:root {
  --bg: #faf8f4;
  --bg-alt: #f2eee6;
  --text: #121521;
  --muted: #5e5a52;
  --navy: #121521;
  --accent: #b8913f;
  --accent-dark: #151b2e;
  --accent-text: #7a5c14;
  --on-accent: #ffffff;
  --card: #fffefb;
  --card-shadow: 0 1px 2px rgba(40,30,10,.05), 0 12px 32px -14px rgba(40,30,10,.16);
  --hero-from: #fbf9f5;
  --hero-to: #efe6d4;
  --hero-text: #121521;
  --hero-lead: #4a463e;
  --hero-eyebrow: #7a5c14;
  --hero-ghost-border: rgba(18,21,33,.35);
  --hero-ghost-hover: rgba(18,21,33,.06);
  --border: #e4ddd0;
  --radius: 14px;
}
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0b0f;
    --bg-alt: #0f1117;
    --text: #ece8df;
    --muted: #a29d92;
    --navy: #08090c;
    --border: #24262f;
    --accent-text: #dcbb7c;
    --accent-dark: #c9a45c;
    --on-accent: #14110d;
    --accent: #d4af6a;
    --card: #14161d;
    --card-shadow: none;
    --hero-from: #08090c;
    --hero-to: #1a160d;
    --hero-text: #ffffff;
    --hero-lead: #d3cdc0;
    --hero-eyebrow: #dcbb7c;
    --hero-ghost-border: rgba(255,255,255,.4);
    --hero-ghost-hover: rgba(255,255,255,.1);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0b0f;
  --bg-alt: #0f1117;
  --text: #ece8df;
  --muted: #a29d92;
  --navy: #08090c;
  --border: #24262f;
  --accent-text: #dcbb7c;
  --accent-dark: #c9a45c;
    --on-accent: #14110d;
    --accent: #d4af6a;
  --card: #14161d;
  --card-shadow: none;
  --hero-from: #08090c;
  --hero-to: #1a160d;
  --hero-text: #ffffff;
  --hero-lead: #d3cdc0;
  --hero-eyebrow: #dcbb7c;
  --hero-ghost-border: rgba(255,255,255,.4);
  --hero-ghost-hover: rgba(255,255,255,.1);
}
.theme { padding: 4px 8px; font-size: 1rem; line-height: 1; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: calc(var(--fs, 100) * 1%); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center { text-align: center; }

.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: .5px; }
.logo span { font-weight: 400; color: var(--accent-text); margin-left: 6px; }
.links { display: flex; align-items: center; gap: 20px; }
.links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.links a:hover { color: var(--accent-text); }
.lang {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  border-radius: 6px; padding: 4px 10px; cursor: pointer; font-weight: 600;
}
.langs { display: flex; gap: 4px; }
.lang { padding: 4px 8px; font-size: .8rem; }
.lang:hover, .lang.active { border-color: var(--accent-text); color: var(--accent-text); }
.lang.active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); font-weight: 700; }

.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text); padding: 96px 0;
}
.eyebrow { color: var(--hero-eyebrow); text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; font-weight: 600; margin: 0 0 16px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.15; margin: 0 0 20px; max-width: 18ch; }
.lead { font-size: 1.15rem; max-width: 60ch; color: var(--hero-lead); margin: 0 0 32px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 8px;
  text-decoration: none; font-weight: 600; transition: .2s;
}
.btn.primary { background: var(--accent-dark); color: var(--on-accent); }
.btn.primary:hover { opacity: .9; }
.btn.ghost { border: 1px solid var(--hero-ghost-border); color: var(--hero-text); }
.btn.ghost:hover { background: var(--hero-ghost-hover); }

.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
h2 { font-size: 2rem; margin: 0 0 32px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--card-shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
.card.soon { border-style: dashed; }
.tag {
  position: absolute; top: 14px; right: 14px; font-size: .7rem; font-weight: 700;
  background: var(--accent-dark); color: var(--on-accent); padding: 2px 8px; border-radius: 99px; text-transform: uppercase;
}

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(s); display: block; font-size: 2rem; font-weight: 800; color: var(--accent-text); }
.steps strong { display: block; margin: 4px 0; font-size: 1.1rem; }
.steps span { color: var(--muted); }

.footer { padding: 24px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }

.menu { display: flex; gap: 20px; }
.burger { display: none; padding: 6px 8px; line-height: 0; }
.nav-inner { position: relative; }
@media (max-width: 640px) {
  .hero { padding: 64px 0; }
  .links { gap: 8px; }
  .burger { display: inline-block; }
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 8px 16px 16px;
  }
  .menu.open { display: flex; }
  .menu a { padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); }
  .menu a:last-child { border-bottom: 0; }
  .logo { font-size: 1.05rem; }
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--accent-dark); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 8px; }
main:focus { outline: none; }
.a11y { position: relative; }
.a11y-toggle {
  width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer; display: inline-grid; place-items: center;
}
.a11y-toggle:hover, .a11y-toggle[aria-expanded="true"] { border-color: var(--accent-text); color: var(--accent-text); }
.a11y-panel {
  position: absolute; right: 0; top: calc(100% + 12px); width: 300px; max-height: calc(100vh - 90px); overflow-y: auto; z-index: 60;
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: 0 8px 28px rgba(0,0,0,.3);
  display: grid; gap: 8px;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-size: 1.1rem; margin: 0 0 4px; }
.a11y-panel .row { display: grid; gap: 6px; font-size: .9rem; }
.a11y-panel .btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.a11y-panel button {
  font: inherit; font-size: .9rem; padding: 8px; cursor: pointer; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-alt); color: var(--text); text-align: center;
}
.a11y-panel button:hover { border-color: var(--accent-text); }
.a11y-panel button[aria-pressed="true"], .a11y-panel button.on {
  background: var(--accent-dark); color: var(--on-accent); border-color: var(--accent-dark);
}
.a11y-panel .reset { background: transparent; }

:root[data-links="on"] a { text-decoration: underline; }
:root[data-font="on"] body {
  font-family: Verdana, Tahoma, "Trebuchet MS", sans-serif;
  letter-spacing: .03em; word-spacing: .12em; line-height: 1.85;
}
:root[data-motion="reduce"], :root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before {
  transition: none !important; animation: none !important; scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
:root[data-contrast="high"] {
  color-scheme: dark;
  --bg: #000; --bg-alt: #000; --text: #fff; --muted: #fff; --navy: #000;
  --card: #000; --card-shadow: none; --border: #fff; --accent: #ffd800; --accent-dark: #ffd800; --accent-text: #ffd800; --on-accent: #000;
  --hero-from: #000; --hero-to: #000; --hero-text: #fff; --hero-lead: #fff; --hero-eyebrow: #fff;
  --hero-ghost-border: #fff; --hero-ghost-hover: rgba(255,255,255,.15);
}
:root[data-contrast="high"] .hero { background: #000; border-bottom: 1px solid #fff; }
:root[data-contrast="high"] .lead, :root[data-contrast="high"] .eyebrow { color: #fff; }
:root[data-contrast="high"] .btn.primary,
:root[data-contrast="high"] .tag,
:root[data-contrast="high"] .skip,
:root[data-contrast="high"] .a11y-panel button[aria-pressed="true"],
:root[data-contrast="high"] .a11y-panel button.on { color: #000; }
:root[data-contrast="high"] a { text-decoration: underline; }

.sub { color: var(--muted); margin: -16px 0 28px; max-width: 60ch; }
.chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { border: 1px solid var(--border); background: var(--card); border-radius: 99px; padding: 8px 18px; font-weight: 600; }
:root[data-contrast="high"] .chips li { border-color: #fff; }

.stats { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.stats ul { list-style: none; margin: 0; padding: 24px 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }
.stats strong { display: block; font-size: 1.8rem; color: var(--accent-text); line-height: 1.2; }
.stats span { color: var(--muted); font-size: .95rem; }

/* Contact form */
.form { display: grid; gap: 16px; margin-top: 24px; text-align: left; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--muted); border-radius: 8px; padding: 10px 12px; width: 100%;
}
.field [aria-invalid="true"] { border-color: #d6336c; border-width: 2px; }
:root[data-contrast="high"] .field [aria-invalid="true"] { border-color: #ffd800; }
.err { margin: 0; color: #b4234f; font-size: .9rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: #ff8fb0; } }
:root[data-theme="dark"] .err { color: #ff8fb0; }
:root[data-contrast="high"] .err { color: #ffd800; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; justify-self: start; }
.form .btn:disabled { opacity: .6; cursor: wait; }
.status { margin: 0; min-height: 1.4em; font-weight: 600; }
.status.ok { color: var(--accent-text); }
.status.bad { color: #b4234f; }
:root[data-theme="dark"] .status.bad { color: #ff8fb0; }
.note { margin: 0; color: var(--muted); font-size: .85rem; }
.alt-contact { margin-top: 28px; color: var(--muted); }
.alt-contact a { color: var(--accent-text); font-weight: 600; }

/* Legal pages and footer */
.prose { padding-top: 48px; padding-bottom: 72px; }
.prose h1 { font-size: 2rem; margin: 0 0 16px; }
.prose h2 { font-size: 1.3rem; margin: 32px 0 8px; }
.prose h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.prose p, .prose li { color: var(--text); }
.prose a { color: var(--accent-text); }
.prose .draft { background: var(--bg-alt); border: 1px dashed var(--muted); border-radius: 8px; padding: 12px 16px; color: var(--muted); }
.ph { background: #ffe58f; color: #4a3b00; padding: 0 4px; border-radius: 4px; font-weight: 600; }
:root[data-contrast="high"] .ph { background: #ffd800; color: #000; }
.back { white-space: nowrap; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flinks { display: flex; gap: 16px; }
.footer a { color: var(--accent-text); }
[hidden] { display: none !important; }
body.legal .links a.back { display: inline; }
@media (max-width: 640px) { body.legal .links a.back { display: none; } body.legal .links a.back:first-of-type { display: none; } }

/* Language select and theme button */
.langsel {
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 99px; padding: 6px 10px; cursor: pointer;
}
.langsel:hover { border-color: var(--accent-text); }
.links .theme {
  width: 36px; height: 36px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); cursor: pointer;
}
.links .theme:hover { border-color: var(--accent-text); color: var(--accent-text); }

.footer a.totop { color: inherit; text-decoration: none; }
.footer a.totop:hover, .footer a.totop:focus-visible { color: var(--text); text-decoration: none; }

/* Back to top button */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--text); color: var(--bg);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--accent-dark); color: var(--on-accent); }

@media (max-width: 640px) {
  .a11y { position: static; }
  .a11y-panel { left: 16px; right: 16px; width: auto; top: calc(100% + 1px); }
  .links { gap: 6px; }
  .langsel { padding: 6px 6px; font-size: .8rem; }
}
:root[data-contrast="high"] .a11y-toggle { color: #fff; }
.logo { white-space: nowrap; }
@media (max-width: 640px) {
  .logo { font-size: .95rem; }
  .links { gap: 4px; }
  .langsel { padding: 6px 4px; font-size: .75rem; max-width: 74px; }
  .a11y-toggle, .links .theme, .burger { width: 34px; height: 34px; }
  .burger { padding: 0; display: inline-grid; place-items: center; }
}

/* Custom language menu */
.langmenu { position: relative; }
.langbtn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 99px;
  padding: 6px 12px; cursor: pointer; height: 36px;
}
.langbtn:hover, .langbtn[aria-expanded="true"] { border-color: var(--accent-text); color: var(--accent-text); }
.langbtn svg { transition: transform .15s; }
.langbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.lc-code { display: none; }
.langlist {
  list-style: none; margin: 0; padding: 6px; position: absolute; right: 0; top: calc(100% + 10px); min-width: 160px; z-index: 60;
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility 0s linear .15s;
}
.langlist.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.langlist button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit;
  background: transparent; border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer;
}
.langlist button::before { content: ""; width: 1em; flex: none; }
.langlist button[aria-checked="true"] { font-weight: 700; color: var(--accent-text); }
.langlist button[aria-checked="true"]::before { content: "\2713"; }
.langlist button:hover, .langlist button:focus-visible { background: var(--bg-alt); }
:root[data-contrast="high"] .langlist button[aria-checked="true"] { color: #ffd800; }
@media (max-width: 640px) {
  .langbtn { padding: 6px 10px; height: 34px; }
  .lc-full { display: none; }
  .lc-code { display: inline; }
}

/* Feature cards with icon */
.feature .icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--accent-text) 14%, transparent); color: var(--accent-text);
}
:root[data-contrast="high"] .feature .icon { background: transparent; border: 1px solid #fff; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.about-grid h2 { margin-bottom: 20px; }
.about-lead { font-size: 1.4rem; font-weight: 600; line-height: 1.4; margin: 0 0 20px; }
.about-grid p { max-width: 62ch; }
.sig { display: grid; gap: 2px; margin-top: 28px; padding-left: 14px; border-left: 3px solid var(--accent-text); }
.sig span { color: var(--muted); font-size: .95rem; }
.about-box { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.about-box h3 { margin: 0 0 16px; font-size: 1.15rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before {
  content: "\2713"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
  background: color-mix(in srgb, var(--accent-text) 16%, transparent); color: var(--accent-text);
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

.backlink { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; color: var(--accent-text); font-weight: 600; text-decoration: none; }
.backlink:hover { text-decoration: underline; }
.prose { padding-top: 32px; }

/* Header zones: logo left, main navigation centered, settings right */
.nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.links { display: contents; }
.menu { grid-column: 2; display: flex; gap: 22px; }
.tools { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 8px; }
@media (max-width: 1100px) {
  .nav-inner { display: flex; justify-content: space-between; }
  .burger { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; }
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 8px 16px 16px;
  }
  .menu.open { display: flex; }
  .menu a { padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); }
  .menu a:last-child { border-bottom: 0; }
}
@media (min-width: 1101px) { .burger { display: none; } }

/* Clearly visible hover/focus on the main navigation */
@media (min-width: 1101px) {
  .menu { gap: 4px; }
  .menu a { padding: 8px 12px; border-radius: 8px; transition: background-color .15s, color .15s; }
  .menu a:hover, .menu a:focus-visible {
    color: var(--text);
    background: color-mix(in srgb, var(--accent-text) 16%, transparent);
  }
}
:root[data-contrast="high"] .menu a:hover { background: #ffd800; color: #000; }

/* Stronger hover for all header controls */
@media (min-width: 1101px) {
  .menu a:hover, .menu a:focus-visible {
    background: color-mix(in srgb, var(--accent-text) 22%, transparent);
    box-shadow: inset 0 -2px 0 var(--accent-text);
  }
}
.langbtn:hover, .a11y-toggle:hover, .links .theme:hover {
  background: color-mix(in srgb, var(--accent-text) 18%, transparent);
  border-color: var(--accent-text); color: var(--text);
}
.langlist button:hover, .langlist button:focus-visible { background: color-mix(in srgb, var(--accent-text) 16%, transparent); }

/* Footer: calm, consistent with the rest of the site */
.footer { padding: 32px 0; }
.footer .foot { align-items: center; }
.footer a { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500; transition: color .15s; }
.footer a:hover, .footer a:focus-visible { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent-text); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.flinks { gap: 24px; }
.flinks a { position: relative; }
.flinks a + a::before { content: ""; position: absolute; left: -13px; top: 50%; width: 1px; height: 14px; transform: translateY(-50%); background: var(--border); }
.footer a.totop { color: var(--muted); }
:root[data-contrast="high"] .footer a { color: #fff; text-decoration: underline; }
.footer .foot { padding-right: 76px; }
@media (max-width: 640px) { .footer .foot { padding-right: 76px; } .flinks { gap: 20px; } }

/* One consistent hover style: soft accent pill, no underline lines */
@media (min-width: 1101px) {
  .menu a:hover, .menu a:focus-visible { box-shadow: none; background: color-mix(in srgb, var(--accent-text) 18%, transparent); color: var(--text); }
}
.footer a { padding: 6px 10px; border-radius: 8px; text-decoration: none; transition: background-color .15s, color .15s; }
.footer a:hover, .footer a:focus-visible {
  text-decoration: none; color: var(--text);
  background: color-mix(in srgb, var(--accent-text) 18%, transparent);
}
.flinks { gap: 4px; }
.flinks a + a::before { display: none; }
.footer a.totop { margin-left: -10px; }
:root[data-contrast="high"] .footer a:hover { background: #ffd800; color: #000; text-decoration: none; }

/* Balanced card grids: no lonely card on its own row */
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-3 > .card:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 > .card:last-child:nth-child(3n+1) { grid-column: auto; }
  .grid-3 > .card:last-child:nth-child(2n+1) { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-3 > .card:last-child:nth-child(2n+1) { grid-column: auto; }
}

/* Refined typography and spacing */
h1, h2 { letter-spacing: -.02em; }
h3 { letter-spacing: -.01em; }
.section { padding: 88px 0; }
.hero { padding: 112px 0; }
@media (max-width: 640px) { .section { padding: 64px 0; } .hero { padding: 72px 0; } }
.steps li, .chips li, .about-box { box-shadow: var(--card-shadow); }
.btn { border-radius: 10px; }
.nav { box-shadow: 0 1px 0 var(--border); border-bottom: 0; }

/* ===== Premium refinement ===== */
:root { --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; }
body { font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; }
h3 { font-weight: 650; }

/* Wordmark */
.logo { font-weight: 700; letter-spacing: .06em; }
.logo span { font-weight: 500; font-size: .74em; letter-spacing: .26em; text-transform: uppercase; margin-left: 8px; }
.nav { background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 148px 0 136px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 75% at 88% 12%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 62%),
    radial-gradient(40% 60% at 5% 100%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}
.hero .container { position: relative; }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 4.8rem); line-height: 1.04; max-width: 16ch; margin-bottom: 28px; }
.eyebrow { font-size: .74rem; letter-spacing: .24em; margin-bottom: 24px; }
.lead { font-size: 1.28rem; line-height: 1.6; max-width: 56ch; margin-bottom: 44px; }

/* Buttons */
.btn { padding: 15px 30px; border-radius: 10px; letter-spacing: .01em; }
.btn.primary::after { content: "\2192"; margin-left: 12px; display: inline-block; transition: transform .2s; }
.btn.primary:hover::after { transform: translateX(4px); }

/* Sections */
.section { padding: 128px 0; }
.section h2 { font-size: clamp(2.1rem, 3.6vw, 3rem); line-height: 1.12; margin-bottom: 36px; position: relative; padding-top: 26px; }
.section h2::before { content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 2px; background: var(--accent-text); }
.sub { font-size: 1.1rem; margin: -18px 0 44px; max-width: 58ch; }
@media (max-width: 640px) { .section { padding: 76px 0; } .hero { padding: 84px 0 76px; } .logo span { letter-spacing: .18em; } }

/* Cards: quieter, more editorial */
.card { border-radius: 12px; padding: 34px 32px; }
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
#services .grid { counter-reset: svc; }
#services .card { counter-increment: svc; }
#services .card h3::before {
  content: counter(svc, decimal-leading-zero); display: block; margin-bottom: 18px;
  font-family: var(--serif); font-size: .95rem; letter-spacing: .14em; color: var(--accent-text);
}
.about-lead { font-family: var(--serif); font-weight: 500; font-size: 1.75rem; line-height: 1.3; letter-spacing: -.01em; }
.about-box { border-radius: 14px; padding: 36px; }
.steps li { border-radius: 12px; padding: 30px 26px; }
.steps li::before { font-family: var(--serif); font-weight: 500; }
.chips li { padding: 10px 20px; font-weight: 500; }

/* Scroll reveal (added by script.js only when motion is allowed) */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.rv.rv-in { opacity: 1; transform: none; }
.grid > .rv:nth-child(3n+2), .grid-4 > .rv:nth-child(4n+2) { transition-delay: .08s; }
.grid > .rv:nth-child(3n+3), .grid-4 > .rv:nth-child(4n+3) { transition-delay: .16s; }
.grid-4 > .rv:nth-child(4n+4) { transition-delay: .24s; }
:root[data-motion="reduce"] .rv { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* Hero: keep headline and buttons visible on first screen in every language */
.hero { padding: 88px 0 96px; }
.hero h1 { font-size: clamp(2.4rem, 4.8vw, 4.1rem); max-width: 21ch; line-height: 1.06; margin-bottom: 22px; }
.eyebrow { margin-bottom: 18px; }
.lead { font-size: 1.2rem; max-width: 60ch; margin-bottom: 36px; }
html[lang="de"] .hero h1 { font-size: clamp(2.3rem, 4.3vw, 3.7rem); max-width: 22ch; }
html[lang="sr"] .hero h1 { font-size: clamp(2.3rem, 4.5vw, 3.85rem); max-width: 22ch; }
@media (max-width: 640px) { .hero { padding: 56px 0 64px; } .hero h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); } }

/* One typeface everywhere: hierarchy comes from weight and size only */
:root { --serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body, button, input, select, textarea { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
h1, h2, h3, .about-lead, .steps li::before, #services .card h3::before { font-family: inherit; }
h1, h2 { font-weight: 650; letter-spacing: -.03em; }
.hero h1 { font-weight: 650; letter-spacing: -.035em; }
.about-lead { font-weight: 600; letter-spacing: -.02em; font-size: 1.6rem; }
.logo { font-weight: 700; letter-spacing: .01em; font-size: 1.2rem; }
.logo span { font-size: 1em; font-weight: 400; letter-spacing: .01em; text-transform: none; margin-left: 6px; }
.eyebrow { letter-spacing: .14em; font-weight: 600; font-size: .78rem; }
#services .card h3::before { font-weight: 600; letter-spacing: .08em; font-size: .9rem; }
.steps li::before { font-weight: 700; }
@media (max-width: 640px) { .logo { font-size: 1.05rem; } .logo span { letter-spacing: .01em; } }

/* Hero fills the first screen; no empty band below it */
.hero { min-height: calc(100vh - 61px); min-height: calc(100svh - 61px); display: flex; align-items: center; padding: 72px 0; }
.hero .container { width: 100%; }
.section { padding: 104px 0; }
@media (max-width: 640px) { .hero { padding: 56px 0; } .section { padding: 72px 0; } }
.nav .container { max-width: 1280px; }

/* Merged sections flow together */
.section.tight { padding-top: 0; }
#methodology h2, #locations h2, #why h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }

/* Header call-to-action */
.nav-cta { padding: 9px 20px; font-size: .9rem; border-radius: 10px; margin-right: 6px; }
.nav-cta::after { content: none !important; }
@media (min-width: 1101px) { .menu-contact { display: none; } }
@media (max-width: 1100px) { .nav-cta { display: none; } }

/* Contact form: two columns, quiet underline fields */
.form-wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.form { gap: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 40px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { font-size: .86rem; font-weight: 600; letter-spacing: .02em; }
.field label.req::after { content: " *"; color: var(--accent-text); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  background: transparent; border: 0; border-bottom: 1px solid var(--muted); border-radius: 0;
  padding: 12px 0; font-size: 1rem; width: 100%; color: var(--text);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:not([type="checkbox"]):focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--accent-text); box-shadow: 0 1px 0 var(--accent-text);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; }
.field [aria-invalid="true"] { border-bottom-color: #d6336c; box-shadow: 0 1px 0 #d6336c; border-width: 0 0 1px 0; }
.consent .check { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; font-size: .92rem; letter-spacing: 0; cursor: pointer; }
.consent input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent-dark); cursor: pointer; }
.consent a { color: var(--accent-text); text-underline-offset: 3px; }
.consent input:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.req-note { margin: 0; color: var(--muted); font-size: .85rem; }
.form .btn { padding: 15px 34px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Page layout for legal pages and 404: footer stays at the bottom */
body.legal { display: flex; flex-direction: column; min-height: 100vh; }
body.legal main { flex: 1; }
.footer .container { max-width: 1280px; }

/* 404 */
.nf { display: grid; justify-items: center; align-content: center; text-align: center; min-height: 58vh; padding-top: 48px; padding-bottom: 72px; }
.nf > div { display: grid; justify-items: center; }
.nf-code {
  margin: 0 0 4px; font-size: clamp(5.5rem, 16vw, 11rem); font-weight: 700; letter-spacing: -.05em; line-height: 1;
  color: var(--accent); opacity: .85;
}
.nf h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 8px 0 12px; }
.nf p { margin: 0 0 28px; color: var(--muted); max-width: 46ch; }
.nf .btn { margin-top: 4px; }

/* ===== Full-screen mobile menu (settings live inside it) ===== */
.ico-close { display: none; }
@media (max-width: 1100px) {
  .logo, .burger { position: relative; z-index: 3; }
  .burger[aria-expanded="true"] .ico-open { display: none; }
  .burger[aria-expanded="true"] .ico-close { display: block; }

  .menu {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1;
    padding: 104px 24px 150px; background: var(--bg); border: 0; overflow-y: auto;
    flex-direction: column; justify-content: flex-start; gap: 0;
  }
  .menu a { font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; padding: 18px 0; border-bottom: 1px solid var(--border); }
  .menu a:last-child { border-bottom: 0; }
  .menu a:hover, .menu a:focus-visible { color: var(--accent-text); background: transparent; box-shadow: none; }

  /* Settings: hidden in the header, shown at the bottom of the open menu */
  .tools { display: none; }
  body.menu-open .tools {
    display: flex; position: fixed; left: 24px; right: 24px; bottom: 28px; z-index: 3;
    justify-self: auto; justify-content: flex-start; gap: 12px; padding-top: 18px; border-top: 1px solid var(--border);
    background: var(--bg);
  }
  .a11y { position: relative; }
  .a11y-panel {
    position: fixed; left: 16px; right: 16px; top: auto; bottom: 96px; width: auto; max-width: 420px;
    max-height: calc(100vh - 220px);
  }
  .langlist { top: auto; bottom: calc(100% + 12px); left: 0; right: auto; }
  .langbtn { height: 40px; padding: 8px 14px; }
  .lc-full { display: inline; }
  .lc-code { display: none; }
  .a11y-toggle, .links .theme { width: 40px; height: 40px; }

  body.menu-open { overflow: hidden; }
  body.menu-open .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  body.menu-open .to-top { display: none; }
}

/* Footer on small screens: stacked, aligned to the same left edge, clear of the back-to-top button */
.flinks a:first-child { margin-left: -10px; }
@media (max-width: 640px) {
  .footer { padding: 36px 0 104px; }
  .footer .foot { flex-direction: column; align-items: flex-start; gap: 10px; padding-right: 16px; }
  .flinks { gap: 4px; flex-wrap: wrap; }
}

/* Mobile menu: Contact stands out as the primary action */
@media (max-width: 1100px) {
  .menu a.menu-contact {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 28px; padding: 20px 24px; border: 0; border-radius: 14px;
    background: var(--accent-dark); color: var(--on-accent);
    font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em;
  }
  .menu a.menu-contact::after { content: "\2192"; font-size: 1.4rem; transition: transform .2s; }
  .menu a.menu-contact:hover, .menu a.menu-contact:focus-visible {
    background: var(--accent-dark); color: var(--on-accent); opacity: .92; box-shadow: none;
  }
  .menu a.menu-contact:hover::after { transform: translateX(4px); }
}
