/* =============================================================
   Nik — link-in-bio
   Mobile-first. Dark background, one warm accent, big type,
   lots of whitespace. No framework, no build step.

   Want a different accent colour? Change --accent below.
   ============================================================= */

:root {
  --bg:        #0b0b0d;   /* near-black background          */
  --surface:   #141417;   /* subtle card lift               */
  --text:      #f5f3ef;   /* warm off-white                 */
  --muted:     #a09a92;   /* secondary text                 */
  --accent:    #ff6a3d;   /* the one warm accent colour     */
  --accent-ink:#1a0d07;   /* text that sits on the accent   */

  --maxw: 26rem;          /* content stays phone-narrow      */
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* Each "screen" fills the viewport and centres its content.
   Uses dvh so mobile browser chrome doesn't clip it. */
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 6vw, 3rem);
  /* respect notches / home indicators */
  padding-top: max(clamp(1.5rem, 6vw, 3rem), env(safe-area-inset-top));
  padding-bottom: max(clamp(1.5rem, 6vw, 3rem), env(safe-area-inset-bottom));
}

.is-hidden { display: none !important; }

/* ---------- Gate (CAPTCHA screen) ---------- */
.gate-inner {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.gate-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

#turnstile-box {
  min-height: 65px; /* reserve space so layout doesn't jump */
  display: flex;
  justify-content: center;
}

.gate-status {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.gate-status.is-error { color: var(--accent); }

/* ---------- Main content (profile) ---------- */
/* Not a centred .screen: a profile can be taller than the viewport,
   so it flows from the top and scrolls naturally. */
.content-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.profile {
  width: 100%;
  max-width: var(--maxw);
  /* Pull up slightly so the socials tuck into the hero's fade, then pad
     the sides and bottom (the hero handles the top, full-bleed). */
  margin: -0.5rem auto 0;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem)
             max(clamp(1.5rem, 6vw, 2.5rem), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  position: relative;
  z-index: 1;
}

/* Hero photo: full-bleed, no box, fades into the page background */
.hero {
  position: relative;
  width: 100%;
  height: clamp(380px, 56vh, 560px);
  overflow: hidden;
}
/* On phones the card is NOT a box — hero + profile just flow normally */
.card { display: contents; }
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 4rem 1rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  /* Bottom fades fully to the page bg so the photo dissolves in — no seam */
  background: linear-gradient(to top,
    var(--bg) 0%,
    rgba(11, 11, 13, 0.75) 26%,
    rgba(11, 11, 13, 0) 68%);
}
.name {
  margin: 0;
  font-size: clamp(2.6rem, 13vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.55);
}
.handle {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 500;
}

/* Social buttons */
.socials {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
}
.social {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.social svg { width: 24px; height: 24px; fill: #141417; }
.social:active { transform: translateY(1px) scale(0.97); }
@media (hover: hover) { .social:hover { opacity: 0.85; } }

.bio {
  margin: 0;
  max-width: 22rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.open-hint {
  /* Negative top margin pulls the hint closer to the bio above it */
  margin: -0.5rem 0 0;
  padding: 0.7rem 0.9rem;
  width: 100%;
  max-width: 22rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}
.open-hint strong { color: var(--text); font-weight: 700; }
.open-hint-icon { color: var(--accent); font-weight: 700; margin-right: 0.15rem; }
.dots {
  display: inline-block;
  font-weight: 900;
  transform: scaleY(1.2);
  color: var(--accent);
  padding: 0 0.1rem;
}

/* CTA as an image card (the main action) */
.cta-card {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(160px, 27vh, 230px);
  margin-top: 0.15rem;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cta-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}
.cta-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.25) 55%,
    rgba(0, 0, 0, 0.45) 100%);
}
.cta-ico {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cta-ico svg {
  width: 18px; height: 18px;
  stroke: #fff; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.cta-label {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  text-align: left;
  color: #fff;
  font-size: clamp(1.15rem, 5.2vw, 1.42rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}
.cta-card:active { transform: translateY(1px) scale(0.995); }
@media (hover: hover) {
  .cta-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

/* Visible keyboard focus */
.social:focus-visible,
.cta-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Gentle reveal when content appears */
#content:not(.is-hidden) .profile { animation: rise 0.5s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #content .profile { animation: none !important; }
  .cta-card, .social { transition: none; }
}

/* ---------- Desktop / tablet only (>= 600px) ----------
   Phones (< 600px) are untouched — the full-bleed mobile layout stays
   exactly as-is. On wider screens, keep everything in a centred
   phone-width column so the hero doesn't stretch the whole window and
   upscale (which looked soft/pixelated). */
@media (min-width: 600px) {
  /* Desktop: hero + profile become a rounded card floating on a blurred,
     full-viewport copy of the photo. The blur lives inside #content only,
     so the CAPTCHA gate never shows the photo. */
  .content-screen {
    position: relative;
    align-items: center;         /* centre the card horizontally */
    justify-content: safe center; /* float it vertically, scroll-safe */
  }
  .content-screen::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url("hero.jpg") center / cover no-repeat;
    filter: blur(42px) brightness(0.5);
    transform: scale(1.12);      /* hide the blur's soft transparent edges */
  }
  .card {
    display: block;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
    margin-block: clamp(1.5rem, 5vh, 3rem);
    background: var(--bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
  .hero { height: 460px; }
}
