/* Xenius Consulting v2 · styles
   One fixed WebGL canvas sits behind the page; this file lays the words over it.
   Three modes, all complete:
     html.gl[data-motion="on"]   3D scene, pinned tour, camera follows the scroll
     html.gl[data-motion="off"]  one still 3D frame, plain page
     html:not(.gl)               no 3D at all (no WebGL or no JavaScript), plain page */

@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-var.woff2") format("woff2-variations");
}

:root {
  --black: #03050a;
  --ink: #0a1122;
  --ink-2: #111b33;
  --blue: #1f5fff;        /* brand blue: fills, borders, large text */
  --blue-deep: #0b3fd6;   /* button and panel fill (white text 7.8:1) */
  --sky: #8fd0ff;         /* light blue: text on black (12.2:1) */
  --white: #f4f8ff;
  --muted: #b3c2da;       /* body copy on black (11.2:1) */
  --line: rgba(143, 208, 255, .2);
  --radius: 14px;
  --wrap: 1240px;
  --gutter: max(20px, calc((100% - var(--wrap)) / 2));
  --font: "Archivo Variable", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --veil: 0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html[data-motion="off"] { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  line-height: 1.55;
  overflow-x: clip;
}
html:not(.gl) body {
  background:
    radial-gradient(60vw 60vh at 85% 10%, rgba(31, 95, 255, .28), transparent 70%),
    radial-gradient(50vw 50vh at 10% 90%, rgba(143, 208, 255, .08), transparent 70%),
    var(--black);
  background-attachment: fixed;
}
a { color: var(--sky); text-underline-offset: .2em; }
a:hover { color: var(--white); }
h1, h2, h3 { margin: 0; font-stretch: 125%; font-weight: 800; line-height: 1; letter-spacing: -.025em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 700; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: fixed; left: 16px; top: -100px; z-index: 100;
  background: var(--white); color: var(--black); padding: 12px 18px; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: 16px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.h-big { font-size: clamp(2rem, 1.1rem + 3.4vw, 4.4rem); }
.h-mid { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.4rem); }
.lead { font-size: clamp(1.08rem, 1rem + .45vw, 1.35rem); color: var(--muted); max-width: 38ch; margin-top: 1.1rem; }
.label { font-size: 1rem; font-stretch: 112%; font-weight: 600; letter-spacing: 0; color: var(--sky); }

/* ---------- The scene and the two layers that keep text readable over it ---------- */
.scene { position: fixed; inset: 0; width: 100%; height: 100lvh; z-index: 0; display: none; }
html.gl .scene { display: block; }
.shade, .veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; display: none; }
html.gl .shade, html.gl .veil { display: block; }
.shade { background: linear-gradient(90deg, rgba(3, 5, 10, .88) 0%, rgba(3, 5, 10, .55) 34%, transparent 62%); }
.veil { background: var(--black); opacity: var(--veil); }
html.gl[data-motion="off"] .veil { opacity: .66; }
@media (max-width: 899px) {
  .shade { background: linear-gradient(180deg, transparent 30%, rgba(3, 5, 10, .9) 62%); }
}
main, .site-footer { position: relative; z-index: 2; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 10px;
  background: var(--blue-deep); color: #fff; border: 2px solid var(--blue-deep);
  font: inherit; font-weight: 700; font-stretch: 110%; text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.btn:hover { color: #fff; background: var(--blue); border-color: var(--sky); }
.btn-ghost { background: rgba(3, 5, 10, .45); border-color: rgba(244, 248, 255, .5); }
.btn-ghost:hover { background: rgba(244, 248, 255, .1); border-color: var(--white); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter);
  background: rgba(3, 5, 10, .6);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--white); text-decoration: none; }
.logo-mark { width: 28px; height: 28px; fill: none; stroke: var(--sky); stroke-width: 3; stroke-linecap: round; }
.logo-mark circle { stroke: var(--blue); fill: var(--black); }
.logo-text { font-stretch: 125%; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
nav ul { display: flex; align-items: center; gap: 6px; }
nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--white); text-decoration: none; font-weight: 600; }
nav a:not(.btn):hover { color: var(--sky); }
.motion-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  background: transparent; color: var(--white); border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: .9rem; cursor: pointer;
}
.motion-toggle:hover { border-color: var(--sky); }
.motion-dot { width: 10px; height: 10px; border-radius: 50%; background: #5b6b86; }
.motion-toggle[aria-pressed="true"] .motion-dot { background: var(--sky); box-shadow: 0 0 10px var(--sky); }
.no-js .motion-toggle { display: none; }
@media (max-width: 760px) {
  .nav-hide, .logo-text { display: none; }
  .motion-toggle { padding: 0 10px; font-size: .82rem; }
}

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: grid; align-items: center; padding: 110px 0 70px; }
.hero-title { font-size: clamp(1.9rem, 1rem + 3.4vw, 4.5rem); line-height: .96; letter-spacing: -.035em; }
.hero-title .line { display: block; }
.hero-sub { max-width: 36ch; margin-top: 1.5rem; font-size: clamp(1.08rem, 1rem + .45vw, 1.35rem); color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
@media (max-width: 899px) {
  html.gl .hero { align-items: end; padding-bottom: 44px; }
}

/* ---------- The tour: plain version first (no 3D, or animations off) ---------- */
.tour { padding: 90px 0; }
.tour-pin {
  width: min(var(--wrap), 100% - 40px); margin-inline: auto;
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.panel { background: rgba(10, 17, 34, .9); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 30px; }
.panel-intro { grid-column: 1 / -1; background: none; border: 0; padding: 0 0 22px; }
.panel > p { color: var(--muted); margin-top: .9rem; }
.panel .count { margin: 0 0 .5rem; color: var(--sky); font-weight: 600; font-stretch: 112%; }
.panel .count span { color: var(--muted); font-weight: 400; font-stretch: 100%; }
.panel .count span::before { content: "/ "; color: var(--line); }
.panel ul { display: grid; gap: 7px; margin-top: 1.1rem; }
.panel li { position: relative; padding-left: 1.3em; }
.panel li::before { content: ""; position: absolute; left: 0; top: .68em; width: .6em; height: 2px; background: var(--sky); }
.hint { display: none; }

/* The tour, pinned: one panel at a time while the camera moves */
html.gl[data-motion="on"] .tour { height: 640vh; padding: 0; }
html.gl[data-motion="on"] .tour-pin { position: sticky; top: 0; height: 100svh; width: auto; margin: 0; display: block; overflow: hidden; }
html.gl[data-motion="on"] .panel {
  position: absolute; left: var(--gutter); top: 50%; width: min(31rem, 100% - 40px);
  background: none; border: 0; padding: 0;
  opacity: 0; transform: translateY(calc(-50% + 22px)); pointer-events: none;
  transition: opacity .4s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}
html.gl[data-motion="on"] .panel.is-on { opacity: 1; transform: translateY(-50%); transition-delay: .12s; }
html.gl[data-motion="on"] .hint { display: block; margin-top: 1.6rem; color: var(--sky); font-weight: 600; }
@media (max-width: 899px) {
  html.gl[data-motion="on"] .panel { top: auto; bottom: 26px; transform: translateY(22px); }
  html.gl[data-motion="on"] .panel.is-on { transform: none; }
  html.gl[data-motion="on"] .panel .h-big { font-size: 1.9rem; }
  html.gl[data-motion="on"] .panel > p { margin-top: .6rem; }
  html.gl[data-motion="on"] .panel ul { margin-top: .7rem; gap: 4px; }
}

/* ---------- Why one team ---------- */
.statement { padding: 22vh 0 16vh; }
.statement-text {
  margin: 1rem 0 0; max-width: 18ch;
  font-size: clamp(1.6rem, 1rem + 2.5vw, 3.3rem); font-weight: 700; font-stretch: 112%; line-height: 1.14; letter-spacing: -.02em;
}

/* ---------- Process: a real sequence, so it gets numbers ---------- */
.process { padding: 14vh 0 20vh; }
.steps { counter-reset: step; display: grid; gap: 0; margin-top: 3rem; max-width: 34rem; }
.steps li { counter-increment: step; position: relative; padding: 0 0 2.4rem 4.2rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -.2rem;
  width: 2.7rem; height: 2.7rem; display: grid; place-items: center;
  border: 2px solid var(--sky); border-radius: 10px; background: var(--black);
  font-weight: 800; font-stretch: 125%; color: var(--sky);
}
.steps li::after { content: ""; position: absolute; left: calc(1.35rem - 1px); top: 2.7rem; bottom: .2rem; width: 2px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); }
.steps p { color: var(--muted); margin: .5rem 0 0; }

/* ---------- Proof: a solid blue band that covers the scene ---------- */
.proof { background: var(--blue-deep); color: #fff; padding: clamp(80px, 13vh, 150px) 0; }
.proof-grid { display: grid; gap: 48px 72px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); align-items: start; }
.proof .lead { color: #fff; max-width: 40ch; }
.proof-note { margin: 1.4rem 0 0; max-width: 46ch; }
.facts { margin: 0; border-top: 2px solid rgba(255, 255, 255, .55); }
.facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .4); }
.facts dt { font-weight: 500; }
.facts dd { margin: 0; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.6rem); font-weight: 800; font-stretch: 125%; line-height: 1; letter-spacing: -.03em; }

/* ---------- Contact ---------- */
.contact { padding: 18vh 0 14vh; }
.contact-col { max-width: 35rem; }
.contact-col .form { margin-top: 2.2rem; }
.contact-list { display: grid; gap: 10px; margin-top: 2rem; font-size: 1.1rem; }

/* The brief: three steps. Without JavaScript every step shows, as one long form. */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step { display: grid; gap: 16px; }
.step > legend { padding: 0; margin-bottom: 4px; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.1; }
.step > legend:focus { outline: none; }
.step-count { margin: 0; color: var(--sky); font-weight: 600; font-stretch: 112%; }
.step-count:empty { display: none; }
.help { margin: 0; color: var(--muted); }
html:not(.gl) .help-3d, html[data-motion="off"] .help-3d { display: none; }
.pick { display: grid; gap: 8px; }
.pick label {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 14px;
  border: 2px solid #5a6c8c; border-radius: 10px; background: var(--black); cursor: pointer; font-weight: 700;
}
.pick label:hover { border-color: var(--sky); }
.pick label:has(input:checked) { border-color: var(--sky); background: #0a1c4d; }
.pick input { width: 22px; height: 22px; min-height: 0; flex: none; padding: 0; accent-color: var(--blue); }
.pick small { display: block; font-size: .9rem; font-weight: 400; color: var(--muted); }
.pick-unsure { border-style: dashed !important; }
.detail { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.detail > legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; color: var(--sky); font-weight: 700; font-stretch: 112%; }
.detail > legend + * { clear: both; }
.detail[hidden], .step[hidden] { display: none; }
.step-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.step-nav [hidden] { display: none; }
.no-js [data-back], .no-js [data-next] { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; color: #ffd0d0; font-weight: 600; }
.form-error:empty { display: none; }
.contact-list .label { display: inline-block; min-width: 4.2em; }
.contact-list a { display: inline-flex; min-height: 44px; align-items: center; }
.form { background: rgba(10, 17, 34, .94); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 38px); display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.optional { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--white); background: var(--black); border: 2px solid #5a6c8c; border-radius: 10px;
  padding: 12px 14px; min-height: 48px; width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--sky); outline-offset: 2px; }
textarea { resize: vertical; }
.form-privacy { font-size: .92rem; color: var(--muted); margin: 0; }
.form .btn { justify-self: start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); border-top: 1px solid var(--line); padding: 26px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; color: var(--muted); font-size: .95rem; }
.footer-inner p { margin: 0; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- The one entrance: the headline arrives while the stack assembles,
   then a band of light crosses each line once ---------- */
html[data-motion="on"] .hero-title .line {
  --d: .2s;
  opacity: 0; transform: translateY(.35em);
  animation: line-in .9s cubic-bezier(.16, 1, .3, 1) var(--d) forwards;
}
html[data-motion="on"] .hero-title .line:nth-child(2) { --d: .38s; }
html[data-motion="on"] .hero-title .line:nth-child(3) { --d: .56s; }
@keyframes line-in { to { opacity: 1; transform: none; } }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  @media (forced-colors: none) {
    html[data-motion="on"] .hero-title .line {
      background: linear-gradient(105deg, var(--white) 0 42%, var(--sky) 50%, var(--white) 58% 100%) 100% 0 / 320% 100% no-repeat;
      -webkit-background-clip: text; background-clip: text; color: transparent;
      animation: line-in .9s cubic-bezier(.16, 1, .3, 1) var(--d) forwards, sheen 1.5s cubic-bezier(.4, 0, .2, 1) calc(var(--d) + .75s) forwards;
    }
  }
}
@keyframes sheen { to { background-position: 0 0; } }

/* ---------- Extras that only run with animations on ---------- */
/* How far down the page you are: a line of light along the bottom of the header */
.progress { display: none; }
html[data-motion="on"] .progress {
  display: block; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--sky)); box-shadow: 0 0 12px var(--sky);
  transform: scaleX(var(--prog, 0)); transform-origin: 0 50%;
}

/* The name tag that follows the mouse over the model */
.tip {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; width: max-content; max-width: 212px;
  display: grid; gap: 1px; padding: 10px 14px;
  background: rgba(3, 5, 10, .86); border: 1px solid var(--sky); border-radius: 10px;
  box-shadow: 0 0 26px rgba(31, 95, 255, .55);
  font-size: .9rem; line-height: 1.3; color: var(--muted);
}
.tip[hidden] { display: none; }
.tip-name { font-size: 1.1rem; font-stretch: 125%; font-weight: 800; letter-spacing: -.01em; color: var(--white); }
.tip-do { color: var(--sky); font-weight: 600; }
html.can-pick main { cursor: pointer; }

/* Buttons: a glow underneath and one sweep of light on hover */
html[data-motion="on"] .btn { position: relative; overflow: hidden; transition: background-color .2s, border-color .2s, box-shadow .3s, transform .2s; }
html[data-motion="on"] .btn:not(.btn-ghost) { box-shadow: 0 10px 34px -12px rgba(31, 95, 255, .95); }
html[data-motion="on"] .btn:hover { box-shadow: 0 12px 40px -8px rgba(60, 130, 255, 1); transform: translateY(-1px); }
html[data-motion="on"] .btn:active { transform: none; }
html[data-motion="on"] .btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .34) 50%, transparent 65%);
  transform: translateX(-110%);
}
html[data-motion="on"] .btn:hover::after { transform: translateX(110%); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }

/* Tour panels: the parts of each panel arrive one after another */
html.gl[data-motion="on"] .panel > * { opacity: 0; transform: translateX(-18px); transition: opacity .3s ease, transform .3s ease; }
html.gl[data-motion="on"] .panel.is-on > * { opacity: 1; transform: none; transition: opacity .55s ease, transform .7s cubic-bezier(.16, 1, .3, 1); transition-delay: .14s; }
html.gl[data-motion="on"] .panel.is-on > :nth-child(2) { transition-delay: .22s; }
html.gl[data-motion="on"] .panel.is-on > :nth-child(3) { transition-delay: .3s; }
html.gl[data-motion="on"] .panel.is-on > :nth-child(4) { transition-delay: .38s; }
html.gl[data-motion="on"] .panel .h-mid { text-shadow: 0 0 44px rgba(31, 95, 255, .7); }

/* "Why one team": words wait in grey (still 5.9:1 on black) and turn white as you scroll */
html.js[data-motion="on"] .statement-text .w { color: #7c8aa6; transition: color .45s ease, text-shadow .45s ease; }
html.js[data-motion="on"] .statement-text .w.lit { color: var(--white); text-shadow: 0 0 30px rgba(143, 208, 255, .28); }

/* Process: each number fills in when you reach it, and the line to the next one draws */
html.js[data-motion="on"] .steps li::before { transition: background-color .5s ease, color .5s ease, box-shadow .5s ease; }
html.js[data-motion="on"] .steps li.is-seen::before { background: var(--blue-deep); color: #fff; box-shadow: 0 0 26px rgba(31, 95, 255, .9); }
html.js[data-motion="on"] .steps li::after { background: linear-gradient(var(--sky), var(--sky)) 0 0 / 100% 0 no-repeat, var(--line); transition: background-size .9s ease .25s; }
html.js[data-motion="on"] .steps li.is-seen::after { background-size: 100% 100%, auto; }

/* The device setting always wins over CSS animation, even if JavaScript failed */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) *, html:not([data-motion="on"]) *::before, html:not([data-motion="on"]) *::after { animation: none !important; transition: none !important; }
}

/* Windows High Contrast / forced colours: drop the scene, keep the words */
@media (forced-colors: active) {
  .scene, .shade, .veil { display: none !important; }
  .btn { border: 2px solid ButtonText; }
}

/* ---------- Privacy page ---------- */
.privacy { padding: 60px 0 100px; max-width: 760px; }
.privacy h1 { margin: 20px 0 10px; }
.privacy h2 { font-size: 1.5rem; margin: 2rem 0 .5rem; }
.privacy a { display: inline-block; padding: 10px 0; }
.privacy .muted { color: var(--muted); }
@media (max-width: 899px) { .help-3d { display: none; } }
