/* omarbaumgartner.com — themeable design system.
   Every color/font/radius is a token; themes (data-theme on <html>) only override tokens.
   Themes: nuit (default) · editorial · mono · electrique · clair */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/fonts/geist-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/fonts/geist-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/fonts/geistmono-latin.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrumentserif-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrumentserif-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrumentserif-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrumentserif-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/spacegrotesk-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/spacegrotesk-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- theme tokens ---------- */

/* 1 · Nuit — dark ink, violet/cyan gradient, serif italic accent (default) */
:root {
  color-scheme: dark;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --grotesk: 'Space Grotesk', var(--sans);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --bg: #07080c; --bg-2: #0c0e14; --bg-3: #1a1e29;
  --surface: rgba(255, 255, 255, .035); --surface-2: rgba(255, 255, 255, .065); --input-bg: rgba(0, 0, 0, .25);
  --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .14); --line-hover: rgba(255, 255, 255, .3);
  --text: #eef0f6; --text-2: #a6acbd; --text-3: #858ca0;
  --accent: #9b87ff; --check: #22d3ee; --accent-soft: rgba(124, 92, 255, .14); --ring: rgba(124, 92, 255, .2);
  --grad: linear-gradient(120deg, #7c5cff 0%, #22d3ee 55%, #ff6b9a 100%);
  --icon-bg: linear-gradient(135deg, rgba(124, 92, 255, .35), rgba(34, 211, 238, .18)); --icon-fg: #fff;
  --btn-bg: #f1effa; --btn-fg: #0a0b10; --btn-hover: #ffffff; --btn-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 10px 24px -14px rgba(0, 0, 0, .9);
  --fab-bg: var(--grad); --fab-fg: #fff; --fab-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7);
  --user-bg: linear-gradient(135deg, #6d4dff, #4f46e5); --user-fg: #fff; --bot-bg: rgba(255, 255, 255, .055);
  --orb-1: #7c5cff; --orb-2: #22d3ee; --orb-3: #ff6b9a; --orb-o: 1; --grain-o: .06;
  --field-o: .55; --glow: rgba(124, 92, 255, .13); --spot: rgba(155, 135, 255, .55);
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), 0 0 0 1px var(--line);
  --device-glow: 0 0 120px -30px rgba(124, 92, 255, .45);
  --topbar-bg: rgba(7, 8, 12, .72); --panel-bg: rgba(13, 15, 22, .92); --backdrop: rgba(3, 4, 8, .7);
  --selection: rgba(124, 92, 255, .45); --err: #fecaca; --err-line: rgba(248, 113, 113, .4); --live: #34d399;
  --display: var(--sans); --display-w: 600; --display-track: -.045em; --h-track: -.035em; --h-lh: 1.1;
  --accent-family: var(--serif); --accent-style: italic; --accent-w: 400; --accent-track: -.02em;
  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-btn: 999px;
}

/* 2 · Éditorial — warm paper, serif headlines, terracotta */
:root[data-theme="editorial"] {
  color-scheme: light;
  --bg: #f4f1ea; --bg-2: #fbfaf6; --bg-3: #e9e4d8;
  --surface: #fbfaf6; --surface-2: #ffffff; --input-bg: #ffffff;
  --line: rgba(28, 25, 23, .12); --line-strong: rgba(28, 25, 23, .2); --line-hover: rgba(28, 25, 23, .45);
  --text: #1c1917; --text-2: #57534e; --text-3: #6f6a64;
  --accent: #b93c0c; --check: #b93c0c; --accent-soft: rgba(185, 60, 12, .08); --ring: rgba(185, 60, 12, .18);
  --grad: linear-gradient(#b93c0c, #b93c0c);
  --icon-bg: rgba(185, 60, 12, .09); --icon-fg: #b93c0c;
  --btn-bg: #1c1917; --btn-fg: #f8f5ef; --btn-hover: #b93c0c; --btn-shadow: none;
  --fab-bg: #1c1917; --fab-fg: #f8f5ef; --fab-shadow: 0 12px 30px -12px rgba(28, 25, 23, .5);
  --user-bg: #1c1917; --user-fg: #f8f5ef; --bot-bg: #ffffff;
  --orb-o: 0; --grain-o: .05; --field-o: 0; --glow: transparent; --spot: rgba(185, 60, 12, .45);
  --shadow: 0 24px 60px -28px rgba(28, 25, 23, .35), 0 0 0 1px var(--line);
  --device-glow: 0 0 0 transparent;
  --topbar-bg: rgba(244, 241, 234, .85); --panel-bg: rgba(251, 250, 246, .97); --backdrop: rgba(28, 25, 23, .35);
  --selection: rgba(185, 60, 12, .2); --err: #9f1239; --err-line: rgba(159, 18, 57, .35); --live: #15803d;
  --display: var(--serif); --display-w: 400; --display-track: -.02em; --h-track: -.015em; --h-lh: 1.04;
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-btn: 999px;
}

/* 3 · Mono — pure black & white, silver accents, sharper corners */
:root[data-theme="mono"] {
  --bg: #000; --bg-2: #0a0a0a; --bg-3: #171717;
  --surface: #0a0a0a; --surface-2: #121212; --input-bg: #000;
  --line: #1f1f1f; --line-strong: #2e2e2e; --line-hover: #5a5a5a;
  --text: #ededed; --text-2: #a1a1a1; --text-3: #808080;
  --accent: #ededed; --check: #ededed; --accent-soft: #161616; --ring: rgba(255, 255, 255, .14);
  --grad: linear-gradient(180deg, #ffffff 25%, #7a7a7a 100%);
  --icon-bg: #161616; --icon-fg: #ededed;
  --btn-bg: #ededed; --btn-fg: #000; --btn-hover: #fff; --btn-shadow: none;
  --fab-bg: #ededed; --fab-fg: #000; --fab-shadow: 0 10px 30px -10px rgba(0, 0, 0, .9);
  --user-bg: #ededed; --user-fg: #000; --bot-bg: #111;
  --orb-o: 0; --grain-o: .035; --field-o: .3; --glow: rgba(255, 255, 255, .045); --spot: rgba(255, 255, 255, .4);
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, .9), 0 0 0 1px var(--line);
  --device-glow: 0 0 0 transparent;
  --topbar-bg: rgba(0, 0, 0, .75); --panel-bg: rgba(10, 10, 10, .96); --backdrop: rgba(0, 0, 0, .75);
  --selection: rgba(255, 255, 255, .25);
  --display-track: -.05em;
  --r-sm: 6px; --r: 10px; --r-lg: 12px; --r-btn: 8px;
}

/* 4 · Électrique — charcoal, acid lime, Space Grotesk, angular */
:root[data-theme="electrique"] {
  --bg: #0e0f0c; --bg-2: #151612; --bg-3: #1f211b;
  --surface: #151612; --surface-2: #1b1d17; --input-bg: #0e0f0c;
  --line: rgba(255, 255, 240, .09); --line-strong: rgba(255, 255, 240, .16); --line-hover: rgba(212, 255, 58, .5);
  --text: #f2f3ea; --text-2: #b3b5a6; --text-3: #8f9282;
  --accent: #d4ff3a; --check: #d4ff3a; --accent-soft: rgba(212, 255, 58, .09); --ring: rgba(212, 255, 58, .22);
  --grad: linear-gradient(#d4ff3a, #d4ff3a);
  --icon-bg: #d4ff3a; --icon-fg: #0e0f0c;
  --btn-bg: #d4ff3a; --btn-fg: #0e0f0c; --btn-hover: #e4ff7d; --btn-shadow: none;
  --fab-bg: #d4ff3a; --fab-fg: #0e0f0c; --fab-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8);
  --user-bg: #d4ff3a; --user-fg: #0e0f0c; --bot-bg: #1b1d17;
  --orb-1: #d4ff3a; --orb-2: #9bbf1f; --orb-3: #d4ff3a; --orb-o: .4; --grain-o: .05;
  --field-o: .3; --glow: rgba(212, 255, 58, .06); --spot: rgba(212, 255, 58, .6);
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
  --device-glow: 0 0 0 transparent;
  --topbar-bg: rgba(14, 15, 12, .8); --panel-bg: rgba(21, 22, 18, .97); --backdrop: rgba(0, 0, 0, .7);
  --selection: rgba(212, 255, 58, .35);
  --display: var(--grotesk); --display-w: 700; --display-track: -.045em; --h-track: -.035em; --h-lh: 1.02;
  --accent-family: var(--grotesk); --accent-style: normal; --accent-w: 700; --accent-track: -.045em;
  --r-sm: 4px; --r: 6px; --r-lg: 8px; --r-btn: 6px;
}

/* 5 · Clair — bright, corporate, trustworthy (white + indigo) */
:root[data-theme="clair"] {
  color-scheme: light;
  --bg: #ffffff; --bg-2: #f6f9fc; --bg-3: #eef2f7;
  --surface: #ffffff; --surface-2: #f6f9fc; --input-bg: #ffffff;
  --line: #e3e8ee; --line-strong: #cfd7df; --line-hover: #9aa6b4;
  --text: #0a2540; --text-2: #425466; --text-3: #5d6b7c;
  --accent: #5a4ff0; --check: #5a4ff0; --accent-soft: rgba(99, 91, 255, .08); --ring: rgba(99, 91, 255, .2);
  --grad: linear-gradient(120deg, #635bff 0%, #00a3ff 55%, #ff5996 100%);
  --icon-bg: linear-gradient(135deg, #635bff, #00a3ff); --icon-fg: #fff;
  --btn-bg: #635bff; --btn-fg: #fff; --btn-hover: #4f46e5; --btn-shadow: 0 6px 16px -8px rgba(99, 91, 255, .6);
  --fab-bg: #635bff; --fab-fg: #fff; --fab-shadow: 0 12px 28px -10px rgba(50, 50, 93, .45);
  --user-bg: #635bff; --user-fg: #fff; --bot-bg: #f6f9fc;
  --orb-1: #a5b4fc; --orb-2: #7dd3fc; --orb-3: #fbcfe8; --orb-o: 1.6; --grain-o: 0;
  --field-o: .3; --glow: rgba(99, 91, 255, .05); --spot: rgba(99, 91, 255, .5);
  --shadow: 0 30px 60px -12px rgba(50, 50, 93, .22), 0 18px 36px -18px rgba(0, 0, 0, .25), 0 0 0 1px var(--line);
  --device-glow: 0 0 0 transparent;
  --topbar-bg: rgba(255, 255, 255, .82); --panel-bg: rgba(255, 255, 255, .98); --backdrop: rgba(10, 37, 64, .3);
  --selection: rgba(99, 91, 255, .2); --err: #9f1239; --err-line: rgba(159, 18, 57, .3); --live: #059669;
  --display-track: -.04em; --h-track: -.03em;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  transition: background-color .4s, color .4s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { margin: 0; line-height: var(--h-lh); letter-spacing: -.025em; font-weight: 650; }
h1, h2 { font-family: var(--display); font-weight: var(--display-w); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--selection); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600; transition: top .2s; }
.skip:focus { top: 16px; }
.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-sm { width: 18px; height: 18px; }
.icon-xs { width: 15px; height: 15px; stroke-width: 2.2; }

/* ---------- background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--field-o); transition: opacity .4s; }
.bg-orb { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; transition: opacity .5s; }
.bg-orb-1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -16vmax; background: radial-gradient(circle, var(--orb-1), transparent 65%); opacity: calc(.32 * var(--orb-o)); animation: drift1 26s ease-in-out infinite alternate; }
.bg-orb-2 { width: 38vmax; height: 38vmax; right: -14vmax; top: 18vh; background: radial-gradient(circle, var(--orb-2), transparent 65%); opacity: calc(.2 * var(--orb-o)); animation: drift2 32s ease-in-out infinite alternate; }
.bg-orb-3 { width: 34vmax; height: 34vmax; left: 30vw; bottom: -22vmax; background: radial-gradient(circle, var(--orb-3), transparent 65%); opacity: calc(.16 * var(--orb-o)); animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate3d(12vw, 10vh, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-10vw, 14vh, 0) scale(.9); } }
@keyframes drift3 { to { transform: translate3d(-14vw, -12vh, 0) scale(1.2); } }
.bg-grain {
  position: absolute; inset: -50%; opacity: var(--grain-o); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
:root[data-theme="editorial"] .bg-grain { mix-blend-mode: multiply; }
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } }
.cursor-glow { position: fixed; left: 0; top: 0; z-index: -1; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 60%); pointer-events: none; opacity: 0; transition: opacity .4s; will-change: transform; }
.has-pointer .cursor-glow { opacity: 1; }
.progress { position: fixed; left: 0; top: 0; z-index: 60; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--grad); }

/* ---------- topbar ---------- */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; height: 68px; transition: background .35s var(--ease), border-color .35s, transform .45s var(--ease); border-bottom: 1px solid transparent; }
.topbar.is-scrolled { background: var(--topbar-bg); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); }
.topbar.is-hidden { transform: translateY(-100%); }
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: calc(var(--r-sm) + 1px); font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text);
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent;
  transition: transform .5s var(--ease-spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

/* Mobile menu (burger morphs into a cross; links slide in one by one). */
.menu-btn { display: none; position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.5px; border-radius: 2px; background: var(--text); transition: transform .45s var(--ease), top .45s var(--ease); }
.menu-btn span:first-child { top: 16px; } .menu-btn span:last-child { top: 24px; }
.menu-open .menu-btn span:first-child { top: 20px; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 20px; transform: rotate(-45deg); }
.mobile-menu { position: fixed; inset: 0; z-index: 49; padding-top: 96px; background: var(--panel-bg); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); clip-path: circle(0 at calc(100% - 45px) 34px); transition: clip-path .7s var(--ease); }
.mobile-menu[hidden] { display: block; visibility: hidden; }
.menu-open .mobile-menu { visibility: visible; clip-path: circle(150% at calc(100% - 45px) 34px); }
.mobile-menu-inner { display: grid; gap: 4px; }
.mobile-menu a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: var(--display-w); font-size: clamp(34px, 9vw, 48px); letter-spacing: var(--h-track); opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.menu-open .mobile-menu a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 70ms + 180ms); }
.mm-num { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .1em; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { position: relative; padding: 8px 14px; border-radius: var(--r-btn); color: var(--text-2); font-size: 14.5px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.lang { display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: var(--r-btn); color: var(--text-3); background: var(--surface); }
.lang .icon { margin-right: 4px; }
.lang-opt { padding: 4px 9px; border-radius: var(--r-btn); font-family: var(--mono); font-size: 12px; color: var(--text-2); transition: color .2s, background .2s; }
.lang-opt:hover { color: var(--text); }
.lang-opt.is-active { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line); }

/* ---------- buttons ---------- */
/* Flat solid fill + crisp inset highlight; hover only shifts the fill (no glow halo, no color flip). */
.btn {
  --mx: 0px; --my: 0px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 22px; border-radius: var(--r-btn); font-size: 15px; font-weight: 550; letter-spacing: -.005em; white-space: nowrap;
  transform: translate3d(var(--mx), var(--my), 0); transition: transform .35s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn-primary { color: var(--btn-fg); background: var(--btn-bg); box-shadow: var(--btn-shadow); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-primary { overflow: hidden; isolation: isolate; }
.btn-primary::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-120%); }
.btn-primary:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.btn-primary .icon { transition: transform .35s var(--ease); }
.btn-primary:hover .icon { transform: translateX(3px); }
.btn-ghost { color: var(--text); border: 1px solid var(--line-strong); background: var(--surface); }
.btn-ghost:hover { border-color: var(--line-hover); background: var(--surface-2); }
.btn:active { transform: translate3d(var(--mx), var(--my), 0) scale(.97); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 108px 0 130px; }
.hero-inner { max-width: 1000px; }
/* Byline: monogram tile + name + role, like the signature of a message. */
.byline { display: inline-flex; align-items: center; margin: 0; padding-left: 14px; border-left: 2px solid var(--accent); }
.byline-text { display: grid; gap: 3px; line-height: 1.2; }
.byline-text strong { font-size: 17px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.byline-text span { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.byline-text span::before { content: '/ '; color: var(--accent); }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
.hero-title { margin: 28px 0; font-size: clamp(42px, 7.6vw, 104px); line-height: .98; letter-spacing: var(--display-track); }
:root[data-theme="editorial"] .hero-title { font-size: clamp(48px, 8.6vw, 120px); line-height: .95; }
.hero-title .line { display: inline-block; overflow: hidden; padding: .06em .02em .14em; margin: -.06em -.02em -.14em; vertical-align: top; }
.hero-title .word { display: inline-block; }
.accent {
  font-family: var(--accent-family); font-style: var(--accent-style); font-weight: var(--accent-w); letter-spacing: var(--accent-track); padding-right: .08em;
  background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s ease-in-out infinite alternate;
}
@keyframes shimmer { to { background-position: 100% 0; } }
.hero-lead { max-width: 640px; font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero-services { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14.5px; }
.hero-services li { display: flex; align-items: center; gap: 9px; }
.hero-services .icon { color: var(--accent); }
/* Scroll cue: small mono label over a thin line with a light running down it. Fades out once you scroll. */
.scroll-cue { position: absolute; z-index: 5; left: 50%; bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 12px; transform: translateX(-50%); color: var(--text-3); transition: color .3s, opacity .5s var(--ease), transform .5s var(--ease); }
.scroll-cue:hover { color: var(--text); }
.scroll-cue-label { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); letter-spacing: .22em; text-transform: uppercase; padding-left: .22em; }
.scroll-cue-track { position: relative; width: 1px; height: 38px; overflow: hidden; background: var(--line-strong); }
.scroll-cue-dot { position: absolute; left: 0; top: 0; width: 1px; height: 22px; background: linear-gradient(transparent, var(--accent)); animation: cue 2.2s var(--ease) infinite; }
.scroll-cue:hover .scroll-cue-dot { animation-duration: 1.2s; }
@keyframes cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(240%); } }
.scrolled-past-hero .scroll-cue { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
.scrolled-past-hero .scroll-cue, .scroll-cue.is-blocked, .menu-open .scroll-cue { opacity: 0; transition-delay: 0s; pointer-events: none; }
.hero-br { display: block; content: ''; }

.hero-services li { transition: color .25s, transform .4s var(--ease); }
.hero-services li:hover { color: var(--text); transform: translateY(-2px); }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(90px, 12vw, 150px) 0; }
.section-head { margin-bottom: clamp(44px, 6vw, 72px); }
.section-head .lead, .contact-copy .lead { max-width: 720px; }
.contact-grid > * { min-width: 0; }
.contact-head { grid-column: 1 / -1; margin-bottom: calc(clamp(36px, 6vw, 80px) * -.4); }
.contact-head .kicker { margin-bottom: 18px; }
/* Section titles sit on one line: JS (fitTitles) gives all of them one shared size that fits the
   longest title; without JS, or if even the smallest allowed size is too wide, they wrap evenly. */
.section h2 { text-wrap: balance; }
.fit-titles .section h2 { white-space: nowrap; }
.fit-titles .section h2.wraps { white-space: normal; }
.kicker { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.kicker-num { color: var(--accent); }
.kicker-num::after { content: ''; display: inline-block; width: 28px; height: 1px; margin-left: 12px; vertical-align: middle; background: var(--line-strong); }
.section h2 { font-size: clamp(34px, 5vw, 60px); letter-spacing: var(--h-track); }
:root[data-theme="editorial"] .section h2 { font-size: clamp(40px, 5.8vw, 72px); }
.lead { margin-top: 20px; font-size: 18px; color: var(--text-2); }






/* ---------- cards ---------- */
.grid-services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { position: relative; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.service { padding: 34px 30px 32px; transition: border-color .4s, transform .5s var(--ease); }
.service::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient(400px circle at var(--x, 50%) var(--y, 0%), var(--spot), transparent 45%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .4s; pointer-events: none; }
.card-glow { position: absolute; inset: 0; background: radial-gradient(500px circle at var(--x, 50%) var(--y, 0%), var(--accent-soft), transparent 45%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.service:hover { transform: translateY(-4px); }
.service:active { transform: scale(.985); transition-duration: .15s; }
.service-num { position: absolute; right: 26px; top: 28px; font-family: var(--mono); font-size: 12px; color: var(--text-3); letter-spacing: .1em; }
.service:hover::before, .service:hover .card-glow { opacity: 1; }
.service-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 26px; border-radius: calc(var(--r) - 1px); color: var(--icon-fg); background: var(--icon-bg); border: 1px solid var(--line); transition: transform .6s var(--ease-spring); }
.service:hover .service-icon { transform: rotate(-6deg) scale(1.08); }
.service h3 { font-size: 23px; margin-bottom: 12px; }
.service > p { color: var(--text-2); margin-bottom: 24px; }
.checks { display: grid; gap: 11px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text-2); }
.checks .icon { margin-top: 4px; color: var(--check); }
.checks-2 { grid-template-columns: 1fr 1fr; gap: 11px 20px; margin: 26px 0; }

/* ---------- project ---------- */
.project { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.project-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.project-brand img { border-radius: 13px; box-shadow: 0 8px 30px -8px rgba(198, 63, 31, .5); }
.project-brand h3 { font-size: 30px; margin-bottom: 4px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 999px; font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line); color: var(--text-2); }
.pill-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 10px var(--live); }
.project-tagline { font-size: 21px; line-height: 1.45; color: var(--text); margin-bottom: 14px; letter-spacing: -.01em; }
.project-copy > p { color: var(--text-2); }
.project-offer { padding: 14px 16px; margin-bottom: 26px; border-radius: var(--r-sm); border: 1px dashed var(--line-strong); font-size: 14.5px; }
.stack-label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3) !important; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tags li { padding: 5px 12px; border-radius: var(--r-btn); font-size: 13px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); }
.project-visual { position: relative; perspective: 1400px; padding: 0 6% 12% 0; }
.device { --rx: 0deg; --ry: 0deg; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .6s var(--ease); transform-style: preserve-3d; will-change: transform; }
.device-desktop { border-radius: var(--r); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow), var(--device-glow); }
.device-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: var(--bg-3); border-bottom: 1px solid var(--line); }
.device-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.device-bar em { margin-left: 12px; padding: 2px 12px; border-radius: 6px; background: var(--surface-2); font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.device img { width: 100%; height: auto; backface-visibility: hidden; }
.device-phone { position: absolute; right: 0; bottom: 0; width: 27%; border-radius: 22px; overflow: hidden; border: 5px solid #1c1f2a; box-shadow: var(--shadow); }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding: 28px 24px 30px; border-top: 1px solid var(--line-strong); }
.step::before { content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--grad); }
:root[data-theme="electrique"] .step::before { height: 3px; top: -2px; }
.step-num { display: block; margin-bottom: 30px; font-family: var(--accent-family); font-style: var(--accent-style); font-weight: var(--accent-w); font-size: 54px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step { transition: background .4s; border-radius: 0 0 var(--r) var(--r); }
.step:hover { background: linear-gradient(var(--surface), transparent); }
.step h3 { font-size: 21px; margin-bottom: 10px; }
.step p { color: var(--text-2); font-size: 15px; }
.pricing-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin-top: 56px; padding: 22px 26px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.pricing-note strong { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.pricing-note span { color: var(--text); font-size: 17px; }

/* ---------- contact ---------- */
/* ---------- booking (right column of Contact) ---------- */
.booking { display: grid; gap: 16px; align-content: start; padding: 28px; scroll-margin-top: 96px; }
.booking-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.booking-head h3 { font-size: 21px; }
.booking-lead { margin-top: 6px; color: var(--text-2); font-size: 14px; }
.booking-status { color: var(--text-2); font-size: 14.5px; }
.booking-status:empty { display: none; }
.booking-status.is-error { color: var(--err); }
.booking-picker { display: grid; gap: 12px; min-width: 0; }
.booking-daybar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.booking-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; }
.booking-days.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.booking-days.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
.booking-days.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.booking-nav { display: grid; place-items: center; width: 34px; height: 58px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); transition: color .2s, border-color .2s, opacity .2s; }
.booking-nav:hover { color: var(--text); border-color: var(--accent); }
.booking-nav[disabled] { opacity: .3; pointer-events: none; }
.booking-nav .icon { transform: rotate(90deg); }
.booking-nav[data-nav="1"] .icon { transform: rotate(-90deg); }
.booking-month { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.booking-days::-webkit-scrollbar { display: none; }
.booking-day { flex: none; display: grid; justify-items: center; gap: 1px; width: 60px; padding: 9px 0; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); scroll-snap-align: start; transition: border-color .2s, background .2s, color .2s; }
.booking-day small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.booking-day strong { font-size: 18px; color: var(--text); font-weight: 600; line-height: 1.2; }
.booking-day em { font-style: normal; font-size: 11px; color: var(--text-3); }
.booking-day:hover, .booking-time:hover { border-color: var(--accent); }
.booking-day[aria-selected="true"], .booking-time[aria-pressed="true"] { border-color: transparent; background: var(--btn-bg); color: var(--btn-fg); }
.booking-day[aria-selected="true"] strong, .booking-day[aria-selected="true"] em { color: var(--btn-fg); }
.booking-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.booking-time { padding: 9px 4px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); font-family: var(--mono); font-size: 13.5px; color: var(--text); transition: border-color .2s, background .2s; }
.booking-form { display: grid; gap: 10px; }
.booking-form .btn { width: 100%; margin-top: 2px; }
.booking-form .btn[disabled] { opacity: .45; pointer-events: none; }
.booking-code { display: grid; gap: 8px; }
.booking-code-text { font-size: 14px; color: var(--text-2); }
.booking-code input { font-family: var(--mono); font-size: 18px; letter-spacing: .3em; text-align: center; }
.booking-code .link-btn { justify-self: start; font-size: 13px; }
.booking-done { display: grid; gap: 14px; justify-items: start; }
.booking-check { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--live); }
.booking-done p { font-size: 16px; color: var(--text); }
.booking-foot { text-align: left; }
.booking-foot a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.booking [hidden] { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .booking { padding: 22px 18px; } .booking-fields { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq-list { display: grid; gap: 12px; max-width: 900px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .25s, background .25s; }
.faq-item:hover { border-color: var(--line-strong); }
.faq-item[open] { background: var(--surface-2); border-color: var(--line-strong); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r); }
.faq-item h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.faq-icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; background: var(--text-2); transition: transform .3s var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-item p { padding: 0 24px 22px; color: var(--text-2); max-width: 760px; }
@media (max-width: 560px) { .faq-item summary { padding: 18px; } .faq-item p { padding: 0 18px 18px; } .faq-item h3 { font-size: 16.5px; } }
.section-contact::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 50%, var(--accent-soft), transparent 70%); pointer-events: none; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.contact-grid > .booking { align-self: stretch; }
.contact-list { display: grid; gap: 12px; margin-top: 40px; }
.contact-list li { display: flex; align-items: stretch; gap: 8px; }
.contact-item { flex: 1; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 16.5px; transition: border-color .25s, background .25s, transform .4s var(--ease); min-width: 0; }
.contact-item > span:last-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.contact-item small { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.contact-item:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateX(4px); }
.contact-item:hover .contact-icon { transform: rotate(-8deg) scale(1.08); }
.contact-icon { transition: transform .5s var(--ease-spring); }
.contact-item:active, .copy-btn:active, .chip:active, .lang-opt:active { transform: scale(.96); }
.contact-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: calc(var(--r) - 4px); flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.copy-btn { position: relative; width: 52px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); display: grid; place-items: center; transition: color .2s, border-color .2s, background .2s; }
.copy-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.copy-btn.is-done { color: var(--live); border-color: var(--live); }
.copy-btn[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 4px 9px; border-radius: 7px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600; white-space: nowrap; animation: tip .25s var(--ease); }
@keyframes tip { from { opacity: 0; transform: translate(-50%, 4px); } }
.field { display: grid; gap: 8px; }
.field span { font-size: 13.5px; color: var(--text-2); }
.field input, .field select, .field textarea { width: 100%; padding: 13px 15px; border-radius: calc(var(--r) - 4px); border: 1px solid var(--line-strong); background: var(--input-bg); outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.field select option { background: var(--bg-2); color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--err-line); }
.hint { font-size: 12.5px; color: var(--text-3); text-align: center; }

/* ---------- footer & legal ---------- */
.footer { padding: 40px 0 48px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-3); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer-inner > div { display: flex; flex-direction: column; gap: 4px; }
.footer strong { color: var(--text); font-weight: 600; }
.footer-links { align-items: flex-end; }
.link-btn { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: color .2s; }
.link-btn:hover { color: var(--text); }
.legal { width: min(640px, 100% - 32px); max-height: min(86vh, 760px); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--bg-2); color: var(--text); box-shadow: var(--shadow); }
.legal::backdrop { background: var(--backdrop); backdrop-filter: blur(6px); }
.legal[open] { animation: pop .4s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.legal-inner { position: relative; padding: 36px 34px 32px; }
.legal h2 { font-size: 26px; margin-bottom: 22px; padding-right: 40px; }
.legal h3 { margin: 26px 0 12px; font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; font-size: 14.5px; }
.legal dt { color: var(--text-3); }
.legal dd { margin: 0; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal p { color: var(--text-2); font-size: 14.5px; margin-bottom: 10px; }
.legal-close { position: absolute; right: 18px; top: 18px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--text-2); transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- chat ("Omar" persona) ---------- */
.chat-fab { --mx: 0px; --my: 0px; position: fixed; right: 24px; bottom: 24px; z-index: 70; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: var(--fab-fg); background: var(--fab-bg); box-shadow: var(--fab-shadow); transform: translate3d(var(--mx), var(--my), 0); transition: transform .4s var(--ease-spring); }
.chat-fab-ring { position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: .6; animation: ring 2.8s var(--ease) infinite; }
@keyframes ring { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.35); opacity: 0; } }
.chat-fab.is-open .chat-fab-ring, .chat-fab.was-opened .chat-fab-ring { display: none; }
.fab-hint { position: fixed; right: 96px; bottom: 36px; z-index: 70; max-width: 230px; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--panel-bg); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 13.5px; color: var(--text); pointer-events: none; opacity: 0; transform: translateX(12px) scale(.9); transform-origin: right bottom; transition: opacity .4s var(--ease), transform .6s var(--ease-spring); }
.fab-hint.is-shown { opacity: 1; transform: none; }
.fab-face { position: absolute; font-family: var(--mono); font-size: 16px; font-weight: 500; letter-spacing: .02em; transition: transform .45s var(--ease-spring), opacity .25s; }
.fab-dot { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--live); border: 2.5px solid var(--bg); transition: opacity .25s; }
.icon-fab { width: 26px; height: 26px; position: absolute; transition: transform .45s var(--ease-spring), opacity .25s; }
.icon-close { opacity: 0; transform: rotate(-90deg) scale(.5); }
.chat-fab.is-open .fab-face, .chat-fab.is-open .fab-dot { opacity: 0; transform: rotate(90deg) scale(.5); }
.chat-fab.is-open .icon-close { opacity: 1; transform: none; }

.chat-panel {
  position: fixed; right: 24px; bottom: 100px; z-index: 69; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100svh - 130px));
  display: flex; flex-direction: column; border-radius: calc(var(--r-lg) - 2px); overflow: hidden;
  background: var(--panel-bg); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--line-strong); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .55);
  transform-origin: calc(100% - 31px) calc(100% + 45px);
}
.chat-panel[hidden] { display: none; }
.chat-panel.is-entering { animation: chatIn .5s var(--ease) both; }
.chat-panel.is-leaving { animation: chatOut .25s var(--ease) both; }
@keyframes chatIn { from { opacity: 0; transform: translateY(20px) scale(.92); } }
@keyframes chatOut { to { opacity: 0; transform: translateY(14px) scale(.95); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 12px 14px 18px; border-bottom: 1px solid var(--line); }
.chat-avatar { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-family: var(--mono); font-size: 13px; color: var(--fab-fg); background: var(--fab-bg); flex-shrink: 0; }
.chat-avatar::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--live); border: 2px solid var(--bg-2); }
.chat-head-text { flex: 1; min-width: 0; }
.chat-head h2 { font-family: var(--sans); font-weight: 650; font-size: 15.5px; letter-spacing: -.01em; }
.chat-head p { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; overscroll-behavior: contain; }
.chat-log::-webkit-scrollbar { width: 6px; }
.chat-log::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: calc(var(--r) - 1px); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; animation: msgIn .4s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.96); filter: blur(4px); } }
.msg-user { transform-origin: right bottom; } .msg-bot { transform-origin: left bottom; }
.msg-bot { align-self: flex-start; background: var(--bot-bg); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg-user { align-self: flex-end; background: var(--user-bg); color: var(--user-fg); border-bottom-right-radius: 5px; }
.msg p + p, .msg p + ul, .msg ul + p { margin-top: 8px; }
.msg ul { padding-left: 2px; display: grid; gap: 4px; }
.msg li { position: relative; padding-left: 16px; }
.msg li::before { content: ''; position: absolute; left: 2px; top: .68em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.msg a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.msg-user a { color: inherit; }
.msg strong { font-weight: 650; }
.msg-error { border-color: var(--err-line); color: var(--err); }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); animation: bounce 1.2s var(--ease) infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
.caret::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 12px; }
.chat-suggestions[hidden] { display: none; }
.chip { padding: 7px 12px; border-radius: var(--r-btn); font-size: 13px; color: var(--text-2); border: 1px solid var(--line-strong); background: var(--surface); transition: color .2s, border-color .2s, background .2s, transform .3s var(--ease); animation: msgIn .45s var(--ease) both; }
.chip:nth-child(2) { animation-delay: .06s; } .chip:nth-child(3) { animation-delay: .12s; } .chip:nth-child(4) { animation-delay: .18s; }
.chip:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.chat-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 7px 7px 7px 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--input-bg); transition: border-color .2s, box-shadow .2s; }
.chat-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.chat-form textarea { flex: 1; min-height: 24px; max-height: 120px; padding: 6px 0; border: 0; outline: 0; resize: none; background: transparent; font-size: 14.5px; line-height: 1.5; }
.chat-form textarea::placeholder { color: var(--text-3); }
.chat-send { display: grid; place-items: center; width: 38px; height: 38px; border-radius: calc(var(--r) - 5px); color: var(--fab-fg); background: var(--fab-bg); transition: opacity .2s, transform .3s var(--ease-spring); }
.chat-send:hover { transform: scale(1.07); }
.chat-send:disabled { opacity: .4; transform: none; cursor: not-allowed; }
.chat-disclaimer { padding: 8px 16px 12px; text-align: center; font-size: 11.5px; color: var(--text-3); }

/* ---------- live AI-assistant / RAG demo (#assistant) ---------- */
.rag-steps { display: flex; gap: 8px; margin: -4px 0 14px; padding: 0; list-style: none; font-size: 13px; color: var(--text-3); }
.rag-steps li { display: flex; align-items: center; gap: 8px; flex: 1; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); transition: color .3s, border-color .3s, background .3s; }
.rag-steps li span { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; font-family: var(--mono); font-size: 11px; background: var(--surface-2); transition: background .3s, color .3s; }
.rag-steps li.is-on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.rag-steps li.is-on span { background: var(--accent); color: #fff; }
.rag-steps li.is-done { color: var(--text-2); }
.rag-steps li.is-done span { background: var(--check); color: #0b0d12; }

.rag-board { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
.rag-chat, .rag-kb { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.rag-chat { height: 560px; overflow: hidden; }
.rag-chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rag-chat-head strong { display: block; font-size: 14.5px; }
.rag-chat-head small { display: block; font-size: 12px; color: var(--text-3); }
.rag-avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; color: var(--icon-fg); background: var(--icon-bg); border: 1px solid var(--line); }
.rag-thread { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.msg { max-width: 86%; animation: qIn .35s var(--ease) both; }
.msg-body { padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.msg-user { align-self: flex-end; }
.msg-user .msg-body { min-height: 1.5em; border-bottom-right-radius: 5px; background: var(--btn-bg); color: var(--btn-fg); }
.msg-bot { align-self: flex-start; }
.msg-bot .msg-body { border-bottom-left-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.msg.is-thinking .msg-body { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13.5px; }
.think-icon { display: grid; color: var(--accent); animation: thinkSpin 1.1s linear infinite; }
@keyframes thinkSpin { 50% { transform: translateX(3px) rotate(-12deg); } }
.think-text { background: linear-gradient(90deg, var(--text-3) 30%, var(--text) 50%, var(--text-3) 70%) 0 0 / 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
.cite { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin: 0 3px; padding: 0 5px; border-radius: 999px; vertical-align: 1px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border: 0; box-shadow: 0 0 0 3px var(--accent-soft); cursor: pointer; animation: pop .35s var(--ease-spring); }
.msg-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.msg-sources-label { margin-right: 2px; }
.src-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; font-size: 12px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-strong); cursor: pointer; transition: border-color .2s, color .2s; }
.src-chip:hover { color: var(--text); border-color: var(--accent); }
.src-chip b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-family: var(--mono); font-size: 10.5px; color: #fff; background: var(--accent); }
.msg-sources.is-handed { padding: 6px 10px; border-radius: 10px; color: #fcd34d; background: rgba(250, 204, 21, .1); border: 1px solid rgba(250, 204, 21, .3); }
.handed-icon { display: grid; }
.msg-sources.flash { animation: qIn .45s var(--ease) both; }
.rag-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; max-height: 76px; overflow: hidden; }
.rag-chips::-webkit-scrollbar { display: none; }
.rag-chips-label { flex: none; align-self: center; font-size: 12px; color: var(--text-3); }
.rag-chip { flex: none; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, color .2s; }
.rag-chip:hover { color: var(--text); border-color: var(--line-hover); }
.rag-compose { display: flex; gap: 8px; margin: 10px 14px 14px; padding: 5px 5px 5px 14px; border-radius: var(--r-btn); background: var(--input-bg); border: 1px solid var(--line-strong); transition: border-color .2s, box-shadow .2s; }
.rag-compose:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.rag-compose input { flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; font-size: 15px; }
.rag-compose .btn { width: 42px; height: 42px; padding: 0; justify-content: center; }

.rag-kb { padding: 14px; height: 560px; }
.rag-kb .demo-col-title { margin-bottom: 4px; }
.rag-kb-hint { margin-bottom: 12px; font-size: 12.5px; color: var(--text-3); }
.rag-cards { display: grid; align-content: start; gap: 7px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 2px; }
.kb-card { position: relative; padding: 9px 11px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .35s, background .35s, opacity .35s, transform .35s var(--ease); }
.kb-head { display: flex; align-items: center; gap: 9px; }
.kb-icon { display: grid; flex: none; color: var(--text-3); transition: color .3s; }
.kb-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-rank:empty { display: none; }
.kb-rank { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; font-family: var(--mono); font-size: 11px; color: #fff; background: var(--accent); animation: pop .4s var(--ease-spring); }
.kb-score { display: block; height: 3px; margin-top: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.kb-score-fill { display: block; height: 100%; border-radius: inherit; background: var(--line-hover); transform-origin: 0 50%; transform: scaleX(var(--s, 0)); transition: transform .6s var(--ease), background .3s; }
.kb-text { display: none; margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.kb-card.is-open .kb-text { display: block; animation: qIn .3s var(--ease) both; }
.kb-card.is-scanned { animation: scanCard .9s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes scanCard { 50% { border-color: var(--accent); background: var(--accent-soft); } }
.rag.is-searching .kb-card:not(.is-scanned) { opacity: .6; }
.kb-card.is-hit { border-color: var(--accent); }
.kb-card.is-hit .kb-icon { color: var(--accent); }
.kb-card.is-hit .kb-score-fill { background: var(--grad); }
.rag-cards:has(.is-hit) .kb-card:not(.is-hit) { opacity: .55; }
.kb-card.is-cited { background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.kb-card.flash { animation: laneFlash .9s var(--ease); }
.why p { color: var(--text-2); margin-bottom: 22px; line-height: 1.6; }

@media (max-width: 1024px) {
  .rag-board { grid-template-columns: 1fr; }
  .rag-chat { height: 500px; }
  .rag-kb { height: auto; }
  .rag-cards { grid-template-columns: 1fr 1fr; overflow: visible; }
}
@media (max-width: 680px) {
  .rag-steps { gap: 4px; font-size: 11.5px; }
  .rag-steps li { justify-content: center; padding: 6px 6px; text-align: center; line-height: 1.2; }
  .rag-steps li span { display: none; }
  .rag-chat { height: 470px; }
  .rag-thread { padding: 12px 10px; }
  .msg { max-width: 92%; }
  .msg-body { font-size: 14px; }
  .rag-chips { flex-wrap: nowrap; max-height: none; overflow-x: auto; scrollbar-width: none; padding: 8px 10px 0; -webkit-mask: linear-gradient(90deg, #000 85%, transparent); mask: linear-gradient(90deg, #000 85%, transparent); }
  .rag-compose { margin: 8px 10px 10px; }
  .rag-compose input { font-size: 16px; text-overflow: ellipsis; }
  .rag-kb { padding: 12px 10px; }
  .kb-text { font-size: 13px; }
  .rag-cards { grid-template-columns: 1fr; }
  .kb-card { padding: 8px 10px; }
}

/* ---------- live triage demo (#demo) ---------- */
.service-tech { margin: -8px 0 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.demo { position: relative; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.demo-tabs { display: flex; gap: 6px; padding: 4px; border-radius: var(--r-btn); background: var(--input-bg); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-btn); font-size: 14px; color: var(--text-2); white-space: nowrap; transition: color .2s, background .25s, box-shadow .25s; }
.demo-tab:hover { color: var(--text); }
.demo-tab.is-active { color: var(--btn-fg); background: var(--btn-bg); box-shadow: var(--btn-shadow); }
.demo-controls { display: flex; align-items: center; gap: 10px; }
.demo-live .dot { animation: livePulse 1.6s ease-in-out infinite; }
.is-paused .demo-live .dot { animation: none; background: var(--text-3); box-shadow: none; }
@keyframes livePulse { 50% { opacity: .35; } }
.demo-play { width: 40px; height: 40px; border: 1px solid var(--line-strong); }

.demo-board { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr) minmax(0, 1.05fr); gap: 14px; min-height: 470px; }
.demo-col { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.demo-mid::before, .demo-mid::after { content: ''; position: absolute; top: 118px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b87ff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>") center / 13px no-repeat; border: 1px solid var(--line-strong); }
.demo-mid::before { left: -19px; }
.demo-mid::after { right: -19px; }
.demo-col-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.demo-count { padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); letter-spacing: 0; }
.demo-ms { margin-left: auto; color: var(--check); letter-spacing: 0; text-transform: none; }

/* incoming queue */
.demo-queue { display: grid; align-content: start; gap: 8px; overflow: hidden; max-height: 430px; -webkit-mask: linear-gradient(#000 85%, transparent); mask: linear-gradient(#000 85%, transparent); }
.qmsg { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); animation: qIn .5s var(--ease) both; animation-delay: var(--d, 0ms); transition: opacity .35s, transform .35s var(--ease); }
.qmsg.is-you { border-color: var(--accent); background: var(--accent-soft); }
.qmsg.is-leaving { opacity: 0; transform: translateX(14px) scale(.96); }
@keyframes qIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
.qmsg-ch { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.qmsg-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }

/* decision panel */
.decision { position: relative; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.decision-msg { position: relative; min-height: 96px; display: grid; align-items: center; border-radius: 14px; border: 1px dashed var(--line-strong); padding: 14px 16px; overflow: hidden; }
.decision-idle { color: var(--text-3); font-size: 14px; text-align: center; }
.decision-card .decision-text { font-size: 15px; line-height: 1.5; color: var(--text); }
.decision-card.is-arriving { opacity: 0; }
.decision.is-reading .decision-msg { border-style: solid; border-color: var(--accent); }
.decision.is-reading .decision-msg::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 40%; background: linear-gradient(transparent, var(--accent-soft), transparent); animation: scan 1s linear infinite; pointer-events: none; }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(260%); } }
.decision.is-done .decision-msg { border-style: solid; border-color: var(--line-strong); }
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; transition: opacity .4s; }
.decision:not(.is-done):not(.is-filed) .decision-grid :is(.bar-track, .meter, .next-icon) { opacity: .45; }
.decision.is-filed .decision-grid :is(.bar-track, .meter, .next-icon) { opacity: .6; }
.decision-filed { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--text-2); animation: qIn .4s var(--ease) both; }
.decision-filed b { color: var(--text); }
.decision-filed .icon { color: var(--live); }
.demo-queue:empty::after { content: attr(data-empty); display: grid; place-items: center; min-height: 120px; border-radius: 12px; border: 1px dashed var(--line-strong); font-size: 13.5px; color: var(--text-3); }
.dq { padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.dq-lanes { grid-column: 1 / -1; }
.dq-title { margin-bottom: 10px; font-size: 12px; color: var(--text-3); }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: minmax(0, 11em) 1fr 3.2em; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); transition: color .3s; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { position: relative; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--line-hover); transform-origin: 0 50%; transform: scaleX(var(--w, 0)); transition: transform .7s var(--ease), background .3s; }
.bar-pct { text-align: right; font-family: var(--mono); font-size: 11.5px; }
.bar.is-top { color: var(--text); font-weight: 550; }
.bar.is-top .bar-fill { background: var(--grad); }
.meter { position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, rgba(52, 211, 153, .35), rgba(250, 204, 21, .35), rgba(248, 113, 113, .45)); }
.meter-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #34d399, #facc15, #f87171); clip-path: inset(0 calc((1 - var(--u, 0)) * 100%) 0 0); transition: clip-path .8s var(--ease); }
.meter-needle { position: absolute; top: 50%; left: calc(var(--u, 0) * 100%); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px var(--bg-2); transition: left .8s var(--ease-spring); }
.meter.is-hot .meter-needle { animation: hot 1s ease-in-out infinite; }
@keyframes hot { 50% { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 8px rgba(248, 113, 113, .35); } }
.meter-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--text-3); }
.next { display: flex; align-items: center; gap: 10px; }
.next-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; color: var(--icon-fg); background: var(--icon-bg); border: 1px solid var(--line); }
.next-icon:empty { opacity: .3; }
.next strong { display: block; font-size: 14px; line-height: 1.3; }
.next small { display: block; font-size: 11.5px; color: var(--text-3); }
.next[data-action="urgent"] .next-icon { background: rgba(248, 113, 113, .2); color: #fca5a5; }
.next[data-action="archive"] .next-icon { background: var(--surface-2); color: var(--text-3); }
.next.pop .next-icon { animation: pop .5s var(--ease-spring); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.meta { font-size: 13px; color: var(--text-2); }

/* sorted lanes */
.lanes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
.lane { padding: 9px 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transition: border-color .4s, background .4s; }
.lane.flash { animation: laneFlash .9s var(--ease); }
@keyframes laneFlash { 0% { border-color: var(--accent); background: var(--accent-soft); } 100% { border-color: var(--line); } }
.lane.has-urgent { border-color: rgba(248, 113, 113, .45); }
.lane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 550; }
.lane-n { min-width: 24px; padding: 1px 7px; border-radius: 99px; text-align: center; font-family: var(--mono); font-size: 11.5px; font-weight: 500; background: var(--surface-2); color: var(--text-2); }
.lane-n.bump { animation: pop .45s var(--ease-spring); }
.lane-list { display: grid; gap: 4px; margin-top: 6px; }
.lane-list:empty { display: none; }
.lmsg { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 8px; background: var(--bg-2); font-size: 12px; color: var(--text-2); }
.lmsg.is-landing { opacity: 0; }
.lmsg.is-urgent { background: rgba(248, 113, 113, .12); color: var(--text); }
.lmsg-act { display: grid; flex: none; color: var(--check); }
.lmsg-act .icon { width: 14px; height: 14px; }
.lmsg.is-urgent .lmsg-act { color: #fca5a5; }
.lmsg-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmsg { cursor: pointer; }
.lmsg:hover { color: var(--text); }
.lmsg:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 1px; }
.lmsg.is-open { align-items: flex-start; }
.lmsg.is-open .lmsg-text { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.45; }
.lmsg-next { display: none; }
.lmsg.is-open .lmsg-next { display: block; margin-top: 4px; font-size: 11px; color: var(--text-3); }
.kb-conf { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 11px; color: var(--text-3); }
.kb-conf .kb-score { flex: 1; height: 5px; margin-top: 0; }
.kb-pct { min-width: 3.2em; text-align: right; font-family: var(--mono); font-size: 11px; }
.kb-pct:empty::before { content: '–'; }
.kb-card.is-hit .kb-pct { color: var(--text); font-weight: 600; }
.msg.is-clickable { cursor: pointer; }
.msg.is-clickable:hover { box-shadow: 0 0 0 1px var(--line-hover); }
.msg.is-selected { box-shadow: 0 0 0 2px var(--accent); }
.dq-title { display: flex; justify-content: space-between; gap: 8px; }
.dq-hint { font-size: 11px; font-style: italic; }
.lmsg.is-you { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); color: var(--text); animation: laneFlash 1.4s var(--ease); }
.bar-pct:empty::before { content: '–'; }
.device-bar em { color: var(--text-2); }
.demo-more > summary { display: none; }
.demo-cta-mobile { display: none; }
.chat-fab { transition: transform .4s var(--ease-spring), opacity .3s; }
.chat-fab.is-away { opacity: 0; pointer-events: none; transform: translateY(20px) scale(.8); }
@media (max-width: 680px) {
  /* shorter page on phones */
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 28px; }
  .service { padding: 24px 20px 22px; }
  .service-icon { width: 44px; height: 44px; margin-bottom: 16px; }
  .service h3 { font-size: 20px; margin-bottom: 8px; }
  .service > p { margin-bottom: 16px; }
  .checks { gap: 8px; }
  .grid-services { gap: 14px; }
  .step { padding: 18px 4px 20px; }
  .step-num { margin-bottom: 10px; font-size: 36px; }
  .demo-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .demo-stats div { padding: 10px 12px; }
  .demo-stats b { font-size: 21px; }
  .demo-more { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
  .demo-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; font-size: 14.5px; font-weight: 550; cursor: pointer; list-style: none; }
  .demo-more > summary::-webkit-details-marker { display: none; }
  .demo-more > summary .icon { flex: none; transform: rotate(90deg); transition: transform .3s; }
  .demo-more[open] > summary .icon { transform: rotate(-90deg); }
  .demo-more .demo-after { margin-top: 0; padding: 4px 16px 18px; }
  .demo-more:not([open]) + .demo-cta-mobile { display: inline-flex; margin-top: 14px; }
}
.footer-sectors { font-size: 13px; color: var(--text-3); }
.footer-sectors a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.sector-page .topbar-inner { gap: 16px; }
.sector-crumbs { flex: 1; font-size: 14px; color: var(--text-3); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sector-crumbs a { color: var(--text-2); }
.sector-hero { padding: 140px 0 24px; }
.sector-hero h1 { font-size: clamp(34px, 6vw, 64px); line-height: 1.05; letter-spacing: -.02em; max-width: 18ch; margin-bottom: 20px; }
.sector-hero .lead, .sector-section .lead { max-width: 64ch; }
.sector-section { padding: 56px 0; }
.sector-section h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; }
.sector-uses { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.sector-use { padding: 22px; }
.sector-use h3 { font-size: 18px; margin-bottom: 8px; }
.sector-qa { display: grid; gap: 14px; margin-top: 24px; }
.sector-qa-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 16px 18px; }
.sector-q { font-weight: 600; margin-bottom: 8px; }
.sector-lang { display: inline-block; margin-right: 8px; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); vertical-align: 2px; }
.sector-use h3 { min-height: 2.5em; }
@media (max-width: 560px) { .sector-crumbs { display: none; } .sector-page .topbar-inner { justify-content: space-between; } .sector-hero { padding-top: 112px; } .sector-use h3 { min-height: 0; } }
.sector-a { color: var(--text-2); }
.sector-sorted { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 24px; }
.sector-sorted li { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 18px; }
.sector-sorted li span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--text-3); }
.sector-cta .hero-cta { margin-top: 20px; }
.sector-others { margin-top: 28px; font-size: 14px; color: var(--text-3); }
.sector-others a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.demo-slowed { margin: -4px 0 12px; font-size: 12px; font-style: italic; color: var(--text-3); }
.ghost { box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); border-radius: 12px; background: var(--bg-3); }

/* stats, compose, notes */
.demo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.demo-stats div { padding: 14px 16px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.demo-stats b { display: block; font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.demo-stats b.bump { animation: statBump .5s var(--ease); }
@keyframes statBump { 40% { color: var(--accent); transform: translateY(-2px); } }
.demo-stats span { font-size: 12.5px; color: var(--text-3); }
.demo-compose { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 6px 6px 6px 16px; border-radius: var(--r-btn); background: var(--input-bg); border: 1px solid var(--line-strong); transition: border-color .2s, box-shadow .2s; }
.demo-compose:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.demo-compose-icon { display: grid; color: var(--text-3); }
.demo-compose input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font-size: 15px; }
.demo-compose .btn { height: 44px; }
.demo-status { min-height: 1.5em; margin-top: 10px; font-size: 13.5px; color: var(--text-2); }
.demo-status[data-kind="error"] { color: var(--err); }
.demo-note { font-size: 12px; color: var(--text-3); }

.demo-after { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 56px); margin-top: clamp(40px, 5vw, 64px); }
.demo-after h3 { font-size: 22px; margin-bottom: 18px; }
.how ol { display: grid; gap: 14px; }
.how li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-2); }
.how-num { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; font-family: var(--mono); font-size: 13px; color: var(--accent); border: 1px solid var(--line-strong); }
.uses { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.uses[hidden] { display: none; }
.use { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, transform .4s var(--ease); }
.use:hover { border-color: var(--line-hover); transform: translateY(-2px); }
.use-decide { border-color: var(--accent); background: var(--accent-soft); }
.use-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 10px; border-radius: 10px; color: var(--icon-fg); background: var(--icon-bg); }
.use h4 { margin: 0 0 6px; font-size: 15px; }
.use p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }

@media (max-width: 1024px) {
  .demo-board { grid-template-columns: 1fr 1fr; min-height: 0; }
  .demo-mid { grid-column: 1 / -1; order: -1; }
  .demo-mid::before, .demo-mid::after { display: none; }
  .demo-queue { max-height: 300px; }
  .demo-after { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .demo { padding: 12px; }
  .demo-bar { flex-direction: column; align-items: stretch; }
  .demo-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .demo-tab { justify-content: center; padding: 0 10px; font-size: 13px; }
  .demo-controls { justify-content: space-between; }
  .demo-board { grid-template-columns: 1fr; }
  .demo-in .demo-queue { max-height: 170px; }
  .decision-grid { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 1fr auto; row-gap: 4px; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .bar-label { white-space: normal; }
  .demo-stats { grid-template-columns: 1fr 1fr; }
  .demo-stats b { font-size: 21px; }
  .uses { grid-template-columns: 1fr; }
  .demo-compose { border-radius: var(--r); flex-wrap: wrap; padding: 8px; }
  .demo-compose-icon { display: none; }
  .demo-compose input { flex-basis: 100%; padding: 0 8px; font-size: 16px; }
  .demo-compose .btn { width: 100%; }
}

/* ---------- style picker (preview only; rendered when THEME_PICKER=1) ---------- */
.theme-picker { position: fixed; left: 20px; bottom: 20px; z-index: 90; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 14px; background: rgba(20, 20, 24, .9); color: #f4f4f5; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6); backdrop-filter: blur(12px); font-family: 'Geist', system-ui, sans-serif; }
.theme-picker-label { padding: 0 6px 0 8px; font-size: 12px; color: #a1a1aa; white-space: nowrap; }
.theme-opt { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 8px; border-radius: 9px; font-size: 13px; color: #d4d4d8; transition: background .2s, color .2s; }
.theme-opt:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.theme-opt.is-active { background: #fff; color: #09090b; }
.theme-swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); }
.theme-opt kbd { font-family: 'Geist Mono', monospace; font-size: 11px; opacity: .55; }
.sw-nuit { background: linear-gradient(135deg, #07080c 50%, #7c5cff 50%); }
.sw-editorial { background: linear-gradient(135deg, #f4f1ea 50%, #b93c0c 50%); }
.sw-mono { background: linear-gradient(135deg, #000 50%, #ededed 50%); }
.sw-electrique { background: linear-gradient(135deg, #0e0f0c 50%, #d4ff3a 50%); }
.sw-clair { background: linear-gradient(135deg, #ffffff 50%, #635bff 50%); }

/* ---------- Clair / Nuit switch ---------- */
.mode-switch { position: relative; display: inline-flex; align-items: center; justify-content: space-between; flex: none; width: 62px; height: 34px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); transition: border-color .2s, background .4s; }
.mode-switch:hover { border-color: var(--line-hover); }
.mode-switch .icon { position: relative; z-index: 1; transition: color .35s, transform .5s var(--ease); }
.mode-knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--btn-bg); box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .35); transition: transform .45s var(--ease-spring), background .4s; }
.mode-sun { color: var(--btn-fg); }
:root:not([data-theme="clair"]) .mode-knob { transform: translateX(28px); }
:root:not([data-theme="clair"]) .mode-sun { color: var(--text-3); transform: rotate(-90deg); }
:root:not([data-theme="clair"]) .mode-moon { color: var(--btn-fg); transform: rotate(-20deg); }
.mode-switching, .mode-switching *, .mode-switching *::before, .mode-switching *::after { transition-duration: .45s !important; }
@media (max-width: 820px) { .mode-switch { margin-left: 8px; } }

/* Light-theme fixes for colours written for the dark theme */
:root[data-theme="clair"] .msg-sources.is-handed { color: #92400e; background: #fffbeb; border-color: #fcd34d; }
:root[data-theme="clair"] .next[data-action="urgent"] .next-icon { color: #b91c1c; background: #fee2e2; }
:root[data-theme="clair"] .lmsg.is-urgent .lmsg-act { color: #b91c1c; }
:root[data-theme="clair"] .lmsg.is-urgent { background: #fef2f2; }
:root[data-theme="clair"] .rag-steps li.is-done span { color: #fff; }
:root[data-theme="clair"] .kb-score { background: var(--line-strong); }
:root[data-theme="clair"] .rag-cards:has(.is-hit) .kb-card:not(.is-hit) { opacity: .7; }
:root[data-theme="clair"] .ghost { box-shadow: 0 18px 40px -12px rgba(50, 50, 93, .3); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid-services { grid-template-columns: 1fr; max-width: 640px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .project { grid-template-columns: 1fr; }
  .project-visual { order: -1; }
}
@media (max-width: 820px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .menu-btn { display: block; }
  .contact-grid { grid-template-columns: 1fr; }
  .theme-opt .theme-name, .theme-opt kbd, .theme-picker-label { display: none; }
  .theme-opt { padding: 0 9px; }
}
@media (max-width: 560px) {
  .container { width: min(1200px, 100% - 36px); }
  .hero { padding-bottom: 110px; }
  .hero-cta .btn { width: 100%; }
  .hero-services { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 36px; font-size: 13.5px; }
  .checks-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step-num { margin-bottom: 16px; font-size: 44px; }
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 10px; }
  .chat-panel { right: 0; bottom: 0; width: 100vw; height: 100svh; border-radius: 0; border: 0; padding-bottom: env(safe-area-inset-bottom); }
  .chat-head { padding-top: max(14px, env(safe-area-inset-top)); }
  .chat-head .icon-btn { width: 44px; height: 44px; }
  .chat-form textarea, .field input, .field select, .field textarea { font-size: 16px; } /* prevents iOS zoom-on-focus */
  .chat-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; }
  .chat-fab.is-open { opacity: 0; pointer-events: none; }
  .scroll-cue { bottom: calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
  .scroll-cue-track { height: 30px; }
  .fab-hint { right: 80px; bottom: calc(26px + env(safe-area-inset-bottom)); max-width: 180px; }
  .service-num { right: 20px; top: 22px; }
  .theme-picker { left: 12px; bottom: calc(18px + env(safe-area-inset-bottom)); }
}

@media (max-height: 640px) { .scroll-cue { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .bg-grain, #field { display: none; }
}
