:root {
  --black: #000000;
  --obsidian: #101012;
  --gunmetal: #292b2e;
  --titanium: #bfc2c7;
  --platinum: #f5f5f7;
  --pad: clamp(22px, 5vw, 84px);
  --ease: cubic-bezier(.16, .8, .14, 1);
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Inter, Arial, sans-serif;
  --text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--black); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--platinum);
  font-family: var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
::selection { background: var(--titanium); color: var(--black); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; z-index: 40; left: var(--pad); top: -60px; padding: 10px 14px; background: var(--platinum); color: var(--black); font: 500 12px var(--text); text-decoration: none; }
.skip:focus { top: 12px; }

/* fixed stage */
.gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; pointer-events: none; }
.poster {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; display: none;
  background: #000 url("../assets/novanix-logo.png") no-repeat 74% 18% / 420% auto;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 88%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 88%);
}
.no-gl .gl { display: none; }
.no-gl .poster { display: block; }
main { position: relative; z-index: 1; }

/* signature + chapter index: difference blend keeps them legible on black and on platinum */
.top {
  position: fixed; z-index: 30; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + clamp(18px, 2.6vw, 30px)) var(--pad) 0;
  mix-blend-mode: difference; color: #fff; pointer-events: none;
}
.sig, .soon { pointer-events: auto; color: inherit; text-decoration: none; font: 600 11.5px/1 var(--display); letter-spacing: .5em; text-transform: uppercase; }
.sig { padding: 8px 0; }
.soon { font-weight: 500; font-size: 10px; letter-spacing: .36em; opacity: .62; }
.sig:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }

.chapter {
  position: fixed; z-index: 30; right: var(--pad); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  mix-blend-mode: difference; color: #fff; font: 500 10px/1 var(--display); letter-spacing: .2em; opacity: .7;
}
.chapter i { width: 1px; height: 46px; background: currentColor; opacity: .35; }

/* shared type */
h1, h2 { margin: 0; font-family: var(--display); font-weight: 500; color: var(--platinum); }
.idx { margin: 0 0 clamp(16px, 2.4vh, 26px); font: 500 10px/1 var(--display); letter-spacing: .36em; text-transform: uppercase; color: var(--titanium); }
.idx span { margin-left: 1.3em; opacity: .6; }

.lines > span { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.lines > span > span { display: block; transform: translate3d(0, 108%, 0); transition: transform 1.25s var(--ease); }
.lines.in > span > span { transform: none; }
.lines.in > span:nth-child(2) > span { transition-delay: .09s; }
.lines.in > span:nth-child(3) > span { transition-delay: .18s; }

/* 01 — first impression */
.s1 { position: relative; height: 100vh; height: 100svh; }
.s1::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 0% 100%, rgba(0, 0, 0, .78), transparent 58%);
}
.s1-copy { position: absolute; left: var(--pad); bottom: clamp(40px, 9vh, 112px); }
h1 { font-size: clamp(50px, 8.6vw, 156px); line-height: .9; letter-spacing: -.052em; }
h1 > span:nth-child(3) > span { color: var(--titanium); }
.edition {
  margin: 0 0 clamp(16px, 2.6vh, 28px); display: flex; gap: 1.4em; align-items: baseline;
  font: 500 10px/1 var(--display); letter-spacing: .36em; text-transform: uppercase; color: var(--platinum);
  opacity: 0; animation: cuein 1.2s .5s var(--ease) forwards;
}
.edition span:last-child { color: var(--titanium); opacity: .7; letter-spacing: .24em; }
.daily {
  margin: clamp(16px, 2.6vh, 26px) 0 0; font: 400 clamp(13px, 1vw, 15px)/1.4 var(--text); color: var(--titanium);
  opacity: 0; animation: cuein 1.2s 1.1s var(--ease) forwards;
}
.tilt {
  position: absolute; right: var(--pad); top: clamp(84px, 13svh, 120px); z-index: 5;
  padding: 11px 16px; border: 1px solid rgba(191, 194, 199, .3); background: rgba(16, 16, 18, .55); color: var(--platinum);
  font: 500 9.5px/1 var(--display); letter-spacing: .32em; text-transform: uppercase; border-radius: 999px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tilt[hidden] { display: none; }
.cue {
  position: absolute; right: var(--pad); bottom: clamp(30px, 6vh, 64px); display: flex; align-items: center; gap: 14px;
  font: 500 9.5px/1 var(--display); letter-spacing: .42em; text-transform: uppercase; color: var(--titanium);
  opacity: 0; animation: cuein 1s 1.6s var(--ease) forwards;
}
.cue i { width: 46px; height: 1px; background: linear-gradient(90deg, var(--titanium), transparent); transform-origin: left; animation: cue 2.6s 2s var(--ease) infinite; }
@keyframes cuein { to { opacity: .8; } }
@keyframes cue { 0% { transform: scaleX(0); } 55% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* 02 — precision */
.s2 { position: relative; height: 280vh; }
.s2-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; }
.s2-copy { position: absolute; right: clamp(64px, 9vw, 160px); top: 22vh; text-align: right; }
.s2-copy h2 { font-size: clamp(42px, 6.8vw, 120px); line-height: .92; letter-spacing: -.05em; }
.wipe > span { display: block; clip-path: inset(-.1em calc((1 - var(--w, 0)) * 101%) -.15em 0); }
.wipe > span:nth-child(3) { color: var(--titanium); }

/* 03 — the possibility: an endless field of NX pieces to the horizon */
.s3 { position: relative; height: 440vh; }
/* constellation names, placed under their letters by main.js */
.cons { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.lbl { position: absolute; left: 0; top: 0; opacity: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; width: 160px; will-change: transform, opacity; }
.lbl b { font: 500 11px/1 var(--display); letter-spacing: .34em; text-transform: uppercase; color: var(--platinum); padding-left: .34em; }
.lbl span { font-size: 12px; line-height: 1.35; color: var(--titanium); max-width: 150px; }
.cons-now { display: none; }
.s3-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.s3-copy { position: absolute; left: var(--pad); top: clamp(96px, 15vh, 170px); max-width: 60vw; }
.s3-copy h2 { font-size: clamp(42px, 6.8vw, 120px); line-height: .92; letter-spacing: -.05em; }
.s3-copy h2 > span:nth-child(2) > span { color: var(--titanium); }
.cap { margin: clamp(18px, 2.8vh, 30px) 0 0; font: 400 clamp(14px, 1.1vw, 17px)/1.5 var(--text); color: var(--titanium); opacity: 0; transform: translateY(10px); transition: opacity 1s var(--ease) .35s, transform 1s var(--ease) .35s; }
.s3-copy.in .cap { opacity: 1; transform: none; }
.s3-copy .idx { opacity: 0; transition: opacity .8s var(--ease); }
.s3-copy.in .idx { opacity: 1; }

/* 04 — the signature */
.s4 { position: relative; height: 220vh; }
.s4-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; }
.s4-fallback { display: none; }
.no-gl .s4-fallback { display: block; position: absolute; left: 50%; top: 40%; width: min(110vw, 1500px); height: auto; transform: translate(-50%, -50%); }
.s4-copy { position: absolute; left: 50%; bottom: clamp(70px, 14vh, 150px); transform: translateX(-50%); width: calc(100vw - 2 * var(--pad)); text-align: center; }
.sign {
  font-size: clamp(26px, 3.3vw, 54px); line-height: 1.05; letter-spacing: var(--ls, .18em); opacity: var(--o, 0);
  color: var(--platinum);
}
.acts { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: clamp(22px, 3.4vh, 38px); }
.forge {
  position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 13px 22px 13px 14px;
  border: 1px solid rgba(191, 194, 199, .34); border-radius: 999px; background: rgba(16, 16, 18, .4); color: var(--platinum);
  font: 500 10.5px/1 var(--display); letter-spacing: .34em; text-transform: uppercase; cursor: pointer;
  user-select: none; -webkit-user-select: none; touch-action: none; -webkit-touch-callout: none;
  opacity: var(--c, 0); transition: border-color .4s var(--ease), background-color .4s var(--ease), transform .4s var(--ease);
}
.forge i {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--platinum) calc(var(--h, 0) * 360deg), rgba(191, 194, 199, .22) 0);
  -webkit-mask: radial-gradient(circle, transparent 6.5px, #000 7px); mask: radial-gradient(circle, transparent 6.5px, #000 7px);
}
.forge:hover { border-color: rgba(245, 245, 247, .8); }
.forge.on { background: rgba(245, 245, 247, .1); border-color: var(--platinum); transform: scale(.97); }
.forge:focus-visible { outline: 1px solid var(--platinum); outline-offset: 5px; }
.forge[hidden] { display: none; }
.cta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 15px 28px; border: 1px solid rgba(191, 194, 199, .34); color: var(--platinum); text-decoration: none;
  font: 500 10.5px/1 var(--display); letter-spacing: .34em; text-transform: uppercase;
  background: linear-gradient(180deg, rgba(245, 245, 247, .05), rgba(245, 245, 247, 0));
  opacity: var(--c, 0); transform: translateY(calc((1 - var(--c, 0)) * 10px));
  transition: border-color .5s var(--ease), background-color .5s var(--ease);
}
.cta::after { content: ""; width: 22px; height: 1px; background: currentColor; transition: width .6s var(--ease); }
.cta:hover { border-color: rgba(245, 245, 247, .85); background-color: rgba(245, 245, 247, .07); }
.cta:hover::after { width: 34px; }
.cta:focus-visible { outline: 1px solid var(--platinum); outline-offset: 5px; }
.cta[hidden] { display: none; }
.cta[aria-disabled="true"] { cursor: default; }
.cta[aria-disabled="true"]::after { display: none; }
.cta small { letter-spacing: .12em; text-transform: none; color: var(--titanium); }
.foot {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--pad) calc(env(safe-area-inset-bottom) + clamp(14px, 2.4vh, 22px));
  display: flex; justify-content: center; opacity: var(--c, 0);
  color: #6c6f75; font: 500 9.5px/1 var(--display); letter-spacing: .32em; text-transform: uppercase;
}

/* mobile: composed, not shrunk */
@media (max-width: 760px) {
  .chapter { display: none; }
  .soon { letter-spacing: .26em; font-size: 9.5px; }
  .sig { letter-spacing: .42em; font-size: 11px; }
  h1 { font-size: clamp(46px, 14.4vw, 72px); }
  .s1-copy { bottom: clamp(70px, 13svh, 120px); }
  .cue { left: var(--pad); right: auto; bottom: clamp(26px, 5svh, 44px); }
  .s2 { height: 220vh; }
  .s2-copy { right: var(--pad); left: var(--pad); top: auto; bottom: 14svh; text-align: left; }
  .s2-copy h2 { font-size: clamp(42px, 12.6vw, 64px); }
  .s3 { height: 420vh; }
  .lbl { width: 90px; }
  .lbl b { font-size: 9.5px; letter-spacing: .26em; padding-left: .26em; }
  .lbl span { display: none; }
  .cons-now { display: flex; flex-direction: column; align-items: center; gap: 8px; position: fixed; z-index: 1; left: var(--pad); right: var(--pad); bottom: clamp(64px, 12svh, 110px); opacity: 0; pointer-events: none; text-align: center; }
  .cons-now b { font: 500 11px/1 var(--display); letter-spacing: .34em; text-transform: uppercase; color: var(--platinum); padding-left: .34em; }
  .cons-now span { font-size: 14px; color: var(--titanium); }
  .s3-copy { max-width: none; right: var(--pad); top: clamp(84px, 13svh, 130px); }
  .s3-copy h2 { font-size: clamp(40px, 12vw, 60px); }
  .s4 { height: 190vh; }
  .s4-copy { bottom: clamp(70px, 13svh, 120px); }
  .sign { font-size: clamp(24px, 7.2vw, 36px); white-space: nowrap; }
}

/* portrait tablets use the portrait camera, so they get the portrait copy placement too */
@media (min-width: 761px) and (max-aspect-ratio: 4/5) {
  .s2-copy { right: var(--pad); left: var(--pad); top: auto; bottom: 12vh; text-align: left; }
  .s3-copy { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lines > span > span { transition: none; }
  .cue, .cue i { animation: none; opacity: .8; }
  .edition, .daily { animation: none; opacity: 1; }
  .cap { transition: none; }
}
