:root {
  --bg: #f3f3f0;
  --stage: #e7e7e3;
  --ink: #0f1012;
  --graphite: #0f1012;
  --muted: #7d7e7b;
  --body: #46484a;
  --accent: #f5b014;
  --head: "Instrument Sans", system-ui, sans-serif;
  --text: "Work Sans", system-ui, sans-serif;
  --gutter: clamp(20px, 3.2vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

/* ---------- film grain ---------- */
.grain {
  position: fixed; inset: -50%;
  z-index: 100; pointer-events: none;
  opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--text); font-weight: 600; font-size: 14px;
  border: 0; border-radius: 999px; cursor: pointer;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn__arrow {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 14px;
  transition: transform .25s ease;
}
.btn:hover .btn__arrow { transform: rotate(45deg); }
.btn--pill { background: #fff; color: var(--ink); padding: 6px 6px 6px 20px; }
.btn--accent { background: var(--accent); color: var(--ink); font-size: 15px; padding: 7px 7px 7px 24px; }
.btn--accent .btn__arrow { width: 34px; height: 34px; }
.btn--accent:hover { background: #ffc233; }
.btn--lg { height: 58px; padding-left: 28px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px var(--gutter);
  color: #fff;
  transition: color .35s ease;
}
.nav__logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--head); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.nav__glyph { width: 30px; aspect-ratio: 388 / 240; background: currentColor; -webkit-mask: url(assets/logo.svg) center / contain no-repeat; mask: url(assets/logo.svg) center / contain no-repeat; }
.nav .btn { justify-self: end; }
.nav__pill {
  display: flex; align-items: center; gap: 18px;
  padding: 11px 26px; border-radius: 999px;
  background: rgba(10, 11, 12, .3);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transition: background .35s ease;
}
.nav__pill a { opacity: .85; transition: opacity .2s; }
.nav__pill a:hover { opacity: 1; }
.nav__pill i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.nav[data-theme="light"] { color: var(--ink); }
.nav[data-theme="light"] .nav__pill { background: rgba(15, 16, 18, .07); }
.nav[data-theme="light"] .btn--nav { background: var(--ink); color: #fff; }
.nav[data-theme="light"] .btn--nav .btn__arrow { background: var(--accent); color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  background: #14110e; color: #fff;
  display: flex; align-items: flex-end;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 68% 50%;
  animation: settle 2.6s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes settle { from { transform: scale(1.09); } to { transform: scale(1); } }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 10, .72) 0%, rgba(8, 9, 10, .4) 34%, rgba(8, 9, 10, 0) 62%),
    linear-gradient(0deg, rgba(8, 9, 10, .5) 0%, rgba(8, 9, 10, 0) 30%),
    linear-gradient(180deg, rgba(8, 9, 10, .4) 0%, rgba(8, 9, 10, 0) 22%);
}
.hero__copy {
  position: relative; z-index: 2;
  padding: 0 var(--gutter) clamp(64px, 10vh, 110px);
  max-width: 980px;
  animation: rise 1.2s .25s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: rgba(255, 255, 255, .62); margin-bottom: 22px; }
.hero h1 {
  font-family: var(--head); font-weight: 500;
  font-size: clamp(54px, 8.6vw, 140px); line-height: .94; letter-spacing: -.05em;
  color: #fff; max-width: 9ch;
}
.hero__sub { margin: 26px 0 34px; max-width: 30ch; font-size: 19px; line-height: 1.45; color: rgba(255, 255, 255, .76); }
.hero__scroll { position: absolute; z-index: 2; right: var(--gutter); bottom: 26px; width: 1px; height: 56px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.hero__scroll span { display: block; width: 100%; height: 40%; background: #fff; animation: drip 2s ease-in-out infinite; }
@keyframes drip { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

/* ---------- shared type ---------- */
.label { font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; }
.label--dark { color: rgba(255, 255, 255, .5); }
h2 {
  font-family: var(--head); font-weight: 500;
  font-size: clamp(38px, 5.6vw, 82px); line-height: 1.02; letter-spacing: -.045em;
}
h3 { font-family: var(--head); font-weight: 500; letter-spacing: -.025em; }

/* ---------- vision ---------- */
.vision { padding: clamp(110px, 18vh, 200px) var(--gutter); max-width: 1280px; margin: 0 auto; }
.vision h2 { max-width: 16ch; }
.vision__body { margin-top: 36px; max-width: 46ch; font-size: 20px; line-height: 1.5; color: var(--body); }

/* ---------- product orbit ---------- */
.product { position: relative; height: 520vh; background: var(--stage); }
.product__sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 92px var(--gutter) 34px;
  background: radial-gradient(90% 70% at 50% 42%, #f4f4f1 0%, var(--stage) 70%);
}
.product__label { margin: 0; }
.product__stage { position: relative; display: grid; place-items: center; min-height: 0; }
.stage3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s ease; }
.has-3d .stage3d {
  opacity: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent), linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent), linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}
.has-3d .orbit { visibility: hidden; }
.orbit {
  position: relative; aspect-ratio: 16 / 9;
  width: min(100%, calc((100svh - 330px) * 16 / 9));
  perspective: 1500px; perspective-origin: 50% 45%;
}
.orbit__floor {
  position: absolute; left: 14%; right: 14%; bottom: 3%; height: 7%;
  background: radial-gradient(closest-side, rgba(15, 16, 18, .34), transparent);
  filter: blur(10px); will-change: transform, opacity;
}
.view {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; will-change: transform, opacity;
  user-select: none; -webkit-user-drag: none;
}
.view--crop {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
}
.product__row {
  display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2.4fr) minmax(150px, 1fr);
  gap: clamp(20px, 4vw, 64px); align-items: end;
  padding-top: 20px; border-top: 1px solid rgba(15, 16, 18, .14);
}
.product__count { font-family: var(--head); font-size: clamp(48px, 5.4vw, 84px); font-weight: 500; letter-spacing: -.06em; line-height: 1; display: flex; flex-wrap: wrap; align-items: baseline; }
.product__total { font-size: .3em; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.product__count small { flex-basis: 100%; margin-top: 12px; font-family: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.product__texts { display: grid; }
.step { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 48px); align-items: end; opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.step h3 { font-size: clamp(28px, 3vw, 46px); line-height: 1.04; }
.step p { font-size: 17px; line-height: 1.5; color: var(--body); max-width: 34ch; }
.product__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; text-align: right; }
.product__dots { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
.product__dots li { width: 26px; height: 3px; border-radius: 2px; background: rgba(15, 16, 18, .16); transition: background .3s, width .3s; }
.product__dots li.is-active { background: var(--ink); width: 48px; }
.product__note { font-size: 11px; color: var(--muted); }

/* ---------- about ---------- */
.about { padding: clamp(100px, 16vh, 180px) var(--gutter); max-width: 1280px; margin: 0 auto; }
.about__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: clamp(56px, 9vh, 100px); border-top: 1px solid rgba(15, 16, 18, .16); }
.about__grid article { padding: 30px 32px 10px 0; }
.about__grid article + article { padding-left: 32px; border-left: 1px solid rgba(15, 16, 18, .16); }
.about__grid span { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .12em; background: var(--accent); color: var(--ink); padding: 2px 8px; border-radius: 4px; }
.about__grid h3 { font-size: 26px; line-height: 1.1; margin: 20px 0 12px; }
.about__grid p { color: var(--body); max-width: 30ch; }

/* ---------- contact ---------- */
.contact { background: var(--graphite); color: #fff; padding: clamp(110px, 18vh, 200px) var(--gutter); position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; right: -12%; top: -34%; width: 70vw; height: 70vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 176, 20, .2), transparent 62%); pointer-events: none;
}
.contact__inner { position: relative; max-width: 1280px; margin: 0 auto; }
.contact h2 { font-size: clamp(56px, 9.4vw, 140px); letter-spacing: -.055em; line-height: .96; }
.contact__sub { margin-top: 32px; max-width: 42ch; font-size: 19px; color: rgba(255, 255, 255, .62); }
.form { margin-top: 56px; max-width: 760px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { margin-bottom: 22px; }
.field span { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 17px; color: #fff;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px; padding: 16px 18px; outline: none; transition: border-color .2s, background .2s;
  appearance: none; -webkit-appearance: none; resize: vertical;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, .3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: rgba(255, 255, 255, .09); }
.form__msg { min-height: 1.5em; margin-top: 18px; font-size: 15px; color: rgba(255, 255, 255, .7); }
.form__msg.is-ok { color: #9be39b; }
.form__msg.is-err { color: #ff9a7a; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- footer ---------- */
.footer {
  background: var(--graphite); color: rgba(255, 255, 255, .5);
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between;
  padding: 28px var(--gutter); font-size: 13px;
}
.footer .nav__logo { color: #fff; font-size: 18px; }
.footer .nav__glyph { width: 24px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__pill { display: none; }
  .hero__img { object-position: 72% 50%; }
  .hero__shade { background: linear-gradient(0deg, rgba(8, 9, 10, .85) 0%, rgba(8, 9, 10, .35) 55%, rgba(8, 9, 10, .35) 100%); }
  .hero__scroll { display: none; }
  .product { height: 480vh; }
  .product__sticky { padding: 84px var(--gutter) 22px; }
  .orbit { width: 100%; }
  .product__row { grid-template-columns: 1fr; gap: 14px; }
  .product__count { font-size: 44px; }
  .product__count small { flex-basis: auto; margin: 0 0 0 14px; }
  .step { grid-template-columns: 1fr; gap: 8px; }
  .step h3 { font-size: 26px; }
  .step p { font-size: 16px; }
  .product__aside { align-items: flex-start; text-align: left; }
  .product__note { display: none; }
  .about__grid { grid-template-columns: 1fr; }
  .about__grid article, .about__grid article + article { padding: 28px 0; border-left: 0; }
  .about__grid article + article { border-top: 1px solid rgba(15, 16, 18, .16); }
  .form__row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .hero__img, .hero__copy, .hero__scroll span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
