/* links.css: the link-in-bio page (charleslesula.com/links).
   Builds on tokens.css, base.css and components.css (buttons, screenshot viewer).
   Sized for a phone held in one hand, inside the Instagram or TikTok app. */

/* ---------- Page ---------- */

/* The red glow at the top, behind the avatar. Fixed, so it stays put while the list scrolls. */
.lb-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 45% at 50% -6%, rgba(229, 37, 33, 0.30), transparent 70%),
    radial-gradient(50% 35% at 85% 105%, var(--glow-soft), transparent 70%);
}

/* One centered column: 20px side gutters on phones, never wider than 480px.
   The extra padding keeps content clear of notches and the home bar (needs viewport-fit=cover). */
.lb {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: min(100% - 40px, 480px);
  min-height: 100dvh;
  margin-inline: auto;
  padding:
    calc(var(--space-7) + env(safe-area-inset-top)) 0
    calc(var(--space-6) + env(safe-area-inset-bottom));
}

/* ---------- Profile ---------- */
.lb-head {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  text-align: center;
}

/* Circle photo with a thin red ring and a soft glow under it */
.lb-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 0 0 5px var(--bg),
    0 0 0 6px rgba(229, 37, 33, 0.6),
    0 20px 50px -14px var(--glow);
}

.lb-name {
  margin-top: var(--space-2);
  font-size: clamp(1.75rem, 7.5vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: var(--track-display);
}
.lb-role {
  color: var(--text-muted);
  font-size: var(--fs-body);
  line-height: 1.4;
}

/* ---------- Proof chip: a number that opens its screenshot ---------- */
.lb-proof {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  margin-top: var(--space-2);
  padding: 0.4rem 1rem 0.4rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.lb-proof:hover { border-color: rgba(255, 90, 84, 0.5); background: rgba(229, 37, 33, 0.07); }
.lb-proof:active { transform: scale(0.98); }
.lb-proof-num {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(229, 37, 33, 0.16);
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lb-proof-text { display: grid; gap: 0.15rem; }
.lb-proof-label { font-size: var(--fs-small); line-height: 1.3; color: var(--text-muted); }

/* ---------- Primary action ---------- */
.lb-cta {
  --btn-h: 64px;
  justify-content: space-between;
  width: 100%;
  padding: 0 1.5rem;
  white-space: normal;
  text-align: left;
}
.lb-cta-text { display: grid; gap: 0.3rem; }
.lb-cta-label { font-size: 1.0625rem; font-weight: 700; }
.lb-cta-sub { font-size: var(--fs-small); font-weight: 500; opacity: 0.85; }
.lb-cta .arrow { font-size: 1.25rem; }

/* ---------- Link cards ---------- */
.lb-links { display: grid; gap: var(--space-3); }

.lb-link {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 64px;
  padding: 0.625rem 1rem 0.625rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.lb-link:hover { border-color: var(--line-strong); background: var(--surface-2); }
.lb-link:active { transform: scale(0.98); }

.lb-link-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--red-text);
}
.lb-link-icon svg { width: 22px; height: 22px; }
.lb-link-text { display: grid; gap: 0.15rem; min-width: 0; }
.lb-link-title { font-weight: 600; line-height: 1.3; }
.lb-link-sub { font-size: var(--fs-small); line-height: 1.35; color: var(--text-muted); }
.lb-link-arrow { color: var(--text-faint); transition: transform var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.lb-link:hover .lb-link-arrow { color: var(--text); transform: translateX(3px); }

/* Placeholder cards: clearly marked in drafts. They never go live as dead links:
   check_site.py lists any that are left, and each one gets a real URL or comes out before deploying. */
.lb-tag {
  margin-left: 0.4rem;
  padding: 0.15rem 0.45rem;
  border: 1px dashed rgba(255, 90, 84, 0.55);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-text);
  vertical-align: 0.15em;
}
.lb-link[data-placeholder] { border-style: dashed; }

/* ---------- Socials and footer ---------- */
.lb-socials { display: flex; justify-content: center; gap: var(--space-3); }
.lb-socials a {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.lb-socials a:hover { color: var(--text); border-color: rgba(255, 90, 84, 0.5); background: rgba(229, 37, 33, 0.08); }
.lb-socials svg { width: 20px; height: 20px; }

.lb-foot {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  font-size: var(--fs-label);
  color: var(--text-faint);
}
.lb-foot a { display: inline-block; margin-block: -12px; padding: 12px 4px; color: var(--text-muted); text-underline-offset: 3px; }

/* ---------- Motion: a short fade-up on load, one item after another ----------
   Pure CSS. Reduce Motion (or ?motion=off) shows everything at once. */
@keyframes lb-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.lb-rise {
  animation: lb-rise var(--dur-slow) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
html.motion-off .lb-rise { animation: none; }
