/* C Laser
   Layout: a fixed WebGL stage sits behind the page. The "story" sections are
   transparent and let it show; the "sheet" sections are opaque and slide over it. */

:root {
  --white: #ffffff;
  --mist: #eef6f7;
  --mist-deep: #dcecef;
  --rule: #d3e3e6;
  --ink: #17313b;
  --body: #47606a;
  --quiet: #6d858e;
  --teal: #4da8bf;
  --teal-deep: #2e7f92;
  --slate: #294652;
  --slate-deep: #1f3742;
  --red: #e26d62;

  --font: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(20px, 4.4vw, 64px);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--slate);
  color: var(--body);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
a { color: inherit; text-decoration: none; }
sup { font-size: .5em; line-height: 0; position: relative; top: -.55em; vertical-align: baseline; }
svg { display: block; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 8px; background: var(--white); color: var(--ink);
  transition: top .2s;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
h1, h2, h3, h4 { color: var(--ink); font-weight: 500; }
h1 { font-size: clamp(44px, 6.3vw, 96px); line-height: 1.02; letter-spacing: -.028em; }
h2 { font-size: clamp(32px, 3.5vw, 54px); line-height: 1.08; letter-spacing: -.022em; }
h3 { font-size: clamp(22px, 1.9vw, 28px); line-height: 1.2; letter-spacing: -.012em; }
h4 { font-size: 18px; line-height: 1.3; }
p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }

.label { color: var(--teal-deep); font-size: 16px; font-weight: 500; margin-bottom: 18px; }
.lede { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; }
.lede--ink { color: var(--body); max-width: 40em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 26px; border-radius: 999px;
  font-size: 16px; font-weight: 500; white-space: nowrap;
  transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--mist); }
.btn--nav { height: 44px; padding: 0 22px; background: var(--white); color: var(--ink); }

.textlink { font-size: 16px; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.textlink span { transition: transform .25s var(--ease); }
.textlink:hover span { transform: translateX(4px); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

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

.pins { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pin {
  position: absolute; left: 0; top: 0; opacity: 0;
  color: var(--ink); font-size: 13.5px; font-weight: 500; line-height: 1; white-space: nowrap;
  will-change: transform, opacity;
}
.pin i {
  position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 4px rgba(255, 255, 255, .7);
}
.pin span { position: absolute; left: 12px; top: -.5em; display: flex; align-items: center; gap: 9px; }
.pin span::before { content: ""; width: 30px; height: 1px; background: currentColor; opacity: .45; }
.notes { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stage-note {
  position: absolute; bottom: 24px; opacity: 0; padding: 7px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, .82); color: var(--body); font-size: 13px; line-height: 1.3;
}
.stage-note { left: var(--gutter); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--nav-h); color: var(--white);
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.nav__inner {
  height: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: clamp(20px, 3.2vw, 48px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__name { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.nav__links { display: flex; gap: clamp(16px, 2.2vw, 32px); margin-right: auto; }
.nav__links a { font-size: 15.5px; font-weight: 500; opacity: .86; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.nav__toggle { display: none; background: none; border: 0; padding: 10px 0 10px 10px; font-size: 15.5px; font-weight: 500; cursor: pointer; }

.nav[data-theme="dark"].is-scrolled { background: rgba(38, 65, 76, .74); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav[data-theme="light"] { color: var(--ink); }
.nav[data-theme="light"].is-scrolled { background: rgba(255, 255, 255, .86); box-shadow: 0 1px 0 rgba(23, 49, 59, .07); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav[data-theme="light"] .btn--nav { background: var(--teal-deep); color: var(--white); }
.nav[data-theme="light"] .btn--nav:hover { background: #276f80; }

/* ---------- Story ---------- */
main { position: relative; z-index: 1; overflow-x: clip; }
.story { position: relative; }

.beat { position: relative; min-height: 125vh; display: flex; align-items: center; }
/* In-page links land with the chapter centered, not with its top edge under the header */
.story .beat:not(.beat--hero) { scroll-margin-top: calc(-12.5vh - var(--nav-h)); }
.beat--hero { min-height: 100vh; min-height: 100svh; padding-top: var(--nav-h); }
.beat .wrap { position: relative; z-index: 1; }
/* A soft clearing behind the copy, so nothing in the scene competes with it */
.story .beat--right .beat__text { position: relative; }
.story .beat--right .beat__text::before {
  content: ""; position: absolute; inset: -70px -110px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(247, 251, 251, .84) 38%, rgba(247, 251, 251, 0));
}
.beat__text { width: min(500px, 41vw); }
.beat--hero .beat__text { width: min(640px, 48vw); }
.beat--right .beat__text { margin-left: auto; }

.beat__text > p + p { margin-top: 16px; }
.beat__text h1 + .lede { margin-top: 28px; }
.beat__text h2 + p { margin-top: 22px; }
.beat--hero h1, .beat--hero .lede { color: var(--white); }
.beat--hero .lede { opacity: .92; max-width: 34em; }
.beat--hero .actions { margin-top: 36px; color: var(--white); }
.fineprint { margin-top: 34px !important; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .78); }

.cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 1; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(255, 255, 255, .78); font-size: 13px; font-weight: 500; letter-spacing: .02em;
}
.cue i { width: 1px; height: 34px; background: linear-gradient(rgba(255, 255, 255, .8), rgba(255, 255, 255, 0)); transform-origin: top; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 35% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-height: 719px) { .cue { display: none; } }

.aside { margin-top: 22px !important; padding-left: 16px; border-left: 2px solid var(--rule); font-size: 15.5px; line-height: 1.55; color: var(--quiet); }

.keylist { margin-top: 28px; border-top: 1px solid var(--rule); }
.keylist li { display: grid; grid-template-columns: 12px minmax(120px, auto) 1fr; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.keylist i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.keylist b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.keylist span { color: var(--body); }

.figures { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.figures div { padding: 14px 16px 0 0; }
.figures div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.figures dt { font-size: 13.5px; color: var(--quiet); }
.figures dd { margin-top: 2px; color: var(--ink); font-size: 22px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }

/* ---------- Sheets ---------- */
.sheet { position: relative; z-index: 2; background: var(--white); padding: clamp(88px, 11vw, 160px) 0; }
.sheet--mist { background: var(--mist); }
.sheet--lead { border-radius: 32px 32px 0 0; box-shadow: 0 -24px 60px rgba(23, 49, 59, .06); }
.sheet--tail { border-radius: 0 0 32px 32px; }
.sheet__head { max-width: 860px; }
.sheet__head h2 + .lede { margin-top: 24px; }

/* Technology: sticky visual, scrolling items */
.tech { margin-top: clamp(40px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 112px); align-items: start; }
.tech__visual { position: sticky; top: calc(var(--nav-h) + 4vh); aspect-ratio: 1 / 1; max-height: calc(100vh - var(--nav-h) - 8vh); border-radius: 28px; background: var(--mist); overflow: hidden; justify-self: stretch; }
.tech__visual svg { width: 100%; height: 100%; }
.tech__items li { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; opacity: .3; transition: opacity .5s; }
.tech__items li.is-active { opacity: 1; }
.tech__kicker { color: var(--teal-deep); font-size: 16px; font-weight: 500; margin-bottom: 10px; }
.tech__items h3 { font-size: clamp(30px, 3vw, 46px); line-height: 1.08; letter-spacing: -.02em; }
.tech__items h3 + p { margin-top: 18px; max-width: 28em; }

.viz { opacity: 0; transition: opacity .6s var(--ease); }
.tech__visual[data-active="wavelength"] .viz[data-viz="wavelength"],
.tech__visual[data-active="pulse"] .viz[data-viz="pulse"],
.tech__visual[data-active="power"] .viz[data-viz="power"] { opacity: 1; }
.viz__num { fill: var(--ink); font-size: 92px; font-weight: 500; letter-spacing: -.035em; }
.viz__unit { fill: var(--teal-deep); font-size: 34px; letter-spacing: -.01em; }
.viz__sup { font-size: 44px; }
.viz__cap { fill: var(--body); font-size: 16px; }
.viz__ticks text, .viz__tag { fill: var(--quiet); font-size: 13.5px; }
.viz__tag--ink { fill: var(--ink); font-weight: 500; }
.viz__axis { stroke: #b9d0d5; stroke-width: 1.5; stroke-linecap: round; }
.viz__band { fill: #b9dbe3; }
.viz__wave { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease) .1s; }
.tech__visual[data-active="wavelength"] .viz__wave { stroke-dashoffset: 0; }
.viz__marker line { stroke: var(--ink); stroke-width: 1.5; }
.viz__marker circle { fill: var(--white); stroke: var(--ink); stroke-width: 2; }
.viz__marker--dot circle { fill: var(--red); stroke: var(--white); stroke-width: 2.5; }
.viz__marker { transform: translateX(-60px); opacity: 0; transition: transform 1s var(--ease) .15s, opacity .6s .15s; }
.tech__visual[data-active="wavelength"] [data-viz="wavelength"] .viz__marker,
.tech__visual[data-active="power"] [data-viz="power"] .viz__marker { transform: none; opacity: 1; }
.viz__pulses rect { fill: var(--red); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .6s var(--ease); }
.tech__visual[data-active="pulse"] .viz__pulses rect { transform: none; }
.viz__pulses rect:nth-child(2) { transition-delay: .05s; }
.viz__pulses rect:nth-child(3) { transition-delay: .1s; }
.viz__pulses rect:nth-child(4) { transition-delay: .15s; }
.viz__pulses rect:nth-child(5) { transition-delay: .2s; }
.viz__pulses rect:nth-child(6) { transition-delay: .25s; }
.viz__pulses rect:nth-child(7) { transition-delay: .3s; }
.viz__pulses rect:nth-child(8) { transition-delay: .35s; }

.spec { margin-top: clamp(48px, 7vw, 104px); }
.spec__title { margin-bottom: 20px; }
.spec__table { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.spec__table div { padding: 22px 24px 24px 0; border-bottom: 1px solid var(--rule); }
.spec__table dt { font-size: 14.5px; color: var(--quiet); }
.spec__table dd { margin-top: 4px; color: var(--ink); font-size: 21px; font-weight: 500; letter-spacing: -.01em; }
.spec__note { margin-top: 22px; max-width: 62em; font-size: 14.5px; line-height: 1.55; color: var(--quiet); }

/* Science */
.timeline { margin-top: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: repeat(6, 1fr); }
.timeline li { position: relative; padding: 30px 22px 0 0; border-top: 1px solid #c3d9de; }
.timeline li::before { content: ""; position: absolute; left: 0; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.timeline__year { display: block; color: var(--ink); font-size: clamp(26px, 2.3vw, 34px); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.timeline p { margin-top: 12px; font-size: 15.5px; line-height: 1.5; }
.timeline__next::before { background: var(--red) !important; box-shadow: 0 0 0 5px rgba(226, 109, 98, .18); }
.timeline__next p { color: var(--ink); }

.stand { margin-top: clamp(56px, 8vw, 120px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 64px); padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid #c3d9de; }
.stand__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.stand h4 { margin-bottom: 10px; }
.stand p { font-size: 16.5px; }

/* Company */
.company { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 112px); align-items: end; }
.company__main h2 { max-width: 15em; }
.company__main h2 + p { margin-top: 28px; }
.company__main p { max-width: 36em; }
.company__main p + p { margin-top: 16px; }
.founder { padding: 30px 32px 14px; border-radius: 24px; background: var(--mist); }
.founder__role { color: var(--teal-deep); font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.founder ul { margin-top: 20px; }
.founder li { padding: 13px 0; border-top: 1px solid var(--rule); font-size: 15.5px; line-height: 1.4; }

.facts { margin-top: clamp(48px, 7vw, 96px); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.facts div { padding: 22px 24px 0 0; }
.facts dt { font-size: 14.5px; color: var(--quiet); }
.facts dd { margin-top: 4px; color: var(--ink); font-size: 21px; font-weight: 500; letter-spacing: -.01em; }

/* ---------- Closing ---------- */
.beat--closing { min-height: 78vh; align-items: center; padding: 132px 0 100px; margin-top: -32px; z-index: 1; }
.closing { width: min(620px, 50vw); }
.closing h2 { color: var(--white); font-size: clamp(36px, 4.6vw, 68px); letter-spacing: -.026em; line-height: 1.04; }
.closing .lede { margin-top: 24px; color: rgba(255, 255, 255, .9); max-width: 30em; }
.closing .actions { margin-top: 34px; }
.closing__mail { color: rgba(255, 255, 255, .86); font-size: 16px; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 2; background: var(--slate-deep); color: rgba(255, 255, 255, .78); padding: clamp(56px, 7vw, 88px) 0 36px; font-size: 15.5px; }
.footer .brand { color: var(--white); }
.footer__top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; }
.footer__brand p { margin-top: 14px; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__col h4 { color: var(--white); font-size: 15.5px; margin-bottom: 6px; }
.footer__col a { transition: color .2s; }
.footer__col a:hover { color: var(--white); }
.footer__col address { line-height: 1.55; }
.footer__legal { margin-top: clamp(40px, 6vw, 72px); padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px 40px; font-size: 13.5px; line-height: 1.55; color: rgba(255, 255, 255, .62); }
.footer__legal p:last-child { text-align: right; }

/* ---------- Reveals ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(18px); filter: blur(6px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
.js [data-split] .w {
  display: inline-block; opacity: 0; transform: translateY(.3em); filter: blur(10px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
  transition-delay: calc(var(--i) * 55ms);
}
.js [data-split].is-in .w { opacity: 1; transform: none; filter: none; }

/* ---------- Without WebGL ---------- */
.no-webgl #stage, .no-webgl .pins, .no-webgl .notes { display: none; }
.no-webgl .beat--hero, .no-webgl .beat--closing { background: linear-gradient(160deg, #294652 0%, #3f6876 55%, #5c8b98 100%); }
.no-webgl .story .beat:not(.beat--hero) { background: linear-gradient(180deg, #ffffff, var(--mist)); }

/* ---------- Mid-width screens ---------- */
@media (max-width: 1099px) {
  .beat__text { width: min(460px, 44vw); }
  .beat--hero .beat__text { width: min(560px, 56vw); }
  .story .beat--right .beat__text::before { inset: -60px -56px; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .stand { grid-template-columns: 1fr; }
  .company { gap: 36px; }
  .footer__top { gap: 28px; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 719px) {
  body { font-size: 17px; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: var(--nav-h); margin: 0; padding: 8px var(--gutter) 20px;
    flex-direction: column; gap: 0; background: var(--white); color: var(--ink);
    box-shadow: 0 18px 40px rgba(23, 49, 59, .12); display: none;
  }
  .nav__links a { padding: 14px 0; border-top: 1px solid var(--rule); font-size: 17px; opacity: 1; }
  .nav.is-open .nav__links { display: flex; }
  .nav.is-open { background: var(--white); color: var(--ink); }
  .btn--nav { margin-left: auto; height: 40px; padding: 0 18px; font-size: 15px; }
  .nav.is-open .btn--nav { background: var(--teal-deep); color: var(--white); }
  .nav__toggle { display: block; }
  .pins { display: none; }
  .stage-note { bottom: auto; top: calc(var(--nav-h) + 12px); }

  .beat { min-height: 135vh; min-height: 135svh; align-items: flex-end; padding-bottom: 9vh; }
  .story .beat:not(.beat--hero) { scroll-margin-top: calc(-35vh - var(--nav-h)); }
  .beat--hero { min-height: 100vh; min-height: 100svh; padding-bottom: 7vh; }
  .beat::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 78%; pointer-events: none;
    background: linear-gradient(to top, rgba(240, 247, 248, .97) 52%, rgba(240, 247, 248, 0));
  }
  .beat--hero::after { background: linear-gradient(to top, rgba(41, 70, 82, .92) 45%, rgba(41, 70, 82, 0)); opacity: calc(1 - var(--k, 0)); }
  .beat--closing::after { display: none; }
  .cue { display: none; }
  .beat__text, .beat--hero .beat__text { width: 100%; max-width: 560px; }
  .story .beat--right .beat__text::before { display: none; }
  .beat--right .beat__text { margin-left: 0; }
  .beat--closing { min-height: 0; align-items: flex-start; padding: 104px 0 46vh; }
  .closing { width: 100%; }

  .tech { grid-template-columns: 1fr; gap: 28px; }
  .tech__visual { position: sticky; top: calc(var(--nav-h) + 8px); max-height: 46vh; aspect-ratio: auto; height: 46vh; z-index: 1; box-shadow: 0 18px 40px rgba(23, 49, 59, .08); }
  .tech__items li { min-height: 44vh; }
  .spec__table { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .stand, .stand__cols { grid-template-columns: 1fr; }
  .company { grid-template-columns: 1fr; align-items: start; }
  .facts { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__legal { grid-template-columns: 1fr; }
  .footer__legal p:last-child { text-align: left; }
}

@media (max-width: 520px) {
  .figures dd { font-size: 18px; }
  .spec__table, .timeline { grid-template-columns: 1fr; }
  .timeline li { padding-right: 0; }
  .footer__top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal], .js [data-split] .w { opacity: 1; transform: none; filter: none; transition: none; }
  .viz, .viz__wave, .viz__marker, .viz__pulses rect, .tech__items li { transition: none; }
  .cue i { animation: none; }
}
