/* ===========================================================================
   FLUX - scroll-driven cinema for the flux layout.
   The motion is native CSS (scroll-driven animations). Base styles keep all
   content visible/static, so browsers without support get a clean layout;
   the @supports block layers the cinema on top. No JavaScript.
   ========================================================================= */

:root {
  --bg:        var(--theme-colours-bg, #F4F3EF);
  --surface:   var(--theme-colours-surface, #FFFFFF);
  --surface-2: var(--theme-colours-surface-2, #ECEAE2);
  --text:      var(--theme-colours-text, #1A1A1B);
  --muted:     var(--theme-colours-text-muted, #6A6A64);
  --heading:   var(--theme-colours-heading, #0B0B0C);
  --accent:    var(--theme-colours-accent, #2C2BFF);
  --accent-2:  var(--theme-colours-accent-2, #FF4D2E);
  --on-accent: var(--theme-colours-on-accent, #FFFFFF);
  --border:    var(--theme-colours-border, #E2E0D7);
  --font-display: var(--theme-fonts-display, 'Bricolage Grotesque', system-ui, sans-serif);
  --font-body:    var(--theme-fonts-body, 'Inter', system-ui, sans-serif);
  --max-w: 1180px; --pad: 120px 24px; --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

.display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: .94; color: var(--heading); font-size: clamp(3rem, 11vw, 8.5rem); }
.h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.0; color: var(--heading); font-size: clamp(2rem, 6vw, 4.2rem); }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.45rem); color: var(--muted); line-height: 1.5; }
.eyebrow { font-family: var(--font-display); font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--pad); }
.btn { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: .9rem; padding: 15px 28px; border-radius: 100px; border: 2px solid var(--heading); }
.btn-primary { background: var(--heading); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--heading); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

/* progress meter */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; z-index: 200; }

/* nav */
nav.flux-nav { position: fixed; inset: 0 0 auto 0; z-index: 100; mix-blend-mode: difference; }
.flux-nav .inner { max-width: var(--max-w); margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.flux-nav .logo { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.flux-nav a { color: #fff; font-weight: 600; font-size: .9rem; }

/* hero */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 120px 24px 80px; }
.hero .wrap { width: 100%; }
.hero .display { max-width: 15ch; }
.hero .display em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 30px; max-width: 540px; }

/* scroll-linked horizontal band */
.band { background: var(--heading); color: var(--bg); overflow: hidden; padding: 26px 0; }
.band-row { display: flex; gap: 0; white-space: nowrap; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 9vw, 7rem); letter-spacing: -.03em; will-change: transform; }
.band-row span { padding: 0 .35em; }
.band-row .o { color: transparent; -webkit-text-stroke: 2px var(--bg); }

/* feature rows */
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feat + .feat { margin-top: 120px; }
.feat:nth-child(even) .feat-media { order: -1; }
.feat .num { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--accent); }
.feat h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.6rem); color: var(--heading); margin: 8px 0 14px; line-height: 1.04; }
.feat p { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.feat-media { aspect-ratio: 5/4; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); position: relative; overflow: hidden; }
.feat-media .blob { position: absolute; inset: 0; background: radial-gradient(60% 60% at 35% 30%, var(--accent), transparent 60%), radial-gradient(55% 55% at 75% 80%, var(--accent-2), transparent 60%); opacity: .85; }

/* statement */
.statement { background: var(--surface); border-block: 1px solid var(--border); }
.statement .big { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; line-height: 1.04; font-size: clamp(1.9rem, 5vw, 3.6rem); color: var(--heading); max-width: 18ch; }
.statement .big em { font-style: normal; color: var(--accent); }

/* CTA + footer */
.cta { background: var(--accent); color: var(--on-accent); text-align: center; }
.cta .h2 { color: var(--on-accent); margin: 0 auto 16px; max-width: 16ch; }
.cta .lead { color: color-mix(in srgb, var(--theme-colours-on-accent) 85%, transparent); max-width: 520px; margin: 0 auto; }
.cta .btn-row { justify-content: center; }
.cta .btn-primary { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); }
.cta .btn-ghost { color: var(--on-accent); border-color: color-mix(in srgb, var(--theme-colours-on-accent) 60%, transparent); }
footer.flux-foot { background: var(--bg); border-top: 1px solid var(--border); padding: 50px 24px 32px; }
.flux-foot .inner { max-width: var(--max-w); margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .9rem; }
.flux-foot a { color: var(--accent); }
.support-note { font-size: .82rem; color: var(--muted); margin-top: 16px; }

/* responsive */
@media (max-width: 820px) { .feat { grid-template-columns: 1fr; gap: 26px; } .feat:nth-child(even) .feat-media { order: 0; } :root { --pad: 84px 20px; } }

/* =========================================================================
   The cinema - layered only where scroll-driven animations are supported.
   ========================================================================= */
@supports (animation-timeline: scroll()) {
  .progress { animation: fx-grow linear; animation-timeline: scroll(root); }
  @keyframes fx-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  .hero .wrap { animation: fx-hero linear both; animation-timeline: scroll(root); animation-range: 0 92vh; }
  @keyframes fx-hero { to { transform: scale(.86) translateY(-26px); opacity: 0; filter: blur(3px); } }

  .band-row { animation: fx-slide linear; animation-timeline: scroll(root); }
  @keyframes fx-slide { from { transform: translateX(2%); } to { transform: translateX(-32%); } }

  .fx { animation: fx-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 72%; }
  @keyframes fx-rise { from { opacity: 0; transform: translateY(64px); } to { opacity: 1; transform: none; } }

  .zoom { animation: fx-zoom linear both; animation-timeline: view(); animation-range: entry 8% cover 46%; }
  @keyframes fx-zoom { from { transform: scale(.84); opacity: .4; } to { transform: scale(1); opacity: 1; } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
  .progress { display: none; }
}

/* site chrome - navigation from nav.conf, mobile toggle, auth, page body.
   The bar keeps its mix-blend-mode: difference trick, so nav children render
   inline in the bar (a dropdown panel cannot escape the blend group); the
   open mobile panel switches to a solid heading-on-bg slab for legibility. */
.flux-nav .nav-links { display: flex; align-items: center; gap: 22px; list-style: none; }
.flux-nav .nav-links a.active { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.flux-nav .nav-group { display: inline-flex; align-items: center; gap: 10px; }
.flux-nav .nav-group-label { font-weight: 600; font-size: .9rem; opacity: .55; cursor: default; }
.flux-nav .nav-children { display: inline-flex; align-items: center; gap: 14px; list-style: none; }
.flux-nav .auth { display: inline-flex; gap: 12px; }
.ls-auth { font-size: .84rem; opacity: .7; }
.ls-auth:hover { opacity: 1; }
.flux-nav .nav-toggle { display: none; background: none; border: 2px solid #fff; border-radius: 10px; color: #fff; font-size: 1.05rem; line-height: 1; padding: 3px 10px; cursor: pointer; }
.flux-page { padding: 140px 24px 88px; }
.flux-page .wrap { max-width: 800px; }
.flux-page .page-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; line-height: 1.0; color: var(--heading); font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: 16px; }
.flux-page .standfirst { font-size: clamp(1.1rem, 1.7vw, 1.4rem); color: var(--muted); line-height: 1.5; margin-bottom: 38px; }
.flux-page h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; color: var(--heading); font-size: 1.7rem; margin: 42px 0 14px; }
.flux-page h3 { font-family: var(--font-display); font-weight: 700; color: var(--heading); font-size: 1.25rem; margin: 28px 0 10px; }
.flux-page p, .flux-page li { color: var(--text); font-size: 1.02rem; line-height: 1.7; }
.flux-page p { margin-bottom: 16px; }
.flux-page ul, .flux-page ol { margin: 0 0 16px 22px; }
.flux-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.flux-page blockquote { border-left: 3px solid var(--accent); padding-left: 18px; color: var(--muted); margin: 22px 0; }
.flux-page code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-size: .9em; }
.flux-page pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; overflow-x: auto; margin-bottom: 16px; }
.flux-page pre code { background: none; border: 0; padding: 0; }
.flux-page img { max-width: 100%; height: auto; border-radius: 12px; }
.flux-page table { border-collapse: collapse; width: 100%; margin-bottom: 18px; }
.flux-page th, .flux-page td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; font-size: .95rem; }
.flux-page th { color: var(--heading); background: var(--surface); }
.flux-foot time { color: inherit; }
@media (max-width: 820px) {
  .flux-nav .nav-toggle { display: block; }
  .flux-nav .nav-links { display: none; }
  body.nav-open nav.flux-nav { mix-blend-mode: normal; background: var(--heading); }
  body.nav-open .flux-nav .inner { color: var(--bg); }
  body.nav-open .flux-nav .inner a { color: var(--bg); }
  body.nav-open .flux-nav .nav-toggle { border-color: var(--bg); color: var(--bg); }
  body.nav-open .flux-nav .nav-links { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: var(--heading); flex-direction: column; align-items: flex-start; padding: 6px 24px 22px; gap: 12px; }
  body.nav-open .flux-nav .nav-group { flex-direction: column; align-items: flex-start; gap: 8px; }
  body.nav-open .flux-nav .nav-children { flex-direction: column; align-items: flex-start; gap: 10px; padding-left: 16px; }
}
