/* Tech True Point, "The System" prototype.
 * Deliberately its own visual world: the live site is Apple-plain and light, this is a dark
 * instrument panel. Nothing here is loaded by the live site and nothing here is shared with it.
 *
 * Palette is derived from assets the brand already owns: the blue and gold of the hero ribbon
 * artwork, on the near-black that artwork sits on.
 */

:root {
  --void: #05070c;
  --void-2: #080b12;
  --panel: #0d111a;
  --hair: rgba(143, 176, 224, .16);
  --hair-hot: rgba(143, 192, 255, .42);
  --ink: #eef2f8;
  --ink-2: #93a1b8;
  --ink-3: #737f97;   /* 4.95:1 on the page ground. #5d6a80 measured 3.68 and failed AA. */
  --blue: #2f7fff;      /* lights, glow, hairlines: never a background for white text */
  --blue-btn: #2568e0;  /* 5.08:1 with white. --blue as a button ground measured 3.74 and failed AA. */
  --blue-hi: #8fc0ff;
  --gold: #d9a441;
  --gold-hi: #f0c877;

  --shell: min(1240px, 100% - 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  --f-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Nothing is ever hidden waiting on JS. is-booting only softens the first paint; if the
 * module never runs, the timeout in boot.js clears it and the page is a readable document. */
body.is-booting .act-inner > *,
body.is-booting .panel { opacity: 0; }
body.is-ready .act-inner > *,
body.is-ready .panel { opacity: 1; }

a { color: var(--blue-hi); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 90;
  background: var(--blue-btn); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 16px; }

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

/* ---------- The canvas stage ---------- */

/* overflow:hidden matters: .grain is inset -50% to keep the noise tile from showing seams,
 * and without clipping here it pushed 58px of horizontal scroll at 390px. */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#gl { display: block; width: 100%; height: 100%; }

/* Shown until the first rendered frame, and it IS the whole backdrop in lite mode. A radial
 * suggestion of the same composition, so the swap between modes is not a jarring change of
 * subject. */
.stage-poster {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 62% 42%, rgba(47, 127, 255, .20), transparent 62%),
    radial-gradient(ellipse 40% 34% at 30% 66%, rgba(217, 164, 65, .13), transparent 60%),
    linear-gradient(180deg, #070a11, #05070c 60%);
  transition: opacity .9s var(--ease);
}
body.gl-live .stage-poster { opacity: 0; }

/* Film grain. One tiny inline SVG turbulence, tiled: no image request, and it is what stops
 * large flat gradients from banding on a dark screen. */
.grain {
  position: absolute; inset: 0;
  opacity: .014; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.is-lite .grain { opacity: .03; }

/* ---------- Chrome ---------- */

.proto-flag {
  position: fixed; left: 14px; bottom: 14px; z-index: 60;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); background: rgba(8, 11, 18, .82);
  border: 1px solid var(--hair); border-radius: 999px; padding: 7px 12px;
  backdrop-filter: blur(8px);
}

/* The bar is fixed over a scrolling document, so it needs its own ground or headings read
   straight through it. A gradient scrim rather than a solid bar: the scene stays visible. */
.chrome-bg {
  position: fixed; inset: 0 0 auto 0; height: 92px; z-index: 49; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 12, .92) 0%, rgba(5, 7, 12, .72) 55%, transparent 100%);
  backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
.chrome {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  width: var(--shell); margin: 0 auto; padding: 22px 0;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.mark { width: 34px; height: auto; color: var(--blue-hi); }
.wordmark { font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em; font-size: 1.02rem; }
.wordmark b { color: var(--gold); font-weight: 600; }
.chrome-tag {
  margin: 0 auto 0 0; font-family: var(--f-mono); font-size: .68rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.chrome-cta {
  font-size: .86rem; font-weight: 600; text-decoration: none; color: var(--ink);
  border: 1px solid var(--hair-hot); border-radius: 999px; padding: 9px 17px;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.chrome-cta:hover { background: rgba(47, 127, 255, .16); border-color: var(--blue-hi); }

@media (max-width: 720px) {
  .chrome-tag { display: none; }
  .chrome { gap: 12px; padding: 16px 0; }
  .brand { margin-right: auto; }
  .wordmark { font-size: .92rem; white-space: nowrap; }
  .mark { width: 28px; }
  .chrome-cta { font-size: .78rem; padding: 8px 13px; white-space: nowrap; }
}
@media (max-width: 400px) {
  .wordmark { font-size: .84rem; }
  .chrome-cta { font-size: .74rem; padding: 7px 11px; }
}

/* ---------- Acts ---------- */

main { position: relative; z-index: 10; }

.act {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 128px 0 96px;
}
/* Every act stacks its children. Before this the flex default put act 3's header and its
   cascade in one ROW, which forced .cascade 58px past the viewport on a phone. */
.act > * { width: 100%; }
/* A soft ground behind every block of act copy. The globe rotates behind the type and a card
   can pass under any word at any moment; without this the headline is legible most of the time,
   which is not the same as legible. Radial so it never reads as a box. */
.act-inner { width: var(--shell); margin: 0 auto; max-width: 100%; position: relative; }
.act-inner::before {
  content: "";
  position: absolute; inset: -46px -24px;
  z-index: -1;
  background: radial-gradient(ellipse 62% 58% at 40% 50%, rgba(5, 7, 12, .92) 0%, rgba(5, 7, 12, .78) 46%, transparent 78%);
  pointer-events: none;
}
.act-2 .act-inner::before { background: radial-gradient(ellipse 62% 58% at 62% 50%, rgba(5, 7, 12, .92) 0%, rgba(5, 7, 12, .78) 46%, transparent 78%); }
.act-inner-wide { max-width: 100%; }

.act-1 .act-inner { max-width: 700px; margin-left: max(24px, calc((100vw - var(--shell)) / 2)); margin-right: auto; }
.act-2 .act-inner { max-width: 700px; margin-left: auto; margin-right: max(24px, calc((100vw - var(--shell)) / 2)); text-align: right; }
.act-4 .act-inner { max-width: 760px; margin-left: max(24px, calc((100vw - var(--shell)) / 2)); margin-right: auto; }

.eyebrow {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 22px;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--blue-hi);
}
.act-2 .eyebrow { justify-content: flex-end; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 10px var(--blue); }

/* ---------- Kinetic type ----------
 * The headline is split into lines, each line into characters, by js/story.js. Every char
 * gets a wrapper with overflow hidden so the reveal is a real mask wipe rather than a fade.
 * Under reduced motion the split still happens but nothing is transformed, so the markup is
 * identical in both paths and the text is always selectable and readable. */

.kinetic {
  margin: 0 0 26px;
  font-family: var(--f-display);
  font-weight: 620;
  font-size: clamp(2.4rem, 6.4vw, 5rem);
  line-height: 1.06;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.kinetic .line { display: block; }
/* The gradient is set on the CHARACTERS, not on the line. After story.js splits the headline
 * every glyph is an inline-block descendant, and background-clip:text on the ancestor does not
 * paint through them: the accent line rendered completely invisible the first time. The
 * unsplit case is covered too, for the no-JS and reduced-motion paths. */
.kinetic .accent,
.kinetic .accent .k-word,
.kinetic .accent .k-char {
  background: linear-gradient(96deg, var(--blue-hi) 0%, #ffffff 46%, var(--gold-hi) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
/* .k-word is load-bearing, not decorative. Each .k-mask is an inline-block, so without a
   nowrap word wrapper the browser breaks lines between letters: the first build shipped
   "Every b / usiness". */
.k-word { display: inline-block; white-space: nowrap; }
.k-char { display: inline-block; will-change: transform; }
/* padding + equal negative margin gives the mask room for ascenders and descenders without
   changing the line box. Without it, overflow:hidden crops the type, which is exactly what the
   first globe build shipped. */
.k-mask {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  padding: .14em .02em .18em; margin: -.14em -.02em -.18em;
}

.lede {
  margin: 0; max-width: 52ch; color: var(--ink-2);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.62;
}
.act-2 .lede { margin-left: auto; }

.scroll-cue {
  display: flex; align-items: center; gap: 12px;
  margin: 54px 0 0; font-family: var(--f-mono);
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.scroll-cue span {
  width: 34px; height: 1px; background: linear-gradient(90deg, var(--blue-hi), transparent);
  animation: cue 2.6s var(--ease) infinite;
}
@keyframes cue { 0%, 100% { transform: scaleX(.4); opacity: .5; } 50% { transform: scaleX(1); opacity: 1; } }

/* ---------- Cascading panels ----------
 * Sticky-stacked: each panel pins at the same offset and the next one rides up over it, so
 * the stack literally accumulates the way the estate does. Pure CSS sticky; ScrollTrigger
 * only drives the scene highlight and the panel's own entrance, never the pinning, so the
 * cascade still works if the JS never boots. */

.cascade {
  width: var(--shell); max-width: 620px;
  margin: 84px auto 0 max(24px, calc((100vw - var(--shell)) / 2));
  display: flex; flex-direction: column; gap: 28px;
}
.panel {
  position: sticky; top: 108px;
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 34px 36px;
  background: linear-gradient(168deg, rgba(18, 24, 38, .92), rgba(8, 11, 18, .92));
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9);
  transition: border-color .5s var(--ease), transform .5s var(--ease);
}
.panel.is-active { border-color: var(--hair-hot); }
.panel-idx {
  margin: 0 0 14px; font-family: var(--f-mono); font-size: .7rem;
  letter-spacing: .16em; color: var(--blue-hi);
}
.panel h3 {
  margin: 0 0 8px; font-family: var(--f-display); font-weight: 620;
  font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.03em; line-height: 1;
}
.panel-lede { margin: 0 0 24px; color: var(--ink-2); max-width: 58ch; font-size: .98rem; }
.panel-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.panel-rows li {
  display: grid; gap: 2px;
  padding: 15px 0; border-top: 1px solid var(--hair);
}
.panel-rows li:last-child { border-bottom: 1px solid var(--hair); }
.panel-rows b { font-weight: 560; font-size: 1rem; }
.panel-rows span { color: var(--ink-3); font-size: .88rem; font-family: var(--f-mono); letter-spacing: .01em; }

@media (min-width: 900px) {
  .panel { padding: 38px 40px; }
}

/* ---------- CTA ---------- */

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 34px 0 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  background: var(--blue-btn); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 1rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  box-shadow: 0 14px 40px -18px var(--blue);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 22px 50px -18px var(--blue); }
.btn-quiet {
  background: transparent; color: var(--ink);
  border: 1px solid var(--hair-hot); box-shadow: none;
}
.btn-quiet svg { width: 17px; height: 17px; }
.btn-quiet:hover { background: rgba(143, 192, 255, .1); }
.fineprint { margin: 0; color: var(--ink-3); font-size: .88rem; }

.proto-foot {
  position: relative; z-index: 10;
  width: var(--shell); margin: 0 auto; padding: 40px 0 64px;
  border-top: 1px solid var(--hair);
  color: var(--ink-3); font-size: .84rem;
}
.proto-foot p { margin: 0 0 6px; }
.mode-note { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em; }

/* ============================================================
   LITE PATH
   Loads no three.js and no GSAP at all: boot.js decides before importing anything, so the
   lite visitor never downloads 2 MB to throw it away. The story is still told, by a CSS
   composition and scroll-linked state, and every word is the same.
   ============================================================ */

body.is-lite .stage-poster { opacity: 1; }

.lite-figure { display: none; }
body.is-lite .lite-figure {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: var(--shell); margin: 54px auto 0; max-width: 640px;
}
.lite-tile {
  border: 1px solid var(--hair); border-radius: 12px;
  padding: 14px 14px 16px;
  background: linear-gradient(165deg, rgba(20, 28, 45, .9), rgba(8, 11, 18, .9));
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
  transform: translateY(10px); opacity: 0;
  transition: opacity .7s var(--ease), transform .7s var(--ease), border-color .7s var(--ease);
}
.lite-tile.in { opacity: 1; transform: none; }
.lite-tile.lit { border-color: var(--hair-hot); color: var(--blue-hi); }
.lite-tile i {
  display: block; width: 22px; height: 3px; border-radius: 2px;
  background: var(--ink-3); margin-bottom: 10px; transition: background .7s var(--ease);
}
.lite-tile.lit i { background: var(--blue); box-shadow: 0 0 12px var(--blue); }

/* ---------- Reduced motion ----------
 * The requirement here is NOT "no animation". It is that the reduced-motion visitor gets a
 * complete, legible page rather than an empty stage waiting for a timeline that will never
 * run. Everything is visible at rest; only movement is removed. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  body.is-booting .act-inner > *,
  body.is-booting .panel { opacity: 1; }
  .lite-tile { opacity: 1; transform: none; }
  .panel { position: relative; top: auto; }
}

@media (max-width: 899px) {
  body { font-size: 16px; }
  .act { min-height: auto; padding: 104px 0 72px; }
  .act-2 .act-inner { text-align: left; margin-right: auto; }
  .act-2 .eyebrow { justify-content: flex-start; }
  .act-2 .lede { margin-left: 0; }
  .cascade { margin-top: 48px; gap: 18px; }
  .panel { position: relative; top: auto; padding: 26px 22px; }
  .proto-flag { left: 10px; bottom: 10px; font-size: 9px; }
}

/* ============================================================
   THE WORKING SITE
   The cinematic sequence hands off here. Same brand, calmer register: the ground lifts to a
   near-white, type inverts, and nothing moves except a plain fade in. This is the part that has
   to function as a business website, and it is styled to be read rather than watched.
   The canvas fades out underneath it, so no WebGL is competing with the copy.
   ============================================================ */

.daylight {
  position: relative;
  z-index: 12;
  background: #f6f7f9;
  color: #14171c;
  margin-top: 12vh;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -40px 120px -30px rgba(0, 0, 0, .85);
}

.band { padding: 92px 0; }
.band + .band { border-top: 1px solid #e3e6eb; }
.band-inner { width: var(--shell); max-width: 1120px; margin: 0 auto; }

.daylight .eyebrow {
  color: #1a5fd0;
  margin-bottom: 14px;
}
.daylight h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 640;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -.03em;
  max-width: 20ch;
}
.band-lede {
  margin: 16px 0 0;
  max-width: 60ch;
  color: #454e5d;
  font-size: 1.04rem;
}

/* ---------- proof ---------- */
.proof { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 0; }
.proof li { padding: 20px 0; border-top: 1px solid #e3e6eb; display: grid; gap: 3px; }
.proof li:last-child { border-bottom: 1px solid #e3e6eb; }
.proof b { font-weight: 620; font-size: 1.06rem; }
.proof span { color: #545d6d; font-size: .94rem; font-family: var(--f-mono); }
@media (min-width: 860px) {
  .proof { grid-template-columns: 1fr 1fr; column-gap: 54px; }
  .proof li:nth-child(2) { border-bottom: 0; }
  .proof li:nth-last-child(2) { border-bottom: 1px solid #e3e6eb; }
}

/* ---------- services ----------
   A list, not a card grid. Every row is a real route into the site and the arrow says so. */
.svc-list { margin-top: 36px; border-top: 1px solid #e3e6eb; }
.svc {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 22ch) minmax(0, 1fr) 1.4rem;
  gap: 4px 26px;
  align-items: start;
  padding: 24px 10px 24px 0;
  border-bottom: 1px solid #e3e6eb;
  text-decoration: none;
  color: inherit;
  transition: background .18s ease, padding-left .18s ease;
}
.svc:hover { background: #eef1f5; padding-left: 10px; }
.svc-n { font-family: var(--f-mono); font-size: .76rem; color: #4a5262; padding-top: 4px; }  /* #858e9e measured 3.08:1 and #5f6879 still failed mid-fade */
.svc-t { font-weight: 620; font-size: 1.06rem; line-height: 1.3; }
.svc-d { color: #454e5d; font-size: .95rem; line-height: 1.55; }
.svc::after {
  content: ""; width: 9px; height: 9px; margin-top: 8px; justify-self: end;
  border-right: 2px solid #4a5262; border-top: 2px solid #4a5262;
  transform: rotate(45deg); transition: transform .18s ease, border-color .18s ease;
}
.svc:hover::after { border-color: #1a5fd0; transform: rotate(45deg) translate(2px, -2px); }
@media (max-width: 860px) {
  .svc { grid-template-columns: 2.4rem 1fr 1rem; gap: 4px 14px; }
  .svc-t { grid-column: 2; }
  .svc-d { grid-column: 2; }
  .svc::after { grid-row: 1; }
}

/* ---------- conversion ---------- */
.band-cta { background: #eef1f5; }
.daylight .cta-row { margin: 30px 0 16px; }
.daylight .btn-quiet { color: #14171c; border-color: #c3cad6; }
.daylight .btn-quiet:hover { background: #e2e7ee; }
.daylight .fineprint { color: #545d6d; }

/* The footer follows the daylight surface rather than sitting on the dark stage. */
body .proto-foot { position: relative; z-index: 12; background: #eef1f5; color: #545d6d; border-top: 1px solid #e3e6eb; }
body .proto-foot .mode-note { color: #545d6d; }
body .proto-foot a { color: #1a5fd0; }
.proto-foot > .foot-inner { width: var(--shell); max-width: 1120px; margin: 0 auto; }

@media (max-width: 899px) {
  .daylight { margin-top: 6vh; border-radius: 20px 20px 0 0; }
  .band { padding: 60px 0; }
}

/* ---------- 1980s terminal labels ----------
 * The section labels type themselves in behind a blinking block cursor. Monospace, wide
 * tracking, a faint phosphor bloom on the glyphs. The ghost copy underneath reserves the exact
 * width of the finished string, which is what stops the line reflowing as characters arrive.
 */
.eyebrow.term { align-items: baseline; }
.term-wrap { position: relative; display: inline-block; }
.term-ghost { visibility: hidden; }
.term-out {
  position: absolute; left: 0; top: 0; white-space: pre;
  text-shadow: 0 0 8px currentColor, 0 0 18px rgba(143, 192, 255, .35);
}
.term-cursor {
  position: absolute; top: 0; left: 100%;
  margin-left: .12em;
  color: currentColor;
  text-shadow: 0 0 10px currentColor;
  animation: term-blink 1.05s steps(1) infinite;
}
.term-cursor-off { display: none; }
@keyframes term-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* The daylight labels are on a near-white ground, where a phosphor glow reads as a printing
   fault rather than as a screen. Same typing, no bloom. */
.daylight .term-out { text-shadow: none; }
.daylight .term-cursor { text-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .term-cursor { animation: none; display: none; }
}

/* The real label text for assistive tech. Not display:none, which would hide it from screen
   readers as well; the clip pattern keeps it in the accessibility tree. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
