/* ============================================================
   Forfatum — Editorial theme (paper / navy / orange — from the logo)
   All design tokens live in :root — change the brand once.
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  /* Surfaces */
  --paper:      #F7F4EE;
  --paper-2:    #EFEBE2;
  --card:       #FFFFFF;
  --line:       rgba(11, 34, 60, 0.12);
  --line-2:     rgba(11, 34, 60, 0.22);

  /* Ink */
  --ink:        #101E33;
  --ink-2:      #475366;
  --ink-3:      #5F6C82;   /* ≥4.5:1 on paper for small labels */

  /* Brand — from the logo */
  --primary:      #0B223C;   /* navy */
  --primary-2:    #163558;   /* hover */
  --primary-soft: rgba(11, 34, 60, 0.07);
  --accent:       #F8851C;   /* orange */
  --accent-2:     #FFA652;   /* orange on dark */
  --accent-text:  #A4540A;   /* orange dark enough for 11px labels */
  --accent-soft:  rgba(248, 133, 28, 0.14);
  --ai:           #E0741A;   /* AI-boosted emphasis */
  --ai-soft:      rgba(248, 133, 28, 0.08);
  --danger:       #B3261E;

  /* Layout */
  --container:  1240px;
  --section-py: 6rem;
  --radius:     10px;
  --radius-lg:  14px;
  --nav-h:      72px;

  /* Motion */
  --ease:       cubic-bezier(.16, 1, .3, 1);
  --ease-io:    cubic-bezier(.65, 0, .35, 1);

  /* Type */
  --serif:      'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:       'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:       'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

[id] { scroll-margin-top: calc(var(--nav-h) + 1rem); }

::selection { background: var(--primary); color: var(--paper); }

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; }
a, button, summary, [role="button"] { touch-action: manipulation; }

.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }

/* ── Accessibility helpers ────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}
[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute;
  top: -100px; left: 1rem;
  z-index: 2000;
  padding: .75rem 1.25rem;
  background: var(--primary);
  color: var(--paper);
  font-weight: 600;
  border-radius: 6px;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ================================================================
   BACKGROUND LAYERS
   Grain, aurora blobs, dot-grid spotlight, drifting rings.
   Everything is pointer-events:none and lives behind content.
   ================================================================ */

/* Paper grain — SVG turbulence at very low opacity */
.grain {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  opacity: .055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* Aurora — slow drifting soft blobs in brand colours */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  will-change: transform;
  animation: aurora-drift 26s var(--ease-io) infinite alternate;
}
.aurora .a1 { width: 620px; height: 620px; left: -14%; top: -30%; background: radial-gradient(circle, rgba(11,34,60,.28), transparent 65%); }
.aurora .a2 { width: 520px; height: 520px; right: -10%; top: 5%;  background: radial-gradient(circle, rgba(248,133,28,.30), transparent 65%); animation-duration: 32s; animation-delay: -8s; }
.aurora .a3 { width: 460px; height: 460px; left: 35%; bottom: -35%; background: radial-gradient(circle, rgba(248,133,28,.18), transparent 65%); animation-duration: 38s; animation-delay: -16s; }
@keyframes aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6%, -4%, 0) scale(1.08); }
  100% { transform: translate3d(-5%, 6%, 0) scale(.96); }
}

/* Dot grid — revealed by a spotlight that follows the pointer */
.dotgrid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(11,34,60,.26) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(360px circle at var(--mx, 50%) var(--my, 40%), #000 0%, rgba(0,0,0,.45) 40%, transparent 72%);
          mask-image: radial-gradient(360px circle at var(--mx, 50%) var(--my, 40%), #000 0%, rgba(0,0,0,.45) 40%, transparent 72%);
  opacity: .9;
  transition: opacity .6s;
}

/* Engraving-style flow-field canvas (drawn by JS) */
.flowfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  /* keep the lines out from under the headline for legibility */
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 50% 48%, transparent 30%, #000 75%);
          mask-image: radial-gradient(ellipse 55% 60% at 50% 48%, transparent 30%, #000 75%);
}

/* Floating geometric rings for the alt sections */
.rings {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.rings span {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(11,34,60,.18);
  will-change: transform;
  animation: ring-float 22s ease-in-out infinite alternate;
}
.rings .r1 { width: 380px; height: 380px; right: -120px; top: -140px; border-color: rgba(248,133,28,.28); }
.rings .r2 { width: 240px; height: 240px; right: -50px; top: -70px; animation-duration: 28s; animation-delay: -6s; border-style: dashed; }
.rings .r3 { width: 300px; height: 300px; left: -140px; bottom: -160px; animation-duration: 34s; animation-delay: -12s; }
.rings .r4 { width: 120px; height: 120px; left: 12%; bottom: 8%; border-color: rgba(248,133,28,.25); animation-duration: 18s; animation-delay: -3s; }
@keyframes ring-float {
  0%   { transform: translate3d(0,0,0) rotate(0deg); }
  100% { transform: translate3d(-30px, 24px, 0) rotate(40deg); }
}

/* Gold rule that draws itself when scrolled into view */
.rule {
  height: 3px;
  width: 0;
  background: var(--accent);
  transition: width .9s var(--ease);
}
.rule.drawn, html.no-js .rule { width: 56px; }

/* Section content always sits above background layers */
.section > .container, .hero > .container { position: relative; z-index: 1; }

/* ================================================================
   LAYOUT PRIMITIVES
   ================================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.narrow { max-width: 760px; }

.section { padding: var(--section-py) 0; position: relative; }
main.section { overflow: hidden; }
main.section .aurora span { opacity: .4; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}
.section-tag {
  display: inline-block;
  font: 600 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: .9rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: .9rem;
  text-wrap: balance;
}
.section-sub {
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  min-height: 44px;
  border-radius: 7px;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn { position: relative; overflow: hidden; transform: translate(var(--mag-x, 0px), var(--mag-y, 0px)); }
.btn::after {
  /* light sweep on hover */
  content: '';
  position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg);
  transition: left .55s var(--ease);
  pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn:active { transform: translate(var(--mag-x, 0px), var(--mag-y, 0px)) scale(.95); transition-duration: .08s; }
.btn-primary:hover, .btn-secondary:hover { transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 3px)); }
.btn .ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.45);
  transform: scale(0); animation: ripple .55s var(--ease) forwards;
}
.btn-secondary .ripple, .btn-ghost .ripple { background: rgba(248,133,28,.3); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  background: var(--primary);
  color: var(--paper);
  border-color: var(--primary);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(11,34,60,.28), 0 0 0 3px rgba(248,133,28,.25); background: var(--primary-2); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: rgba(11,34,60,.3);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--primary); box-shadow: 0 8px 20px rgba(11,34,60,.10); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-lg { padding: .95rem 1.75rem; font-size: 1rem; min-height: 50px; }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; min-height: 38px; }
.btn-full { width: 100%; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(248,133,28,.45);
  box-shadow: 0 18px 36px rgba(11,34,60,.12), 0 0 0 1px rgba(248,133,28,.25), 0 8px 24px rgba(248,133,28,.12);
}

/* Spotlight border: a radial highlight follows the pointer (JS sets --sx/--sy) */
.spot { overflow: hidden; }
.spot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--sx, 50%) var(--sy, 50%), rgba(248,133,28,.22), transparent 60%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.spot:hover::after { opacity: 1; }
.spot > * { position: relative; z-index: 1; }

/* AI emphasis chip */
.chip-ai {
  display: inline-block;
  font: 600 10px/1 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ai);
  border: 1px solid rgba(248,133,28,.5);
  padding: .3rem .65rem;
  border-radius: 999px;
  animation: aiGlow 2.4s ease-in-out infinite;
}
@keyframes aiGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(248,133,28,0); }
  50%      { box-shadow: 0 0 10px rgba(248,133,28,.35); }
}

/* ── Reveal on scroll ─────────────────────────────────────── */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease);
}
html.js .reveal-left  { transform: translateX(-36px); }
html.js .reveal-right { transform: translateX(36px); }
html.js .reveal-scale { transform: scale(.92) translateY(12px); }
html.js .reveal-flip  { transform: perspective(900px) rotateX(-14deg) translateY(18px); transform-origin: top; }
html.js .reveal.visible { opacity: 1; transform: none; filter: none; }

/* ================================================================
   HEADER / NAV
   ================================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   turn it into the containing block for the fixed mobile menu. */
.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247,244,238,.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.navbar.scrolled { box-shadow: 0 6px 24px rgba(11,34,60,.06); }

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--nav-h);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  flex-shrink: 0;
  letter-spacing: -.01em;
}
.nav-logo img { display: block; height: 40px; width: auto; }
.nav-logo .logo-compact { display: none; height: 36px; }
.footer .nav-logo img { height: 32px; }
/* Legacy text mark (still used by the admin sign-in) */
.logo-mark {
  width: 26px; height: 26px;
  border-radius: 4px;
  background: var(--primary);
  flex-shrink: 0;
}
.accent { color: var(--accent); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
}
.nav-links { display: flex; align-items: center; gap: .1rem; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .5rem .85rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: .85rem; right: .85rem; bottom: 6px;
  height: 2px; border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgba(11,34,60,.05); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.active { color: var(--paper); background: var(--primary); font-weight: 600; }
.nav-links a.active::after { display: none; }

.lang-toggle {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(11,34,60,.28);
  color: var(--ink-2);
  font: 600 11px/1 var(--mono);
  letter-spacing: .06em;
  border-radius: 6px;
  min-width: 44px; min-height: 40px;
  padding: 0 .75rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lang-toggle:hover { border-color: var(--primary); color: var(--primary); }

.nav-cta { margin-left: .25rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  padding: 6.5rem 0 5.5rem;
  overflow: hidden;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
}
.hero-content { max-width: 760px; }

.hero .rule { margin-bottom: 1.5rem; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: 600 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid rgba(11,34,60,.2);
  background: rgba(255,255,255,.5);
  padding: .45rem .9rem .45rem .65rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.3); } }

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  font-weight: 700;
  color: var(--primary);
  /* orange marker that grows in under the second line */
  background: linear-gradient(transparent 68%, var(--accent-soft) 68%, var(--accent-soft) 92%, transparent 92%) no-repeat 0 0 / 0% 100%;
  transition: background-size 1s var(--ease) .5s;
}
html.js .hero-title em.marked, html.no-js .hero-title em { background-size: 100% 100%; }

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--ink-2);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: .9rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}
.stat { display: flex; flex-direction: column-reverse; }
.stat-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label { font: 500 12px/1.4 var(--mono); color: var(--ink-2); margin-top: .35rem; }

/* Staggered entrance for hero children (first paint only) */
html.js .hero-content > * { animation: fadeInUp .6s var(--ease) both; }
html.js .hero-content > :nth-child(2) { animation-delay: .08s; }
html.js .hero-content > :nth-child(3) { animation-delay: .16s; }
html.js .hero-content > :nth-child(4) { animation-delay: .24s; }
html.js .hero-content > :nth-child(5) { animation-delay: .32s; }
html.js .hero-content > :nth-child(6) { animation-delay: .40s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ================================================================
   TICKER — disciplines marquee
   ================================================================ */
.ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card);
  padding: .9rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: ticker-scroll 40s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track ul { display: flex; gap: 0; }
.ticker-track li {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  font: 600 12px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.ticker-track li::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .7;
}
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================================================================
   BUSINESS MODEL — 3 steps
   ================================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.step-card .step-num {
  font: 700 13px/1 var(--mono);
  color: var(--accent-text);
  margin-bottom: .75rem;
}
.step-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.step-card p { color: var(--ink-2); font-size: .9rem; line-height: 1.65; }
.steps-note {
  text-align: center;
  color: var(--ink-3);
  font: 400 .85rem/1.5 var(--mono);
  margin-top: 2rem;
}

/* ================================================================
   SERVICES — 6 cards with 3D tilt
   ================================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  perspective: 1200px;
}
.service-card {
  transform-style: preserve-3d;
  transition: transform .15s ease-out, box-shadow .25s var(--ease), border-color .25s;
  will-change: transform;
}
.service-card:hover { box-shadow: 0 14px 28px rgba(11,34,60,.1); }
.service-initial {
  width: 44px; height: 44px;
  border-radius: 6px;
  border: 1px solid rgba(11,34,60,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  background: var(--paper);
  transform: translateZ(20px);
}
.service-card:hover .service-initial { transform: translateZ(20px) rotateY(360deg); background: var(--accent); color: #fff; border-color: var(--accent); }
.service-initial { transition: transform .7s var(--ease), background .3s, color .3s, border-color .3s; }
.service-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.service-card p { color: var(--ink-2); font-size: .88rem; line-height: 1.65; }

/* ================================================================
   LIFECYCLE — 6 steps, Dev & QA emphasised
   ================================================================ */
.lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .9rem;
  counter-reset: phase;
}
.phase-card {
  padding: 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
}
.phase-card .phase-num { font: 700 11px/1 var(--mono); color: var(--accent-text); }
.phase-card h3 {
  font-family: var(--serif);
  font-size: .95rem;
  font-weight: 700;
}
.phase-card p { color: var(--ink-2); font-size: .83rem; line-height: 1.6; }
.phase-card .chip-ai { margin-top: .4rem; }
.phase-emph {
  background: var(--ai-soft);
  border-color: rgba(248,133,28,.45);
}
.phase-emph h3 { font-size: 1.1rem; }

/* ================================================================
   AI EDGE — numbered points
   ================================================================ */
.ai-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.ai-point {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
}
.ai-num {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(11,34,60,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 12px/1 var(--mono);
  color: var(--primary);
  background: var(--paper);
}
.ai-num { position: relative; transition: background .3s, color .3s; }
.ai-num::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px dashed var(--accent); opacity: 0;
  transition: opacity .3s;
  animation: spin 6s linear infinite;
}
.ai-point:hover .ai-num { background: var(--primary); color: var(--paper); }
.ai-point:hover .ai-num::after { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-point h3 { font-size: 1rem; font-weight: 700; margin-bottom: .35rem; }
.ai-point p { color: var(--ink-2); font-size: .88rem; line-height: 1.65; }

/* ================================================================
   CASE TEASER
   ================================================================ */
.case-teaser {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid rgba(248,133,28,.4);
  border-radius: 12px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.case-teaser::before {
  /* animated gold sheen */
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  left: -50%;
  background: linear-gradient(100deg, transparent, rgba(248,133,28,.10), transparent);
  animation: sheen 6s var(--ease-io) infinite;
  pointer-events: none;
}
@keyframes sheen { 0%, 60% { left: -50%; } 100% { left: 120%; } }
.case-teaser h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
}
.case-teaser p { color: var(--ink-2); font-size: .95rem; max-width: 480px; }
.case-teaser > * { position: relative; }

/* ================================================================
   TESTIMONIALS
   ================================================================ */
.logo-strip {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  padding: 1.25rem 1.5rem;
  animation: ticker-scroll 36s linear infinite;
}
.logo-strip-wrap {
  overflow: hidden;
  margin: 0 auto 3rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.logo-strip-wrap:hover .logo-strip { animation-play-state: paused; }
.logo-item { color: var(--ink-3); transition: color .25s var(--ease), transform .25s var(--ease); flex-shrink: 0; }
.logo-item svg { width: 140px; height: 40px; }
.logo-item:hover { color: var(--primary); transform: translateY(-3px); }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
}
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: .3rem; right: 1.25rem;
  font-family: Georgia, serif;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--ink-3);
  opacity: .25;
  pointer-events: none;
}
.testimonial-featured { border-color: rgba(248,133,28,.45); background: linear-gradient(180deg, rgba(248,133,28,.07), #fff 60%); }
.testimonial-stars { display: flex; gap: .2rem; }
.testimonial-stars svg { width: 15px; height: 15px; fill: var(--accent); transform: scale(0); transition: transform .4s var(--ease); }
.testimonial-card.visible .testimonial-stars svg, html.no-js .testimonial-stars svg { transform: scale(1); }
.testimonial-stars svg:nth-child(2) { transition-delay: .08s; } .testimonial-stars svg:nth-child(3) { transition-delay: .16s; }
.testimonial-stars svg:nth-child(4) { transition-delay: .24s; } .testimonial-stars svg:nth-child(5) { transition-delay: .32s; }
.testimonial-card blockquote { flex: 1; }
.testimonial-card blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.testimonial-author strong { display: block; font-size: .9rem; }
.author-role { display: block; font-size: .78rem; color: var(--ink-3); margin-top: .1rem; }
.author-avatar {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 .8rem/1 var(--serif);
  color: var(--paper);
  background: var(--primary);
}

/* ================================================================
   FAQ
   ================================================================ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s;
}
.faq-item { border-left: 3px solid transparent; }
.faq-item:hover { border-left-color: var(--accent); }
.faq-item[open] { border-color: rgba(11,34,60,.35); border-left-color: var(--accent); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--primary); }
.faq-chevron { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink-3); transition: transform .3s var(--ease); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--primary); }
.faq-answer { padding: 0 1.4rem 1.3rem; color: var(--ink-2); font-size: .93rem; line-height: 1.75; max-width: 68ch; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq-item[open] .faq-answer { animation: faq-open .25s var(--ease); }

/* ================================================================
   CONTACT STRIP
   ================================================================ */
.contact-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
.contact-info { display: flex; flex-direction: column; gap: .5rem; font-style: normal; }
.contact-info-item {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  color: var(--ink-2);
  font-size: .95rem;
  transition: color .2s;
}
.contact-info-item svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
a.contact-info-item:hover { color: var(--primary); }
.contact-cta {
  background: var(--primary);
  color: var(--paper);
  border-radius: 12px;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
}
.contact-cta::before {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  right: -120px; top: -140px;
  border-radius: 50%;
  border: 1px solid rgba(247,244,238,.18);
  animation: ring-float 24s ease-in-out infinite alternate;
}
.contact-cta::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  right: -40px; bottom: -110px;
  border-radius: 50%;
  border: 1px dashed rgba(248,133,28,.5);
  animation: ring-float 30s ease-in-out infinite alternate-reverse;
}
.contact-cta > * { position: relative; }
.contact-cta h3 { font-family: var(--serif); font-size: 1.35rem; margin-bottom: .5rem; }
.contact-cta p { color: rgba(247,244,238,.8); font-size: .92rem; margin-bottom: 1.4rem; }
.contact-cta { animation: float-card 7s ease-in-out infinite; }
@keyframes float-card { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.contact-cta .btn-primary { background: var(--accent); color: var(--primary); border-color: var(--accent); }
.contact-cta .btn-primary:hover { background: var(--accent-2); box-shadow: 0 10px 24px rgba(0,0,0,.25), 0 0 0 3px rgba(255,255,255,.2); }
.contact-info-item svg { transition: transform .3s var(--ease); }
a.contact-info-item:hover svg { transform: translateX(4px) rotate(-8deg); }

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand p { color: var(--ink-2); font-size: .9rem; margin-top: .9rem; max-width: 300px; line-height: 1.7; }
.footer-social { display: flex; gap: .5rem; margin-top: 1.25rem; }
.footer-social a {
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: all .2s;
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: var(--accent); transform: translateY(-3px) rotate(-6deg); }
.footer-social svg { width: 16px; height: 16px; }
.footer-links-group h4 {
  font: 600 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.1rem;
}
.footer-links-group ul { display: flex; flex-direction: column; gap: .55rem; }
.footer-links-group a { display: inline-block; padding: .15rem 0; font-size: .9rem; color: var(--ink-2); transition: color .2s; }
.footer-links-group a:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.footer-bottom p { color: var(--ink-3); font: 400 .8rem/1.5 var(--mono); }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { display: inline-block; padding: .25rem 0; color: var(--ink-3); font-size: .8rem; }
.footer-legal a:hover { color: var(--ink); }

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  z-index: 900;
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(11,34,60,.12);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), background .2s;
}
.back-to-top.show { opacity: 1; transform: translateY(calc(-1 * var(--lift, 0px))); }
.back-to-top:hover { background: var(--primary); color: var(--paper); border-color: var(--primary); }
.back-to-top svg { width: 18px; height: 18px; }

/* ================================================================
   PAGE HEADER (inner pages)
   ================================================================ */
.page-head { padding: 3.5rem 0 1.5rem; }
.page-head .section-tag { margin-bottom: .6rem; }
.page-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  text-wrap: balance;
}
.page-lead { color: var(--ink-2); font-size: 1.05rem; line-height: 1.75; max-width: 680px; margin-top: 1rem; }

/* ================================================================
   QUOTE FLOW
   ================================================================ */
.quote-wrap { max-width: 720px; margin: 0 auto; }
.quote-intro { text-align: center; margin-bottom: 2.25rem; }
.quote-intro h1 { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.01em; margin-bottom: .6rem; }
.quote-intro p { color: var(--ink-2); }

.stepper { display: flex; gap: .5rem; margin-bottom: 2.25rem; }
.stepper li { flex: 1; }
.stepper .bar { height: 3px; border-radius: 4px; background: rgba(11,34,60,.12); margin-bottom: .5rem; transition: background .3s; }
.stepper .lbl { font: 600 11px/1 var(--mono); color: var(--ink-3); text-align: center; transition: color .3s; }
.stepper li.done .bar, .stepper li.current .bar { background: var(--accent); }
.stepper li.current .lbl { color: var(--accent-text); }

.quote-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2.25rem;
  animation: fadeInUp .4s var(--ease) both;
}
.quote-panel h2 { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.quote-panel .panel-sub { color: var(--ink-2); font-size: .9rem; margin-bottom: 1.4rem; }
.quote-panel h2 + .field, .quote-panel h2 + .field-row { margin-top: 1.4rem; }

.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--paper);
  border: 1px solid rgba(11,34,60,.2);
  border-radius: 6px;
  color: var(--ink);
  font-family: inherit;
  font-size: .95rem;
  padding: .7rem .9rem;
  min-height: 46px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: .78rem; color: var(--danger); min-height: 1em; }
.field-hint { font-size: .78rem; color: var(--ink-3); }

.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.type-btn {
  background: var(--card);
  border: 1px solid rgba(11,34,60,.18);
  color: var(--ink-2);
  font-weight: 500;
  font-size: .88rem;
  border-radius: 6px;
  padding: .8rem .9rem;
  min-height: 48px;
  cursor: pointer;
  text-align: left;
  transition: transform .15s, border-color .2s, background .2s, color .2s;
}
.type-btn:hover { border-color: var(--primary); }
.type-btn[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--paper);
  font-weight: 600;
  animation: popSelect .3s ease;
}
@keyframes popSelect { 0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }

.dropzone {
  display: block;
  border: 1px dashed rgba(248,133,28,.55);
  border-radius: 10px;
  padding: 2.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  margin-bottom: 1rem;
  background: var(--paper);
  transition: background .2s, border-color .2s;
}
.dropzone:hover, .dropzone.drag { background: var(--accent-soft); border-color: var(--accent); }
.dropzone strong { display: block; color: var(--accent-text); font-weight: 600; font-size: .92rem; margin-bottom: .25rem; }
.dropzone span { color: var(--ink-3); font-size: .8rem; }
.dropzone input { display: none; }
.file-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .55rem .5rem .55rem .9rem;
  font: 400 .85rem/1.4 var(--mono);
  color: var(--ink-2);
  animation: fadeInUp .25s var(--ease);
}
.file-item button {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 6px;
  font-size: 1rem;
}
.file-item button:hover { background: rgba(179,38,30,.08); }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; max-width: 420px; }
.cal-head strong { font-family: var(--serif); font-size: .98rem; }
.cal-nav { display: flex; gap: .25rem; }
.cal-nav button {
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  background: var(--card);
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.cal-nav button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.cal-nav button:disabled { opacity: .35; cursor: not-allowed; }
.cal-nav svg { width: 16px; height: 16px; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; max-width: 420px; }
.cal-dow div { text-align: center; font: 700 10px/1 var(--mono); color: var(--ink-3); padding: .3rem 0; }
.cal-grid { margin: .4rem 0 1.4rem; }
.cal-day {
  aspect-ratio: 1;
  border-radius: 6px;
  font: 400 .82rem/1 var(--mono);
  cursor: pointer;
  border: 1px solid rgba(11,34,60,.18);
  background: var(--card);
  color: var(--ink-2);
  transition: border-color .15s, background .15s;
}
.cal-day:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.cal-day:disabled { border-color: transparent; background: transparent; color: #C9CFD9; cursor: not-allowed; }
.cal-day.empty { visibility: hidden; }
.cal-day[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--paper); font-weight: 700; animation: popSelect .3s ease; }
.slots { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.slot-btn {
  background: var(--card);
  border: 1px solid rgba(11,34,60,.18);
  color: var(--ink-2);
  font: 600 .85rem/1 var(--mono);
  border-radius: 6px;
  padding: .7rem 1rem;
  min-height: 42px;
  cursor: pointer;
  transition: border-color .15s;
}
.slot-btn:hover { border-color: var(--primary); }
.slot-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--paper); animation: popSelect .3s ease; }

.review-list { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1.75rem; }
.review-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(11,34,60,.1);
  padding-bottom: .65rem;
  font-size: .9rem;
}
.review-list div:last-child { border-bottom: none; }
.review-list span:first-child { color: var(--ink-3); font-size: .85rem; }
.review-list span:last-child { font-weight: 600; text-align: right; }

.panel-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; }
.panel-actions .btn:only-child { margin-left: auto; }
.panel-error { color: var(--danger); font-size: .85rem; margin-top: 1rem; }

.confirm {
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(11,34,60,.35);
  border-radius: 12px;
  padding: 3.5rem 2rem;
  animation: fadeInUp .4s var(--ease) both;
}
.confirm-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1px solid rgba(11,34,60,.35);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.confirm-icon svg { width: 26px; height: 26px; }
.confirm h2 { font-family: var(--serif); font-size: 1.5rem; margin-bottom: .6rem; }
.confirm p { color: var(--ink-2); max-width: 420px; margin: 0 auto .5rem; }
.confirm .details { color: var(--ink-3); font: 400 .85rem/1.5 var(--mono); margin: 1rem auto 1.75rem; }

/* ================================================================
   DASHBOARD (preview)
   ================================================================ */
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.75rem;
}
.dash-client { font: 600 12px/1 var(--mono); color: var(--accent-text); margin-bottom: .4rem; letter-spacing: .06em; }
.dash-head h1 { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; letter-spacing: -.01em; }
.progress { text-align: right; }
.progress small { display: block; font-size: .8rem; color: var(--ink-3); margin-bottom: .2rem; }
.progress strong { font-family: var(--serif); font-size: 1.6rem; color: var(--primary); }
.progress-bar { width: 140px; height: 4px; background: rgba(11,34,60,.1); border-radius: 4px; margin-top: .5rem; overflow: hidden; margin-left: auto; }
.progress-bar i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 4px; transition: width 1s ease-out .15s; }
.progress-bar.go i { width: var(--pct, 64%); }

.phase-pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; margin-bottom: 2.75rem; }
.pipe {
  border-radius: var(--radius);
  padding: 1.1rem .9rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
}
.pipe.emph { background: var(--ai-soft); border-color: rgba(248,133,28,.45); }
.pipe small { display: block; font: 700 .7rem/1 var(--mono); color: var(--ink-3); margin-bottom: .4rem; }
.pipe strong { display: block; font-family: var(--serif); font-size: .88rem; }
.pipe.emph strong { font-size: 1.02rem; }
.pipe span { display: block; font-size: .72rem; margin-top: .4rem; font-weight: 600; color: var(--ink-3); }
.pipe.done small, .pipe.done span { color: var(--primary); }
.pipe.active small, .pipe.active span { color: var(--accent-text); }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; }
.dash-section-title { font: 700 .8rem/1 var(--sans); color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.milestones { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 2.25rem; }
.milestone {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .9rem 1.1rem;
  transition: transform .2s var(--ease);
}
.milestone:hover { transform: translateX(4px); }
.milestone i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--ink-3); }
.milestone .m-title { font-weight: 600; font-size: .9rem; }
.milestone .m-date { font-size: .78rem; color: var(--ink-3); margin-top: .1rem; }
.milestone .m-status { margin-left: auto; font: 700 11px/1 var(--mono); text-transform: uppercase; color: var(--ink-3); }
.milestone.done i, .milestone.done .m-status { background: var(--primary); color: var(--primary); }
.milestone.active i, .milestone.active .m-status { background: var(--accent); color: var(--accent-text); }
.milestone.done .m-status, .milestone.active .m-status { background: none; }

.docs { display: flex; flex-direction: column; gap: .5rem; }
.doc {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .7rem 1rem;
  font: 400 .85rem/1.4 var(--mono);
}
.doc span:last-child { margin-left: auto; font-family: var(--sans); font-size: .75rem; color: var(--ink-3); }

.team-card { padding: 1.25rem; margin-bottom: 2rem; }
.team-card .person { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.team-card .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--paper); display: flex; align-items: center; justify-content: center; font: 700 .85rem/1 var(--serif); }
.team-card .name { font-weight: 700; font-size: .9rem; }
.team-card .role { font-size: .78rem; color: var(--ink-3); }

.activity { display: flex; flex-direction: column; gap: .9rem; }
.activity li { border-left: 2px solid var(--line); padding-left: .9rem; }
.activity .a-text { font-size: .85rem; }
.activity .a-time { font-size: .75rem; color: var(--ink-3); margin-top: .15rem; }

.preview-note {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: 600 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ai);
  border: 1px solid rgba(248,133,28,.4);
  background: var(--ai-soft);
  padding: .45rem .8rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

/* ================================================================
   CASE STUDY
   ================================================================ */
.case-wrap { max-width: 900px; margin: 0 auto; }
.case-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 2.5rem 0 3.25rem; }
.metric { text-align: center; padding: 1.4rem; }
.metric strong { display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--primary); }
.metric span { display: block; font-size: .8rem; color: var(--ink-2); margin-top: .35rem; }
.narrative { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 3rem; }
.narrative .card { padding: 1.5rem 1.6rem; }
.narrative .n-head { display: flex; align-items: baseline; gap: .65rem; flex-wrap: wrap; margin-bottom: .5rem; }
.narrative .n-num { font: 700 11px/1 var(--mono); color: var(--accent-text); }
.narrative h3 { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.narrative p { color: var(--ink-2); font-size: .92rem; line-height: 1.75; max-width: 680px; }
.case-quote {
  padding: 2rem;
  margin-bottom: 2.75rem;
}
.case-quote::before {
  content: '\201C';
  position: absolute;
  top: .25rem; right: 1.5rem;
  font-family: Georgia, serif;
  font-size: 3.2rem;
  color: var(--ink-3);
  opacity: .35;
}
.case-quote p { font-family: var(--serif); font-style: italic; font-size: 1.1rem; line-height: 1.7; margin-bottom: 1rem; }
.case-quote .who { font-weight: 700; font-size: .9rem; }
.case-quote .who-role { font-size: .8rem; color: var(--ink-3); }

/* ================================================================
   MOTION LAYER — scroll progress, cursor follower, word reveals,
   section rails, section-specific signatures
   ================================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 1200;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(var(--scroll, 0)); transform-origin: left;
  pointer-events: none;
}

/* Cursor follower — a ring that trails the pointer and reacts to what's under it */
.cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 4000;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(var(--cx, -100px), var(--cy, -100px)) scale(1);
  transition: opacity .3s, transform .12s ease-out, background .2s, border-color .2s, width .2s, height .2s, margin .2s;
  mix-blend-mode: multiply;
}
.cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 4001;
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--accent); border-radius: 50%;
  pointer-events: none; opacity: 0;
  transform: translate(var(--cx, -100px), var(--cy, -100px));
  transition: opacity .3s;
}
html.cursor-on .cursor-ring, html.cursor-on .cursor-dot { opacity: 1; }
.cursor-ring.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(248,133,28,.16); border-color: var(--accent); }
.cursor-ring.is-press { transform: translate(var(--cx), var(--cy)) scale(.75); background: rgba(248,133,28,.35); }
.cursor-ring.is-text  { width: 4px; height: 40px; margin: -20px 0 0 -2px; border-radius: 2px; background: var(--accent); border-color: transparent; }

/* Word-by-word heading reveal */
.split .w { display: inline-block; white-space: pre; }
html.js .split .w { opacity: 0; transform: translateY(.55em) rotate(1.5deg); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i) * 55ms); }
html.js .split.visible .w, html.js .split.in .w, html.js .reveal.visible .split .w { opacity: 1; transform: none; }

/* Business model: connector rail between the 3 steps */
.steps-grid { position: relative; }
.steps-grid::before {
  content: ''; position: absolute; left: 8%; right: 8%; top: 2.55rem; height: 2px; z-index: 0;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 16px);
  transform: scaleX(0); transform-origin: left; opacity: .7;
  transition: transform 1.2s var(--ease) .2s;
}
.steps-grid.drawn::before, html.no-js .steps-grid::before { transform: scaleX(1); }
.step-card { position: relative; z-index: 1; }
.step-card .step-num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line-2); transition: transform .35s var(--ease), background .3s, color .3s, border-color .3s; }
.step-card:hover .step-num { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(-10deg) scale(1.1); }

/* Lifecycle: rail that draws across the six phases */
.lifecycle-grid { position: relative; }
.lifecycle-grid::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1.1rem; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.6s var(--ease) .1s;
}
.lifecycle-grid.drawn::before, html.no-js .lifecycle-grid::before { transform: scaleX(1); }
.phase-card { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.phase-card:hover { transform: translateY(-6px) rotate(-.6deg); }
.phase-emph { position: relative; }
.phase-emph::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  animation: phase-pulse 3s ease-out infinite;
}
@keyframes phase-pulse { 0% { box-shadow: 0 0 0 0 rgba(248,133,28,.45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(248,133,28,0); } }

/* Hero: stat counters land with a bounce */
.stat-num { display: inline-block; }
.stat.counted .stat-num { animation: land .5s var(--ease); }
@keyframes land { 0% { transform: scale(1.25); color: var(--accent); } 100% { transform: scale(1); } }

/* Case teaser: arrow nudges */
.case-teaser .btn::before { content: '92'; order: 2; margin-left: .35rem; transition: transform .3s var(--ease); }
.case-teaser .btn:hover::before { transform: translateX(6px); }

/* Ticker items light up on hover */
.ticker-track li { transition: color .2s; }
.ticker-track li:hover { color: var(--accent-text); }

/* Haptic press feedback for everything tappable */
.type-btn:active, .slot-btn:active, .cal-day:active:not(:disabled), .faq-item summary:active, .nav-links a:active, .lang-toggle:active, .icon-btn:active { transform: scale(.96); transition-duration: .08s; }

/* Section dividers: hairline that draws when the section enters */
.section-alt::before {
  content: ''; position: absolute; top: -1px; left: 50%; height: 1px; width: 0; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-50%);
  transition: width 1.4s var(--ease);
}
.section-alt.drawn::before, html.no-js .section-alt::before { width: min(60%, 720px); }

/* ================================================================
   LOGO CHOREOGRAPHY — inline header logo + left brand rail
   ================================================================ */
.logo-inline { display: block; height: 40px; width: auto; overflow: visible; }
.logo-inline path, .rail-mark path, .rail-word path { transform-box: fill-box; transform-origin: center; }
.lg-frame  { fill: var(--primary); }
.lg-letter { fill: var(--primary); }
.lg-f      { fill: var(--accent); }
.lg-square { fill: var(--primary); }

/* Entrance: frame settles, F's slide in from opposite sides, letters rise one by one */
html.js .logo-inline .lg-frame  { animation: lg-frame .7s var(--ease) both; }
html.js .logo-inline .lg-f1     { animation: lg-f-left .7s var(--ease) .25s both; }
html.js .logo-inline .lg-f2     { animation: lg-f-right .7s var(--ease) .35s both; }
html.js .logo-inline .lg-letter { animation: lg-letter .5s var(--ease) both; animation-delay: calc(.45s + var(--i) * 55ms); }
@keyframes lg-frame   { from { opacity: 0; transform: scaleX(.6); transform-origin: left center; } to { opacity: 1; transform: none; } }
@keyframes lg-f-left  { from { opacity: 0; transform: translateX(-60%) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes lg-f-right { from { opacity: 0; transform: translateX(60%) rotate(12deg); }  to { opacity: 1; transform: none; } }
@keyframes lg-letter  { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }

/* Hover: the F's hop in turn, the letters ripple */
.nav-logo:hover .lg-f1 { animation: lg-hop .5s var(--ease); }
.nav-logo:hover .lg-f2 { animation: lg-hop .5s var(--ease) .08s; }
.nav-logo:hover .lg-letter { animation: lg-wave .6s var(--ease); animation-delay: calc(var(--i) * 40ms); }
@keyframes lg-hop  { 0% { transform: none; } 40% { transform: translateY(-18%) rotate(-6deg); } 100% { transform: none; } }
@keyframes lg-wave { 0% { transform: none; } 35% { transform: translateY(-22%); fill: var(--accent); } 100% { transform: none; } }

/* Brand rail — fixed to the left edge, appears after the hero, travels with the page */
.brand-rail {
  position: fixed; left: 1.1rem; top: 50%; z-index: 950;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  transform: translate(-140%, -50%);
  opacity: 0; pointer-events: none;
  transition: transform .6s var(--ease), opacity .4s;
}
.brand-rail.show { transform: translate(0, -50%); opacity: 1; pointer-events: auto; }
.rail-mark { display: block; width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 8px 20px rgba(11,34,60,.18); transition: box-shadow .3s; }
.rail-mark svg { display: block; width: 100%; height: 100%; transform: rotate(var(--tilt, 0deg)) scale(var(--squash, 1)); transition: transform .35s var(--ease); }
.rail-mark:hover { box-shadow: 0 12px 28px rgba(248,133,28,.35); }
.rail-mark:hover svg { transform: rotate(var(--tilt, 0deg)) scale(1.08); }
/* the F's breathe out of phase while idle */
.brand-rail.show .rail-mark .lg-f1 { animation: lg-breathe 3.2s ease-in-out infinite; }
.brand-rail.show .rail-mark .lg-f2 { animation: lg-breathe 3.2s ease-in-out -1.6s infinite; }
@keyframes lg-breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4%); } }
/* scroll track */
.rail-track { width: 2px; height: 120px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.rail-track i { display: block; width: 100%; height: 100%; background: linear-gradient(180deg, var(--accent), var(--primary)); transform: scaleY(var(--scroll, 0)); transform-origin: top; }
/* vertical wordmark */
.rail-word-wrap { width: 22px; height: 112px; position: relative; }
.rail-word { position: absolute; left: 0; top: 0; width: 112px; height: 22px; transform: translate(-45px, 45px) rotate(90deg); overflow: visible; }
.rail-word .lg-letter { transition: opacity .5s var(--ease), transform .5s var(--ease), fill .3s; transition-delay: calc(var(--i) * 60ms); opacity: 0; transform: translateX(-40%); }
.brand-rail.show .rail-word .lg-letter { opacity: 1; transform: none; }
.brand-rail:hover .rail-word .lg-letter { fill: var(--accent); transition-delay: calc(var(--i) * 30ms); }

/* Below 1340px there's no margin for the full rail: keep just the FF, floating bottom-left
   (mirrors the back-to-top button on the right). Still tilts with scroll, still scrolls home. */
@media (max-width: 1340px) {
  /* --lift is set by JS to the footer's overlap so the mark rides up above it */
  .brand-rail { top: auto; bottom: 1.5rem; left: 1.5rem; gap: 0; transform: translate(-160%, calc(-1 * var(--lift, 0px))); }
  .brand-rail.show { transform: translate(0, calc(-1 * var(--lift, 0px))); }
  .rail-track, .rail-word-wrap { display: none; }
  .rail-mark { width: 44px; height: 44px; }
}
@media (max-width: 640px) {
  .brand-rail { bottom: 1rem; left: 1rem; }
  .rail-mark {
    width: 40px; height: 40px; border-radius: 9px;
    /* paper-coloured halo so the mark never sits directly on card edges or text */
    box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--line), 0 8px 20px 6px rgba(11,34,60,.16);
  }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lifecycle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phase-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .testimonial-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .testimonial-featured { order: -1; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --section-py: 4.5rem; --nav-h: 64px; }

  .nav-toggle { display: flex; z-index: 1001; }
  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 5rem 1.5rem 2rem;
    background: rgba(247,244,238,.97);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .nav-menu.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s; }
  .nav-links { flex-direction: column; gap: .25rem; width: 100%; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { justify-content: center; width: 100%; font-family: var(--serif); font-size: 1.35rem; padding: .85rem 2rem; min-height: 52px; }
  .nav-cta { width: min(100%, 320px); margin-left: 0; }
  .lang-toggle { min-height: 44px; }

  .hero { min-height: 0; padding: 4.5rem 0 4rem; }
  .steps-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .ai-grid { grid-template-columns: 1fr; }
  .contact-strip { grid-template-columns: 1fr; gap: 2rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .case-teaser { padding: 1.75rem; }
}

@media (max-width: 400px) {
  .nav-logo .logo-lockup { display: none; }
  .nav-logo .logo-compact { display: block; }
}

@media (max-width: 640px) {
  :root { --section-py: 3.75rem; }

  .hero-title br { display: none; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 1.25rem 2rem; }

  .services-grid, .lifecycle-grid, .phase-pipeline, .case-metrics { grid-template-columns: 1fr; }
  .service-card { transform: none !important; }
  .card { padding: 1.4rem; }

  .logo-strip { gap: 2rem; }
  .logo-item svg { width: 112px; height: 32px; }
  .steps-grid::before { display: none; }

  .field-row { grid-template-columns: 1fr; }
  .field input, .field textarea { font-size: 1rem; } /* avoid iOS zoom */
  .quote-panel { padding: 1.4rem; }
  .stepper .lbl { font-size: 10px; }
  .type-grid { grid-template-columns: 1fr; }
  .panel-actions { flex-direction: column-reverse; }
  .panel-actions .btn { width: 100%; }

  .faq-item summary { padding: 1rem 1.1rem; font-size: .95rem; }
  .faq-answer { padding: 0 1.1rem 1.1rem; }

  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .back-to-top {
    right: 1rem; bottom: 1rem; width: 40px; height: 40px;
    background: var(--card);
    /* same paper halo as the floating FF so the pair matches */
    box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--line), 0 8px 20px 6px rgba(11,34,60,.16);
  }

  .aurora span { filter: blur(50px); }
  .rings .r1 { width: 240px; height: 240px; }
}

/* ================================================================
   REDUCED MOTION — honour the OS setting
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .rule { width: 56px; }
  .flowfield, .dotgrid { display: none; }
  .aurora span, .rings span { animation: none; }
  .ticker-track { animation: none; }
  .service-card { transform: none !important; }
  .progress-bar i { width: var(--pct, 64%); }
  .cursor-ring, .cursor-dot, .scroll-progress { display: none; }
  .split .w { opacity: 1; transform: none; }
  .steps-grid::before, .lifecycle-grid::before { transform: none; }
  .section-alt::before { width: min(60%, 720px); }
  .hero-title em { background-size: 100% 100%; }
  .logo-strip { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .contact-cta, .phase-emph::after { animation: none; }
  .logo-inline path, .rail-mark path { animation: none !important; }
  .rail-word .lg-letter { opacity: 1; transform: none; }
  .rail-mark svg { transform: none !important; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: rgba(11,34,60,.22); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ================================================================
   COMMITMENTS (home) · WORKED-EXAMPLE NOTE · LEGAL PAGES
   ================================================================ */
.commit-card::before { content: none; }
.commit-card h3 { font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; color: var(--primary); }
.commit-card > p { flex: 1; color: var(--ink-2); line-height: 1.7; font-size: .95rem; }
.commit-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  color: var(--accent-text);
  background: linear-gradient(135deg, rgba(248,133,28,.16), rgba(248,133,28,.06));
  border: 1px solid rgba(248,133,28,.35);
  transition: transform .35s var(--ease), background .25s var(--ease);
}
.commit-icon svg { width: 22px; height: 22px; }
.commit-card:hover .commit-icon { transform: translateY(-3px) rotate(-6deg); background: rgba(248,133,28,.22); }
.commit-foot {
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  font: 500 .72rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.commit-foot::before { content: '✓'; color: var(--accent-text); margin-right: .5rem; }
.stack-item svg text { font-family: var(--sans); }

.example-note {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1rem;
  padding: .45rem .8rem;
  border: 1px dashed rgba(11,34,60,.35);
  border-radius: 999px;
  font: 500 .78rem/1.3 var(--mono);
  color: var(--ink-2);
  background: rgba(255,255,255,.55);
}
.example-note span { color: var(--accent-text); font-size: .95rem; }

.legal { max-width: 760px; margin: 0 auto; }
.legal .legal-updated { margin-top: .75rem; font: 500 .75rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.legal h2 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; margin: 2.4rem 0 .75rem; color: var(--primary); }
.legal h3 { font-size: .95rem; font-weight: 600; margin: 1.4rem 0 .4rem; color: var(--ink); }
.legal p, .legal li { color: var(--ink-2); line-height: 1.75; font-size: .97rem; }
.legal p + p { margin-top: .75rem; }
.legal ul { padding-left: 1.2rem; margin: .5rem 0 1rem; }
.legal li { margin: .35rem 0; }
.legal code { font: 500 .85em var(--mono); background: var(--paper-2); padding: .1em .4em; border-radius: 4px; color: var(--ink); }
.legal a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--primary); }

/* the language switch sets <html lang>; each legal page carries both languages */
html[lang="fr"] .only-en, html:not([lang="fr"]) .only-fr { display: none; }
