/* ==========================================================================
   HYBRIX — style.css
   1. Tokens          5. Buttons / cards      9. Page sections
   2. Base            6. Intro + curtain     10. Footer
   3. Background      7. Reveal states       11. Responsive
   4. Nav / menu      8. Cursor / progress   12. Reduced motion
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  /* Brand colours — sampled from the Hybrix logo. Nothing else is added. */
  --purple-600: #6211a5;
  --purple-500: #8f16ea;   /* the H */
  --purple-400: #a437eb;   /* the glow at the arch */
  --purple-300: #c58af3;   /* tint of the above, for small text on dark */
  --bg: #0d041d;           /* page */
  --bg-deep: #080212;
  --surface: #150628;
  --surface-2: #1c0a35;
  --white: #ffffff;
  --text-2: rgba(255, 255, 255, .7);
  --text-3: rgba(255, 255, 255, .46);
  --line: rgba(164, 55, 235, .22);
  --line-soft: rgba(164, 55, 235, .1);

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);       /* expo out */
  --ease-io: cubic-bezier(.76, 0, .24, 1);   /* expo in-out */
  --gutter: clamp(20px, 4.2vw, 68px);
  --max: 1440px;
  --nav-h: 84px;
}

/* 2. BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--purple-600) var(--bg-deep); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--white);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
em { font-style: italic; }
::selection { background: var(--purple-500); color: var(--white); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--purple-600); border-radius: 10px; border: 2px solid var(--bg-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--purple-500); }

/* Focus — always visible for keyboard users */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--purple-300); outline-offset: 4px; border-radius: 4px; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 10000;
  background: var(--white); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 16px; }
/* Voiceflow chat widget: keep it in its own light scheme so the dark site theme
   doesn't turn its message box black. */
#voiceflow-chat, #voiceflow-chat * { color-scheme: light; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
main { position: relative; z-index: 2; }
section { position: relative; }

/* Type */
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(3.3rem, 10.4vw, 10rem); line-height: .92; letter-spacing: -.025em; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 6vw, 5.6rem); line-height: 1; letter-spacing: -.02em; }
.h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.05; letter-spacing: -.01em; }
.display em, .h2 em, .h3 em { color: var(--purple-300); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.55; color: var(--text-2); max-width: 36ch; }
.muted { color: var(--text-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--purple-300);
}
.eyebrow::before { content: ''; width: 36px; height: 1px; background: currentColor; opacity: .7; }

/* 3. BACKGROUND (shared on every page: grid + lights) --------------------- */
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--bg); }
.bg__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(164, 55, 235, .105) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 55, 235, .105) 1px, transparent 1px);
  background-size: 64px 64px;
}
#bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg__glow { position: absolute; border-radius: 50%; will-change: transform; }
.bg__glow--a { width: 80vmax; height: 80vmax; left: -28vmax; top: -40vmax; background: radial-gradient(closest-side, rgba(143, 22, 234, .34), transparent); }
.bg__glow--b { width: 70vmax; height: 70vmax; right: -30vmax; bottom: -40vmax; background: radial-gradient(closest-side, rgba(98, 17, 165, .42), transparent); }
.bg__vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 35%, var(--bg-deep) 100%); }
/* Radial reveal used by the intro, removed afterwards */
#bg.is-revealing .bg__grid, #bg.is-revealing canvas {
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 calc(var(--r, -25) * 1%), transparent calc(var(--r, -25) * 1% + 28%));
  mask-image: radial-gradient(circle at 50% 50%, #000 calc(var(--r, -25) * 1%), transparent calc(var(--r, -25) * 1% + 28%));
}
.bg__glow--a { animation: drift-a 38s ease-in-out infinite alternate; }
.bg__glow--b { animation: drift-b 46s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(14vmax, 10vmax, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-16vmax, -8vmax, 0) scale(1.08); } }
html.intro-pending .bg__glow { opacity: 0; }

/* 4. NAV / MENU ------------------------------------------------------------ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); padding-inline: var(--gutter);
  transition: transform .7s var(--ease);
}
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s;
  background: linear-gradient(var(--bg) 20%, rgba(13, 4, 29, 0));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.nav__mark { width: 26px; height: auto; aspect-ratio: 362 / 400; flex: none; }
.nav__word { font-family: var(--serif); font-size: 1.7rem; letter-spacing: -.01em; line-height: 1; }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.8vw, 44px); }
.nav__link { position: relative; font-size: .95rem; color: var(--text-2); padding: 12px 0; transition: color .3s; }
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--purple-300);
  transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease);
}
.nav__link:hover, .nav__link[aria-current='page'] { color: var(--white); }
.nav__link:hover::after, .nav__link[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }
.nav__right { display: flex; align-items: center; gap: 16px; }
.burger { display: none; width: 48px; height: 48px; position: relative; z-index: 3; }
.burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--white); transition: transform .6s var(--ease), top .6s var(--ease); }
.burger span:nth-child(1) { top: 20px; }
.burger span:nth-child(2) { top: 27px; }
.burger[aria-expanded='true'] span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { top: 23px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 150; background: var(--bg-deep);
  display: flex; flex-direction: column; justify-content: center; padding: 100px var(--gutter) 40px;
  clip-path: circle(0% at calc(100% - 44px) 42px); visibility: hidden;
}
.menu__links { display: flex; flex-direction: column; gap: 4px; }
.menu__item { overflow: hidden; }
.menu__link { display: block; font-family: var(--serif); font-size: clamp(2.6rem, 11vw, 4.4rem); line-height: 1.15; letter-spacing: -.02em; }
.menu__link[aria-current='page'] { color: var(--purple-300); font-style: italic; }
.menu__foot { margin-top: 40px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: .95rem; }

/* 5. BUTTONS / CARDS ------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px; isolation: isolate; overflow: hidden;
  min-height: 52px; padding: 0 28px; border-radius: 999px; font-weight: 500; font-size: 1rem; white-space: nowrap;
  border: 1px solid var(--line); will-change: transform;
  transition: border-color .4s, color .4s;
}
.btn--primary { background: var(--purple-500); border-color: var(--purple-500); color: var(--white); box-shadow: 0 10px 40px -10px rgba(143, 22, 234, .7); }
.btn--ghost { background: rgba(255, 255, 255, .02); }
.btn--lg { min-height: 68px; padding: 0 40px; font-size: 1.15rem; }
.btn__bg { position: absolute; inset: 0; z-index: -1; background: var(--purple-400); transform: translateY(101%); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transition: transform .6s var(--ease), border-radius .6s var(--ease); }
.btn--ghost .btn__bg { background: var(--white); }
.btn:hover .btn__bg { transform: translateY(0); border-radius: 0; }
.btn--ghost:hover { color: var(--bg); border-color: var(--white); }
.btn__txt { display: block; height: 1.25em; line-height: 1.25; overflow: hidden; }
.btn__txt span { display: block; transition: transform .6s var(--ease); }
.btn:hover .btn__txt span { transform: translateY(-100%); }
.btn__arrow { width: 18px; height: 18px; flex: none; transition: transform .6s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .92rem; }

.text-link { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--white); font-weight: 500; }
.text-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--purple-300); transform-origin: right; transition: transform .7s var(--ease); }
.text-link:hover::after { transform: scaleX(0); }
.text-link svg { width: 16px; height: 16px; transition: transform .6s var(--ease); }
.text-link:hover svg { transform: translateX(5px); }

.card {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(28, 10, 53, .8), rgba(21, 6, 40, .6));
  transition: border-color .5s, transform .8s var(--ease);
}
.card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .5s; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(164, 55, 235, .22), transparent 70%);
}
.card:hover { border-color: var(--line); }
.card:hover::before { opacity: 1; }

/* 6. INTRO + PAGE CURTAIN -------------------------------------------------- */
html.intro-pending .nav, html.intro-pending main, html.intro-pending .footer { visibility: hidden; }
.intro { position: fixed; inset: 0; z-index: 9200; display: grid; place-items: center; pointer-events: auto; overflow: hidden; }
.intro__light {
  position: absolute; left: 50%; top: 50%; width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(143, 22, 234, .55), rgba(98, 17, 165, .22) 45%, transparent 75%);
  opacity: 0; transform: scale(.12); will-change: transform, opacity;
  mix-blend-mode: screen;      /* adds light to the grid instead of covering it */
}
.intro__stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(18px, 3vh, 32px); }
.intro__h { position: relative; height: clamp(120px, 24vh, 220px); width: auto; aspect-ratio: 362 / 400; overflow: visible; will-change: transform; z-index: 2; }
.intro__word { display: flex; font-family: var(--serif); font-size: clamp(3rem, 8.4vw, 7.4rem); line-height: 1; letter-spacing: -.02em; }
.intro__word span { display: block; overflow: hidden; padding: .06em .005em; margin: -.06em 0; }
.intro__word i { display: block; font-style: normal; will-change: transform; }
.intro__tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .34em; text-transform: uppercase; color: var(--purple-300); }
.intro__skip {
  position: absolute; right: var(--gutter); bottom: 30px; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 6px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-2); transition: color .3s;
}
.intro__skip:hover { color: var(--white); }
.intro__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--purple-400); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 20px var(--purple-400); }

.curtain { position: fixed; inset: 0; z-index: 9400; display: flex; pointer-events: none; visibility: hidden; }
.curtain__col { flex: 1; background: var(--surface); transform: scaleY(0); transform-origin: bottom; margin-right: -1px; }
.curtain__col:nth-child(even) { background: var(--bg-deep); }
.curtain__mark { position: absolute; left: 50%; top: 50%; width: 54px; margin: -30px 0 0 -27px; opacity: 0; }
html.is-entering .curtain { visibility: visible; }
html.is-entering .curtain__col { transform: scaleY(1); }
html.is-entering .curtain__mark { opacity: 1; }

/* 7. REVEAL STATES --------------------------------------------------------- */
/* Pre-JS state: anything that animates in starts hidden; the fail-safe class releases it. */
html.js:not(.hx-fail):not(.hx-reduce) [data-reveal]:not(.is-in):not(.is-split) { opacity: 0; }
html.js:not(.hx-fail):not(.hx-reduce) [data-reveal='line']:not(.is-in) { opacity: 1; transform: scaleX(0); }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .03em .16em; margin: -.08em -.03em -.16em; }
.wi { display: inline-block; will-change: transform; }
.c { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em 0 .16em; margin: -.08em 0 -.16em; }
.ci { display: inline-block; will-change: transform; }

.rule { height: 1px; background: var(--line); transform-origin: left; }

/* 8. CURSOR / PROGRESS ----------------------------------------------------- */
.progress { position: fixed; left: 0; top: 0; z-index: 9100; height: 2px; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--purple-600), var(--purple-300)); box-shadow: 0 0 14px var(--purple-400); pointer-events: none; }
.cursor { position: fixed; left: 0; top: 0; z-index: 9500; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 50%; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--white); }
.cursor__ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid var(--purple-300); transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background .4s, border-color .4s; }
.cursor.is-on { opacity: 1; }
.cursor.is-link .cursor__ring { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: rgba(143, 22, 234, .22); border-color: transparent; }
.cursor.is-down .cursor__ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.cursor.is-hidden { opacity: 0; }
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor #voiceflow-chat, html.has-cursor #voiceflow-chat * { cursor: auto !important; }

/* 9. PAGE SECTIONS --------------------------------------------------------- */
.page-hero { min-height: 82svh; display: flex; align-items: flex-end; padding: calc(var(--nav-h) + 80px) 0 clamp(60px, 9vh, 110px); }
.page-hero .display { margin: 26px 0 34px; }
.page-hero--short { min-height: 70svh; }
.section { padding: clamp(90px, 14vh, 200px) 0; }
.section__head { display: flex; flex-direction: column; gap: 22px; margin-bottom: clamp(44px, 7vh, 90px); }

/* — Home: hero — */
.hero { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 40px) 0 90px; overflow: hidden; }
.hero__inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: clamp(26px, 4.5vh, 48px); }
.hero .display { max-width: 11ch; }
.hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__ghost { position: absolute; z-index: 1; right: clamp(-90px, -3vw, 0px); top: 52%; height: min(86vh, 860px); aspect-ratio: 362 / 400; transform: translateY(-50%); pointer-events: none; }
.hero__ghost svg { height: 100%; width: 100%; overflow: visible; }
.hero__scroll { position: absolute; z-index: 2; left: var(--gutter); bottom: 30px; display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--text-3); }
.hero__scroll i { display: block; width: 1px; height: 46px; background: linear-gradient(var(--purple-300), transparent); transform-origin: top; animation: scrollcue 2.4s var(--ease-io) infinite; }
@keyframes scrollcue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* — Marquee — */
.marquee { overflow: hidden; border-block: 1px solid var(--line-soft); padding: clamp(26px, 4vw, 48px) 0; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; align-items: center; flex: none; }
.marquee__item { font-family: var(--serif); font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: 1; letter-spacing: -.02em; padding-right: clamp(26px, 4vw, 60px); white-space: nowrap; }
.marquee__item:nth-child(even) { font-style: italic; color: var(--purple-300); }
.marquee__sep { width: clamp(10px, 1.4vw, 18px); height: clamp(10px, 1.4vw, 18px); margin-right: clamp(26px, 4vw, 60px); background: var(--purple-500); transform: rotate(45deg); flex: none; }

/* — Statement — */
.statement { padding: clamp(110px, 20vh, 260px) 0; }
.statement__text { font-family: var(--serif); font-size: clamp(2.2rem, 5.6vw, 5.4rem); line-height: 1.08; letter-spacing: -.02em; max-width: 20em; }
.statement__text .sw { color: rgba(255, 255, 255, .16); transition: none; }
.statement__text em { color: inherit; }

/* — Horizontal services — */
.hs { padding: clamp(80px, 12vh, 160px) 0 clamp(60px, 10vh, 140px); overflow: hidden; }
.hs__pin { min-height: 100svh; display: flex; align-items: center; }
.hs__track { display: flex; gap: clamp(18px, 2.2vw, 32px); padding-inline: var(--gutter); width: max-content; align-items: stretch; }
.hs__intro { width: min(82vw, 520px); display: flex; flex-direction: column; justify-content: center; gap: 28px; padding-right: clamp(0px, 4vw, 70px); flex: none; }
.svc-card { width: min(82vw, 470px); min-height: min(62vh, 560px); padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; flex: none; }
.svc-card__num { font-family: var(--mono); font-size: .76rem; letter-spacing: .2em; color: var(--purple-300); }
.svc-card__art { height: 150px; display: grid; place-items: center; }
.svc-card__art svg { height: 100%; width: auto; overflow: visible; }
.svc-card h3 { margin-bottom: 14px; }
.svc-card p { color: var(--text-2); max-width: 34ch; }

/* — Steps (home preview) — */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2vw, 30px); position: relative; }
.steps__line { position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--line-soft); }
.steps__fill { position: absolute; left: 0; top: 7px; height: 1px; width: 100%; background: linear-gradient(90deg, var(--purple-600), var(--purple-300)); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 12px var(--purple-400); }
.step { position: relative; padding-top: 44px; }
.step::before { content: ''; position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 1px solid var(--purple-400); transition: background .6s, box-shadow .6s; }
.step.is-on::before { background: var(--purple-400); box-shadow: 0 0 22px var(--purple-400); }
.step__num { font-family: var(--mono); font-size: .74rem; letter-spacing: .2em; color: var(--purple-300); }
.step h3 { margin: 12px 0 10px; }
.step p { color: var(--text-2); max-width: 26ch; font-size: 1rem; }

/* — Demo teaser — */
.demo-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px, 5vw, 80px); align-items: center; padding: clamp(32px, 5.5vw, 90px); border-radius: 32px; border: 1px solid var(--line); background: radial-gradient(120% 140% at 100% 0%, rgba(143, 22, 234, .3), transparent 55%), var(--surface); overflow: hidden; }
.demo-panel__copy { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.chat-mock { border-radius: 22px; border: 1px solid var(--line); background: rgba(8, 2, 18, .7); padding: 22px; display: flex; flex-direction: column; gap: 16px; min-height: 280px; justify-content: space-between; box-shadow: 0 40px 80px -30px rgba(143, 22, 234, .55); }
.chat-mock__top { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); font-size: .9rem; color: var(--text-2); }
.chat-mock__top svg { width: 20px; }
.chat-mock__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--purple-300); margin-left: auto; box-shadow: 0 0 12px var(--purple-300); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.typing { display: inline-flex; gap: 6px; padding: 14px 18px; border-radius: 18px 18px 18px 4px; background: var(--surface-2); width: fit-content; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--purple-300); animation: typing 1.4s infinite var(--ease-io); }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-6px); opacity: 1; } }
.chat-mock__input { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-3); font-size: .95rem; }

/* — CTA — */
.cta { padding: clamp(110px, 20vh, 260px) 0; text-align: center; overflow: hidden; }
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: clamp(34px, 6vh, 60px); }
.cta .display { font-size: clamp(3.6rem, 13vw, 13rem); }

/* — Services page — */
.stack { position: relative; padding-bottom: 10vh; }
.svc { position: relative; margin-bottom: 28px; transform-origin: 50% 0; }
@media (min-width: 1025px) {
  .svc { position: sticky; top: calc(var(--nav-h) + 4vh); margin-bottom: 18vh; }
}
.svc__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 90px); align-items: center; padding: clamp(30px, 5vw, 84px); min-height: min(68svh, 620px); border-radius: 30px; border: 1px solid var(--line); background: linear-gradient(150deg, var(--surface-2), var(--surface) 60%); box-shadow: 0 -30px 80px -40px rgba(143, 22, 234, .5); }
.svc__num { font-family: var(--mono); font-size: .78rem; letter-spacing: .22em; color: var(--purple-300); }
.svc h2 { margin: 18px 0 22px; }
.svc__text { color: var(--text-2); max-width: 40ch; }
.svc__list { margin-top: 30px; display: grid; gap: 4px; }
.svc__list li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-soft); color: var(--white); font-size: 1rem; }
.svc__list li::before { content: ''; width: 7px; height: 7px; background: var(--purple-400); transform: rotate(45deg); flex: none; }
.svc__art { display: grid; place-items: center; aspect-ratio: 1; max-height: 460px; border-radius: 22px; border: 1px solid var(--line-soft); background: radial-gradient(70% 70% at 50% 50%, rgba(143, 22, 234, .2), transparent), var(--bg-deep); overflow: hidden; }
.svc__art svg { width: 78%; height: auto; overflow: visible; }
.built { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; color: var(--text-2); }
.two-col { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 6vw, 110px); align-items: start; }
.two-col__body { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.two-col__body p { color: var(--text-2); max-width: 46ch; }

/* — How it works — */
.flow { position: relative; --node: clamp(84px, 14vh, 128px); }
.flow__pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 4vh, 56px); padding: calc(var(--nav-h) + 4px) 0 24px; }
.flow__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.flow__counter { font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; color: var(--text-3); }
.flow__counter b { color: var(--white); font-weight: 400; }
.flow__stage { position: relative; }
.flow__nodes { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.flow__track { position: absolute; left: 12.5%; right: 12.5%; top: calc(var(--node) / 2); height: 1px; background: var(--line); }
.flow__fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--purple-600), var(--purple-300)); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 14px var(--purple-400); }
.flow__packet { position: absolute; left: 0; top: -6px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 5px rgba(197, 138, 243, .25), 0 0 30px 6px var(--purple-400); }
.node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.node__icon { position: relative; z-index: 1; width: var(--node); height: var(--node); display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text-3); transition: color .6s, border-color .6s, box-shadow .8s, background .6s; }
.node__icon svg { width: 52px; height: 52px; overflow: visible; }
.node.is-on .node__icon { color: var(--white); border-color: var(--purple-400); background: radial-gradient(closest-side, rgba(143, 22, 234, .35), var(--bg)); box-shadow: 0 0 60px -6px rgba(143, 22, 234, .7), inset 0 0 30px rgba(164, 55, 235, .25); }
.node__label { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); transition: color .6s; max-width: 18ch; }
.node.is-on .node__label { color: var(--white); }
.node__copy { display: none; }
.flow__copy { position: relative; min-height: 150px; border-top: 1px solid var(--line-soft); padding-top: 28px; display: none; }
.flow--pinned .flow__copy { display: block; }
.flow__copy-item { position: absolute; left: 0; top: 28px; right: 0; display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; opacity: 0; }
.flow__copy-item.is-on { opacity: 1; }
.flow__copy-item p { color: var(--text-2); max-width: 44ch; font-size: 1.15rem; }
.flow:not(.flow--pinned) .node__copy { display: block; }
.flow:not(.flow--pinned) .flow__pin { min-height: 0; padding-block: 60px; }
.flow:not(.flow--pinned) .flow__nodes { grid-template-columns: 1fr; gap: 56px; }
.flow:not(.flow--pinned) { --node: 104px; }
.flow:not(.flow--pinned) .flow__track { left: calc(var(--node) / 2); right: auto; top: calc(var(--node) / 2); bottom: calc(var(--node) / 2); width: 1px; height: auto; }
.flow:not(.flow--pinned) .flow__fill { transform-origin: top; }
.flow:not(.flow--pinned) .flow__packet { display: none; }
.flow:not(.flow--pinned) .node { flex-direction: row; text-align: left; gap: 28px; align-items: flex-start; }
.flow:not(.flow--pinned) .node__label { display: none; }
.flow:not(.flow--pinned) .flow__counter { display: none; }
.node__copy h3 { margin-bottom: 8px; }
.node__copy p { color: var(--text-2); max-width: 36ch; }
.closing { text-align: left; }

/* — Demo page — */
.demo-hero { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: calc(var(--nav-h) + 40px) 0 80px; overflow: hidden; }
.demo-hero__inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 34px; }
.demo-hero .display { font-size: clamp(3.4rem, 11vw, 11rem); }
.demo-hero .lead { max-width: 44ch; margin-inline: auto; }
.orbit { position: absolute; left: 50%; top: 50%; z-index: 1; pointer-events: none; }
.orbit span { position: absolute; left: 0; top: 0; border-radius: 50%; border: 1px solid var(--line); /* size + centring margins are inline */ }
.orbit span::after { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--purple-300); box-shadow: 0 0 18px 3px var(--purple-400); }
.hints { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.hint { padding: 32px; display: flex; flex-direction: column; gap: 56px; min-height: 240px; justify-content: space-between; }
.hint__num { font-family: var(--mono); font-size: .76rem; letter-spacing: .2em; color: var(--purple-300); }
.hint p { font-family: var(--serif); font-size: clamp(1.6rem, 2.4vw, 2.2rem); line-height: 1.12; }

/* — About — */
.about-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(30px, 6vw, 120px); }
.about-grid__body { display: flex; flex-direction: column; gap: 28px; }
.about-grid__body p { font-size: clamp(1.15rem, 1.6vw, 1.5rem); line-height: 1.55; color: var(--text-2); max-width: 40ch; }
.about-grid__body p strong { color: var(--white); font-weight: 500; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.value { padding: clamp(30px, 4vw, 60px) clamp(0px, 2vw, 30px) 0 0; }
.value + .value { padding-left: clamp(18px, 3vw, 50px); border-left: 1px solid var(--line-soft); }
.value h3 { margin: 16px 0 12px; }
.value p { color: var(--text-2); max-width: 28ch; }
.bigmark { display: grid; place-items: center; padding: clamp(40px, 8vh, 100px) 0; }
.bigmark svg { height: min(56vh, 520px); width: auto; overflow: visible; }

/* — Contact — */
.contact-hero { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 40px) 0 80px; }
.contact-hero__inner { display: flex; flex-direction: column; gap: clamp(34px, 6vh, 64px); align-items: flex-start; }
.contact-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.contact-item { padding: 34px clamp(0px, 1.5vw, 24px) 10px 0; display: flex; flex-direction: column; gap: 12px; }
.contact-item + .contact-item { padding-left: clamp(16px, 2vw, 32px); border-left: 1px solid var(--line-soft); }
.contact-item__label { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); }
.contact-item a, .contact-item p { font-family: var(--serif); font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.15; overflow-wrap: anywhere; }
.contact-item a { position: relative; width: fit-content; padding-block: 4px; }
.contact-item a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--purple-300); transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease); }
.contact-item a:hover::after { transform: scaleX(1); transform-origin: left; }

/* — 404 — */
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 100px 0 60px; }
.nf__inner { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.nf__h { height: clamp(120px, 26vh, 240px); width: auto; overflow: visible; }
.nf .display { font-size: clamp(3rem, 8vw, 7rem); }

/* 10. FOOTER --------------------------------------------------------------- */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--line-soft); padding: clamp(60px, 9vh, 110px) 0 28px; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.2fr .8fr .8fr 1fr; gap: 40px; padding-bottom: clamp(50px, 8vh, 100px); }
.footer__blurb { color: var(--text-2); max-width: 28ch; }
.footer h4 { font-family: var(--mono); font-weight: 400; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); margin-bottom: 18px; }
.footer li a, .footer__col p { display: inline-block; padding: 7px 0; color: var(--text-2); transition: color .3s, transform .5s var(--ease); }
.footer li a:hover { color: var(--white); transform: translateX(6px); }
.footer__word { font-family: var(--serif); font-size: clamp(6rem, 27vw, 28rem); line-height: .78; letter-spacing: -.04em; text-align: center; color: transparent; -webkit-text-stroke: 1px var(--line); user-select: none; margin: 0 -2vw; padding-bottom: .04em; }
.footer__bar { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 26px; font-size: .88rem; color: var(--text-3); }

/* 11. RESPONSIVE ----------------------------------------------------------- */
@media (max-width: 1024px) {
  .nav__links, .nav__right .btn { display: none; }
  .burger { display: block; }
  .demo-panel, .svc__inner, .two-col, .about-grid { grid-template-columns: 1fr; }
  .svc__art { max-height: 320px; aspect-ratio: 16 / 10; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 60px; }
  .steps__line, .steps__fill { display: none; }
  .contact-list { grid-template-columns: 1fr 1fr; }
  .contact-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .contact-item:nth-child(n+3) { border-top: 1px solid var(--line-soft); margin-top: 20px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  :root { --nav-h: 72px; }
  body { font-size: 1rem; }
  .hero { padding-bottom: 110px; align-items: flex-start; padding-top: calc(var(--nav-h) + 8vh); }
  .hero__ghost { right: -52vw; top: 64%; height: 64vh; opacity: .5; }
  .hero__row { flex-direction: column; align-items: flex-start; gap: 30px; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
  .steps { grid-template-columns: 1fr; }
  .hints, .values { grid-template-columns: 1fr; }
  .value + .value { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-soft); margin-top: 30px; padding-top: 30px; }
  .svc { position: relative; top: 0; margin-bottom: 28px; }
  .stack { padding-bottom: 0; }
  .contact-list { grid-template-columns: 1fr; }
  .contact-item + .contact-item { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-soft); margin-top: 20px; }
  .contact-item:nth-child(n+3) { margin-top: 20px; }
  .footer__top { grid-template-columns: 1fr; }
  .flow:not(.flow--pinned) { --node: 88px; }
  .btn--lg { padding: 0 30px; min-height: 62px; font-size: 1.05rem; }
  .hs__intro { padding-right: 0; }
  .intro__skip { bottom: 20px; }
}
/* Horizontal services collapse to a vertical stack without pinning */
.hs--stacked .hs__pin { min-height: 0; }
.hs--stacked .hs__track { flex-direction: column; width: 100%; }
.hs--stacked .hs__intro, .hs--stacked .svc-card { width: 100%; min-height: 0; }

/* 12. REDUCED MOTION ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.intro-pending .nav, html.intro-pending main, html.intro-pending .footer { visibility: visible; }
  .intro, .curtain { display: none !important; }
  .svc { position: relative; top: 0; }
}
html.hx-fail .intro, html.hx-fail .curtain { display: none; }
html.hx-fail.intro-pending .nav, html.hx-fail.intro-pending main, html.hx-fail.intro-pending .footer { visibility: visible; }
