/* ============================================================
   HALIDE — Light, Manufactured
   Art direction: silver-halide film over pristine 3D.
   Charcoal / bone / sodium-amber. Syne + Space Grotesk.
   ============================================================ */

:root {
  --ink: #0b0a08;
  --ink-warm: #17100b;
  --bone: #eae3d6;
  --bone-dim: rgba(234, 227, 214, 0.55);
  --bone-faint: rgba(234, 227, 214, 0.54);
  --sodium: #ffb03a;
  --ember: #ff4b1f;
  --hair: rgba(234, 227, 214, 0.14);

  --font-display: "Syne", "Arial Black", sans-serif;
  --font-body: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(234, 227, 214, 0.25) transparent;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-loading { overflow: hidden; }

::selection { background: var(--sodium); color: var(--ink); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- WebGL stage ---------- */
#stage {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  display: block;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed; top: 0.75rem; left: 50%;
  transform: translate(-50%, -300%);
  z-index: 90;
  background: var(--bone); color: var(--ink);
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.6rem 1.2rem; border-radius: 2rem;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ---------- Focus ---------- */
a, button { outline: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sodium);
  outline-offset: 3px;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 80;
  background: var(--ink);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
}
.preloader__mark {
  position: absolute; top: var(--gutter); left: var(--gutter);
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: 0.34em; font-size: 0.85rem;
  color: var(--bone-dim);
}
.preloader__center { display: grid; justify-items: center; gap: 1.1rem; }
.preloader__counter {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 1; color: var(--bone);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 0.35rem;
}
.preloader__counter em {
  font-style: normal; font-size: 0.22em;
  color: var(--sodium); letter-spacing: 0.2em;
}
.preloader__bar {
  width: min(38vw, 260px); height: 1px;
  background: var(--hair); overflow: hidden;
}
.preloader__bar span {
  display: block; width: 100%; height: 100%;
  background: var(--sodium);
  transform: scaleX(0); transform-origin: left center;
}
.preloader__status {
  font-size: 0.72rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--bone-faint);
}
.preloader__foot {
  position: absolute; bottom: var(--gutter);
  font-size: 0.66rem; letter-spacing: 0.3em;
  color: var(--bone-faint);
}

/* ---------- Custom cursor ---------- */
.cursor { pointer-events: none; display: none; }
body.has-custom-cursor .cursor { display: block; }
.cursor__dot {
  position: fixed; top: 0; left: 0; z-index: 86;
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor__ring {
  position: fixed; top: 0; left: 0; z-index: 85;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.65);
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  will-change: transform;
}
.cursor__label {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; opacity: 0; transform: scale(0.6);
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
}
.cursor__ring.has-label .cursor__label { opacity: 1; transform: scale(1); }
body.has-custom-cursor, body.has-custom-cursor a,
body.has-custom-cursor button { cursor: none; }

/* ---------- Nav ---------- */
.nav-scrim {
  position: fixed; top: 0; left: 0; right: 0; z-index: 39;
  height: 5.5rem; pointer-events: none;
  background: linear-gradient(rgba(11, 10, 8, 0.55), transparent);
}
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--gutter) * 0.6) var(--gutter);
  mix-blend-mode: difference;
  opacity: 0;
}
.nav__mark {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.05rem; letter-spacing: 0.22em;
  color: #fff; text-decoration: none;
}
.nav__mark sup { font-size: 0.5em; letter-spacing: 0; }
.nav__links { display: flex; gap: clamp(1rem, 3vw, 2.6rem); }
.nav__links a {
  color: #fff; text-decoration: none;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500;
  display: inline-flex; gap: 0.45em; align-items: baseline;
  position: relative;
  padding: 0.7rem 0.15rem; margin: -0.7rem -0.15rem;
}
.nav__links a i {
  font-style: normal; font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.5);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: #fff;
  transform: scaleX(0); transform-origin: right center;
  transition: transform 0.45s var(--ease-out);
}
.nav__links a:hover::after, .nav__links a:focus-visible::after {
  transform: scaleX(1); transform-origin: left center;
}
.nav__sound {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: none; border: none; color: #fff;
  font-family: var(--font-body); font-size: 0.78rem;
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500;
  padding: 0.7rem 0.3rem; margin: -0.7rem -0.3rem;
}
.nav__sound-wave { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.nav__sound-wave i {
  width: 2px; height: 3px; background: #fff;
  transition: height 0.3s;
}
.nav__sound[aria-pressed="true"] .nav__sound-wave i { animation: wave 0.9s ease-in-out infinite; }
.nav__sound[aria-pressed="true"] .nav__sound-wave i:nth-child(2) { animation-delay: 0.15s; }
.nav__sound[aria-pressed="true"] .nav__sound-wave i:nth-child(3) { animation-delay: 0.3s; }
.nav__sound[aria-pressed="true"] .nav__sound-wave i:nth-child(4) { animation-delay: 0.45s; }
@keyframes wave { 0%, 100% { height: 3px; } 50% { height: 10px; } }

/* ---------- Shared layout ---------- */
main { position: relative; z-index: 2; }
section { position: relative; }

/* ---------- 01 Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--gutter) clamp(2rem, 6vh, 4.5rem);
  background: linear-gradient(10deg, rgba(11, 10, 8, 0.6) 0%, rgba(11, 10, 8, 0.18) 34%, transparent 55%);
}
.hero__inner { display: grid; gap: clamp(1rem, 2.5vh, 1.8rem); }
.hero__eyebrow {
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--bone-dim);
}
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, min(7.8vw, 17vh), 9rem);
  line-height: 0.98; letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__line { display: block; overflow: hidden; white-space: nowrap; }
.hero__line-inner { display: inline-block; will-change: transform; }
.hero__line-inner .char { display: inline-block; will-change: transform; }
.hero__sub {
  max-width: 34ch; font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: var(--bone-dim);
}
.hero__hint {
  position: absolute; right: var(--gutter); bottom: clamp(2rem, 6vh, 4.5rem);
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.8rem;
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--bone-faint);
  text-align: right;
}
.hero__hint-line {
  width: 1px; height: 64px;
  background: linear-gradient(var(--bone-dim), transparent);
  animation: hint 2.2s var(--ease-out) infinite;
  transform-origin: top center;
}
@keyframes hint {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(20px); opacity: 0; }
}

/* ---------- 02 Product ---------- */
.product { height: 340vh; }
.product__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
}
.product__head {
  position: absolute; top: clamp(5rem, 12vh, 8rem); left: var(--gutter);
  opacity: 0; pointer-events: none;
}
.product__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 5.5vw, 4.6rem);
  letter-spacing: 0.02em; line-height: 1;
}
.product__tag {
  margin-top: 0.6rem; font-size: 0.78rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--sodium);
}
.product__stage {
  position: absolute; right: var(--gutter);
  bottom: clamp(3rem, 10vh, 6rem);
  width: min(40ch, 72vw);
  opacity: 0; pointer-events: none;
}
.product__stage-index {
  font-family: var(--font-display); font-weight: 500;
  font-size: 0.85rem; color: var(--sodium); letter-spacing: 0.22em;
}
.product__stage h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  margin: 0.5rem 0 0.7rem; line-height: 1.05;
}
.product__stage p { color: var(--bone-dim); max-width: 38ch; }

/* ---------- 03 Features ---------- */
.features__viewport {
  height: 100vh; height: 100svh;
  overflow: hidden; position: relative;
}
.features__track {
  display: flex; height: 100%;
  will-change: transform;
}
.feature {
  flex: 0 0 100vw; height: 100%;
  display: flex; align-items: center;
  padding: 0 var(--gutter);
  position: relative;
}
.feature__ghost {
  position: absolute; right: -0.05em; bottom: -0.12em;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(14rem, 44vh, 30rem); line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(234, 227, 214, 0.26);
  pointer-events: none; user-select: none;
}
.feature__body { max-width: 46ch; display: grid; gap: 1.1rem; }
.feature__kicker {
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--sodium);
}
.feature__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
  line-height: 0.96; text-transform: uppercase; letter-spacing: -0.01em;
}
.feature__text { color: var(--bone-dim); font-size: clamp(0.95rem, 1.3vw, 1.1rem); max-width: 36ch; }
.feature__spec {
  padding-top: 1rem; border-top: 1px solid var(--hair);
  font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--bone-faint);
}
.features__progress {
  position: absolute; left: var(--gutter); right: var(--gutter);
  bottom: clamp(1.5rem, 4vh, 2.5rem);
  height: 1px; background: var(--hair);
}
.features__progress span {
  display: block; height: 100%; background: var(--sodium);
  transform: scaleX(0); transform-origin: left center;
}

/* ---------- 04 Field ---------- */
.field { height: 220vh; }
.field__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center; justify-content: center;
}
.field__caption {
  position: absolute;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 3.4rem);
  letter-spacing: 0.01em; text-align: center;
  opacity: 0; pointer-events: none;
}
.field__caption--2 { color: var(--sodium); }

/* ---------- 05 Manifesto ---------- */
.manifesto {
  padding: clamp(8rem, 22vh, 16rem) var(--gutter) clamp(4rem, 10vh, 7rem);
  display: grid; gap: clamp(2.5rem, 6vh, 4rem);
}
.manifesto__kicker {
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--bone-faint);
}
.manifesto__lines { display: grid; gap: clamp(0.4rem, 1.4vh, 1rem); }
.manifesto__line {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.9rem, 5.1vw, 4.6rem);
  line-height: 1.06; letter-spacing: -0.01em;
  width: fit-content;
}
.manifesto__line--indent { margin-left: clamp(2rem, 10vw, 10rem); }
.manifesto__line--accent { color: var(--sodium); }
.manifesto__line .word { display: inline-block; overflow: hidden; vertical-align: top; }
.manifesto__line .word > span { display: inline-block; will-change: transform; }

/* ---------- 06 Outro ---------- */
.outro {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: clamp(4rem, 12vh, 8rem);
}
.outro__cta {
  display: grid; justify-items: center; text-align: center;
  gap: clamp(1.2rem, 3vh, 2rem);
  padding: 0 var(--gutter);
}
.outro__kicker {
  font-size: 0.74rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--bone-dim);
}
.outro__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3rem, 10vw, 9rem);
  line-height: 0.95; letter-spacing: -0.01em;
}
.outro__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 0.5rem; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 1.05rem 2.2rem; border-radius: 3rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
  transition: color 0.35s var(--ease-out), background-color 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out);
  will-change: transform;
}
.btn--solid { background: var(--sodium); color: var(--ink); }
.btn--solid:hover { background: var(--bone); }
.btn--ghost { border: 1px solid rgba(234, 227, 214, 0.4); color: var(--bone); }
.btn--ghost:hover { border-color: var(--sodium); color: var(--sodium); }
.btn__label { display: inline-block; will-change: transform; }

.outro__footer { display: grid; gap: 0; }
.outro__wordmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(4.6rem, 19.5vw, 22rem);
  line-height: 0.78; text-align: center;
  letter-spacing: -0.01em;
  transform: translateY(0.06em);
  color: var(--bone);
  user-select: none;
}
.outro__wordmark sup { font-size: 0.09em; font-weight: 500; letter-spacing: 0; vertical-align: 2.2em; }
.outro__meta {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter) 1.3rem;
  border-top: 1px solid var(--hair);
  background: var(--ink);
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-faint);
}
.outro__mail,
.outro__credit {
  color: var(--bone-dim); text-decoration: none;
  transition: color 0.3s;
  padding: 0.5rem 0; margin: -0.5rem 0;
}
.outro__mail:hover,
.outro__credit:hover { color: var(--sodium); }

/* ---------- Noscript / no-WebGL ---------- */
.noscript {
  position: fixed; inset: auto 0 0 0; z-index: 100;
  padding: 1rem var(--gutter);
  background: var(--sodium); color: var(--ink);
  font-size: 0.85rem; text-align: center;
}
body.no-webgl #stage { display: none; }
body.no-webgl section {
  background: radial-gradient(120% 90% at 50% 0%, var(--ink-warm), var(--ink) 70%);
}
body.no-webgl .preloader { display: none; }
body.no-webgl .nav { opacity: 1; }
body.no-webgl .product { height: auto; }
body.no-webgl .product__sticky { position: static; height: auto; padding: 6rem var(--gutter); }
body.no-webgl .product__head { position: static; margin-bottom: 3rem; }
body.no-webgl .product__stage {
  position: static; opacity: 1; visibility: visible;
  width: auto; margin-bottom: 2.5rem;
}
body.no-webgl .field { height: auto; }
body.no-webgl .field__sticky { position: static; height: auto; padding: 6rem var(--gutter); flex-direction: column; gap: 1rem; }
body.no-webgl .field__caption { position: static; opacity: 1; visibility: visible; }

/* ---------- Mobile / vertical features ---------- */
@media (max-width: 899px) {
  .features__viewport { height: auto; overflow: visible; }
  .features__track { flex-direction: column; height: auto; }
  .feature {
    flex: none; width: 100%; min-height: 88vh;
    padding: clamp(3rem, 10vh, 5rem) var(--gutter);
  }
  .feature__ghost { font-size: clamp(9rem, 40vw, 16rem); right: -0.04em; }
  .features__progress { display: none; }
  .hero__hint { left: var(--gutter); right: auto; align-items: flex-start; text-align: left; }
  .product { height: 300vh; }
  .product__stage { left: var(--gutter); right: var(--gutter); width: auto; bottom: clamp(2.5rem, 8vh, 4rem); }
  .nav__links a i { display: none; }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .nav { opacity: 1; }
  .hero__hint-line { animation: none; opacity: 0.5; transform: none; }
  .nav__sound[aria-pressed="true"] .nav__sound-wave i { animation: none; height: 8px; }
  .features__viewport { height: auto; overflow: visible; }
  .features__track { flex-direction: column; height: auto; }
  .feature { flex: none; width: 100%; min-height: 80vh; padding: clamp(3rem, 10vh, 5rem) var(--gutter); }
  .features__progress { display: none; }
  html { scroll-behavior: auto; }
}
