/* ==========================================================================
   Rekalogika — rekalogika.com
   Production stylesheet. Built on the Rekalogika Design System tokens
   (coral #ff6347 + slate #364e59 · Jaldi / Open Sans / JetBrains Mono ·
   the 3x3 pixel-grid motif). Self-contained: tokens are inlined below so the
   site has no dependency on the design/ source folder.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Jaldi:wght@400;700&family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---------------------------------------------------------------- Tokens -- */
:root {
  /* Coral — primary brand accent */
  --coral-50:  #fff4f1;
  --coral-100: #ffe4df;
  --coral-200: #ffb6a9;
  --coral-300: #ff8c78;
  --coral-400: #ff7f68;
  --coral-500: #ff6347;   /* THE brand color */
  --coral-600: #ff4726;
  --coral-700: #ff3a16;
  --coral-800: #e42300;
  --coral-900: #b81d00;
  --brand-hero: #e95940;

  /* Slate — ink + neutrals */
  --slate-900: #1b2930;
  --slate-800: #283b44;
  --slate-700: #364e59;   /* wordmark · primary ink */
  --slate-600: #4a626d;
  --slate-500: #647c87;
  --slate-400: #8a9da6;
  --slate-300: #b3c0c6;
  --slate-200: #d4dde1;
  --slate-100: #e8eef0;
  --slate-50:  #f4f7f8;
  --white:     #ffffff;
  --black:     #11181c;

  --success-500: #2e8b57;
  --success-bg:  #e9f6ef;

  /* Semantic aliases */
  --brand:           var(--coral-500);
  --brand-hover:     var(--coral-600);
  --brand-active:    var(--coral-700);
  --brand-subtle:    var(--coral-100);
  --brand-tint:      var(--coral-50);

  --text-strong:     var(--slate-900);
  --text-body:       var(--slate-700);
  --text-muted:      var(--slate-500);
  --text-faint:      var(--slate-400);
  --text-link:       var(--coral-600);
  --text-link-hover: var(--coral-700);

  --surface-page:    var(--white);
  --surface-subtle:  var(--slate-50);
  --surface-sunken:  var(--slate-100);
  --surface-card:    var(--white);

  --border-subtle:   var(--slate-200);
  --border-default:  var(--slate-300);
  --border-strong:   var(--slate-400);
  --border-brand:    var(--coral-500);

  --ring: color-mix(in srgb, var(--coral-500) 45%, transparent);
  --logo-ink: var(--slate-700);
  --logo-blush: var(--coral-100);

  /* Type */
  --font-heading: 'Jaldi', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body:    'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --font-mono:    'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.375rem;
  --text-xl:   1.75rem;
  --text-2xl:  2.25rem;
  --text-3xl:  3rem;

  --leading-tight:   1.1;
  --leading-snug:    1.3;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  /* Spacing — 4px grid */
  --space-1: 0.25rem; --space-2: 0.5rem;  --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.5rem;  --space-6: 2rem;    --space-7: 2.5rem;  --space-8: 3rem;
  --space-9: 4rem;    --space-10: 6rem;

  /* Radii */
  --radius-sm: 5px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 18px;
  --radius-pill: 999px; --radius-pixel: 30%;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(27 41 48 / 0.06);
  --shadow-sm: 0 1.5px 3px 0 rgb(27 41 48 / 0.15);
  --shadow-md: 0 3px 6px 0 rgb(27 41 48 / 0.20);
  --shadow-lg: 0 12px 28px -8px rgb(27 41 48 / 0.22);
  --shadow-brand: 0 8px 24px -8px rgb(255 99 71 / 0.45);

  /* Motion */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-normal: 200ms;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 760px;
  --header-h: 68px;
}

/* Dark band — opt in with [data-theme="dark"]; coral stays the accent. */
[data-theme='dark'] {
  --text-strong:     var(--white);
  --text-body:       var(--slate-200);
  --text-muted:      var(--slate-400);
  --text-faint:      var(--slate-500);
  --text-link:       var(--coral-300);
  --text-link-hover: var(--coral-200);

  --surface-page:    var(--slate-900);
  --surface-subtle:  var(--slate-800);
  --surface-sunken:  #16232a;
  --surface-card:    var(--slate-800);

  --border-subtle:   color-mix(in srgb, var(--white) 10%, transparent);
  --border-default:  color-mix(in srgb, var(--white) 18%, transparent);
  --border-strong:   color-mix(in srgb, var(--white) 28%, transparent);

  --logo-ink: var(--white);
  --logo-blush: var(--coral-200);
}

/* ----------------------------------------------------------------- Base -- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text-strong);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}
a:hover { color: var(--text-link-hover); }

img, svg { display: block; max-width: 100%; }

code, kbd, samp {
  font-family: var(--font-mono);
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.38em;
  font-size: 0.85em;
  color: var(--coral-800);
}

::selection { background: var(--coral-200); color: var(--slate-900); }
:focus-visible { outline: 2px solid var(--coral-500); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--brand); color: #fff; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md); font-weight: 600;
}
.skip-link:focus { top: var(--space-4); color: #fff; }

/* ------------------------------------------------------------- Layout -- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-7);
}
.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-8); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-600);
  margin-bottom: var(--space-3);
}
[data-theme='dark'] .eyebrow { color: var(--coral-400); }

.section-head { max-width: 54ch; }
.section-head h2 { margin: 0; }
.section-head p {
  font-size: var(--text-md);
  color: var(--text-muted);
  margin: var(--space-3) 0 0;
}

/* --------------------------------------------------------------- Buttons -- */
.btn {
  --btn-h: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  height: var(--btn-h); padding-inline: var(--space-5);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  line-height: 1; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }

.btn--sm { --btn-h: 34px; padding-inline: var(--space-4); }
.btn--lg { --btn-h: 52px; padding-inline: var(--space-6); font-size: var(--text-base); }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }
.btn--primary:active { background: var(--brand-active); }

.btn--secondary {
  background: var(--surface-card); color: var(--text-body);
  border-color: var(--border-default);
}
.btn--secondary:hover { border-color: var(--border-brand); color: var(--text-strong); }

.btn--ghost { background: transparent; color: var(--text-link); padding-inline: var(--space-2); }
.btn--ghost:hover { color: var(--text-link-hover); }

.btn--block { width: 100%; }

/* ----------------------------------------------------------- Pixel motif -- */
/* The logo's 3x3 rounded-pixel grid, reused as a sparse accent texture. */
.pixel-grid { display: grid; gap: 7px; pointer-events: none; }
.pixel-grid span { aspect-ratio: 1; border-radius: var(--radius-pixel); }

.pixel-mark {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  width: 64px;
}
.pixel-mark span { aspect-ratio: 1; border-radius: var(--radius-pixel); background: var(--coral-500); }
.pixel-mark span.blush { background: var(--coral-100); }

/* --------------------------------------------------------------- Header -- */
.site-header {
  position: sticky; top: 0; z-index: 30; height: var(--header-h);
  background: var(--surface-page);
  border-bottom: 1px solid transparent;
  transition: background var(--duration-normal), border-color var(--duration-normal);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom-color: var(--border-subtle);
}
[data-theme='dark'] .site-header.is-scrolled {
  background: rgba(27, 41, 48, 0.9);
}
.site-header .container {
  height: 100%; display: flex; align-items: center; gap: var(--space-6);
}
/* Inline logo lockup — pixel mark + Jaldi wordmark. Rendered inline (not as an
   <img>) so the webfont and theme tokens (--logo-ink / --logo-blush) apply. */
.brand-logo { display: inline-flex; align-items: center; gap: 9px; }
.brand-logo:hover { color: inherit; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-word {
  font-family: var(--font-heading); font-weight: 700; font-size: 26px;
  line-height: 1; letter-spacing: -0.01em; color: var(--logo-ink);
}

.site-nav { display: flex; gap: var(--space-6); margin-left: auto; }
.site-nav a {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-body);
}
.site-nav a:hover { color: var(--brand); }

.header-cta { flex: none; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 42px; height: 42px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); color: var(--text-body); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }

/* Theme switch — shows the moon in light mode, the sun in dark mode. */
.theme-toggle {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--border-default);
  border-radius: var(--radius-md); color: var(--text-body); cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}
.theme-toggle:hover { border-color: var(--border-brand); color: var(--brand); }
.theme-toggle .icon { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
[data-theme='dark'] .theme-toggle .icon-sun { display: block; }

/* ----------------------------------------------------------------- Hero -- */
.hero { position: relative; overflow: hidden; background: var(--surface-page); }
.hero__motif {
  position: absolute; top: 50%; right: clamp(24px, 7vw, 110px);
  transform: translateY(-50%); transform-origin: center right;
  opacity: 0.4;
  grid-template-columns: repeat(9, 16px);
}
.hero .container { position: relative; padding-block: var(--space-10) var(--space-9); }

.badge-pill {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 5px 12px; margin-bottom: var(--space-5);
  background: var(--coral-50); border: 1px solid var(--coral-100);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600;
  color: var(--coral-700);
}
.badge-pill .dot { width: 7px; height: 7px; border-radius: var(--radius-pixel); background: var(--coral-500); }

.hero h1 {
  font-size: clamp(40px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.01em;
  margin: 0; max-width: 16ch;
}
.hero__lead {
  font-size: var(--text-md); color: var(--text-muted);
  margin: var(--space-5) 0 0; max-width: 54ch;
}
.hero__actions { display: flex; gap: var(--space-3); margin-top: var(--space-6); flex-wrap: wrap; }

/* -------------------------------------------------------- Client strip -- */
.client-strip {
  border-block: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
}
.client-strip .container {
  display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap;
  padding-block: var(--space-5);
}
.client-strip__label {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint);
  flex: none;
}
.client-strip__names { display: flex; gap: var(--space-6); flex-wrap: wrap; align-items: center; }
.client-strip__names span {
  font-family: var(--font-heading); font-weight: 700; font-size: var(--text-lg);
  color: var(--slate-500); letter-spacing: -0.01em;
}

/* ----------------------------------------------------------- Card grids -- */
.grid { display: grid; gap: var(--space-4); margin-top: var(--space-7); }
.grid--industries { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--work { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal);
}
.card:hover { border-color: var(--border-brand); box-shadow: var(--shadow-md); }
.card h3 { margin: 0; font-size: var(--text-lg); }
.card p { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }

.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--coral-50); color: var(--coral-600);
}
.icon-tile .icon { width: 22px; height: 22px; }

/* ------------------------------------------------------- Capabilities -- */
.grid--caps { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-5); }
.capability {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding-top: var(--space-4); border-top: 2px solid var(--coral-500);
}
.capability__num { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.capability h3 { margin: 0; font-size: var(--text-lg); }
.capability p { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }

/* -------------------------------------------------------- Selected work -- */
.work { position: relative; overflow: hidden; background: var(--slate-900); }
.work__motif { position: absolute; left: -40px; bottom: -40px; opacity: 0.18; grid-template-columns: repeat(8, 16px); }
.work .container { position: relative; }
.case {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-6);
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.case__client { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-xl); color: var(--text-strong); }
.case__sector { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); letter-spacing: 0.04em; }
.case h3 { margin: 4px 0 0; font-size: var(--text-lg); }
.case p { margin: 0; font-size: var(--text-sm); color: var(--text-muted); flex: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin-top: var(--space-2); padding: 4px 12px;
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--success-bg); color: var(--success-500);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ----------------------------------------------------------- Open source -- */
.opensource { background: var(--surface-subtle); border-block: 1px solid var(--border-subtle); }
.opensource .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center;
}
.opensource__links { display: flex; gap: var(--space-5); margin-top: var(--space-6); flex-wrap: wrap; }
.opensource__links a { font-weight: 600; font-size: var(--text-sm); }
.pkg-list { display: flex; flex-direction: column; gap: var(--space-3); }
.pkg-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: var(--space-4) var(--space-5);
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
  transition: border-color var(--duration-normal);
}
.pkg-card:hover { border-color: var(--border-brand); }
.pkg-card__name { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-sm); color: var(--text-strong); }
.pkg-card__desc { font-size: var(--text-xs); color: var(--text-muted); }

/* ----------------------------------------------------------------- About -- */
.about { max-width: var(--container-narrow); margin-inline: auto; text-align: center; }
.about .pixel-mark { width: 72px; margin: 0 auto var(--space-5); }
.about h2 { margin: 0; }
.about p {
  font-size: var(--text-md); line-height: var(--leading-relaxed);
  color: var(--text-muted); margin: var(--space-4) auto 0; max-width: 46ch;
}

/* --------------------------------------------------------------- Contact -- */
.contact { background: var(--slate-800); }
.contact .container { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.contact h2 { margin: 0; }
.contact__intro {
  font-size: var(--text-md); color: var(--slate-300);
  margin: var(--space-3) 0 var(--space-6); max-width: 40ch;
}
.contact__details { display: flex; flex-direction: column; gap: var(--space-4); }
.contact__detail { display: flex; align-items: center; gap: 12px; color: inherit; }
.contact__detail:hover { color: inherit; }
.contact__detail > span:last-child { display: flex; flex-direction: column; }
.contact__detail .icon-tile { background: rgba(255,255,255,0.08); color: var(--coral-300); flex: none; width: 40px; height: 40px; }
.contact__detail .icon-tile .icon { width: 19px; height: 19px; }
.contact__detail-label { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.05em; }
.contact__detail-value { font-size: var(--text-base); color: #fff; font-weight: 600; }

/* Form card — forced light on the dark band */
.form-card {
  background: var(--white); border-radius: var(--radius-xl);
  padding: var(--space-6); box-shadow: var(--shadow-lg);
}
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--slate-700); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: var(--text-base); color: var(--slate-900);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--slate-300); border-radius: var(--radius-md);
  background: #fff; outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring);
}
.form-success {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; min-height: 320px;
}
.form-success .check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: var(--radius-pixel);
  background: var(--coral-100); color: var(--coral-600);
}
.form-success .check .icon { width: 26px; height: 26px; }
.form-success h3 { margin: 6px 0 0; color: var(--slate-900); }
.form-success p { margin: 0; color: var(--slate-500); font-size: var(--text-sm); }
.form-card.is-sent form { display: none; }
.form-card.is-sent .form-success { display: flex; }

/* Dark mode — the page is already dark, so drop the glaring white card. */
[data-theme='dark'] .form-card {
  background: var(--slate-900);
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}
[data-theme='dark'] .field label { color: var(--slate-200); }
[data-theme='dark'] .field input,
[data-theme='dark'] .field textarea {
  background: var(--slate-800); color: var(--white);
  border-color: var(--border-default);
}
[data-theme='dark'] .field input::placeholder,
[data-theme='dark'] .field textarea::placeholder { color: var(--slate-400); }
[data-theme='dark'] .form-success h3 { color: var(--white); }
[data-theme='dark'] .form-success p { color: var(--slate-400); }
[data-theme='dark'] .form-success .check {
  background: color-mix(in srgb, var(--coral-500) 22%, transparent);
  color: var(--coral-300);
}

/* Honeypot: kept in the DOM for bots, hidden from people and assistive tech. */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}
/* Submit feedback */
.form-card button[type="submit"]:disabled { opacity: 0.7; cursor: progress; }
.form-error { margin: var(--space-3) 0 0; color: var(--coral-600); font-size: var(--text-sm); }
.form-error:empty { display: none; }

/* ---------------------------------------------------------------- Footer -- */
.site-footer { background: var(--slate-900); border-top: 1px solid rgba(255,255,255,0.08); }
.site-footer .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5); flex-wrap: wrap; padding-block: var(--space-7);
}
.site-footer .brand-mark { width: 24px; height: 24px; }
.site-footer .brand-word { font-size: 24px; }
.footer-links { display: flex; gap: var(--space-5); font-size: var(--text-sm); }
.footer-links a { color: var(--slate-300); }
.footer-links a:hover { color: var(--coral-300); }
.footer-copy { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--slate-500); }

/* ------------------------------------------------------------ Responsive -- */
@media (max-width: 860px) {
  .opensource .container,
  .contact .container { grid-template-columns: 1fr; }
  .opensource__visual { order: -1; }
}

@media (max-width: 720px) {
  :root { --text-2xl: 2rem; --text-3xl: 2.5rem; }
  .container { padding-inline: var(--space-5); }
  .section { padding-block: var(--space-8); }

  /* On narrow screens the text is full-width — pull the motif back to a
     subtle top-right accent so it doesn't sit under the copy. */
  .hero__motif {
    top: -30px; right: -24px; transform: scale(1);
    transform-origin: top right; opacity: 0.4;
  }

  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; margin-left: var(--space-2); }
  .theme-toggle { margin-left: auto; }

  /* Mobile drop panel */
  .site-header.nav-open { background: var(--surface-page); border-bottom-color: var(--border-subtle); }
  .mobile-nav {
    display: none; position: fixed; inset: var(--header-h) 0 auto 0; z-index: 29;
    background: var(--surface-page); border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    flex-direction: column; padding: var(--space-4) var(--space-5) var(--space-6);
    gap: var(--space-4);
  }
  .mobile-nav.is-open { display: flex; }
  .mobile-nav a:not(.btn) { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--text-strong); }
  .mobile-nav a:not(.btn):hover { color: var(--brand); }
  .mobile-nav .btn { margin-top: var(--space-2); }
  .mobile-nav .btn--primary { color: #fff; }
}

@media (min-width: 721px) { .mobile-nav { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
