/* ============================================================
   MailBear — design system
   Type: Space Grotesk (display) · Hanken Grotesk (body) · JetBrains Mono (technical)
   ============================================================ */

:root {
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* headline face (themeable via data-headline) */
  --font-hero: "Big Shoulders Display", "Space Grotesk", sans-serif;
  --hero-tracking: 0.005em;
  --hero-lh: 0.94;

  /* light theme tokens */
  --bg: oklch(0.985 0.006 85);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.975 0.008 84);
  --ink: oklch(0.23 0.012 70);
  --ink-2: oklch(0.42 0.012 70);
  --muted: oklch(0.56 0.012 70);
  --line: oklch(0.23 0.012 70 / 0.10);
  --line-2: oklch(0.23 0.012 70 / 0.06);

  /* deep section */
  --dark: oklch(0.24 0.018 65);
  --dark-2: oklch(0.20 0.018 65);
  --on-dark: oklch(0.96 0.008 85);
  --on-dark-muted: oklch(0.74 0.012 80);
  --dark-line: oklch(0.96 0.008 85 / 0.12);

  /* bear is a brand constant — never themed */
  --bear: #e8a23d;
  --bear-deep: #cf872a;

  /* accent (themeable) */
  --accent: #e8a23d;
  --accent-strong: #cf872a;
  --on-accent: oklch(0.23 0.012 70);
  --accent-tint: oklch(0.95 0.04 80);

  --good: oklch(0.70 0.15 152);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1200px;
  --shadow-1: 0 1px 2px oklch(0.23 0.02 70 / 0.06), 0 8px 24px oklch(0.23 0.02 70 / 0.06);
  --shadow-2: 0 2px 4px oklch(0.23 0.02 70 / 0.07), 0 24px 60px oklch(0.23 0.02 70 / 0.13);
}

/* ---- headline face variants (Tweak: data-headline) ---- */
:root[data-headline="schibsted"] { --font-hero: "Schibsted Grotesk", sans-serif; --hero-tracking: -0.02em; --hero-lh: 1.02; }
:root[data-headline="bricolage"] { --font-hero: "Bricolage Grotesque", sans-serif; --hero-tracking: -0.02em; --hero-lh: 1.0; }
:root[data-headline="space"]     { --font-hero: "Space Grotesk", sans-serif; --hero-tracking: -0.02em; --hero-lh: 1.05; }

/* ---- accent palettes ---- */
:root[data-accent="signal"] {
  --accent: #4f74ff; --accent-strong: #3a5bf0; --on-accent: #fff; --accent-tint: oklch(0.93 0.05 264);
}
:root[data-accent="evergreen"] {
  --accent: #1f9d6b; --accent-strong: #16855a; --on-accent: #fff; --accent-tint: oklch(0.93 0.05 162);
}
:root[data-accent="plum"] {
  --accent: #8a5cf0; --accent-strong: #744ad8; --on-accent: #fff; --accent-tint: oklch(0.93 0.05 300);
}

/* ---- dark theme ---- */
:root[data-theme="dark"] {
  --bg: oklch(0.17 0.012 75);
  --surface: oklch(0.215 0.014 72);
  --surface-2: oklch(0.245 0.014 72);
  --ink: oklch(0.96 0.008 85);
  --ink-2: oklch(0.82 0.01 82);
  --muted: oklch(0.66 0.012 80);
  --line: oklch(0.96 0.008 85 / 0.12);
  --line-2: oklch(0.96 0.008 85 / 0.07);
  --dark: oklch(0.13 0.012 75);
  --dark-2: oklch(0.11 0.012 75);
  --on-dark: oklch(0.96 0.008 85);
  --on-dark-muted: oklch(0.72 0.012 80);
  --dark-line: oklch(0.96 0.008 85 / 0.10);
  --shadow-1: 0 1px 2px #0008, 0 8px 24px #0006;
  --shadow-2: 0 2px 4px #0009, 0 24px 60px #0009;
}

:root[data-radius="sharp"] { --radius: 5px; --radius-sm: 4px; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0; color: var(--ink); }

/* big-print headlines use the display face */
.hero h1, .roast h2, .feat-head h2, .arch h2, #pricing h2, .docs h2, .cta-box h2 {
  font-family: var(--font-hero);
  font-weight: 700;
  letter-spacing: var(--hero-tracking);
  line-height: var(--hero-lh);
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-strong);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: var(--accent); display: inline-block; }
.section { padding: 96px 0; }
.muted { color: var(--muted); }

/* ---- buttons ---- */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 var(--accent-strong) inset, var(--shadow-1); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-2); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-ondark { background: var(--on-dark); color: var(--dark); }
.btn-sm { padding: 9px 15px; font-size: 14px; }

.pill {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); display: inline-flex; align-items: center; gap: 7px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in oklab, var(--good) 22%, transparent); }

/* ============================================================ NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; }
.brand b { color: var(--bear-deep); font-weight: 700; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { font-size: 15px; color: var(--ink-2); padding: 8px 13px; border-radius: 8px; font-weight: 500; transition: background .15s, color .15s; }
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ============================================================ HERO */
.hero { position: relative; padding: 70px 0 0; overflow: hidden; }
.hero-grid { display: grid; gap: 30px; }
.hero h1 { font-size: clamp(40px, 6vw, 76px); max-width: 14ch; }
.hero h1 .hl { color: var(--bear-deep); }
.hero-sub { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 54ch; margin-top: 22px; line-height: 1.5; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; align-items: center; }
.hero-meta { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.hero-meta .m { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-meta .m b { color: var(--ink); font-weight: 600; }

.hero-stage { margin-top: 56px; position: relative; }
.hero-stage::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; z-index: 3;
}

/* ============================================================ PRODUCT MOCK */
.win {
  border-radius: 16px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-2);
}
.win-bar { display: flex; align-items: center; gap: 14px; padding: 0 14px; height: 44px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.tl { display: flex; gap: 7px; }
.tl i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: block; }
.tl i:nth-child(1){ background:#f0685f; } .tl i:nth-child(2){ background:#f4bd4f; } .tl i:nth-child(3){ background:#5fc466; }
.url { flex: 1; max-width: 320px; margin: 0 auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; height: 26px; display: flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.app { display: grid; grid-template-columns: 220px 312px 1fr; height: 540px; font-size: 14px; }
.app-col { border-right: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.app-col:last-child { border-right: 0; }

/* sidebar */
.side { padding: 16px 13px; gap: 4px; background: var(--surface-2); }
.compose { width: 100%; justify-content: center; margin-bottom: 14px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 9px; color: var(--ink-2); font-weight: 500; cursor: pointer; }
.nav-item .ic { width: 17px; height: 17px; opacity: .7; }
.nav-item .ct { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.nav-item.active { background: var(--accent-tint); color: var(--ink); }
.nav-item.active .ct { color: var(--accent-strong); }
.nav-item:hover:not(.active) { background: color-mix(in oklab, var(--ink) 5%, transparent); }
.side-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 16px 11px 7px; }
.lbl-dot { width: 9px; height: 9px; border-radius: 3px; }
.storage { margin-top: auto; padding: 12px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); }
.storage .top { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.bar { height: 6px; border-radius: 4px; background: var(--line); margin: 8px 0 6px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 34%; background: var(--accent); border-radius: 4px; }

/* list */
.list { background: var(--surface); }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.list-head h4 { font-size: 15px; }
.mail { padding: 13px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; display: grid; grid-template-columns: 8px 1fr; gap: 10px; }
.mail:hover { background: var(--surface-2); }
.mail.sel { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.unread { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.unread.read { background: transparent; }
.mail > div { min-width: 0; }
.mail .row1 { display: flex; align-items: baseline; gap: 8px; }
.mail .from { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail .subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail .time { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); flex-shrink: 0; }
.mail .subj { color: var(--ink); margin-top: 2px; font-weight: 500; }
.mail .snip { color: var(--muted); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }

/* reading pane */
.read { background: var(--surface); padding: 0; }
.read-head { padding: 18px 24px; border-bottom: 1px solid var(--line); }
.read-head h3 { font-size: 19px; }
.read-from { display: flex; align-items: center; gap: 11px; margin-top: 13px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display); font-size: 15px; }
.read-from .meta b { font-weight: 600; }
.read-from .meta span { color: var(--muted); font-size: 13px; }
.ai-card { margin: 18px 24px; padding: 14px 16px; border-radius: 12px; background: var(--accent-tint); border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); }
.ai-card .ai-top { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-strong); font-weight: 500; }
.ai-card p { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.5; }
.read-body { padding: 4px 24px 24px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.read-body p { margin-bottom: 12px; }

/* ============================================================ LOGOS / SOCIAL PROOF */
.proof { padding: 40px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.proof .cap { text-align: center; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.proof-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; align-items: center; }
.proof-row span { font-family: var(--font-display); font-weight: 600; font-size: 21px; color: var(--muted); opacity: .8; letter-spacing: -0.01em; }

/* ============================================================ ROAST */
.roast { background: var(--dark); color: var(--on-dark); }
.roast h2, .dark-sec h2 { color: var(--on-dark); }
.roast .eyebrow { color: var(--accent); }
.roast-head { max-width: 760px; }
.roast h2 { font-size: clamp(30px, 4.2vw, 52px); margin-top: 18px; }
.roast h2 em { font-style: normal; color: var(--accent); }
.roast-sub { color: var(--on-dark-muted); font-size: 19px; margin-top: 20px; max-width: 60ch; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 50px; }
.vs-card { border-radius: var(--radius); padding: 28px; border: 1px solid var(--dark-line); }
.vs-old { background: var(--dark-2); }
.vs-new { background: color-mix(in oklab, var(--accent) 12%, var(--dark)); border-color: color-mix(in oklab, var(--accent) 35%, transparent); }
.vs-card .vh { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.vs-new .vh { color: var(--accent); }
.vs-list { display: flex; flex-direction: column; gap: 13px; }
.vs-list .li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; line-height: 1.4; }
.vs-old .li { color: var(--on-dark-muted); }
.vs-list .mk { font-family: var(--font-mono); flex-shrink: 0; margin-top: 1px; }
.vs-old .mk { color: oklch(0.62 0.13 28); }
.vs-new .mk { color: var(--accent); }
.vs-old .li s { text-decoration-color: oklch(0.6 0.14 28 / 0.7); }

/* ============================================================ FEATURES */
.feat-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 50px; }
.feat-head h2 { font-size: clamp(30px, 4vw, 48px); max-width: 18ch; margin-top: 16px; }
.feat-head p { color: var(--muted); max-width: 42ch; font-size: 17px; }
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.fcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; position: relative; overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.fcard:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.fcard.big { grid-column: span 2; }
.fcard .fi { width: 46px; height: 46px; border-radius: 11px; background: var(--accent-tint); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.fcard .fi svg { width: 24px; height: 24px; color: var(--accent-strong); }
.fcard .ftag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-strong); }
.fcard h3 { font-size: 22px; margin: 7px 0 10px; }
.fcard p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.fcard .frow { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.code-mini { margin-top: 20px; background: var(--dark); border-radius: 10px; padding: 16px 18px; font-family: var(--font-mono); font-size: 12.5px; color: var(--on-dark-muted); line-height: 1.7; overflow-x: auto; }
.code-mini .k { color: var(--accent); } .code-mini .s { color: oklch(0.78 0.11 152); } .code-mini .c { color: oklch(0.6 0.01 80); }

.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; }
.mini .mi { width: 20px; height: 20px; color: var(--accent-strong); margin-bottom: 12px; }
.mini h4 { font-size: 16px; font-family: var(--font-display); margin-bottom: 5px; }
.mini p { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* ============================================================ ARCHITECTURE */
.arch { background: var(--surface-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.arch-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; margin-top: 44px; }
.arch-node { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.arch-node .an-ic { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.arch-node h4 { font-family: var(--font-display); font-size: 18px; margin: 8px 0 6px; }
.arch-node p { color: var(--muted); font-size: 13px; }
.arch-arrow { color: var(--muted); font-family: var(--font-mono); font-size: 20px; }
.arch-stack { display: grid; gap: 14px; }

/* ============================================================ PRICING */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 50px; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; }
.tier.feat { border-color: var(--accent); box-shadow: var(--shadow-1); position: relative; }
.tier-badge { position: absolute; top: -11px; left: 30px; background: var(--accent); color: var(--on-accent); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; font-weight: 500; }
.tier h3 { font-size: 21px; }
.tier .desc { color: var(--muted); font-size: 14px; margin-top: 6px; min-height: 40px; }
.tier .price { margin: 20px 0 4px; display: flex; align-items: baseline; gap: 6px; }
.tier .price b { font-family: var(--font-display); font-size: 44px; font-weight: 700; letter-spacing: -0.03em; }
.tier .price span { color: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.tier .btn { margin: 22px 0; justify-content: center; }
.tier ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.tier li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); align-items: flex-start; }
.tier li svg { width: 17px; height: 17px; color: var(--accent-strong); flex-shrink: 0; margin-top: 2px; }

/* ============================================================ DOCS */
.docs { background: var(--dark); color: var(--on-dark); }
.docs h2 { color: var(--on-dark); font-size: clamp(30px,4vw,46px); margin-top: 16px; }
.docs .eyebrow { color: var(--accent); }
.docs-sub { color: var(--on-dark-muted); font-size: 18px; margin-top: 18px; max-width: 52ch; }
.docs-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; margin-top: 44px; align-items: start; }
.term { background: #14110c; border: 1px solid var(--dark-line); border-radius: var(--radius); overflow: hidden; }
:root[data-theme="dark"] .term { background: #0c0a07; }
.term-bar { display: flex; align-items: center; gap: 9px; padding: 11px 15px; border-bottom: 1px solid var(--dark-line); }
.term-bar .tl i { background: #ffffff22; }
.term-bar .fn { font-family: var(--font-mono); font-size: 11.5px; color: var(--on-dark-muted); margin-left: 6px; }
.term pre { margin: 0; padding: 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; color: var(--on-dark-muted); overflow-x: auto; }
.term .k { color: var(--accent); } .term .s { color: oklch(0.8 0.11 152); } .term .c { color: oklch(0.58 0.01 80); } .term .p { color: oklch(0.78 0.08 264); }
.docs-links { display: flex; flex-direction: column; gap: 12px; }
.dlink { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: var(--dark-2); border: 1px solid var(--dark-line); transition: border-color .2s, transform .2s; }
.dlink:hover { border-color: color-mix(in oklab, var(--accent) 45%, transparent); transform: translateX(3px); }
.dlink .di { width: 36px; height: 36px; border-radius: 9px; background: color-mix(in oklab, var(--accent) 18%, transparent); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.dlink h4 { color: var(--on-dark); font-family: var(--font-display); font-size: 16px; }
.dlink p { color: var(--on-dark-muted); font-size: 13.5px; margin-top: 2px; }
.dlink .arr { margin-left: auto; color: var(--on-dark-muted); }

/* ============================================================ CTA */
.cta { text-align: center; }
.cta-box { background: var(--accent); border-radius: 28px; padding: 70px 40px; position: relative; overflow: hidden; }
.cta-box h2 { color: var(--on-accent); font-size: clamp(32px, 4.5vw, 56px); max-width: 18ch; margin: 0 auto; }
.cta-box p { color: color-mix(in oklab, var(--on-accent) 80%, transparent); font-size: 19px; margin: 20px auto 0; max-width: 50ch; }
.cta-box .hero-cta { justify-content: center; }
.cta-bear { position: absolute; opacity: 0.16; }

/* ============================================================ FOOTER */
.footer { background: var(--dark-2); color: var(--on-dark); padding: 70px 0 34px; }
.foot-top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; padding-bottom: 44px; border-bottom: 1px solid var(--dark-line); }
.foot-brand .brand { color: var(--on-dark); margin-bottom: 14px; }
.foot-brand p { color: var(--on-dark-muted); font-size: 14px; max-width: 30ch; }
.fcol h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 14px; font-weight: 500; }
.fcol a { display: block; color: var(--on-dark); opacity: .82; font-size: 14.5px; padding: 5px 0; }
.fcol a:hover { opacity: 1; color: var(--accent); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; flex-wrap: wrap; gap: 14px; }
.foot-bottom .credits { font-family: var(--font-mono); font-size: 12px; color: var(--on-dark-muted); line-height: 1.7; }
.foot-bottom .credits b { color: var(--on-dark); font-weight: 500; }
.foot-status { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 12px; color: var(--on-dark-muted); }

/* ============================================================ RESPONSIVE */
@media (max-width: 980px) {
  .feat-grid, .price-grid, .vs, .docs-grid { grid-template-columns: 1fr; }
  .fcard.big { grid-column: span 1; }
  .mini-grid { grid-template-columns: repeat(2, 1fr); }
  .arch-flow { grid-template-columns: 1fr; }
  .arch-arrow { transform: rotate(90deg); justify-self: center; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 200px 1fr; }
  .app-col.read { display: none; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .mini-grid { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .app-col.list { display: none; }
  .hero-meta { gap: 14px; }
}

/* ============================================================ LANGUAGE SWITCHER */
.lang { position: relative; }
.lang > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line);
  color: var(--ink-2); font-family: var(--font-body); font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s, border-color .15s;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary::marker { content: ""; }
.lang > summary:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-2); }
.lang > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang > summary > svg:first-of-type { width: 16px; height: 16px; opacity: .75; }
.lang .chev { width: 12px; height: 12px; opacity: .6; transition: transform .15s; }
.lang[open] .chev { transform: rotate(180deg); }
.lang-cur { white-space: nowrap; }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 190px; max-height: min(64vh, 460px); overflow-y: auto;
  display: grid; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-2);
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 11px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.lang-menu a:hover { background: var(--surface-2); color: var(--ink); }
.lang-menu a[aria-current="true"] { background: var(--accent-tint); color: var(--ink); }
.lang-menu .code { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.lang-menu a[aria-current="true"] .code { color: var(--accent-strong); }

@media (max-width: 560px) {
  .lang-cur { display: none; }
  .nav-signin { display: none; }
}
