/* =========================================================
   رؤى · Ruaa — calm data platform
   Palette: sand-mist base, mist blue data ink, sage, lavender, sand
   ========================================================= */
:root {
  --bg: #f4f2ec;
  --bg-2: #efece4;
  --surface: #fbfaf7;
  --surface-2: #f6f4ef;
  --glass: rgba(251, 250, 247, .62);
  --ink: #1f2a37;
  --ink-2: #4b5663;
  --muted: #6b7480;
  --line: #e3e0d7;
  --line-2: #d6d2c6;

  --accent: #36689f;          /* validated chart hue (light) */
  --accent-soft: #dfe7f0;
  --sage: #b9c9b8;
  --sage-d: #5f8a72;
  --mist: #c3d3e2;
  --lav: #cdc6e1;
  --lav-d: #7c71a8;
  --sand: #e8dbc3;
  --blush: #ecd5cb;
  --good-ink: #2f6b4b;

  --b1: #c9d8e6; --b2: #d5e0d2; --b3: #ddd6ec; --b4: #efe2cc;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(31, 42, 55, .04), 0 12px 40px -12px rgba(31, 42, 55, .12);
  --shadow-lg: 0 2px 4px rgba(31, 42, 55, .04), 0 30px 80px -24px rgba(31, 42, 55, .22);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --f-display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Readex Pro", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1620; --bg-2: #121a25; --surface: #16202b; --surface-2: #1a2531;
    --glass: rgba(22, 32, 43, .6);
    --ink: #e7ebef; --ink-2: #aab5c0; --muted: #8b96a2; --line: #24303c; --line-2: #2f3c4a;
    --accent: #6193d6; --accent-soft: #1e2c3d;
    --sage: #3d5247; --sage-d: #84b096; --mist: #2a3b4e; --lav: #363252; --lav-d: #a69cd6;
    --sand: #3d3527; --blush: #3e2f2c; --good-ink: #84c4a0;
    --b1: #1d3047; --b2: #1f3329; --b3: #2a2645; --b4: #33291c;
    --shadow: 0 1px 2px rgba(0,0,0,.2), 0 12px 40px -12px rgba(0,0,0,.5);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.2), 0 30px 80px -24px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1620; --bg-2: #121a25; --surface: #16202b; --surface-2: #1a2531;
  --glass: rgba(22, 32, 43, .6);
  --ink: #e7ebef; --ink-2: #aab5c0; --muted: #8b96a2; --line: #24303c; --line-2: #2f3c4a;
  --accent: #6193d6; --accent-soft: #1e2c3d;
  --sage: #3d5247; --sage-d: #84b096; --mist: #2a3b4e; --lav: #363252; --lav-d: #a69cd6;
  --sand: #3d3527; --blush: #3e2f2c; --good-ink: #84c4a0;
  --b1: #1d3047; --b2: #1f3329; --b3: #2a2645; --b4: #33291c;
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 12px 40px -12px rgba(0,0,0,.5);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.2), 0 30px 80px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; margin: 0; line-height: 1.35; letter-spacing: 0; }
p { margin: 0; }
main, .footer { overflow-x: clip; }
::selection { background: var(--mist); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.num, .kpi__value, .stat b, .tip, table { font-variant-numeric: tabular-nums; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage-d); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sage-d) 18%, transparent); }
.soft { font-style: normal; background: linear-gradient(100deg, var(--accent), var(--lav-d) 55%, var(--sage-d)); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* once split, each word carries its own slice of the gradient (inline-blocks escape the parent's text clip) */
.soft:has(.wi) { background: none; color: inherit; }
.soft .wi { background: linear-gradient(100deg, var(--accent), var(--lav-d) 55%, var(--sage-d)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.soft .w:nth-child(1) .wi { background-position: 100% 0; }
.soft .w:nth-child(2) .wi { background-position: 60% 0; }
.soft .w:nth-child(3) .wi { background-position: 20% 0; }

/* ---------- buttons ---------- */
.btn { --pad: 14px 26px; display: inline-flex; align-items: center; gap: 10px; padding: var(--pad); border-radius: 999px; font-weight: 500; font-size: 16px; border: 1px solid transparent; cursor: pointer; position: relative; transition: background-color .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease); will-change: transform; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(-4px); }
.btn--ink { background: var(--ink); color: var(--bg); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--ink) 60%, transparent); }
.btn--ink:hover { box-shadow: 0 16px 40px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn--ghost { background: var(--glass); border-color: var(--line-2); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--sm { --pad: 9px 18px; font-size: 15px; }
.btn--lg { --pad: 17px 32px; font-size: 17px; }
.btn > span { position: relative; pointer-events: none; }

/* ---------- nav ---------- */
.nav { position: fixed; inset-inline: 0; top: 0; z-index: 50; padding-block: 14px; transition: transform .6s var(--ease); }
.nav.is-hidden { transform: translateY(-110%); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 18px; padding-inline-start: 14px; border-radius: 999px; background: transparent; border: 1px solid transparent; transition: background-color .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease); }
.nav.is-scrolled .nav__inner { background: var(--glass); border-color: var(--line); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: var(--shadow); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 36px; height: 36px; }
.brand__ar { font-family: var(--f-display); font-weight: 600; font-size: 22px; }
.brand__en { font-size: 13px; color: var(--muted); letter-spacing: .08em; direction: ltr; padding-top: 4px; }
.nav__links { display: flex; gap: 6px; }
.nav__links a { padding: 6px 14px; border-radius: 999px; color: var(--ink-2); font-size: 15px; transition: background-color .3s, color .3s; }
.nav__links a:hover { background: var(--surface-2); color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass); display: grid; place-items: center; cursor: pointer; transition: border-color .3s; }
.theme-btn:hover { border-color: var(--accent); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; grid-area: 1/1; transition: transform .6s var(--ease), opacity .4s; }
.i-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="dark"] .i-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="dark"] .i-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
  :root:not([data-theme="light"]) .i-moon { opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; padding-top: 130px; padding-bottom: 90px; overflow: hidden; isolation: isolate; }
.mesh { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .9; will-change: transform; }
.b1 { width: 52vw; height: 52vw; max-width: 760px; max-height: 760px; background: var(--b1); top: -18%; left: -12%; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 40vw; height: 40vw; max-width: 580px; max-height: 580px; background: var(--b2); bottom: -10%; right: -8%; animation: drift2 30s ease-in-out infinite alternate; }
.b3 { width: 34vw; height: 34vw; max-width: 520px; max-height: 520px; background: var(--b3); top: 10%; right: 22%; animation: drift3 24s ease-in-out infinite alternate; }
.b4 { width: 28vw; height: 28vw; max-width: 420px; max-height: 420px; background: var(--b4); bottom: 6%; left: 30%; animation: drift1 34s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-10vw, -8vh, 0) scale(.92); } }
@keyframes drift3 { to { transform: translate3d(-6vw, 10vh, 0) scale(1.15); } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 50% 0%, transparent 40%, var(--bg) 100%); pointer-events: none; }

.flow { position: absolute; left: 0; bottom: 4%; width: 200%; height: 300px; z-index: -1; opacity: .7; pointer-events: none; }
.flow path { fill: none; stroke-linecap: round; }
.flow__track { will-change: transform; }
.flow__track--a path { stroke: var(--accent); stroke-width: 1.4; opacity: .35; }
.flow__track--b path { stroke: var(--sage-d); stroke-width: 1.2; opacity: .35; stroke-dasharray: 2 8; }
.flow__track--c path { stroke: var(--lav-d); stroke-width: 1; opacity: .25; }
.flow__track--a { animation: flow 40s linear infinite; }
.flow__track--b { animation: flow 60s linear infinite reverse; }
.flow__track--c { animation: flow 50s linear infinite; }
@keyframes flow { to { transform: translateX(-50%); } }

.hero__inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero__title { font-size: clamp(38px, 5.4vw, 74px); font-weight: 500; line-height: 1.28; margin-top: 22px; }
.hero__title .soft { display: inline; }
.hero__lead { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 36em; margin-top: 22px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__meta { list-style: none; padding: 0; margin: 38px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--muted); font-size: 15px; }
.hero__meta strong { color: var(--ink); font-weight: 500; margin-inline-end: 4px; }
.hero__meta li { position: relative; }
.hero__meta li + li::before { content: ""; position: absolute; inset-inline-start: -15px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }

/* split words — Arabic must be split by word, never by letter */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .08em .18em; margin-block: -.08em -.18em; }
.split .wi { display: inline-block; will-change: transform; }

.hero__visual { position: relative; height: 480px; }
.glass { background: var(--glass); border: 1px solid color-mix(in srgb, var(--surface) 70%, var(--line)); backdrop-filter: blur(18px) saturate(1.15); -webkit-backdrop-filter: blur(18px) saturate(1.15); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.card-main { position: absolute; inset-inline: 6% 0; top: 60px; padding: 22px 22px 16px; }
.cm__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.pill { font-size: 13px; padding: 2px 10px; border-radius: 999px; direction: ltr; }
.pill--up { background: color-mix(in srgb, var(--sage-d) 16%, transparent); color: var(--good-ink); }
.cm__value { font-family: var(--f-display); font-size: 40px; font-weight: 500; margin-top: 6px; line-height: 1.3; }
.cm__value small { font-size: 16px; color: var(--muted); font-weight: 400; }
.cm__chart { width: 100%; height: 150px; margin-top: 8px; overflow: visible; }
.hc-band { fill: var(--accent); opacity: .12; }
.hc-area { fill: url(#heroArea); }
.hc-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hc-fc { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-dasharray: 6 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hc-today { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hc-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.cm__axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

.chip { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; font-size: 13px; }
.chip b { display: block; font-weight: 500; font-size: 15px; color: var(--ink); }
.chip span { color: var(--muted); }
.chip__ic { width: 34px; height: 34px; border-radius: 11px; flex: none; position: relative; }
.chip__ic--sage { background: var(--sage); }
.chip__ic--sage::after { content: ""; position: absolute; inset: 10px; border: 2px solid var(--sage-d); border-radius: 50%; }
.chip__ic--lav { background: var(--lav); }
.chip__ic--lav::after { content: ""; position: absolute; inset: 11px 15.5px; background: var(--lav-d); border-radius: 2px; }
.chip svg { width: 60px; height: 24px; fill: none; stroke: var(--sage-d); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip--a { top: 0; inset-inline-start: -2%; }
.chip--b { bottom: 30px; inset-inline-end: -4%; }
.chip--c { bottom: -6px; inset-inline-start: 4%; }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 1.5px solid var(--line-2); border-radius: 20px; }
.scroll-hint span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--muted); animation: wheel 2.2s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* ---------- marquee ---------- */
.strip { padding: 34px 0 10px; text-align: center; }
.strip__label { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); direction: ltr; }
.marquee__track { display: flex; align-items: center; gap: 34px; width: max-content; animation: marquee 46s linear infinite; padding-inline-end: 34px; }
.marquee__track span { font-family: var(--f-display); font-size: clamp(18px, 2vw, 24px); color: var(--ink-2); white-space: nowrap; direction: rtl; }
.marquee__track i { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); flex: none; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding-block: clamp(80px, 11vw, 150px); position: relative; }
.sec-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 70px); }
.sec-head--center { text-align: center; margin-inline: auto; }
.sec-title { font-size: clamp(30px, 3.8vw, 50px); margin-top: 18px; }
.sec-lead { font-size: 18px; color: var(--ink-2); margin-top: 16px; }

/* ---------- features ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.fcard { --tone: var(--mist); --tone-d: var(--accent); position: relative; padding: 30px 28px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .6s var(--ease); isolation: isolate; }
.fcard[data-tone="sage"] { --tone: var(--sage); --tone-d: var(--sage-d); }
.fcard[data-tone="lav"] { --tone: var(--lav); --tone-d: var(--lav-d); }
.fcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--tone) 70%, transparent), transparent 65%); opacity: 0; transition: opacity .6s var(--ease); }
.fcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tone-d) 35%, var(--line)); }
.fcard:hover::before { opacity: 1; }
.fcard__art { height: 130px; border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 55%, var(--surface)), var(--surface-2)); display: grid; place-items: center; margin-bottom: 26px; }
.fcard__art svg { width: 150px; height: 100px; overflow: visible; }
.fcard__num { font-size: 13px; color: var(--muted); }
.fcard h3 { font-size: 24px; margin: 4px 0 10px; }
.fcard p { color: var(--ink-2); font-size: 16px; }
.fcard__list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: 15px; }
.fcard__list li { display: flex; align-items: center; gap: 10px; }
.fcard__list li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--tone-d) 16%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%235f8a72' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

/* feature art micro-animations */
.art-analyse rect { fill: var(--accent); opacity: .3; transform-box: fill-box; transform-origin: bottom; transition: transform .7s var(--ease), opacity .5s; }
.art-analyse rect:nth-child(4) { opacity: .7; }
.art-analyse .lens { fill: color-mix(in srgb, var(--surface) 60%, transparent); stroke: var(--ink-2); stroke-width: 2.5; transition: transform .8s var(--ease); }
.art-analyse .lens-h { stroke: var(--ink-2); stroke-width: 3; stroke-linecap: round; transition: transform .8s var(--ease); }
.fcard:hover .art-analyse rect:nth-child(1) { transform: scaleY(1.3); }
.fcard:hover .art-analyse rect:nth-child(2) { transform: scaleY(.75); }
.fcard:hover .art-analyse rect:nth-child(3) { transform: scaleY(1.2); }
.fcard:hover .art-analyse .lens, .fcard:hover .art-analyse .lens-h { transform: translate(-44px, 14px); }
.art-measure .g-track { fill: none; stroke: color-mix(in srgb, var(--sage-d) 20%, transparent); stroke-width: 10; stroke-linecap: round; }
.art-measure .g-fill { fill: none; stroke: var(--sage-d); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 126; stroke-dashoffset: 60; transition: stroke-dashoffset 1s var(--ease); }
.art-measure .g-needle { stroke: var(--ink-2); stroke-width: 3; stroke-linecap: round; transform-origin: 60px 66px; transform: rotate(-20deg); transition: transform 1s var(--ease); }
.art-measure circle { fill: var(--ink-2); }
.fcard:hover .art-measure .g-fill { stroke-dashoffset: 18; }
.fcard:hover .art-measure .g-needle { transform: rotate(58deg); }
.art-forecast .f-band { fill: var(--lav-d); opacity: .18; transform-box: fill-box; transform-origin: left center; transition: transform .8s var(--ease), opacity .6s; }
.art-forecast .f-hist { fill: none; stroke: var(--lav-d); stroke-width: 2.6; stroke-linecap: round; }
.art-forecast .f-fc { fill: none; stroke: var(--lav-d); stroke-width: 2.6; stroke-dasharray: 5 5; stroke-linecap: round; animation: dash 1.6s linear infinite paused; }
.art-forecast circle { fill: var(--lav-d); stroke: var(--surface); stroke-width: 2.5; }
.fcard:hover .art-forecast .f-band { transform: scaleY(1.35); opacity: .28; }
.fcard:hover .art-forecast .f-fc { animation-play-state: running; }
@keyframes dash { to { stroke-dashoffset: -20; } }

/* ---------- demo dashboard ---------- */
.demo { background: linear-gradient(180deg, transparent, var(--bg-2) 20%, var(--bg-2) 80%, transparent); }
.dash { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lg); padding: clamp(16px, 2.4vw, 28px); }
.dash__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dash__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.dash__title b { font-weight: 500; }
.dash__dots { display: flex; gap: 6px; }
.dash__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.dash__dots i:nth-child(1) { background: var(--blush); } .dash__dots i:nth-child(2) { background: var(--sand); } .dash__dots i:nth-child(3) { background: var(--sage); }
.badge-demo { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--sand); color: var(--ink); }

.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 7px 16px; border-radius: 999px; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: color .3s; white-space: nowrap; }
.seg button[aria-checked="true"] { color: var(--ink); }
.seg__thumb { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 3px rgba(31,42,55,.1), 0 4px 12px -4px rgba(31,42,55,.12); transition: transform .5s var(--ease), width .5s var(--ease); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; text-align: start; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; overflow: hidden; transition: border-color .4s var(--ease), background-color .4s var(--ease), transform .5s var(--ease); }
.kpi:hover { transform: translateY(-2px); }
.kpi[aria-checked="true"] { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.kpi--static { cursor: default; }
.kpi--static:hover { transform: none; }
.kpi__label { font-size: 14px; color: var(--ink-2); }
.kpi__value { font-family: var(--f-display); font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; line-height: 1.35; display: flex; align-items: baseline; gap: 6px; }
.kpi__value small { font-size: 13px; color: var(--muted); font-family: var(--f-body); font-weight: 400; }
.kpi__delta { font-size: 13px; color: var(--muted); }
.kpi__delta b { font-weight: 500; color: var(--good-ink); direction: ltr; unicode-bidi: isolate; }
.kpi__spark { width: 100%; height: 28px; margin-top: 8px; }
.kpi__spark path { fill: none; stroke: var(--accent); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; opacity: .55; transition: opacity .4s; }
.kpi[aria-checked="true"] .kpi__spark path { opacity: 1; }
.kpi__ring { position: absolute; inset-inline-end: 16px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(var(--sage-d) calc(var(--p, 0) * 1%), color-mix(in srgb, var(--sage-d) 16%, transparent) 0); }
.kpi__ring span { position: absolute; inset: 5px; border-radius: 50%; background: var(--surface-2); }

.dash__body { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.panel { margin: 0; padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.panel__head h3 { font-size: 18px; }
.panel__head p { font-size: 13px; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; width: 20px; height: 10px; }
.lg-line { border-top: 2px solid var(--accent); margin-top: 8px; height: 0 !important; }
.lg-dash { border-top: 2px dashed var(--accent); margin-top: 8px; height: 0 !important; }
.lg-band { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 3px; }

.chart { position: relative; height: 340px; touch-action: pan-y; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.chart text { font-family: var(--f-body); font-size: 12px; fill: var(--muted); }
.chart .y-label { font-variant-numeric: tabular-nums; }
.chart .hist { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .fc { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 5; stroke-linecap: round; }
.chart .band { fill: var(--accent); opacity: .14; }
.chart .area { fill: url(#areaGrad); }
.chart .today line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; opacity: .6; }
.chart .today text { fill: var(--ink-2); font-size: 12px; }
.chart .zone { fill: var(--muted); font-size: 11px; }
.chart .fc-zone { fill: var(--accent); opacity: .035; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; opacity: 0; transition: opacity .2s; }
.chart .hdot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; opacity: 0; transition: opacity .2s; }
.chart.is-hover .cross, .chart.is-hover .hdot { opacity: 1; }
.chart .end-label { fill: var(--ink); font-size: 13px; font-weight: 500; }
.tip { position: absolute; top: 0; left: 0; pointer-events: none; min-width: 150px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; line-height: 1.6; opacity: 0; transform: translate3d(0, 6px, 0); transition: opacity .2s, transform .25s var(--ease); z-index: 3; }
.chart.is-hover .tip { opacity: 1; }
.tip .t-m { color: var(--muted); font-size: 12px; }
.tip .t-v { font-family: var(--f-display); font-size: 18px; font-weight: 500; color: var(--ink); }
.tip .t-r { color: var(--ink-2); font-size: 12px; }
.tip .t-k { display: inline-block; font-size: 11px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); margin-inline-start: 6px; }

.table-view { margin-top: 12px; font-size: 14px; }
.table-view summary { cursor: pointer; color: var(--ink-2); width: fit-content; padding: 4px 0; }
.table-wrap { max-height: 260px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; }
.table-view table { width: 100%; border-collapse: collapse; }
.table-view th, .table-view td { padding: 7px 12px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-view th { position: sticky; top: 0; background: var(--surface-2); font-weight: 500; }
.table-view tr.is-fc td { color: var(--ink-2); }

.drivers { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 16px; }
.drivers li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 14px; }
.drivers .d-val { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.drivers .d-bar { grid-column: 1 / -1; height: 10px; border-radius: 0; background: transparent; position: relative; }
.drivers .d-bar::before { content: ""; position: absolute; inset: 0; background: var(--line); opacity: .5; border-radius: 4px; }
.drivers .d-bar span { position: absolute; inset-block: 0; right: 0; width: var(--w); background: var(--accent); border-radius: 4px 0 0 4px; transform-origin: right center; transform: scaleX(0); transition: transform 1s var(--ease); }
.drivers.is-in .d-bar span { transform: scaleX(1); }
.insight { display: flex; gap: 12px; margin-top: 24px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--lav) 40%, var(--surface)); font-size: 14px; color: var(--ink); }
.insight__ic { width: 32px; height: 32px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; flex: none; }
.insight__ic svg { width: 18px; height: 18px; fill: none; stroke: var(--lav-d); stroke-width: 1.8; stroke-linecap: round; }
.demo__note { font-size: 13px; color: var(--muted); margin-top: 16px; text-align: center; }

/* ---------- how ---------- */
.how__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: start; }
.sec-head--sticky { position: sticky; top: 120px; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 26px; }
.steps__rail { position: absolute; top: 28px; bottom: 28px; inset-inline-start: 27px; width: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.steps__fill { position: absolute; inset: 0; background: linear-gradient(180deg, var(--accent), var(--lav-d), var(--sage-d)); transform-origin: top; transform: scaleY(0); }
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 22px; align-items: start; }
.step__node { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-size: 20px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); position: relative; z-index: 1; transition: background-color .6s var(--ease), color .6s var(--ease), border-color .6s var(--ease), box-shadow .6s var(--ease); }
.step.is-active .step__node { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 12%, transparent); }
.step__body { padding: 24px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: box-shadow .6s var(--ease), border-color .6s var(--ease), opacity .6s var(--ease); opacity: .55; }
.step.is-active .step__body { opacity: 1; box-shadow: var(--shadow); }
.step h3 { font-size: 22px; margin-bottom: 6px; }
.step p { color: var(--ink-2); font-size: 16px; }

/* ---------- proof ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-block: 1px solid var(--line); }
.stat { padding: 34px 20px; text-align: center; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat b { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 5vw, 64px); line-height: 1.2; background: linear-gradient(120deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat > span { color: var(--ink-2); font-size: 15px; }
.stat b[dir="ltr"] { direction: ltr; }
.proof__note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 12px; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 60px; }
.quote { margin: 0; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.quote:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.quote blockquote { margin: 0; font-size: 17px; line-height: 1.85; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote figcaption b { display: block; font-weight: 500; font-size: 15px; }
.quote figcaption small { color: var(--muted); font-size: 13px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); background: hsl(var(--h) 28% 86%); color: hsl(var(--h) 25% 30%); flex: none; }
[data-theme="dark"] .avatar { background: hsl(var(--h) 20% 24%); color: hsl(var(--h) 30% 80%); }

/* ---------- cta ---------- */
.cta__panel { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: clamp(56px, 9vw, 110px) clamp(20px, 5vw, 60px); border-radius: 36px; border: 1px solid var(--line); background: var(--surface); }
.mesh--cta { z-index: -1; }
.mesh--cta .blob { filter: blur(60px); opacity: .85; }
.mesh--cta .b1 { width: 60%; height: 140%; top: -40%; left: -10%; }
.mesh--cta .b2 { width: 50%; height: 120%; bottom: -50%; right: -10%; }
.mesh--cta .b3 { width: 40%; height: 100%; top: 0; right: 30%; }
.cta__title { font-size: clamp(30px, 4.4vw, 58px); max-width: 15em; margin-inline: auto; }
.cta__lead { font-size: 18px; color: var(--ink-2); max-width: 34em; margin: 20px auto 0; }
.cta .hero__cta { justify-content: center; }

/* ---------- footer ---------- */
.footer { padding: 70px 0 30px; border-top: 1px solid var(--line); margin-top: 40px; }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__brand { max-width: 320px; }
.footer__brand p { color: var(--ink-2); font-size: 15px; margin-top: 10px; }
.footer__brand .brand__ar { margin-inline-end: 10px; }
.footer__cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer__cols h4 { font-size: 15px; margin-bottom: 12px; }
.footer__cols a { display: block; color: var(--ink-2); font-size: 15px; padding: 3px 0; transition: color .3s; }
.footer__cols a:hover { color: var(--accent); }
.footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero__inner { grid-template-columns: 1fr; gap: 30px; }
  .hero__visual { height: 430px; max-width: 560px; width: 100%; margin-inline: auto; }
  .cards, .quotes { grid-template-columns: 1fr 1fr; }
  .cards > :last-child, .quotes > :last-child { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash__body { grid-template-columns: 1fr; }
  .how__grid { grid-template-columns: 1fr; gap: 10px; }
  .sec-head--sticky { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .nav__links { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 110px; padding-bottom: 80px; }
  .hero__title { font-size: clamp(32px, 9vw, 42px); }
  .hero__visual { height: 380px; }
  .card-main { inset-inline: 0; top: 54px; padding: 18px 16px 12px; }
  .cm__value { font-size: 32px; }
  .cm__chart { height: 120px; }
  .chip { padding: 9px 12px; gap: 9px; }
  .chip b { font-size: 14px; }
  .chip__ic { width: 28px; height: 28px; }
  .chip__ic--sage::after { inset: 8px; } .chip__ic--lav::after { inset: 9px 12.5px; }
  .chip--a { inset-inline-start: 0; top: 0; }
  .chip--b { inset-inline-end: 0; bottom: 34px; }
  .chip--c { inset-inline-start: 0; bottom: -10px; }
  .chip--c svg { width: 44px; }
  .btn { --pad: 13px 22px; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .cards, .quotes { grid-template-columns: 1fr; }
  .kpis { gap: 10px; }
  .kpi { padding: 12px 12px 10px; }
  .kpi__value { font-size: 24px; flex-wrap: wrap; gap: 2px 4px; }
  .kpi__ring { width: 30px; height: 30px; inset-inline-end: 10px; bottom: 10px; }
  .kpi__ring span { inset: 4px; }
  .dash { border-radius: 22px; }
  .dash__top { flex-direction: column; align-items: stretch; }
  .seg { justify-content: space-between; }
  .seg button { flex: 1; padding: 7px 8px; }
  .panel { padding: 14px; }
  .chart { height: 270px; }
  .step { grid-template-columns: 44px 1fr; gap: 14px; }
  .step__node { width: 44px; height: 44px; font-size: 17px; }
  .steps__rail { inset-inline-start: 21px; }
  .step__body { padding: 18px; }
  .stat { padding: 24px 10px; }
  .footer__cols { gap: 34px; }
  .nav__inner { padding-inline-end: 6px; }
  .brand__en { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .blob, .flow__track, .marquee__track { animation: none !important; }
  .step__body { opacity: 1; }
  .drivers .d-bar span { transform: none; }
}
