:root {
  --ink: #07080c;
  --panel: #0e1016;
  --line: rgba(255, 255, 255, 0.09);
  --text: #e8eaef;
  --muted: #8b93a3;
  --accent: #3d9b7a;
  --accent-soft: #5ec4a0;
}

html { font-feature-settings: 'ss01', 'kern'; scroll-behavior: smooth; }

body {
  opacity: 0;
  animation: pageIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.04s forwards;
  background: var(--ink);
  color: var(--text);
  margin: 0;
}
@keyframes pageIn { to { opacity: 1; } }

.page-bg {
  background:
    radial-gradient(ellipse 65% 45% at 78% 20%, rgba(61, 155, 122, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 8% 88%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    linear-gradient(165deg, #0b0c11 0%, #07080c 45%, #050608 100%);
  min-height: 100vh;
}

/* WebGL */
#webgl-canvas {
  position: fixed;
  top: 0;
  right: 0;
  width: 58vw;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(32px, 16px, 0) scale(0.94);
  filter: blur(4px);
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.85s ease;
}
#webgl-canvas.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}
#webgl-canvas.is-revealed {
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

.story-glow {
  position: fixed;
  top: 14%;
  right: 4%;
  width: min(48vw, 580px);
  height: min(68vh, 640px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 155, 122, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.story-glow.is-active { opacity: 1; transform: scale(1); }

@media (max-width: 767px) {
  #webgl-canvas {
    width: 100vw;
    height: 44vh;
    top: auto;
    bottom: 0;
    transform: translate3d(0, 20px, 0) scale(0.94);
  }
  #webgl-canvas.is-active {
    opacity: 0.6;
    transform: translate3d(0, 0, 0) scale(1);
  }
  .story-text-col { padding-bottom: 46vh !important; }
  .story-glow {
    top: auto; bottom: 4%; right: 50%;
    transform: translateX(50%) scale(0.88);
    width: 82vw; height: 36vh;
  }
  .story-glow.is-active { transform: translateX(50%) scale(1); }
}

/* Nav */
.glass {
  background: rgba(7, 8, 12, 0.78);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

#navbar {
  --nav-full: 4rem;
  --nav-peek: 0.75rem;
  transform: translateY(calc(-1 * (var(--nav-full) - var(--nav-peek))));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
#navbar.expanded { transform: translateY(0); }
#navbar .nav-content { opacity: 0; transition: opacity 0.3s ease 0.08s; }
#navbar.expanded .nav-content { opacity: 1; }
#navbar .nav-peek-line {
  position: absolute; bottom: 0.28rem; left: 50%; transform: translateX(-50%);
  width: 1.75rem; height: 1.5px; border-radius: 1px;
  background: rgba(255,255,255,0.28);
  transition: opacity 0.25s ease;
}
#navbar.expanded .nav-peek-line { opacity: 0; }

.logo-mark {
  background: linear-gradient(145deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.03) 100%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.logo-general {
  font-family: Outfit, sans-serif;
  font-weight: 400;
  letter-spacing: 0.22em;
  font-size: 0.5625rem;
  text-transform: uppercase;
  color: var(--muted);
}
.logo-pen {
  font-family: Outfit, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 0.9375rem;
  color: #fff;
}

/* Hero */
#hero-video { will-change: transform; }

.hero-fade {
  background: linear-gradient(
    to bottom,
    rgba(7, 8, 12, 0.4) 0%,
    transparent 26%,
    rgba(7, 8, 12, 0.5) 58%,
    rgba(7, 8, 12, 0.92) 84%,
    var(--ink) 100%
  );
}

.brand-hero {
  font-family: Outfit, sans-serif;
  font-weight: 600;
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: #fff;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.brand-hero .line { display: block; overflow: hidden; }
.brand-hero .line-inner { display: block; transform: translateY(110%); }

.hero-title {
  font-family: Outfit, sans-serif;
  font-weight: 400;
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: rgba(232, 234, 239, 0.88);
}

.hero-lead {
  max-width: 28rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}

.anim-fade { opacity: 0; transform: translateY(18px); }

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  font-family: Outfit, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #06110c;
  background: linear-gradient(165deg, #7ed9b8 0%, #5ec4a0 45%, #3d9b7a 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -2px 0 rgba(0, 0, 0, 0.18) inset,
    0 10px 28px rgba(61, 155, 122, 0.35),
    0 4px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, filter 0.28s ease;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-3px);
  filter: brightness(1.05);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 16px 36px rgba(61, 155, 122, 0.4),
    0 8px 14px rgba(0, 0, 0, 0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.2rem;
  font-family: Outfit, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(232, 234, 239, 0.85);
  background: linear-gradient(160deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.28s ease, border-color 0.28s ease, color 0.28s ease;
  text-decoration: none;
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(94, 196, 160, 0.4);
  transform: translateY(-2px);
}

.cta-row { perspective: 800px; }

@keyframes drift {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(5px); opacity: 0.7; }
}
.scroll-hint { animation: drift 2.6s ease-in-out infinite; }

/* Story */
#story { position: relative; z-index: 10; }

.story-pin {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.story-layout {
  display: grid;
  grid-template-columns: 1fr;
  height: 100vh;
  max-width: 90rem;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .story-layout { grid-template-columns: 42% 58%; }
}

.story-text-col {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 5.5rem 1.5rem 2rem;
}
@media (min-width: 768px) {
  .story-text-col { padding: 5.5rem 1.5rem 2rem 3.25rem; }
}

.story-card-col { position: relative; z-index: 15; }
@media (max-width: 767px) { .story-card-col { display: none; } }

.story-station {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: inherit;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0);
  will-change: transform, opacity;
  pointer-events: none;
}
.story-station.is-on { pointer-events: auto; }

.station-card {
  position: relative;
  max-width: 26rem;
  padding: 1.75rem 1.5rem 1.75rem 1.6rem;
  background: linear-gradient(155deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 55%, rgba(0,0,0,0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 20px 50px rgba(0, 0, 0, 0.4);
}
.station-card::before {
  content: '';
  position: absolute;
  left: 0; top: 12%; bottom: 12%;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent-soft), transparent);
  opacity: 0.7;
}

.station-card.is-hero-station {
  max-width: 28rem;
  border-color: rgba(94, 196, 160, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(61, 155, 122, 0.08);
}

.swipe-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: Outfit, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.swipe-badge em {
  font-style: normal;
  color: rgba(232, 234, 239, 0.35);
  font-weight: 500;
}

.draw-progress {
  margin-top: 1.25rem;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.draw-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  box-shadow: 0 0 12px rgba(94, 196, 160, 0.5);
  transition: width 0.1s linear;
}

.station-title {
  font-family: Outfit, sans-serif;
  font-size: clamp(1.625rem, 3.4vw, 2.35rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
}
.station-title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  margin-right: 0.28em;
}
.station-title .word-inner {
  display: inline-block;
  transform: translateY(110%);
}

.station-body {
  margin-top: 0.9rem;
  max-width: 24rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}

.station-meta {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  font-family: Outfit, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 234, 239, 0.42);
}
.station-meta span { position: relative; padding-left: 0.85rem; }
.station-meta span::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 4px; height: 4px;
  margin-top: -2px;
  background: var(--accent);
}

#laser-beam {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
#laser-beam.is-active { opacity: 1; }
.laser-path {
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 1;
  stroke-linecap: round;
  filter: url(#laser-glow);
  opacity: 0.7;
}
.laser-path-glow {
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.16;
}
.laser-dot-end { fill: #fff; filter: url(#laser-dot-glow); }
.laser-dot-start { fill: var(--accent-soft); opacity: 0.85; }

.story-progress {
  position: absolute;
  left: 1.5rem;
  bottom: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 30;
}
@media (min-width: 768px) { .story-progress { left: 3.25rem; } }

.progress-dot {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.35s ease, height 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}
.progress-dot.is-active {
  background: var(--accent-soft);
  height: 22px;
  box-shadow: 0 0 12px rgba(94, 196, 160, 0.45);
}
.progress-dot.is-hero {
  height: 8px;
}
.progress-dot.is-hero.is-active {
  height: 28px;
}

.swipe-hint {
  position: absolute;
  left: 1.5rem;
  bottom: 5.5rem;
  font-family: Outfit, sans-serif;
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  z-index: 30;
}
@media (min-width: 768px) { .swipe-hint { left: 3.25rem; } }

.contact-panel {
  background: linear-gradient(155deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.015) 55%, rgba(0,0,0,0.2) 100%);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 24px 60px rgba(0, 0, 0, 0.45);
}

.field {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) inset;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.field::placeholder { color: rgba(139, 147, 163, 0.75); }
.field:focus {
  outline: none;
  border-color: rgba(94, 196, 160, 0.45);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) inset, 0 0 0 3px rgba(61, 155, 122, 0.12);
}

.nav-link { position: relative; text-decoration: none; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent-soft);
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  body { opacity: 1; }
  #webgl-canvas { display: none; }
  .story-station { opacity: 1; visibility: visible; transform: none; position: relative; margin-bottom: 4rem; }
  .story-pin { height: auto; }
  #story { height: auto !important; }
  .brand-hero .line-inner,
  .station-title .word-inner { transform: none; }
  .anim-fade { opacity: 1; transform: none; }
}

/* ── Password gate ── */
body.is-locked {
  overflow: hidden;
}
body.is-locked #site-root {
  visibility: hidden;
  pointer-events: none;
}

#gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(61, 155, 122, 0.1) 0%, transparent 55%),
    #07080c;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
#gate.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  width: min(100%, 22rem);
  padding: 2rem 1.75rem;
  background: linear-gradient(155deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 24px 60px rgba(0,0,0,0.5);
}

.gate-label {
  font-family: Outfit, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.gate-title {
  margin: 0.75rem 0 0;
  font-family: Outfit, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
}

.gate-hint {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

.gate-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gate-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  font-family: Outfit, sans-serif;
  font-size: 0.9375rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.gate-input:focus {
  border-color: rgba(94, 196, 160, 0.5);
  box-shadow: 0 0 0 3px rgba(61, 155, 122, 0.12);
}
.gate-input.is-error {
  border-color: rgba(255, 120, 120, 0.55);
  animation: gateShake 0.35s ease;
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.gate-error {
  min-height: 1.1rem;
  margin: 0;
  font-size: 0.75rem;
  color: #f0a0a0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gate-error.is-visible { opacity: 1; }

.gate-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  font-family: Outfit, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #06110c;
  background: linear-gradient(165deg, #7ed9b8 0%, #5ec4a0 45%, #3d9b7a 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(61, 155, 122, 0.3);
  transition: transform 0.25s ease, filter 0.25s ease;
}
.gate-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
