/* ============ Design tokens ============ */
:root {
  --bg: #060608;
  --text: #f4f4f5;
  --muted: #9d9da8;
  --faint: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.04);
  --accent-1: #4ade80;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(100deg, var(--accent-1), var(--accent-2));
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --radius: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  /* clip, not hidden — hidden would create a scroll container and break
     the sticky hero pin */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(74, 222, 128, 0.35); }

/* ============ Atmosphere ============ */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  animation: drift 22s ease-in-out infinite alternate;
}
.orb-1 { width: 46vw; height: 46vw; top: -14vw; right: -10vw; background: radial-gradient(circle, rgba(74,222,128,0.5), transparent 65%); }
.orb-2 { width: 40vw; height: 40vw; bottom: -12vw; left: -12vw; background: radial-gradient(circle, rgba(34,211,238,0.4), transparent 65%); animation-delay: -8s; }
.orb-3 { width: 26vw; height: 26vw; top: 42%; left: 58%; background: radial-gradient(circle, rgba(74,222,128,0.22), transparent 65%); animation-delay: -15s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-4vw, 3vw) scale(1.12); }
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--faint) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black, transparent);
}

main, .footer { position: relative; z-index: 3; }

/* ============ Glass ============ */
.glass {
  background: var(--glass);
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: clamp(14px, 4vw, 38px);
  padding: 10px 14px 10px 22px;
  background: rgba(10, 10, 14, 0.55);
  border: 1px solid var(--faint);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  width: max-content;
  max-width: calc(100vw - 24px);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo .dot {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; gap: clamp(12px, 2.5vw, 26px); }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--faint);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-btn.active {
  background: var(--accent-grad);
  color: #04140a;
}

/* ============ Hero ============ */
/* The section is a tall scroll runway; .hero-pin sticks to the viewport
   while the scroll-driven intro (name split + chips) plays out. */
.hero {
  position: relative;
  height: 280vh;
  padding: 0;
}

.hero-pin {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 110px 20px 0;
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(10rem, 34vw, 34rem);
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.05);
  user-select: none;
  white-space: nowrap;
}

.hero-stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-name {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 12.5vw, 11rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
  text-align: center;
}

.hero-name .line { display: block; white-space: nowrap; }

.hero-name .line .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotate(6deg);
  animation: letter-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes letter-in {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.line-back {
  position: relative;
  z-index: 1;
  color: var(--text);
}

.line-front {
  position: relative;
  z-index: 3;
  margin-top: -0.06em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(244, 244, 245, 0.9);
  transition: color 0.4s ease, -webkit-text-stroke-color 0.4s ease;
}
.line-front:hover {
  color: transparent;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 2px transparent;
}

.portrait-wrap {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: clamp(300px, 46vw, 580px);
  pointer-events: none;
}

.portrait-glow {
  position: absolute;
  bottom: -6%;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.32), rgba(34, 211, 238, 0.12) 45%, transparent 70%);
  filter: blur(30px);
}

.fchip {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  opacity: 0;
  padding: 12px 18px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--faint);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  will-change: transform, opacity;
}
.fc-2 {
  color: #04140a;
  background: var(--accent-grad);
  border-color: transparent;
}

.portrait {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.06);
  mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  animation: portrait-in 1s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes portrait-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-bottom {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 34px 0 60px;
  opacity: 0;
  animation: fade-up 0.9s 0.9s ease forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 26px;
}
.tagline em {
  font-style: normal;
  font-weight: 600;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: var(--accent-grad);
  color: #04140a;
  box-shadow: 0 8px 30px rgba(74, 222, 128, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(74, 222, 128, 0.45);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--faint);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-2px); }

.btn-lg { padding: 17px 34px; font-size: 1.05rem; }

.scroll-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  z-index: 4;
}
.scroll-hint span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--accent-1);
  animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0; }
}

/* ============ Sections shared ============ */
section { padding: clamp(70px, 10vw, 130px) 20px; max-width: 1100px; margin: 0 auto; }
.hero { max-width: none; }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.section-title .accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 10px;
}

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: clamp(50px, 7vw, 90px);
  padding-bottom: 0;
}
.stat {
  padding: 34px 28px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.stat:hover { transform: translateY(-5px); border-color: rgba(74, 222, 128, 0.35); }
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }

/* ============ LOCK-IN ============ */
.lockin-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(50px, 8vw, 90px) clamp(24px, 6vw, 80px);
}
.lockin-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  aspect-ratio: 2/1;
  background: radial-gradient(ellipse, rgba(74, 222, 128, 0.22), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.lockin-title {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 6.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff, #9d9da8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lockin-desc {
  position: relative;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 460px;
  margin: 18px auto 26px;
}
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.chip {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--faint);
  background: rgba(255, 255, 255, 0.03);
}

/* ============ Story ============ */
/* Timeline 16→19: horizontal with a connecting line on desktop,
   vertical rail on mobile. */
.story .section-title { text-align: center; margin-bottom: 44px; }
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  max-width: 1000px;
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(74, 222, 128, 0.05), rgba(74, 222, 128, 0.5),
    rgba(34, 211, 238, 0.5), rgba(34, 211, 238, 0.05));
}
.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timeline-dot {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent-1);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.45);
  margin-bottom: 28px;
}
.timeline-dot::after {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: var(--accent-grad);
}
.timeline-card { width: 100%; text-align: center; }
.timeline-age {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.timeline-item p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 220px;
  margin: 0 auto;
}
/* placeholder years — filled in later */
.timeline-item.soon .timeline-dot { border-style: dashed; box-shadow: none; }
.timeline-item.soon .timeline-dot::after { opacity: 0.3; }
.timeline-item.soon .timeline-age { opacity: 0.4; }
.timeline-item.soon p { opacity: 0.45; font-style: italic; }
/* gentle left-to-right stagger on reveal */
.timeline-item:nth-child(2) { transition-delay: 0.08s; }
.timeline-item:nth-child(3) { transition-delay: 0.16s; }
.timeline-item:nth-child(4) { transition-delay: 0.24s; }

/* ============ Connect ============ */
.connect { text-align: center; }
.connect-sub { color: var(--muted); margin-bottom: 40px; }
.socials { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.94rem;
  padding: 15px 26px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.social svg { color: var(--accent-1); flex-shrink: 0; }
.social:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

/* ============ Footer ============ */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 36px;
  border-top: 1px solid var(--faint);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-motto { opacity: 0.8; }

/* Fallback when sticky is unsupported: no runway, chips shown statically */
.no-sticky .hero { height: auto; }
.no-sticky .hero-pin { height: auto; min-height: 100vh; min-height: 100svh; }

/* ============ Reveal on scroll ============ */
.reveal, .reveal-left, .reveal-right, .reveal-zoom {
  opacity: 0;
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal { transform: translateY(28px); }
.reveal-left { transform: translateX(-64px); }
.reveal-right { transform: translateX(64px); }
.reveal-zoom { transform: translateY(44px) scale(0.93); }
.reveal.visible, .reveal-left.visible, .reveal-right.visible, .reveal-zoom.visible {
  opacity: 1;
  transform: none;
}

/* ============ Reduced motion ============ */
/* Self-playing animations become instant; the pinned hero story stays —
   it is scroll-driven, so the user controls all motion themselves. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-name .line .ch, .portrait, .hero-bottom { opacity: 1; transform: none; }
  .reveal, .reveal-left, .reveal-right, .reveal-zoom { opacity: 1; transform: none; }
}

/* ============ Responsive ============ */
@media (max-width: 720px) {
  .nav { gap: 12px; padding: 8px 10px 8px 16px; border-radius: 14px; }
  .nav-links { display: none; }

  .hero { height: 240vh; }
  .hero-pin { padding-top: 90px; }
  .hero-name { font-size: clamp(3.2rem, 17.5vw, 5.5rem); }
  .portrait-wrap { width: clamp(250px, 70vw, 370px); }
  .hero-watermark { font-size: 42vw; }

  .stats { grid-template-columns: 1fr; }

  /* timeline turns vertical: rail on the left, text to the right.
     The rail is drawn per item (dot to next dot) so it ends cleanly
     at the last dot instead of running past it. */
  .timeline { display: flex; flex-direction: column; gap: 40px; }
  .timeline::before { display: none; }
  .timeline-item { flex-direction: row; align-items: flex-start; gap: 22px; }
  .timeline-item::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 28px;
    bottom: -50px;
    width: 1px;
  }
  .timeline-item:nth-child(1)::before { background: rgba(74, 222, 128, 0.4); }
  .timeline-item:nth-child(2)::before {
    background: linear-gradient(180deg, rgba(74, 222, 128, 0.4), rgba(34, 211, 238, 0.4));
  }
  .timeline-item:nth-child(3)::before { background: rgba(34, 211, 238, 0.4); }
  .timeline-item:last-child::before { display: none; }
  .timeline-dot { margin-bottom: 0; margin-top: 10px; }
  .timeline-card { text-align: left; }
  .timeline-age { margin-bottom: 8px; }
  .timeline-item p { max-width: none; margin: 0; }
  .timeline-item:nth-child(n) { transition-delay: 0s; }
  .footer { justify-content: center; text-align: center; }

  /* squared-off look on mobile — clickable buttons keep the round
     desktop pill shape and size */
  .glass { border-radius: 8px; }
  .chip { border-radius: 5px; }
  .fchip { border-radius: 6px; padding: 8px 12px; font-size: 0.72rem; z-index: 2; }
  .scroll-hint { border-radius: 8px; }
}
