/* ============================================================
   FILENTO — "Ledger" Design System
   Editorial luxe · Ink · Paper · Brass.
   High-contrast serif display + grotesk body + mono for data.
   Hairlines, sharp corners, restraint. No gradients/glass/aurora.
   ============================================================ */

/* ---------- Self-hosted body font (GDPR-safe, optional). Display = system serif. ----------
   Drop assets/fonts/Geist-Variable.woff2 + GeistMono-Variable.woff2 to upgrade body/mono.
   Falls back cleanly to the system grotesk / mono stack. */
:root {
  /* Editorial serif for display, grotesk for body, mono for data/labels */
  --font-display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;

  --maxw: 1180px;
  --gutter: clamp(22px, 5.2vw, 64px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --r: 2px;
  --r-2: 4px;
}

/* ---------- Dark (default) — warm ink + brass ---------- */
:root, [data-theme="dark"] {
  --bg: #0c111b;
  --bg-2: #090d15;
  --surface: #141b27;
  --surface-2: #1b2330;
  --surface-3: #232c3b;

  --text: #e9eef6;
  --text-2: #9aa7ba;
  --text-3: #6c7991;

  --accent: #5a93f7;        /* logo blue — legible on ink */
  --accent-bright: #82b0f9;
  --accent-deep: #2f6fe8;   /* fills */
  --accent-soft: rgba(90, 147, 247, .12);
  --on-accent: #ffffff;

  --line: rgba(150, 172, 204, .13);
  --line-2: rgba(150, 172, 204, .24);
  --line-3: rgba(150, 172, 204, .4);

  --shadow: 0 30px 60px -34px rgba(0, 0, 0, .72);
  --shadow-2: 0 50px 90px -40px rgba(3, 7, 18, .8);
  --grain-op: .035;
  color-scheme: dark;
}

/* ---------- Light — warm paper + ink + deep brass ---------- */
[data-theme="light"] {
  --bg: #eef1f6;
  --bg-2: #e5e9f1;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --surface-3: #e8edf4;

  --text: #111824;
  --text-2: #47536a;
  --text-3: #76829a;

  --accent: #2563eb;        /* logo blue, strong on white */
  --accent-bright: #3b7af0;
  --accent-deep: #1d4fd0;
  --accent-soft: rgba(37, 99, 235, .09);
  --on-accent: #ffffff;

  --line: rgba(28, 44, 72, .12);
  --line-2: rgba(28, 44, 72, .2);
  --line-3: rgba(28, 44, 72, .34);

  --shadow: 0 24px 50px -32px rgba(28, 44, 72, .28);
  --shadow-2: 0 40px 80px -40px rgba(28, 44, 72, .32);
  --grain-op: .04;
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .4s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* paper grain for warmth */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px; mix-blend-mode: overlay;
}
/* legacy decorative layers — neutralised in the Ledger system */
.bg-fx, .aurora, .bg-grid, .cursor-glow { display: none !important; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 600; line-height: 1.06;
  letter-spacing: -.022em; color: var(--text);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); opacity: .7; }
.section-head.center .eyebrow::before { display: none; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(76px, 10vw, 138px); position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 70px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(2.1rem, 4.8vw, 3.5rem); margin-top: 20px; font-weight: 600; }
.section-head p { color: var(--text-2); font-size: clamp(1.04rem, 1.5vw, 1.18rem); margin-top: 20px; max-width: 64ch; text-wrap: pretty; }
.section-head.center p { margin-inline: auto; }
.lead { color: var(--text-2); font-size: 1.12rem; }

/* ---------- Buttons — rectangular, tracked caps ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  font-family: var(--font-body); font-weight: 600; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 16px 26px; border-radius: var(--r); position: relative; white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent-deep); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-lg { padding: 19px 32px; font-size: .86rem; }
.btn-sm { padding: 12px 18px; font-size: .76rem; }

/* ---------- Pill / tag ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 9px 16px 9px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em; color: var(--text-2);
}
.pill .dot { width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); border-radius: 1px; }
.pill .dot.live { animation: pulseDot 2.6s var(--ease) infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; font-weight: 500;
  color: var(--accent); border: 1px solid var(--line-2); border-radius: var(--r);
}
.tag svg { width: 13px; height: 13px; }

/* ============================================================ HEADER ============================================================ */
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--accent-deep); color: var(--on-accent); padding: 10px 18px; }
.skip:focus { left: 12px; }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%; z-index: 200;
  background: var(--accent); will-change: transform; pointer-events: none;
}

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-block: 20px; border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease), padding .35s var(--ease);
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line-2); padding-block: 13px;
}
.nav { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; }
.logo-on-light { display: none; }
[data-theme="light"] .logo-on-dark { display: none; }
[data-theme="light"] .logo-on-light { display: inline-block; }
.brand .word { color: var(--text); }

.nav-links { display: flex; gap: 2px; margin-inline: auto; }
.nav-links a {
  padding: 8px 14px; font-family: var(--font-mono); font-weight: 500; font-size: .76rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-2);
  transition: color .2s; white-space: nowrap; position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 1px; background: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line-2); color: var(--text-2);
  transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.lang { position: relative; }
.lang-toggle { display: flex; align-items: center; gap: 8px; padding: 0 13px; height: 40px; border-radius: var(--r); background: transparent; border: 1px solid var(--line-2); font-family: var(--font-mono); font-weight: 500; font-size: .78rem; letter-spacing: .06em; color: var(--text-2); transition: border-color .2s, color .2s; }
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }
.lang-toggle .flag { font-size: 1rem; }
.lang-toggle svg { width: 13px; height: 13px; transition: transform .25s; }
.lang.open .lang-toggle svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 196px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-2);
  box-shadow: var(--shadow); padding: 7px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transform-origin: top right;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.lang.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border-radius: var(--r); font-size: .9rem; color: var(--text-2); transition: background .18s, color .18s; }
.lang-menu button:hover { background: var(--surface-2); color: var(--text); }
.lang-menu button.active { color: var(--accent); }
.lang-menu .flag { font-size: 1.1rem; }
.menu-toggle { display: none; }

/* ============================================================ HERO ============================================================ */
.hero { padding-top: clamp(140px, 16vw, 196px); padding-bottom: clamp(64px, 9vw, 110px); border-top: none; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(40px, 5vw, 84px); align-items: center; }
.hero-copy { max-width: 640px; }
.hero h1 { font-size: clamp(2.7rem, 6vw, 4.7rem); font-weight: 600; line-height: 1.03; margin: 26px 0 0; letter-spacing: -.032em; }
.hero h1 .grad { color: var(--accent); }
.hero .sub { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--text-2); margin-top: 26px; max-width: 56ch; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--text-3); font-family: var(--font-mono); font-size: .76rem; letter-spacing: .03em; }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 14px; height: 14px; color: var(--accent); }

/* product mock — a precise ledger, not a glassy app */
.hero-stage { position: relative; }
.mock {
  position: relative; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-2); box-shadow: var(--shadow-2); overflow: hidden;
}
.mock-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mock-bar .dots { display: flex; gap: 7px; }
.mock-bar .dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-3); }
.mock-url { margin-left: 6px; font-family: var(--font-mono); font-size: .74rem; color: var(--text-3); flex: 1; letter-spacing: .02em; }
.mock-tag { font-family: var(--font-mono); font-size: .64rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--line-2); padding: 4px 9px; border-radius: var(--r); }
.mock-body { padding: 10px 22px 22px; }
.mock-field {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(8px);
}
.mock-field.in { opacity: 1; transform: translateY(0); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.mock-field .lab { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.mock-field .val { font-family: var(--font-mono); font-size: .9rem; color: var(--text); display: flex; align-items: center; gap: 10px; }
.mock-field .check { width: 17px; height: 17px; border-radius: 50%; background: var(--accent-deep); display: grid; place-items: center; flex-shrink: 0; opacity: 0; transform: scale(.5); transition: opacity .3s, transform .35s var(--ease); }
.mock-field.done .check { opacity: 1; transform: scale(1); }
.mock-field .check svg { width: 10px; height: 10px; color: var(--on-accent); }
.mock-foot { display: flex; align-items: center; gap: 13px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.mock-foot .spark { width: 30px; height: 30px; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; border-radius: var(--r); }
.mock-foot .spark svg { width: 15px; height: 15px; }
.mock-foot b { font-size: .92rem; font-family: var(--font-body); font-weight: 600; }
.mock-foot small { display: block; color: var(--text-3); font-size: .78rem; margin-top: 2px; }

/* ============================================================ TRUST STRIP ============================================================ */
.strip { border-block: 1px solid var(--line-2); background: var(--bg-2); }
.section + .strip, .strip + .section { border-top: none; }
.strip .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 40px; padding-block: 24px; }
.strip-item { display: flex; align-items: center; gap: 11px; color: var(--text-2); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; }
.strip-item svg { width: 18px; height: 18px; color: var(--accent); transition: transform .3s var(--ease); }
.strip-item:hover svg { transform: translateY(-2px); }

/* ============================================================ STATS ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); }
.stat { position: relative; padding: 36px 30px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.6rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.02em; color: var(--accent); }
.stat .lab { font-weight: 600; margin-top: 16px; font-size: 1rem; }
.stat .desc { color: var(--text-3); font-size: .88rem; margin-top: 9px; line-height: 1.55; }

/* ============================================================ HOW ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.step { position: relative; padding: 38px 34px; border-right: 1px solid var(--line); transition: background .35s var(--ease); }
.step:last-child { border-right: none; }
.step:hover { background: var(--surface); }
.step-no { font-family: var(--font-mono); font-weight: 500; font-size: .82rem; letter-spacing: .1em; color: var(--accent); }
.step h3 { font-size: 1.55rem; font-weight: 500; margin: 18px 0 12px; }
.step p { color: var(--text-2); }
.step .more { color: var(--text-3); font-size: .9rem; margin-top: 14px; }
.step-conn { display: none; }

/* ============================================================ FEATURES ============================================================ */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.feat { position: relative; padding: 36px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .35s var(--ease); }
.feat:hover { background: var(--surface); }
.feat-grid .feat:nth-child(3n) { border-right: none; }
.feat-grid .feat:nth-last-child(-n+3) { border-bottom: none; }
.feat-ic { width: 46px; height: 46px; border: 1px solid var(--line-2); color: var(--accent); display: grid; place-items: center; border-radius: var(--r); }
.feat-ic svg { width: 23px; height: 23px; }
.feat h3 { font-size: 1.3rem; font-weight: 500; margin: 22px 0 10px; }
.feat p { color: var(--text-2); font-size: .96rem; }

/* product tour reuses .feat-grid */

/* ============================================================ COMPARISON ============================================================ */
.cmp { border: 1px solid var(--line-2); background: var(--surface); }
.cmp table { width: 100%; border-collapse: collapse; }
.cmp th, .cmp td { padding: 20px 24px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cmp thead th { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
.cmp thead th.hl { color: var(--accent); border-bottom: 1px solid var(--accent); }
.cmp tbody td:first-child { font-weight: 600; color: var(--text); font-size: .95rem; }
.cmp td { color: var(--text-2); font-size: .95rem; }
.cmp td.hl { background: var(--accent-soft); color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.cmp tr:last-child td { border-bottom: none; }
.cmp .winner { display: inline-flex; align-items: center; gap: 8px; }
.cmp .winner svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.cmp-cards { display: none; }
.cmp-note, p.lead.cmp-note { text-align: center; }

/* ============================================================ USE CASES ============================================================ */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); }
.case { padding: 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .35s var(--ease); }
.cases .case:nth-child(2n) { border-right: none; }
.cases .case:nth-last-child(-n+2) { border-bottom: none; }
.case:hover { background: var(--surface); }
.case-top { display: flex; align-items: center; gap: 16px; }
.avatar { width: 50px; height: 50px; border-radius: var(--r); border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; color: var(--accent); flex-shrink: 0; background: var(--surface-2); }
.case-top .meta b { font-size: 1.08rem; font-family: var(--font-display); font-weight: 500; }
.case-top .meta span { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: .76rem; letter-spacing: .03em; margin-top: 2px; }
.case-badge { margin-left: auto; align-self: flex-start; }
.case p { color: var(--text-2); margin-top: 20px; font-size: .96rem; }

/* ============================================================ PRICING ============================================================ */
.price-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line-2); border-radius: var(--r); margin-top: 30px; position: relative; }
.price-toggle button { padding: 11px 22px; border-radius: var(--r); font-family: var(--font-mono); font-weight: 500; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); transition: color .25s; position: relative; display: inline-flex; align-items: center; z-index: 1; }
.price-toggle button.active { color: var(--on-accent); }
.price-toggle .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: var(--r); background: var(--accent-deep); transition: transform .35s var(--ease); z-index: 0; }
.price-toggle.year .thumb { transform: translateX(100%); }
.save-badge { font-size: .68rem; font-weight: 600; color: var(--accent); margin-left: 8px; letter-spacing: .04em; }
.price-toggle button.active .save-badge { color: var(--on-accent); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 48px; border: 1px solid var(--line-2); align-items: stretch; }
.plan { position: relative; padding: 40px 34px; border-right: 1px solid var(--line); display: flex; flex-direction: column; transition: background .35s var(--ease); }
.plan:last-child { border-right: none; }
.plan:hover { background: var(--surface); }
.plan h3 { font-size: 1.5rem; font-weight: 500; }
.plan .price { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 4px; }
.plan .price .amt { font-family: var(--font-display); font-weight: 500; font-size: 3.4rem; letter-spacing: -.02em; line-height: 1; color: var(--text); }
.plan .price .per { color: var(--text-3); font-family: var(--font-mono); font-size: .82rem; }
.plan .price-alt { color: var(--text-3); font-family: var(--font-mono); font-size: .78rem; min-height: 18px; }
.plan .desc { color: var(--text-2); font-size: .93rem; margin: 20px 0 24px; min-height: 60px; }
.plan ul { display: grid; gap: 13px; margin-bottom: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.plan li { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; color: var(--text-2); line-height: 1.5; }
.plan li svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.plan .btn { width: 100%; margin-top: auto; }
.plan .fine { text-align: center; color: var(--text-3); font-family: var(--font-mono); font-size: .72rem; margin-top: 14px; }

/* Featured — inked panel with blue frame */
.plan.featured { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--accent); }
[data-theme="light"] .plan.featured { background: #0d141f; }
[data-theme="light"] .plan.featured h3, [data-theme="light"] .plan.featured .price .amt { color: #e9eef6; }
[data-theme="light"] .plan.featured .desc { color: #9aa7ba; }
[data-theme="light"] .plan.featured .price .per, [data-theme="light"] .plan.featured .price-alt, [data-theme="light"] .plan.featured .fine { color: #6c7991; }
[data-theme="light"] .plan.featured li { color: #b4c0d2; }
[data-theme="light"] .plan.featured ul { border-top-color: rgba(150,172,204,.2); }
.plan.featured:hover { background: var(--bg-2); }
[data-theme="light"] .plan.featured:hover { background: #0d141f; }
.plan-flag { position: absolute; top: 0; right: 34px; transform: translateY(-50%); background: var(--accent-deep); color: var(--on-accent); font-family: var(--font-mono); font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--r); }

.payg { margin-top: 0; border: 1px solid var(--line-2); border-top: none; padding: 30px 34px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--bg-2); }
.payg .txt { flex: 1; min-width: 240px; }
.payg h4 { font-size: 1.25rem; font-weight: 500; }
.payg p { color: var(--text-2); margin-top: 6px; font-size: .94rem; }

/* ============================================================ SECURITY ============================================================ */
.sec-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; border: 1px solid var(--line); }
.sec-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-right: 1px solid var(--line); }
.sec-card { padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-cards .sec-card:nth-child(2n) { border-right: none; }
.sec-cards .sec-card:nth-last-child(-n+2) { border-bottom: none; }
.sec-card .ic { width: 42px; height: 42px; border: 1px solid var(--line-2); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; border-radius: var(--r); }
.sec-card .ic svg { width: 21px; height: 21px; }
.sec-card h4 { font-size: 1.12rem; font-weight: 500; margin-bottom: 9px; }
.sec-card p { color: var(--text-2); font-size: .9rem; line-height: 1.6; }

.timeline { padding: 36px; background: var(--bg-2); }
.timeline h4 { font-size: 1.15rem; font-weight: 500; margin-bottom: 26px; display: flex; align-items: center; gap: 11px; }
.timeline h4 svg { width: 18px; height: 18px; color: var(--accent); }
.tl-item { display: flex; gap: 20px; padding-bottom: 26px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 25px; top: 40px; bottom: -2px; width: 1px; background: var(--line-2); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 50px; height: 26px; border: 1px solid var(--line-2); color: var(--accent); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 500; font-size: .72rem; flex-shrink: 0; border-radius: var(--r); background: var(--surface); }
.tl-body b { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.tl-body p { color: var(--text-2); font-size: .92rem; margin-top: 4px; }

/* ============================================================ FACTS ============================================================ */
.facts { border: 1px solid var(--line-2); padding: clamp(32px, 4vw, 52px); background: var(--surface); }
.facts h3 { font-size: 1.7rem; font-weight: 500; margin-bottom: 10px; margin-top: 16px; }
.facts > p { color: var(--text-2); margin-bottom: 30px; max-width: 68ch; }
.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.fact-row { display: flex; gap: 15px; padding: 22px 26px 22px 0; border-bottom: 1px solid var(--line); }
.facts-grid .fact-row:nth-child(odd) { padding-right: 40px; border-right: 1px solid var(--line); }
.facts-grid .fact-row:nth-child(even) { padding-left: 30px; }
.facts-grid .fact-row:nth-last-child(-n+2) { border-bottom: none; }
.fact-row svg { width: 19px; height: 19px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.fact-row b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; }
.fact-row span { color: var(--text-2); font-size: .9rem; }

/* ============================================================ FAQ ============================================================ */
.faq-wrap { display: grid; grid-template-columns: .78fr 1.22fr; gap: 52px; align-items: start; }
.faq-aside { position: sticky; top: 110px; }
.faq-aside h3 { font-size: 1.7rem; font-weight: 500; margin-top: 16px; }
.faq-aside p { color: var(--text-2); margin: 16px 0 24px; }
.faq-list { display: grid; }
.faq-cat { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 28px 0 6px; }
.faq-cat:first-child { margin-top: 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; align-items: center; gap: 18px; padding: 22px 4px; text-align: left; font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; }
.faq-q .ic { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; flex-shrink: 0; color: var(--accent); transition: transform .3s; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-q .ic svg { width: 15px; height: 15px; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq-a-inner { padding: 0 40px 24px 4px; color: var(--text-2); font-size: .96rem; line-height: 1.65; }

/* ============================================================ FINAL CTA ============================================================ */
.cta { position: relative; padding: clamp(56px, 8vw, 100px) clamp(28px, 5vw, 76px); text-align: center; overflow: hidden; background: var(--bg-2); border: 1px solid var(--accent); }
[data-theme="light"] .cta { background: #0d141f; }
.cta h2 { font-size: clamp(2.2rem, 5vw, 3.7rem); font-weight: 600; color: var(--text); }
[data-theme="light"] .cta h2 { color: #e9eef6; }
.cta p { color: var(--text-2); font-size: 1.18rem; margin: 22px auto 0; max-width: 56ch; }
[data-theme="light"] .cta p { color: #9aa7ba; }
.cta .hero-cta { justify-content: center; }
.cta .fine { color: var(--text-3); font-family: var(--font-mono); font-size: .78rem; margin-top: 26px; }
.cta .btn-ghost { border-color: var(--line-3); color: var(--text); }
[data-theme="light"] .cta .btn-ghost { border-color: rgba(150,172,204,.32); color: #e9eef6; }
[data-theme="light"] .cta .btn-ghost:hover { border-color: var(--accent-bright); color: var(--accent-bright); }

/* ============================================================ FOOTER ============================================================ */
.footer { border-top: 1px solid var(--line-2); padding-block: clamp(58px, 7vw, 84px) 36px; background: var(--bg-2); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 44px; }
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p { color: var(--text-2); font-size: .93rem; max-width: 320px; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.footer-badges .pill { font-size: .68rem; padding: 6px 12px; }
.footer-badges .pill svg { width: 13px; height: 13px; color: var(--accent); }
.footer-col h5 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 18px; font-weight: 500; }
.footer-col a { display: block; color: var(--text-2); padding: 7px 0; font-size: .93rem; transition: color .2s, padding-left .2s; }
.footer-col a:hover { color: var(--accent); padding-left: 5px; }
.news { display: flex; gap: 8px; margin-top: 14px; }
.news input { flex: 1; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; }
.news input:focus-visible { border-color: var(--accent); outline: none; }
.news button { padding: 12px 18px; border-radius: var(--r); background: var(--accent-deep); color: var(--on-accent); font-family: var(--font-body); font-weight: 600; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.news-consent { display: flex; align-items: flex-start; gap: 9px; margin-top: 13px; cursor: pointer; }
.news-consent input { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent-deep); cursor: pointer; }
.news-consent span { color: var(--text-3); font-size: .78rem; line-height: 1.5; }
.news-consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.news-note { color: var(--text-3); font-family: var(--font-mono); font-size: .72rem; margin-top: 9px; }
.news.invalid input { border-color: #c0563a; }
.news.done input { border-color: var(--accent); }
.news.done button { background: var(--accent-bright); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 50px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--text-3); font-family: var(--font-mono); font-size: .76rem; letter-spacing: .03em; }
.footer-bottom .heart { color: var(--accent); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
.reveal.d4 { transition-delay: .28s; }

/* ---------- Back to top ---------- */
#toTop { background: var(--accent-deep) !important; color: var(--on-accent) !important; border-radius: var(--r) !important; }
#toTop:hover { background: var(--accent-bright) !important; transform: translateY(-2px) !important; }

/* ============================================================ RTL (Arabic) ============================================================ */
[dir="rtl"] .eyebrow::before { display: none; }
[dir="rtl"] .faq-q .ic { margin-left: 0; margin-inline-start: auto; }
[dir="rtl"] .case-badge { margin-left: 0; margin-inline-start: auto; }
[dir="rtl"] .lang-menu { right: auto; left: 0; transform-origin: top left; }
[dir="rtl"] .plan-flag { right: auto; left: 34px; }
[dir="rtl"] .stat, [dir="rtl"] .step, [dir="rtl"] .feat, [dir="rtl"] .case { border-right: none; border-left: 1px solid var(--line); }
[dir="rtl"] .stat:last-child, [dir="rtl"] .step:last-child { border-left: none; }
[dir="rtl"] .cmp td.hl { box-shadow: inset -2px 0 0 var(--accent); }
[dir="rtl"] .tl-item::before { left: auto; right: 25px; }
[dir="rtl"] .faq-a-inner { padding: 0 4px 24px 40px; }
[dir="rtl"] #toTop svg { transform: rotate(-90deg) scaleX(-1); }
[dir="rtl"] .btn svg, [dir="rtl"] .nav-links a svg { transform: scaleX(-1); }

/* ============================================================ RESPONSIVE ============================================================ */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { max-width: 520px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .steps, .feat-grid { grid-template-columns: 1fr; }
  .step, .feat { border-right: none; border-bottom: 1px solid var(--line); }
  .step:last-child, .feat:last-child { border-bottom: none; }
  .feat-grid .feat:nth-child(3n) { border-right: none; }
  .plans { grid-template-columns: 1fr; }
  .plan { border-right: none; border-bottom: 1px solid var(--line); }
  .plan:last-child { border-bottom: none; }
  .sec-grid { grid-template-columns: 1fr; }
  .sec-cards { border-right: none; border-bottom: 1px solid var(--line); }
  .faq-wrap { grid-template-columns: 1fr; gap: 32px; }
  .faq-aside { position: static; }
  .facts-grid { grid-template-columns: 1fr; }
  .facts-grid .fact-row:nth-child(odd) { padding-right: 0; border-right: none; }
  .facts-grid .fact-row:nth-child(even) { padding-left: 0; }
  .facts-grid .fact-row:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .cases { grid-template-columns: 1fr; }
  .case { border-right: none; border-bottom: 1px solid var(--line); }
  .case:last-child { border-bottom: none; }
  .cmp { border: none; }
  .cmp table { display: none; }
  .cmp-cards { display: grid; gap: 0; border: 1px solid var(--line-2); }
  .cmp-card { padding: 26px; border-bottom: 1px solid var(--line); }
  .cmp-card:last-child { border-bottom: none; }
  .cmp-card.win { box-shadow: inset 2px 0 0 var(--accent); }
  .cmp-card h4 { font-size: 1.15rem; font-weight: 500; margin-bottom: 14px; font-family: var(--font-display); }
  .cmp-card .row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9rem; }
  .cmp-card .row span:first-child { color: var(--text-3); font-family: var(--font-mono); font-size: .76rem; }
  .cmp-card .row span:last-child { text-align: right; }
  .payg { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); }
}
@media (max-width: 480px) {
  .stats-grid, .footer-top { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: none; }
  body { font-size: 16px; }
}
