/* ============================================================
   Transilvania Marketing — Redesign
   Aesthetic: tech / fintech, monochrome sober (paper + ink)
   Type: Hanken Grotesk (display/body) + IBM Plex Mono (data)
   ============================================================ */

:root {
  /* paper + ink, warm neutral */
  --paper:      oklch(0.985 0.004 80);
  --paper-2:    oklch(0.965 0.005 80);
  --surface:    oklch(1 0 0);
  --ink:        oklch(0.205 0.012 70);
  --ink-2:      oklch(0.355 0.010 70);
  --muted:      oklch(0.555 0.008 70);
  --faint:      oklch(0.705 0.006 70);
  --line:       oklch(0.905 0.005 80);
  --line-2:     oklch(0.855 0.006 80);
  /* single sober signal accent (positive metrics only) */
  --signal:     oklch(0.56 0.072 158);
  --signal-bg:  oklch(0.95 0.02 158);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);

  --ff-sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

::selection { background: var(--ink); color: var(--paper); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* mono micro-labels -------------------------------------------------- */
.kicker {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.kicker .dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--signal); margin-right: 8px; vertical-align: middle;
}

/* buttons ------------------------------------------------------------ */
.btn {
  font-family: var(--ff-sans);
  font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: all .22s cubic-bezier(.2,.7,.3,1);
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -10px oklch(0.205 0.012 70 / .5); }
.btn-primary .arr { transition: transform .22s ease; }
.btn-primary:hover .arr { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }

/* hairline grid bg helper ------------------------------------------- */
.grid-lines {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ===================== NAV ===================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.985 0.004 80 / .82);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
/* wider nav bar (synced from Header.astro): logo further left, menu group further right */
.nav .nav-inner { max-width: 1480px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 17px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo .mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--ink);
  display: grid; place-items: center; color: var(--paper);
  font-family: var(--ff-mono); font-size: 13px; font-weight: 600;
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .18s; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 1180px) { .nav-links { display: none; } }

/* ===================== NAV MEGA-DROPDOWN ===================== */
.nav-links { gap: 22px; }
.nav-item.has-menu { position: relative; }
.nav-trigger { background: none; border: none; cursor: pointer; font-family: var(--ff-sans); font-size: 14.5px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; padding: 0; transition: color .18s; }
.nav-item.has-menu:hover .nav-trigger, .nav-trigger:focus-visible { color: var(--ink); }
.nav-trigger .caret { font-size: 9px; transition: transform .2s; }
.nav-item.has-menu:hover .nav-trigger .caret { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% + 16px); left: -20px; width: 320px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: 0 30px 70px -28px oklch(0.205 0.012 70 / .4);
  padding: 16px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s; z-index: 60;
}
.mega::before { content: ""; position: absolute; bottom: 100%; left: 0; right: 0; height: 18px; }
.nav-item.has-menu:hover .mega, .nav-item.has-menu:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega-label { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 6px 8px; }
.mega-col + .mega-col { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.mega-link { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--ink); transition: background .15s; }
.mega-link:hover { background: var(--paper-2); }
.mega-link .mi { width: 34px; height: 34px; border-radius: 9px; background: var(--paper-2); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--ff-mono); font-size: 14px; color: var(--ink); flex: none; }
.mega-link .mi.sig { background: var(--signal-bg); color: var(--signal); border-color: transparent; }
.mega-link .mt { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.mega-link .mt small { display: block; font-family: var(--ff-mono); font-size: 10.5px; font-weight: 500; color: var(--muted); margin-top: 2px; letter-spacing: .02em; text-transform: none; }
.mega-new { display: inline-block; vertical-align: 2px; font-family: var(--ff-mono); font-size: 9px; font-weight: 600; letter-spacing: .08em; color: var(--signal); background: var(--signal-bg); border-radius: 100px; padding: 2px 7px; margin-left: 5px; }

/* --- new menu: two-column mega, brand logos, soon badge, active item --- */
.mega.mega-2 { width: 540px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 22px; align-items: start; }
.mega.mega-2 .mega-col + .mega-col { margin-top: 0; border-top: 0; padding-top: 0; }
/* inline, tile-less icons */
.mega-link .mi.logo, .mega-link .mi.ico { width: 26px; height: 26px; background: none; border: 0; border-radius: 0; flex: none; display: grid; place-items: center; }
.mega-link .mi.logo svg { width: 24px; height: 24px; filter: grayscale(1); opacity: .58; transition: filter .25s ease, opacity .25s ease; }
.mega-link:hover .mi.logo svg { filter: none; opacity: 1; }
.mega-link .mi.ico svg { width: 22px; height: 22px; color: var(--muted); transition: color .18s ease; }
.mega-link:hover .mi.ico svg { color: var(--signal); }
/* coming-soon (non-clickable) */
.mega-link.is-soon { cursor: default; }
.mega-link.is-soon:hover { background: none; }
.mega-link.is-soon .mt { color: var(--faint); }
.mega-link.is-soon .mi.ico svg, .mega-link.is-soon:hover .mi.ico svg { color: var(--line-2); }
.mega-soon { display: inline-block; vertical-align: 1px; font-family: var(--ff-mono); font-size: 9px; font-weight: 600; letter-spacing: .08em; color: var(--faint); margin-left: 6px; }
/* active top-level item */
.nav-links .nav-active, .nav-trigger.nav-active { color: var(--ink); font-weight: 600; }
/* CTA: keep readable paper text (beats `.nav-links a` which sets --ink-2) */
.nav-links a.nav-cta, .nav-links a.btn-primary { color: var(--paper); }
.nav-links a.nav-cta:hover, .nav-links a.btn-primary:hover { color: var(--paper); }
/* mobile coming-soon row */
.mm-soon { font-family: var(--ff-mono); font-size: 13px; color: var(--faint); padding: 6px 0; letter-spacing: .02em; }

/* ===================== VARIANT SWITCHER ===================== */
.switcher {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 6px;
  background: var(--ink); color: var(--paper);
  padding: 7px 8px 7px 16px; border-radius: 100px;
  box-shadow: 0 14px 40px -14px oklch(0.205 0.012 70 / .65);
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .04em;
}
.switcher .lbl { text-transform: uppercase; opacity: .6; margin-right: 4px; }
.switcher button {
  font-family: var(--ff-mono); font-size: 12px; font-weight: 500;
  color: var(--paper); background: transparent; border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 100px; transition: all .18s;
}
.switcher button:hover { background: oklch(1 0 0 / .12); }
.switcher button.active { background: var(--paper); color: var(--ink); font-weight: 600; }

/* ===================== HERO (shared) ===================== */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-variant { display: none; }
.hero-variant.show { display: block; animation: fadeUp .5s ease; }

@keyframes fadeUp { from { transform: translateY(14px); } to { transform: none; } }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px; }
.eyebrow .pill {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2);
  padding: 6px 12px; border-radius: 100px;
}

h1.display {
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.02;
  font-size: clamp(38px, 6.2vw, 76px); color: var(--ink);
  text-wrap: balance;
}
h1.display em { font-style: normal; color: var(--muted); }
.lead { font-size: clamp(16px, 1.7vw, 19px); color: var(--ink-2); max-width: 40ch; margin-top: 22px; line-height: 1.55; }
.hero-cta { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; align-items: center; }
.hero-note { font-family: var(--ff-mono); font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.hero-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 var(--signal); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(0.56 0.072 158 / .5); } 70% { box-shadow: 0 0 0 7px oklch(0.56 0.072 158 / 0); } 100% { box-shadow: 0 0 0 0 oklch(0.56 0.072 158 / 0); } }

/* --- Variant A: Ledger (split) --- */
.heroA { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 8vw, 104px); }
@media (max-width: 920px) { .heroA { grid-template-columns: 1fr; gap: 44px; } }

.ledger {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: 0 40px 80px -50px oklch(0.205 0.012 70 / .35);
  overflow: hidden;
}
.ledger-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.ledger-head .tag { display: flex; align-items: center; gap: 7px; }
.ledger-head .tag b { color: var(--ink); font-weight: 600; letter-spacing: 0; text-transform: none; font-family: var(--ff-sans); font-size: 13px; }
.ledger-row {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.ledger-row:last-child { border-bottom: none; }
.ledger-row .name { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.ledger-row .before { font-family: var(--ff-mono); font-size: 13px; color: var(--faint); text-align: right; min-width: 64px; }
.ledger-row .to { color: var(--faint); font-family: var(--ff-mono); font-size: 12px; }
.ledger-row .after { font-family: var(--ff-mono); font-size: 15px; color: var(--ink); font-weight: 600; text-align: right; min-width: 78px; }
.ledger-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; background: var(--paper-2);
}
.ledger-foot .delta { display: inline-flex; align-items: center; gap: 6px; font-family: var(--ff-mono); font-size: 12px; color: var(--signal); font-weight: 600; }
.ledger-foot .delta .chip { background: var(--signal-bg); padding: 3px 8px; border-radius: 100px; }
.ledger-foot .small { font-family: var(--ff-mono); font-size: 11px; color: var(--muted); }

/* --- Variant B: Index (centered) --- */
.heroB { text-align: center; padding-block: clamp(64px, 10vw, 128px); display: flex; flex-direction: column; align-items: center; }
.heroB .eyebrow { margin-inline: auto; }
.heroB h1.display { max-width: 16ch; }
.heroB .lead { margin-inline: auto; text-align: center; max-width: 52ch; }
.heroB .hero-cta { justify-content: center; }
.index-row {
  display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 64px; width: 100%;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.index-cell { padding: 28px 22px; text-align: left; position: relative; }
.index-cell + .index-cell { border-left: 1px solid var(--line); }
.index-cell .n { font-family: var(--ff-mono); font-size: 11px; color: var(--faint); letter-spacing: .1em; }
.index-cell .big { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -0.03em; margin-top: 10px; line-height: 1; }
.index-cell .cap { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
@media (max-width: 720px) { .index-row { grid-template-columns: 1fr; } .index-cell + .index-cell { border-left: none; border-top: 1px solid var(--line); } }

/* --- Variant C: Split focus card (timeline) --- */
.heroC { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 80px); align-items: center; padding-block: clamp(56px, 8vw, 104px); }
@media (max-width: 920px) { .heroC { grid-template-columns: 1fr; gap: 44px; } }
.timeline-card {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 30px; box-shadow: 0 40px 80px -50px oklch(0.205 0.012 70 / .35);
}
.timeline-card .tc-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.timeline-card .tc-head .t { font-weight: 700; letter-spacing: -0.01em; font-size: 16px; }
.timeline-card .tc-head .d { font-family: var(--ff-mono); font-size: 11px; color: var(--muted); }
.tl { position: relative; }
.tl-step { display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding-bottom: 26px; position: relative; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: -2px; width: 1.5px; background: var(--line-2); }
.tl-step:last-child::before { display: none; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; font-family: var(--ff-mono); font-size: 12px; color: var(--muted); z-index: 1; transition: all .3s; }
.tl-step.on .tl-dot { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tl-step .s-t { font-weight: 600; font-size: 14.5px; }
.tl-step .s-d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tl-step .s-when { font-family: var(--ff-mono); font-size: 10.5px; color: var(--faint); margin-top: 5px; letter-spacing: .04em; }

/* ===================== SECTION 1 — TRUST ===================== */
.trust { padding-block: clamp(40px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.trust-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.trust-top .line { font-size: 14.5px; color: var(--ink-2); max-width: 40ch; }
.trust-top .count { display: flex; align-items: baseline; gap: 10px; }
.trust-top .count b { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.trust-top .count span { font-family: var(--ff-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: scroll-x 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.logo-chip {
  display: flex; align-items: center; gap: 9px; padding: 14px 22px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  font-weight: 700; letter-spacing: -0.01em; font-size: 15px; color: var(--ink-2);
  white-space: nowrap; transition: all .2s; flex: none;
}
.logo-chip:hover { color: var(--ink); border-color: var(--line-2); }
.logo-chip .gem { width: 16px; height: 16px; border-radius: 4px; background: var(--line-2); }

/* ===================== SECTION 2 — PROBLEMS ===================== */
.section { padding-block: clamp(64px, 9vw, 110px); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: clamp(40px, 5vw, 60px); }
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; margin-top: 18px; text-wrap: balance; }
.section-head .sub { font-size: 16.5px; color: var(--ink-2); margin-top: 16px; max-width: 50ch; }

.prob-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
@media (max-width: 860px) { .prob-grid { grid-template-columns: 1fr; } }
.prob {
  padding: 34px 30px 30px; border-right: 1px solid var(--line); position: relative;
  transition: background .25s; cursor: default;
}
.prob:last-child { border-right: none; }
@media (max-width: 860px) { .prob { border-right: none; border-bottom: 1px solid var(--line); } .prob:last-child { border-bottom: none; } }
.prob:hover { background: var(--paper-2); }
.prob .pn { font-family: var(--ff-mono); font-size: 12px; color: var(--faint); letter-spacing: .1em; }
.prob h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-top: 22px; line-height: 1.18; }
.prob p { font-size: 14.5px; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.prob .fix {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--ink-2);
  padding-top: 18px; border-top: 1px dashed var(--line-2); width: 100%;
}
.prob .fix .tick { width: 16px; height: 16px; border-radius: 50%; background: var(--signal-bg); color: var(--signal); display: grid; place-items: center; font-size: 10px; flex: none; }
.prob-foot { margin-top: 28px; }
.prob-foot a { font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; font-size: 15px; transition: opacity .2s; }
.prob-foot a:hover { opacity: .6; }

/* ===================== SECTION 3 — SERVICES ===================== */
.svc-list { border-top: 1px solid var(--line-2); }
.svc {
  display: grid; grid-template-columns: 56px 1.1fr 1.4fr auto; align-items: center; gap: 24px;
  padding: 30px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
  position: relative; transition: padding .3s cubic-bezier(.2,.7,.3,1);
}
.svc::before { content: ""; position: absolute; inset: 0; background: var(--surface); opacity: 0; transition: opacity .25s; z-index: -1; border-radius: var(--r-md); }
.svc:hover { padding-inline: 24px; }
.svc:hover::before { opacity: 1; }
.svc .num { font-family: var(--ff-mono); font-size: 12px; color: var(--faint); letter-spacing: .08em; }
.svc .s-name { font-size: clamp(20px, 2.4vw, 27px); font-weight: 700; letter-spacing: -0.025em; }
.svc .s-name small { display: block; font-family: var(--ff-mono); font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .06em; margin-top: 6px; text-transform: uppercase; }
.svc .s-desc { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.svc .s-stat { font-family: var(--ff-mono); font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.svc .s-stat .arr { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: all .25s; flex: none; }
.svc:hover .s-stat .arr { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: rotate(-45deg); }
@media (max-width: 860px) {
  .svc { grid-template-columns: 40px 1fr auto; gap: 16px; }
  .svc .s-desc { display: none; }
}

/* reveal on scroll — transform-only so base visibility never depends on the
   transition advancing (opacity stays 1 in every environment) */
.reveal { transform: translateY(20px); transition: transform .7s cubic-bezier(.2,.7,.3,1); will-change: transform; }
.reveal.in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-variant.show { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* count-up uses tabular figures */
.num-anim { font-variant-numeric: tabular-nums; }

/* ===================== DARK MODE ===================== */
:root { color-scheme: light; }
html { transition: none; }
body, .nav, .rz-tools, .btn, .mega, .site-footer { transition: background-color .3s ease, color .3s ease, border-color .3s ease; }

[data-theme="dark"] {
  color-scheme: dark;
  --paper:      oklch(0.185 0.006 80);
  --paper-2:    oklch(0.225 0.007 80);
  --surface:    oklch(0.245 0.008 80);
  --ink:        oklch(0.965 0.004 80);
  --ink-2:      oklch(0.825 0.006 80);
  --muted:      oklch(0.635 0.007 80);
  --faint:      oklch(0.505 0.007 80);
  --line:       oklch(0.315 0.008 80);
  --line-2:     oklch(0.395 0.009 80);
  --signal:     oklch(0.74 0.13 158);
  --signal-bg:  oklch(0.30 0.045 158);
}

/* sticky bars use a hardcoded paper tint — re-tint for dark */
[data-theme="dark"] .nav { background: oklch(0.185 0.006 80 / .82); }
[data-theme="dark"] .rz-tools { background: oklch(0.185 0.006 80 / .9); }
[data-theme="dark"] .rz-chip.active .ic { background: oklch(0.185 0.006 80 / .18); }
[data-theme="dark"] .rz-chip.active .ct { color: oklch(0.185 0.006 80 / .6); }
/* lift footer just slightly off pure black so it reads as a panel on dark bg */
[data-theme="dark"] .site-footer { background: oklch(0.12 0.005 80); }

/* ---- theme toggle button (in nav) ---- */
.theme-btn {
  position: relative;
  width: 36px; height: 36px; flex: none; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  margin-left: 16px;
  transition: color .18s, border-color .18s, background-color .3s;
}
.theme-btn::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 20px; background: var(--line-2);
}
.theme-btn:hover { color: var(--ink); border-color: var(--ink); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .ic-sun { display: none; }
[data-theme="dark"] .theme-btn .ic-moon { display: none; }
[data-theme="dark"] .theme-btn .ic-sun { display: block; }

/* mobile menu toggle row */
.mm-theme {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; margin-top: 14px; padding: 14px 16px; cursor: pointer;
  font-family: var(--ff-sans); font-size: 16px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
}
.mm-theme .state { display: none; }
.mm-theme-l, .mm-lang-label { display: inline-flex; align-items: center; gap: 11px; }
.mmt-ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
/* iOS-style toggle */
.mmt-switch { width: 46px; height: 27px; border-radius: 100px; background: var(--line-2); position: relative; flex: none; transition: background .22s ease; }
.mmt-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: oklch(1 0 0); box-shadow: 0 1px 3px oklch(0.205 0.012 70 / .3); transition: transform .22s cubic-bezier(.2,.7,.3,1); }
.mm-theme[aria-pressed="true"] .mmt-switch { background: var(--signal); }
.mm-theme[aria-pressed="true"] .mmt-switch::after { transform: translateX(19px); }

/* nav CTA sizing (was inline) */
.nav-cta { padding: 9px 16px; font-size: 14px; }

/* ---- SVG logo (synced from Header.astro) ---- */
.logo { gap: 0; }
.logo-img { height: 26px; width: auto; display: block; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
@media (max-width: 520px) { .logo-img { height: 23px; } }

/* ---- language switcher (desktop nav) ---- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  height: 36px; box-sizing: border-box; padding: 3px;
  margin-left: 16px; position: relative;
  border: 1px solid var(--line-2); border-radius: 100px; background: var(--surface);
}
.lang-switch::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 20px; background: var(--line-2);
}
.lang-globe { width: 15px; height: 15px; color: var(--muted); margin: 0 4px 0 6px; flex: none; }
.lang-opt {
  font-family: var(--ff-mono); font-size: 12px; font-weight: 600; letter-spacing: .05em;
  color: var(--muted); text-decoration: none;
  height: 28px; min-width: 32px; padding: 0 8px;
  display: grid; place-items: center; border-radius: 100px;
  transition: color .18s, background-color .18s;
}
.lang-opt:hover { color: var(--ink); }
.lang-opt.is-active { background: var(--ink); color: var(--paper); }
.lang-opt.is-active:hover { color: var(--paper); }

/* ---- language switcher (mobile menu) ---- */
.mm-lang {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; margin-top: 14px; padding: 10px 10px 10px 16px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
}
.mm-lang-label { font-family: var(--ff-sans); font-size: 16px; font-weight: 600; color: var(--ink); }
.mm-lang-opts { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: 100px; }
.mm-lang-opts a {
  font-family: var(--ff-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); text-decoration: none;
  height: 25px; min-width: 31px; min-height: 0; padding: 0 8px;
  display: grid; place-items: center; border-radius: 100px; border-bottom: none;
}
.mm-lang-opts a::after, .mobile-menu .mm-lang-opts a::after { content: none; }
.mm-lang-opts a.is-active { background: var(--ink); color: var(--paper); }

/* ===================== A11Y ===================== */
/* skip-to-content link, visible only on keyboard focus */
.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 11px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* consistent keyboard focus ring across interactive elements */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }
