/* ==========================================================================
   Novae — landing page
   Built from Figma file "Novae" → page "Final"
   ========================================================================== */

:root {
  /* colour */
  --ink: #05060A;
  --ink-2: #0A0912;
  --paper: #D2D4DB;
  --white: #FFFFFF;
  --snow: #F2F4F8;
  --line-dark: #17181B;
  --muted: #A3AAB9;
  --muted-2: #8B93A5;
  --brand: #5C7AFF;
  --violet: #8F6BFF;

  /* type — Matter is used when installed locally, Host Grotesk is the web fallback */
  --sans: "Matter", "Matter TRIAL", "Matter-TRIAL", "Host Grotesk", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* layout */
  --max: 1440px;
  --pad: 64px;
  --section: 260px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* thin brand-blue scrollbar on a dark track */
  scrollbar-width: thin;
  scrollbar-color: var(--brand) #05060A;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #05060A; }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 0; border: 2px solid #05060A; }
::-webkit-scrollbar-thumb:hover { background: #7690FF; }

/* Lenis smooth scrolling (script.js) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }   /* anchor links still glide if the script is unavailable */
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* Figma "Noise" effect: mono, 1.25px grain, white at ~2.5% over everything.
   The tile is generated in script.js (--noise); static, like in Figma. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: var(--noise, none);
  background-size: var(--noise-size, 320px) var(--noise-size, 320px);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

h2 {
  font-size: 56px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.lede {
  max-width: 320px;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 0.01em;
  opacity: 0.75;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Scan-in headlines: a blue block cursor runs along each line, letters appear behind it ---------- */
[data-scan].is-scanning { position: relative; }
.scan-line { display: block; }
.scan-word { white-space: nowrap; }
.is-scanning .scan-ch { opacity: 0; }
.is-scanning .scan-ch.is-on { opacity: 1; }
.scan-cursor {
  position: absolute;
  left: 0; top: 0;
  background: var(--brand);
  pointer-events: none;
}
.scan-cursor.is-blinking { animation: scan-blink .5s steps(1) 2; }
.scan-cursor.is-done { opacity: 0; transition: opacity .2s ease; }
@keyframes scan-blink { 50% { opacity: 0; } }

/* ---------- Button ---------- */
@property --cut  { syntax: "<length>"; inherits: true; initial-value: 14px; }
@property --cut2 { syntax: "<length>"; inherits: true; initial-value: 0px; }
.btn {
  --cut: 14px;                 /* bottom-left diagonal cut of the blue body */
  --cut2: 0px;                 /* top-right cut (used on hover) */
  --tri: 10px;                 /* light corner triangles, sit in the cuts with a thin gap */
  --tri2: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 145px;
  height: 36px;
  padding: 0 20px;
  /* blue body with its bottom-left corner cut off diagonally */
  --fill: var(--brand);
  background: linear-gradient(45deg,
    transparent calc(var(--cut) * .7071),
    var(--fill) 0 calc(100% - var(--cut2) * .7071),
    transparent 0);
  color: #E8EDFA;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: --cut .25s ease, --cut2 .25s ease;
}
.btn::before,
.btn::after {                  /* light corner triangles */
  content: "";
  position: absolute;
  background: #E6EBF8;
  transition: width .25s ease, height .25s ease;
}
.btn::before {                 /* bottom-left, at rest */
  left: 0; bottom: 0;
  width: var(--tri); height: var(--tri);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}
.btn::after {                  /* top-right, on hover */
  right: 0; top: 0;
  width: var(--tri2); height: var(--tri2);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
/* hover: the triangle hops from the bottom-left corner to the top-right one */
.btn:hover { --cut: 0px; --tri: 0px; --cut2: 14px; --tri2: 10px; }

/* ---------- Corner marks ---------- */
.corners { position: relative; }
.corners::before,
.corners::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 0 solid rgba(255, 255, 255, .55);
  pointer-events: none;
  z-index: 2;
}
.corners::before { top: 7px; left: 7px; border-top-width: 1px; border-left-width: 1px; }
.corners::after { right: 7px; bottom: 7px; border-right-width: 1px; border-bottom-width: 1px; }
.corners--dark::before,
.corners--dark::after { border-color: rgba(0, 0, 0, .45); }

/* ---------- Decorative rings ---------- */
.ring-ticks { fill: none; stroke: #F5F3FA; stroke-width: 8; stroke-dasharray: 1 3; opacity: .16; }
.ring-thin  { fill: none; stroke: #F5F3FA; stroke-width: 1; opacity: .12; }

/* ==========================================================================
   Header
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding-block: 32px;
  transition: padding .3s ease;
}
.nav::before {                /* frosted bar, fades in once the page scrolls */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 6, 10, .72);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-dark);
  opacity: 0;
  transition: opacity .3s ease;
}
.nav.is-scrolled { padding-block: 14px; }
.nav.is-scrolled::before { opacity: 1; }
/* over the light sections the bar turns a slightly darker white */
.nav.is-light { color: var(--ink); }
.nav.is-light .nav__logo { color: var(--ink); }
/* Logo mark: four-point "nova" star (also favicon.svg); brand blue, white on the blue footer tile */
.logo-mark { width: 22px; height: 22px; flex: none; fill: var(--brand); }
.footer__logo .logo-mark { width: 20px; height: 20px; fill: #fff; }
.nav.is-light::before { background: rgba(236, 238, 242, .82); border-bottom-color: rgba(5, 6, 10, .08); }
.nav.is-light .nav__toggle span { background: var(--ink); }
.nav, .nav__logo { transition: padding .3s ease, color .3s ease; }
.nav::before { transition: opacity .3s ease, background-color .3s ease; }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--snow);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 36px;
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 48px;                   /* room for the hover index number left of each link */
  font-size: 16px;
  letter-spacing: 0.01em;
}

.nav__menu .btn { font-size: 14px; letter-spacing: 0.05em; }
.nav__toggle { display: none; }

/* ==========================================================================
   Dark zone (hero → patterns)
   ========================================================================== */
.dark { position: relative; }
.dark::before {               /* vertical rails at the content edges */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: max(var(--pad), calc(50% - 656px));
  right: max(var(--pad), calc(50% - 656px));
  border-inline: 1px solid rgba(255, 255, 255, .08);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 85%, transparent);
          mask-image: linear-gradient(#000 85%, transparent);
}
.dark { isolation: isolate; z-index: 1; }   /* lets the glow spill over the light section */
.dark__glow {                 /* U-shaped blue glow: pinned to the screen bottom, docks on the dark/light border */
  --spill: 320px;             /* how far the glow reaches into the light section once docked */
  position: sticky;
  bottom: calc(-1 * var(--spill));
  z-index: -1;
  height: calc(max(80vh, 480px) + var(--spill));
  margin-top: calc(-1 * (max(80vh, 480px) + var(--spill)));
  margin-bottom: calc(-1 * var(--spill));
  pointer-events: none;
  /* one big ellipse centred above: clear inside, a band of blue on its rim, fading out beyond —
     its lowest point dips into the light section, its sides rise up the screen */
  background: radial-gradient(ellipse 130% 100% at 50% 0%,
    rgba(5, 6, 10, 0) 0%, rgba(5, 6, 10, 0) 50%, #061641 64%, #0D2C82 72%, #1E4BBE 78%,
    #3A6CE8 83%, #5B8DFB 88%, rgba(91, 141, 251, .45) 94%, rgba(91, 141, 251, 0) 100%);
  -webkit-mask-image: linear-gradient(transparent, #000 40%);
          mask-image: linear-gradient(transparent, #000 40%);
}

/* ---------- Hero ---------- */
/* The hero always fills one screen. Everything in it is laid out on the 1024px-tall design
   and scaled by --k (one design pixel, relative to the actual hero height). */
.hero {
  --k: calc(100cqh / 1024);
  --gutter: max(var(--pad), 50cqw - 656px);                                /* space beside the content rails */
  --ring: min(700 * var(--k), max(2 * var(--gutter), 560 * var(--k)));    /* rings fit the gutter on wide screens */
  container-type: size;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  max-height: 1200px;
  overflow: hidden;
}
.hero__line {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(245, 243, 250, .06);
}
.hero__rings {                /* centred where the content rails cross the hero line */
  position: absolute;
  width: var(--ring); height: var(--ring);
  top: calc(50% - var(--ring) / 2);
  pointer-events: none;
}
.hero__rings--right { left: calc(100% - var(--gutter) - var(--ring) / 2); clip-path: inset(0 0 50% 50%); }  /* top-right quarter only */
.hero__rings--left  { left: calc(var(--gutter) - var(--ring) / 2); clip-path: inset(50% 50% 0 0); }          /* bottom-left quarter only */
.rings-spin {                  /* the rings turn inside their fixed, clipped frame */
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: ring-spin 60s linear infinite;
}
.hero__rings--left .rings-spin, .modules__rings--right .rings-spin { animation-direction: reverse; }
@keyframes ring-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .rings-spin { animation: none; }
}
.hero__orb {
  position: absolute;
  top: calc(50% - 510.3px);   /* centred exactly on the hero line */
  left: 50%;
  width: 1020.6px;          /* 1.35 × the 756px orb: room for light bursts (orb size unchanged, see script.js) */
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
}
.hero__content {
  position: absolute;
  z-index: 2;
  top: calc(623 * var(--k));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(640 * var(--k)), calc(100% - 2 * var(--pad)));   /* grows with the hero, so the headline stays on 2 lines */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(20 * var(--k));
  text-align: center;
}
.hero h1 {
  font-size: max(40px, 75 * var(--k));
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.hero p {
  max-width: 320px;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 0.01em;
  opacity: .75;
}

/* Hero entrance (classes set in <head> and script.js):
   headline scans in → paragraph + button → orb starts and comes in → rings fade in last.
   Only opacity/scale are animated (cheap, GPU-composited); no blur filter on the WebGL canvas. */
html.js-intro .hero__orb {
  opacity: 0;
  scale: .9;
  transition: opacity 1.2s ease, scale 1.6s cubic-bezier(.16, 1, .3, 1);
  will-change: opacity, scale;
}
html.js-intro .hero__content > p,
html.js-intro .hero__content > .btn {
  opacity: 0;
  translate: 0 14px;
}
html.js-intro .hero__content > p { transition: opacity .9s ease, translate .9s cubic-bezier(.16, 1, .3, 1); }
html.js-intro .hero__content > .btn {
  transition: opacity .9s ease .15s, translate .9s cubic-bezier(.16, 1, .3, 1) .15s, --cut .25s ease, --cut2 .25s ease;
}
/* Rings: unmasked by a rotating sweep along their visible arc, while the ring turns into place.
   Right ring (top-right quarter): clockwise, from its top-left end to its bottom-right end.
   Left ring (bottom-left quarter): from its top-left end down to its bottom-right end. */
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
html.js-intro .hero__rings {
  --sweep: 0deg;
  transition: --sweep 1s cubic-bezier(.65, 0, .35, 1);
}
html.js-intro .hero__rings--right {
  -webkit-mask-image: conic-gradient(from 0deg, #000 calc(var(--sweep) - 8deg), transparent var(--sweep));
          mask-image: conic-gradient(from 0deg, #000 calc(var(--sweep) - 8deg), transparent var(--sweep));
}
html.js-intro .hero__rings--left {
  -webkit-mask-image: conic-gradient(from 180deg, transparent calc(90deg - var(--sweep)), #000 calc(98deg - var(--sweep)) 90deg, transparent 90deg);
          mask-image: conic-gradient(from 180deg, transparent calc(90deg - var(--sweep)), #000 calc(98deg - var(--sweep)) 90deg, transparent 90deg);
}
html.js-intro .hero__rings .rings-spin { transition: rotate 1.2s cubic-bezier(.16, 1, .3, 1); }
html.js-intro .hero__rings--right .rings-spin { rotate: -70deg; }   /* turns clockwise into place */
html.js-intro .hero__rings--left .rings-spin { rotate: 70deg; }     /* turns the other way into place */

html.js-intro.intro-orb .hero__orb { opacity: 1; scale: 1; }
html.js-intro.intro-text .hero__content > p { opacity: .75; translate: none; }   /* same as the other paragraphs */
html.js-intro.intro-text .hero__content > .btn { opacity: 1; translate: none; }
html.js-intro.intro-rings .hero__rings { --sweep: 106deg; }
html.js-intro.intro-rings .hero__rings .rings-spin { rotate: 0deg; }

/* ---------- Logos ---------- */
.logos { position: relative; }
.logos__inner {
  display: flex;
  align-items: center;
  gap: 128px;
  min-height: 96px;
  padding-block: 20px;
}
.logos__label { color: var(--muted-2); flex: none; }
.logos__marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  /* fade: fully hidden at the edges → fully visible 18% in, on both sides */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.logos__track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.logos__marquee:hover .logos__track { animation-play-state: paused; }
@keyframes marquee {            /* moves left → right: the second copy slides into the first one's place */
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .logos__track { animation: none; }
}
.logos__list {
  display: flex;
  flex: none;
  align-items: center;
  gap: 72px;
  padding-right: 72px;          /* same as the gap, so the loop seam is invisible */
  color: var(--muted);
  white-space: nowrap;
}
.logo-halden   { font-family: "Host Grotesk", sans-serif; font-size: 22px; font-weight: 700; }
.logo-tessera  { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: .22em; }
.logo-oakline  { font-family: "Host Grotesk", sans-serif; font-size: 21px; font-weight: 300; letter-spacing: .01em; }
.logo-kestrel  { font-family: "Host Grotesk", sans-serif; font-size: 19px; font-weight: 700; letter-spacing: .08em; }
.logo-meridian { font-family: "Host Grotesk", sans-serif; font-size: 21px; font-weight: 500; }
.logo-vantage    { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-style: italic; }
.logo-northwind  { font-family: var(--mono); font-size: 17px; font-weight: 400; letter-spacing: -.02em; }
.logo-prism      { font-family: "Host Grotesk", sans-serif; font-size: 16px; font-weight: 600; letter-spacing: .34em; }
.logo-lumen      { font-family: "Host Grotesk", sans-serif; font-size: 21px; font-weight: 400; letter-spacing: -.02em; }
.logo-atlas      { font-family: "Host Grotesk", sans-serif; font-size: 20px; font-weight: 700; letter-spacing: -.04em; }
.logo-fieldstone { font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 400; }
.logo-quill      { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: .18em; }

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 64px;
}
.section-head h2 { max-width: 380px; }

/* ---------- Modules ---------- */
.modules {
  container-type: inline-size;  /* lets the rings measure the section width (cqw) */
  position: relative;
  padding-block: var(--section);
  overflow-x: clip;            /* rings may hang below the section, but never widen the page */
}
.modules .container { position: relative; z-index: 1; }
.modules__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 420px);
}
.module {
  grid-column: var(--col);
  grid-row: var(--row);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border: 1px solid var(--line-dark);
  overflow: hidden;
}
.module::before, .module::after,
.patterns__figure::before, .patterns__figure::after { border-color: rgba(255, 255, 255, .22); }   /* same corner marks as the module boxes */
.module__art {
  position: absolute;
  top: 0; left: 50%;
  width: 328px; height: 270px;
  max-width: none;
  transform: translateX(-50%);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.module:hover .module__art { transform: translateX(-50%) scale(1.04); }
.module__lottie {              /* 183×178 Lottie glyph, centred where the static glyphs are drawn (169, 148) */
  position: absolute;
  left: 77.5px; top: 59px;
  width: 183px; height: 178px;
}
.module__lottie--flows {       /* 218×149, centred on the old Flows glyph (163, 154) */
  left: 54px; top: 79.5px;
  width: 218px; height: 149px;
}
.module__lottie--agents {      /* 186×162, centred on the old Agents glyph (162, 151) */
  left: 69px; top: 70px;
  width: 186px; height: 162px;
}
.module__lottie--memory {      /* 245×154, centred on the old Memory glyph (165, 157) */
  left: 42.5px; top: 80px;
  width: 245px; height: 154px;
}
.module__text { position: relative; display: grid; gap: 8px; }
.module__label {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .4;
}
.module h3 { color: var(--snow); font-size: 28px; font-weight: 400; line-height: 35px; }
.module p  { color: var(--muted); font-size: 15px; line-height: 21px; max-width: 280px; }
/* Hover glow: each box lights up from the bottom in its own colour */
@property --glow-a {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}
.module {
  --glow: 143 107 255;
  background:
    /* U: lives in the bottom half only — an ellipse hanging from the middle of the box,
       clear inside, colour on its rim along the bottom edge, curling softly up the sides */
    radial-gradient(ellipse 95% 100% at 50% 0%,
      rgb(var(--glow) / 0) 0%, rgb(var(--glow) / 0) 50%,
      rgb(var(--glow) / calc(.12 * var(--glow-a))) 66%,
      rgb(var(--glow) / calc(.36 * var(--glow-a))) 82%,
      rgb(var(--glow) / calc(.62 * var(--glow-a))) 100%)
      0 100% / 100% 50% no-repeat,
    rgba(5, 6, 10, .15);
  transition: --glow-a .4s ease;
}
.module:hover, .module:focus-within { --glow-a: 1; }
.module--signals { --glow: 245 196 50; }   /* yellow */
.module--flows   { --glow: 143 107 255; }  /* purple */
.module--memory  { --glow: 8 11 207; }     /* #080BCF */
.module--agents  { --glow: 255 138 46; }   /* orange */
.modules__rings {              /* centred where the content rails cross the section's bottom line */
  --gutter: max(var(--pad), 50cqw - 656px);
  --ring: min(700px, max(2 * var(--gutter), 520px));   /* fits beside the content on wide screens */
  position: absolute;
  width: var(--ring); height: var(--ring);
  bottom: calc(2px - var(--ring) / 2);
  pointer-events: none;
}
.modules__rings--left  { left: calc(var(--gutter) - var(--ring) / 2); clip-path: inset(0 50% 50% 0); }         /* top-left quarter */
.modules__rings--right { left: calc(100% - var(--gutter) - var(--ring) / 2); clip-path: inset(50% 0 0 50%); }  /* bottom-right quarter */
.modules__line {
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: rgba(245, 243, 250, .06);
}

/* ---------- Manifesto ---------- */
.manifesto { padding-block: var(--section); }
.manifesto__inner {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
}
.manifesto__ghost,
.manifesto__text { grid-area: 1 / 1; }
.manifesto__ghost {
  max-width: 1140px;
  font-size: 56px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, .06);
  user-select: none;
}
.manifesto__text {
  max-width: 632px;
  font-size: 24px;
  line-height: 36px;
}

/* ---------- Patterns (signals meet) ---------- */
.patterns { padding: var(--section) 0 468px; }
.patterns__inner {
  display: grid;
  grid-template-columns: 680fr 600fr;
  gap: 32px;
  min-height: 768px;
}
.patterns__figure { position: relative; overflow: hidden; background: #0B0812; }
.patterns__planet { position: absolute; inset: 0; }   /* Cell Planet canvas, under the Lottie layers */
.patterns__figure img { width: 100%; height: 100%; object-fit: cover; }
.patterns__anim {              /* Lottie overlay on the image; the open accordion item's layer fades in */
  position: absolute;
  inset: 0;
  contain: strict;             /* its per-frame SVG updates never trigger layout/paint outside the layer */
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility .45s;
  pointer-events: none;
}
.patterns__anim.is-active { opacity: 1; visibility: visible; }
.patterns__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
}
.patterns__body h2 { max-width: 570px; }

.accordion { display: grid; gap: 24px; }
.accordion__item {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  padding-bottom: 24px;
}
.accordion__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-right: 24px;
  text-align: left;
  font-size: 18px;
  line-height: 27px;
  letter-spacing: .01em;
  opacity: .5;
  transition: opacity .2s;
}
.accordion__head:hover,
.is-open > .accordion__head { opacity: 1; }
.pm { position: relative; width: 16px; height: 16px; flex: none; }
.pm::before, .pm::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: currentColor;
  transition: transform .3s ease;
}
.pm::after { transform: rotate(90deg); }
.is-open .pm::after { transform: rotate(0deg); }
.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease;
}
.is-open > .accordion__panel { grid-template-rows: 1fr; }
.accordion__panel > p {
  overflow: hidden;
  max-width: 395px;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: .01em;
  opacity: .75;
}
.is-open > .accordion__panel > p { padding-top: 16px; }

/* ==========================================================================
   Light zone
   ========================================================================== */
.light { background: var(--paper); color: #000; position: relative; }
.light > .container { position: relative; z-index: 2; }   /* above the hero glow spilling over the border */

/* ---------- Integrations ---------- */
.integrations { padding: 468px 0 var(--section); }
.integrations__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
  margin-bottom: 72px;
}
.integrations__head .lede { max-width: 280px; }
.integrations__graph { overflow: hidden; display: flex; justify-content: center; }

/* Orbit: coded illustration — everything is laid out on the 1312×463 design frame and scales with it */
.orbit {
  container-type: inline-size;
  position: relative;
  flex: none;
  width: 100%;
  min-width: 760px;
  aspect-ratio: 1312 / 463;
}
.orbit::before {               /* soft blue bloom behind the node */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 26% 50% at 50% 62%, rgba(92, 122, 255, .38), rgba(92, 122, 255, .12) 55%, rgba(92, 122, 255, 0) 80%);
  pointer-events: none;
}
.orbit__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  fill: none;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
          mask-image: linear-gradient(#000 70%, transparent);
}
.orbit__lines path { vector-effect: non-scaling-stroke; stroke-width: 1px; }
.orbit__arc  { stroke: rgba(5, 6, 10, .28); }
.orbit__mesh { stroke: rgba(5, 6, 10, .13); }
.orbit__beam { stroke: var(--brand); }
.orbit__node { fill: var(--brand); }

.orbit__tools { position: absolute; inset: 0; }
.tool {
  --h: 0;                      /* 0 = resting tile, 1 = highlighted centre tile (set by script.js) */
  position: absolute;
  left: 0; top: 0;
  /* real size change (no scale transform) so the SVG logos are re-rendered crisp */
  width: calc(3.81cqw * (1 + .52 * var(--h)));
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #F7F7F9;
  box-shadow: 0 1px 2px rgba(5, 6, 10, .06);
  color: rgb(calc(var(--h) * 255) calc(var(--h) * 255) calc(var(--h) * 255));
  translate: -50% -50%;
  cursor: pointer;
}
.tool::before {                /* blue fill of the highlighted tile */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand);
  opacity: var(--h);
}
.tool::after {                 /* pale halo square around it */
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  background: rgba(92, 122, 255, .22);
  opacity: var(--h);
}
.tool svg { position: relative; width: 44%; height: 44%; fill: currentColor; }
.tool:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }

.orbit__caption {
  position: absolute;
  left: 50%; top: 82%;
  transform: translateX(-50%);
  width: max-content;
  text-align: center;
  font-size: max(12px, 1.07cqw);
  line-height: 1.4;
  color: rgba(5, 6, 10, .5);
}
.orbit__caption strong { color: #05060A; font-weight: 400; }

/* ---------- Proof ---------- */
.proof { padding-block: var(--section); }
.proof__row { display: grid; min-height: 376px; }
.proof__row--top { grid-template-columns: 1fr 438px; }
.proof__row:not(.proof__row--top) { grid-template-columns: repeat(3, 1fr); }
.tcard, .stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 32px;
  border: 1px solid rgba(0, 0, 0, .1);
  border-top-width: 0;
  border-right-width: 0;
  overflow: hidden;
}
.proof__row--top > * { border-top-width: 1px; }
.proof__row > :last-child { border-right-width: 1px; }
.tcard__company {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 21px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 32px;
}
.tcard__quote { font-size: 23px; line-height: 1.5; }
.tcard__quote--lg { font-size: 26px; }
.tcard__quote--xl { font-size: 34px; max-width: 790px; }
.tcard--dark {
  color: var(--white);
  background: linear-gradient(180deg, #000 25%, #07077A 100%);
  border-color: transparent;
}
.person { display: flex; align-items: center; gap: 16px; }
.person__avatar {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  background: var(--brand);
  color: var(--white);
  font-family: var(--mono);
  font-size: 14px;
}
.person strong { display: block; font-size: 16px; font-weight: 400; line-height: 16px; margin-bottom: 6px; }
.person span:not(.person__avatar) { display: block; font-size: 14px; line-height: 14px; opacity: .5; }

.stat { color: var(--white); }
.stat--uptime     { background: linear-gradient(180deg, #A9B4FF 0%, #94A5FF 35%, #5C7AFF 75%); border-color: transparent; }
.stat--connectors { background: linear-gradient(180deg, #5C7AFF 20%, #A6B4FF 100%); border-color: transparent; }
/* gradients run under the transparent borders, so no repeated blue line shows along the edges */
.proof .tcard, .proof .stat { background-origin: border-box; }
.stat__label {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 21px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
}
.stat__value { display: block; font-size: 108px; line-height: 1; letter-spacing: -0.02em; margin-bottom: 8px; }
.stat__caption { display: block; font-size: 16px; line-height: 24px; opacity: .75; }

/* ---------- Field notes ---------- */
.notes { padding: var(--section) 0 500px; }
.notes__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 96px;
  margin-bottom: 64px;
}
.notes__head .lede { max-width: 310px; }
.notes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.note { display: flex; flex-direction: column; gap: 24px; }
.note img {
  width: 100%;
  aspect-ratio: 416 / 345;
  object-fit: cover;
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
  transition: clip-path .4s ease, filter .4s ease;
}
.note:hover img {
  clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 44px 100%, 0 calc(100% - 44px));
  filter: brightness(1.1) saturate(1.1);
}
.note__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .5;
}
.note h3 { font-size: 22px; font-weight: 400; line-height: 1.35; max-width: 420px; }
.note:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: 300px var(--pad) 560px;   /* text sits high; a tall stretch of planet, then the footer */
  text-align: center;
}
.cta::before {                 /* ∩-shaped blue arc straddling the light/dark border */
  content: "";
  position: absolute;
  top: -420px; left: 0; right: 0;
  height: 1120px;
  pointer-events: none;
  /* one big ellipse centred below the section: dark inside, a band of blue on its rim,
     fading to transparent outside — its crest rises ~200px into the light section,
     its legs fall down the sides of the CTA */
  background: radial-gradient(ellipse 130% 93% at 50% 100%,
    #0B0812 0%, #0B0812 50%, #061641 62%, #0D2C82 71%, #1E4BBE 77%,
    #3A6CE8 82%, #5B8DFB 87%, rgba(91, 141, 251, .45) 93%, rgba(91, 141, 251, 0) 100%);
  -webkit-mask-image: linear-gradient(#000 75%, transparent);
          mask-image: linear-gradient(#000 75%, transparent);
}
/* CTA + footer share one dark background; the Cell Planet runs behind both, under the text */
.finale { position: relative; background: #0B0812; }
.finale__planet {
  position: absolute;
  top: 380px; left: 0; right: 0; bottom: 0;
  z-index: 1;                  /* above the CTA's arch glow, below the CTA text and the footer */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent 0, #000 160px);
          mask-image: linear-gradient(transparent 0, #000 160px);
}
.finale__planet img {          /* fallback when WebGL2 is unavailable */
  position: absolute;
  left: 50%; bottom: 0;
  width: 100%;
  min-width: 1000px;
  max-width: 1440px;
  transform: translateX(-50%);
}
.cta__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
}
.cta h2 {
  max-width: 680px;
  color: var(--snow);
  font-size: 75px;
  line-height: 1.15;
}

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 2; padding: 0 0 48px; }   /* sits over the planet, near the bottom */
.footer__tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.footer__tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
  padding: 36px 36px 40px;
  background: #0D0F17;
}
.footer__tile--brand { background: #1C62F8; color: #fff; }
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: #fff;
}
.footer__tagline { font-size: 22px; line-height: 1.3; color: #fff; }
.footer__cta {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  transition: color .2s;
}
.footer__cta:hover { color: #fff; }
.footer__cta span { display: inline-block; transition: translate .2s ease; }
.footer__cta:hover span { translate: 3px 0; }
.footer__head { display: flex; justify-content: space-between; align-items: baseline; }
.footer__head h4,
.footer__head span {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.footer__head span { color: rgba(139, 147, 165, .5); }
.footer__links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer__links a { font-size: 15px; line-height: 1.2; color: var(--snow); }
.footer__meta { display: flex; align-items: center; gap: 28px; }
.footer__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__status i {
  width: 6px; height: 6px;
  background: #3DDC84;
  box-shadow: 0 0 8px rgba(61, 220, 132, .6);
}
/* Index + cursor hover (navbar and footer links; markup added by script.js):
   the link's number types in on the left, then a block cursor blinks twice on the right */
.ilink { position: relative; }
.ilink__idx {
  /* Same font, size and line-height as the link and pinned to its top, so this box's baseline is
     exactly the link's baseline; the digits (mono, 2px smaller) sit on that shared baseline. */
  position: absolute;
  right: calc(100% + 8px);
  top: 0;
  font: inherit;
  line-height: inherit;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--brand);
  pointer-events: none;
}
.ilink__idx span {
  font-family: var(--mono);
  font-size: calc(1em - 2px);
  vertical-align: baseline;
  opacity: 0;
}
.ilink__cur {
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  translate: 0 -50%;
  width: .45em;
  height: .9em;
  background: var(--brand);
  opacity: 0;
  pointer-events: none;
}
.ilink:is(:hover, :focus-visible) .ilink__idx span {
  animation: ilink-type .01s linear forwards;
  animation-delay: calc(var(--i) * .1s);            /* "0" then "2": 0.20s in total */
}
.ilink:is(:hover, :focus-visible) .ilink__cur { animation: ilink-blink .2s steps(1) .2s 2; }
@keyframes ilink-type { 0%, 100% { opacity: 1; } }   /* visible from the moment its delay ends */
@keyframes ilink-blink { 0% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ilink:is(:hover, :focus-visible) .ilink__idx span { animation: none; opacity: 1; }
  .ilink:is(:hover, :focus-visible) .ilink__cur { animation: none; }
}

.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 56px; }
.footer__copy,
.footer__legal a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.footer__legal { display: flex; gap: 28px; }
.footer__legal a { transition: color .2s; }
.footer__legal a:hover { color: var(--snow); }

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Decorative rings and the long horizontal guide lines only on Full HD and wider screens */
@media (max-width: 1919.98px) {
  .hero__rings, .modules__rings,
  .hero__line, .modules__line { display: none; }
}

@media (max-width: 1200px) {
  :root { --pad: 40px; --section: 180px; }
  .logos__inner { gap: 48px; }
  .modules__grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; gap: 16px; }
  .module { grid-column: auto; grid-row: auto; min-height: 420px; }
  .patterns__inner { grid-template-columns: 1fr 1fr; }
  .stat__value { font-size: 88px; }
  .tcard__quote--xl { font-size: 28px; }
}

@media (max-width: 900px) {
  :root { --pad: 24px; --section: 128px; }
  h2 { font-size: 42px; }

  .nav__toggle {
    display: grid;
    gap: 6px;
    width: 32px; height: 32px;
    place-content: center;
    position: relative;
    z-index: 2;
  }
  .nav__toggle span { display: block; width: 22px; height: 1px; background: #fff; transition: transform .25s ease; }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }
  .nav__menu {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    font-size: 24px;
    background: rgba(5, 6, 10, .97);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
  }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; }

  .hero { container-type: normal; height: auto; min-height: 0; max-height: none; padding: 120px 0 96px; display: flex; flex-direction: column; align-items: center; }
  .hero__orb { position: relative; top: auto; left: auto; transform: none; width: 1020.6px; max-width: none; flex: none; margin-block: -132.3px; }
  .hero__content { position: relative; top: auto; left: auto; transform: none; margin-top: calc(-0.36 * 756px); }
  .hero__rings { display: none; }
  .hero__line { top: 50%; }
  .hero h1 { font-size: clamp(40px, 9vw, 64px); }

  .logos__inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .logos__marquee { width: 100%; flex: none; }
  .logos__list { gap: 48px; padding-right: 48px; }

  .section-head, .notes__head { flex-direction: column; align-items: flex-start; gap: 24px; }

  .manifesto__ghost { display: none; }
  .notes__head h2 br { display: none; }
  .orbit { min-width: 600px; }
  .manifesto__text { font-size: 20px; line-height: 30px; }

  .patterns { padding-bottom: 420px; }
  .patterns__inner { grid-template-columns: 1fr; min-height: 0; }
  .patterns__figure { aspect-ratio: 680 / 768; max-height: 640px; }


  .proof__row--top, .proof__row:not(.proof__row--top) { grid-template-columns: 1fr; }
  .proof__row > * { border-right-width: 1px; }
  .tcard, .stat { min-height: 320px; }
  .tcard__quote--xl { font-size: 26px; }

  .notes__grid { grid-template-columns: 1fr; gap: 48px; }
  .notes { padding-bottom: 420px; }

  .cta h2 { font-size: clamp(40px, 9vw, 64px); }
  .cta { padding-top: 280px; padding-bottom: 320px; }
  .finale__planet { top: 300px; }
  .footer { padding-bottom: 40px; }

  .footer__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__tile { min-height: 200px; }
  .footer__bottom { flex-direction: column-reverse; align-items: flex-start; margin-top: 40px; }
  .footer__meta { flex-wrap: wrap; gap: 12px 28px; }
}

@media (max-width: 600px) {
  .patterns__body { padding-inline: 16px; }
  .footer__tiles { grid-template-columns: 1fr; }   /* headline + accordion get extra side padding on phones */
  .modules__grid { grid-template-columns: 1fr; }
  .module { min-height: 400px; }
  .stat__value { font-size: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
