/* =========================================================================
   INESQ Studio — main.css
   Foundation only: design tokens, themes, reset, base typography, RTL base.
   Section styles are added with their markup in later steps.
   Concept: "Switchboard" — light-first, product/SaaS tone, engineering calm.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. FONTS (self-hosted — files added in the assets step; OFL licensed)
      Geist / Geist Mono  -> Latin (display, body, mono)
      IBM Plex Sans Arabic -> Arabic
      Noto Sans SC         -> Chinese
   We declare variable webfonts; until the .woff2 files exist the stack falls
   back to system fonts, so the build and preview still work.
   ------------------------------------------------------------------------- */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/IBMPlexSansArabic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/IBMPlexSansArabic-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Noto Sans SC";
  src: url("/assets/fonts/NotoSansSC-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Noto Sans SC";
  src: url("/assets/fonts/NotoSansSC-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  font-style: normal;
}

/* -------------------------------------------------------------------------
   2. DESIGN TOKENS — light theme (default)
   ------------------------------------------------------------------------- */
:root {
  /* --- brand accent (change this one line to experiment later) --- */
  --accent:            #2f5fe0;
  --accent-hover:      #234dc4;
  --accent-contrast:   #ffffff;   /* text on top of accent */
  --accent-soft:       #eef3ff;   /* tinted surface (e.g. WEST block) */
  --error:             #c5372f;   /* error / invalid state */

  /* --- surfaces & text --- */
  --bg:                #ffffff;   /* page background */
  --bg-subtle:         #f7f7f8;   /* alternating sections */
  --surface:           #ffffff;   /* cards */
  --surface-2:         #f1f1f3;   /* insets */
  --text:              #0e0e10;   /* primary text */
  --text-secondary:    #54555a;   /* secondary text */
  --text-tertiary:     #8a8b90;   /* muted / captions */
  --border:            #e6e6e9;   /* hairlines */
  --border-strong:     #d2d2d7;

  /* --- typography families --- */
  --font-sans:  "Geist", "IBM Plex Sans Arabic", "Noto Sans SC",
                system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:  "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- type scale (fluid where useful) --- */
  --fs-eyebrow:   0.6875rem;                              /* 11px labels */
  --fs-small:     0.8125rem;                              /* 13px */
  --fs-body:      0.9375rem;                              /* 15px */
  --fs-lead:      1.125rem;                               /* 18px */
  --fs-h3:        1.375rem;                               /* 22px */
  --fs-h2:        clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem); /* 24–36px */
  --fs-h1:        clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);/* 36–60px */

  /* --- weights --- */
  --fw-light:     300;
  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;

  /* --- line heights --- */
  --lh-tight:     1.1;
  --lh-snug:      1.3;
  --lh-normal:    1.6;

  /* --- letter spacing --- */
  --ls-eyebrow:   0.18em;
  --ls-tight:     -0.02em;

  /* --- spacing scale (4px base) --- */
  --sp-1:  0.25rem;  --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5:  1.5rem;   --sp-6: 2rem;    --sp-8: 3rem;    --sp-10: 4rem;
  --sp-12: 6rem;     --sp-16: 8rem;

  /* --- layout --- */
  --container:      1120px;
  --container-narrow: 760px;
  --gutter:         clamp(1.25rem, 0.5rem + 3vw, 3.25rem);

  /* --- radii --- */
  --radius-sm: 6px;  --radius-md: 10px;  --radius-lg: 16px;  --radius-pill: 999px;

  /* --- shadows (soft, product-like) --- */
  --shadow-sm: 0 1px 2px rgba(14,14,16,.05);
  --shadow-md: 0 4px 16px rgba(14,14,16,.07);
  --shadow-lg: 0 12px 40px rgba(14,14,16,.10);

  /* --- motion --- */
  --ease:        cubic-bezier(.4, 0, .2, 1);
  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --dur-fast:    .16s;
  --dur:         .26s;
  --dur-slow:    .5s;

  /* --- misc --- */
  --nav-h: 64px;
  color-scheme: light;
}

/* -------------------------------------------------------------------------
   3. DESIGN TOKENS — dark theme
   ------------------------------------------------------------------------- */
[data-theme="dark"] {
  --accent:            #5b82f2;
  --accent-hover:      #7396f5;
  --accent-contrast:   #0b0b0d;
  --accent-soft:       #161a26;
  --error:             #ef6f66;

  --bg:                #0c0c0e;
  --bg-subtle:         #121214;
  --surface:           #161618;
  --surface-2:         #1d1d20;
  --text:              #f3f2ef;
  --text-secondary:    #aeafb4;
  --text-tertiary:     #7c7d83;
  --border:            #262629;
  --border-strong:     #34343a;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.55);

  color-scheme: dark;
}

/* -------------------------------------------------------------------------
   4. RESET / NORMALIZE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }
html { scroll-behavior: smooth; }

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: var(--fw-medium); line-height: var(--lh-tight); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* -------------------------------------------------------------------------
   5. BASE TYPOGRAPHY HELPERS
   ------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* -------------------------------------------------------------------------
   6. LAYOUT HELPERS (logical properties → RTL-safe by default)
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--sp-12); }

/* accessibility: visually hidden but available to screen readers */
.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;
}

/* -------------------------------------------------------------------------
   7. RTL ADJUSTMENTS
   Logical properties handle most flips automatically. These are the few
   things that need explicit handling for Arabic.
   ------------------------------------------------------------------------- */
[dir="rtl"] body {
  /* Arabic reads better slightly larger with more line height */
  --fs-body: 1rem;
  --lh-normal: 1.8;
}
/* directional glyphs (arrows) mirror; symbolic icons do not — handled per-use */

/* =========================================================================
   8. SKIP LINK (accessibility)
   ========================================================================= */
.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--sp-4);
  z-index: 200;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  transition: inset-block-start var(--dur) var(--ease);
}
.skip-link:focus { inset-block-start: var(--sp-4); }

/* =========================================================================
   9. NAV / HEADER
   ========================================================================= */
.nav {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-block-end: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--nav-h);
}

/* brand */
.nav__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  margin-inline-end: auto;        /* pushes everything else to the far side */
}
.nav__logo {
  font-weight: var(--fw-semibold);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.nav__tagline {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  text-transform: lowercase;
}

/* primary links (desktop) */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.nav__links > a {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease);
}
.nav__links > a:hover { color: var(--text); }
.nav__cta.nav__cta.nav__cta--drawer { display: none; }   /* shown only inside the mobile drawer */

/* controls cluster */
.nav__controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* icon button (theme toggle) */
.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* language switch */
.langswitch { position: relative; }
.langswitch__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding-inline: var(--sp-3);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.langswitch__btn:hover { background: var(--surface-2); color: var(--text); }
.langswitch__btn svg { transition: transform var(--dur-fast) var(--ease); }
.langswitch.is-open .langswitch__btn svg { transform: rotate(180deg); }
.langswitch__menu {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 150px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              visibility var(--dur-fast) var(--ease);
}
.langswitch.is-open .langswitch__menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.langswitch__menu a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.langswitch__menu a:hover { background: var(--surface-2); color: var(--text); }
.langswitch__menu a.is-current { color: var(--accent); font-weight: var(--fw-medium); }

/* CTA buttons — double class for higher specificity over `a { color: inherit }` */
.nav__cta.nav__cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  padding: 0.6em 1.1em;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
}
.nav__cta.nav__cta:hover,
.nav__cta.nav__cta:focus,
.nav__cta.nav__cta:visited {
  background: var(--accent-hover);
  color: var(--accent-contrast);
}

/* burger (hidden on desktop) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
}
.burger span {
  display: block;
  width: 18px; height: 2px;
  margin-inline: auto;
  background: var(--text);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav.is-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .burger span:nth-child(2) { opacity: 0; }
.nav.is-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- mobile ---- */
@media (max-width: 860px) {
  .burger { display: flex; }
  .nav__cta.nav__cta.nav__cta--header { display: none; }
  .nav__links {
    position: fixed;
    inset-block-start: var(--nav-h);
    inset-inline: 0;
    block-size: calc(100vh - var(--nav-h));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    padding: var(--sp-4) 0 var(--sp-6);
    border-block-start: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease-out);
    overflow-y: auto;
  }
  [dir="rtl"] .nav__links { transform: translateX(-100%); }
  .nav.is-open .nav__links { transform: translateX(0); }
  .nav__links > a {
    display: flex;
    align-items: center;
    padding: var(--sp-4) var(--gutter);
    font-size: 1rem;
    color: var(--text);
    border-block-end: 1px solid var(--border);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  .nav__links > a:hover { background: var(--surface-2); color: var(--accent); }
  .nav__cta.nav__cta.nav__cta--drawer {
    display: inline-flex;
    align-self: flex-start;
    margin: var(--sp-5) var(--gutter) 0;
    padding: 0.85em 1.4em;
    font-size: 1rem;
    color: var(--accent-contrast);
    border-block-end: none;
  }
}

/* =========================================================================
   10. FOOTER
   ========================================================================= */
.footer {
  margin-block-start: var(--sp-16);
  border-block-start: 1px solid var(--border);
  background: var(--bg-subtle);
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: var(--sp-8);
  padding-block: var(--sp-10);
}
.footer__logo {
  font-weight: var(--fw-semibold);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.footer__tagline {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-block-start: var(--sp-2);
}
.footer__social { display: flex; gap: var(--sp-3); margin-block-start: var(--sp-4); }
.footer__social a { font-size: var(--fs-small); color: var(--text-secondary); }
.footer__social a:hover { color: var(--accent); }

.footer__heading {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-block-end: var(--sp-4);
  font-weight: var(--fw-regular);
}
.footer__col { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer__col a {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease);
  width: fit-content;
}
.footer__col a:hover { color: var(--text); }
.footer__legal {
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  line-height: 1.7;
  margin-block-start: var(--sp-2);
}
.footer__legal-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-block-start: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.footer__credit { font-family: var(--font-mono); letter-spacing: 0.04em; }

@media (max-width: 860px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
}
@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; }
}


/* =========================================================================
   11. HERO
   ========================================================================= */
.hero {
  padding-block: clamp(var(--sp-10), 6vw + 2rem, var(--sp-16));
  text-align: center;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
}

.hero__eyebrow { color: var(--text-tertiary); }

.hero__title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  max-width: 22ch;
  margin: 0;
}

.hero__subtitle {
  font-size: var(--fs-lead);
  color: var(--text-secondary);
  max-width: 48ch;
  line-height: var(--lh-snug);
}

.hero__switch-hint {
  margin-block-start: var(--sp-4);
  color: var(--text-tertiary);
}

/* switchboard — pill with 4 language tabs */
.hero__switchboard {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
}
.hero__lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55em 1.1em;
  border-radius: calc(var(--radius-pill) - 4px);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.hero__lang:hover { color: var(--text); }
.hero__lang[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* caption — human-readable proof that switching is real */
.hero__caption {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-block-start: calc(var(--sp-2) * -1);
}
.hero__caption-text { color: var(--accent); }
.hero__caption-dot {
  inline-size: 0.4rem;
  block-size: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
  animation: hero-caption-pulse 2s ease-in-out infinite;
}
@keyframes hero-caption-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* CTAs */
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-block-start: var(--sp-4);
}
.hero__cta.hero__cta.hero__cta--secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.7em 1.3em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.hero__cta.hero__cta.hero__cta--secondary:hover,
.hero__cta.hero__cta.hero__cta--secondary:visited {
  color: var(--text);
  border-color: var(--text);
}

/* mobile tightening */
@media (max-width: 600px) {
  .hero__title { max-width: 18ch; }
  .hero__ctas { width: 100%; flex-direction: column; align-items: stretch; }
  .hero__ctas > * { justify-content: center; }
}

/* ─────────────────────────────────────────────────────────
   Chapter — expandable index entry (collapsed → summary row,
   expanded → full content). Used for the 5 main chapters:
   I — Index — Work,   N — Numbers — Services,
   E — Expansion — Global reach,   S — Studio — About,
   Q — Query — Contact.
   ───────────────────────────────────────────────────────── */
.chapter {
  border-block-start: 1px solid var(--border);
}
.chapter[open] {
  background: var(--bg-subtle);
}

.chapter__summary {
  list-style: none;
  cursor: pointer;
  padding-block: var(--sp-6);
  transition: background var(--dur) var(--ease);
}
.chapter__summary::-webkit-details-marker { display: none; }
.chapter__summary::marker { display: none; }
.chapter__summary:hover { background: var(--bg-subtle); }
.chapter[open] .chapter__summary { padding-block: var(--sp-6) var(--sp-4); }

.chapter__inner {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: var(--sp-8);
  align-items: center;
}
.chapter__inner--body {
  grid-template-columns: 120px 1fr;
  align-items: start;
}

.chapter__rail {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.chapter__letter {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(3rem, 1.5rem + 4vw, 5rem);
  line-height: 0.85;
  font-weight: var(--fw-medium);
  color: var(--accent);
  letter-spacing: -0.04em;
  user-select: none;
}

.chapter__head { min-width: 0; }
.chapter__breadcrumb {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.chapter__breadcrumb-mid { color: var(--text); }
.chapter__teaser {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 60ch;
}
.chapter__teaser strong {
  font-weight: var(--fw-medium);
  color: var(--text);
}

.chapter__toggle {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: var(--fw-regular);
  color: var(--text-tertiary);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: transform var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.chapter__summary:hover .chapter__toggle {
  color: var(--accent);
  border-color: var(--accent);
}
.chapter[open] .chapter__toggle {
  transform: rotate(45deg);
  color: var(--accent);
  border-color: var(--accent);
}

.chapter__body {
  padding-block: 0 var(--sp-10);
}
.chapter__rail-spacer {
  position: sticky;
  inset-block-start: calc(var(--nav-h) + var(--sp-4));
  align-self: start;
}
.chapter__content {
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text);
}

.chapter[open] .chapter__rail {
  position: sticky;
  inset-block-start: calc(var(--nav-h) + var(--sp-4));
  z-index: 1;
}

@media (max-width: 768px) {
  .chapter__inner {
    grid-template-columns: 56px 1fr auto;
    gap: var(--sp-3);
  }
  .chapter__inner--body {
    grid-template-columns: 1fr;
  }
  .chapter__rail-spacer { display: none; }
  .chapter__letter {
    font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  }
  .chapter__toggle {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
  .chapter[open] .chapter__rail {
    position: static;
  }
}

/* ─────────────────────────────────────────────────────────
   Capabilities — sub-section inside chapter I (Index — Work).
   A documentation-style list: small eyebrow heading,
   then rows of label + description separated by hairlines.
   ───────────────────────────────────────────────────────── */
.capabilities {
  margin-block: 0 var(--sp-10);
}
.capabilities__eyebrow {
  margin: 0 0 var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.capabilities__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.capabilities__item {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: var(--sp-5);
  align-items: baseline;
  padding-block: var(--sp-4);
  border-block-start: 1px solid var(--border);
}
.capabilities__item:last-child {
  border-block-end: 1px solid var(--border);
}
.capabilities__label {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.3;
}
.capabilities__desc {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .capabilities__item {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
    padding-block: var(--sp-5);
  }
}

/* ─────────────────────────────────────────────────────────
   Cases — case-study cards inside chapter I (Index — Work).
   Each card: clickable image on top, two-column body below
   (tag → name → result on the left, desc → external link on
   the right). White card on the chapter's subtle background.
   ───────────────────────────────────────────────────────── */
.cases {
  margin-block: 0 var(--sp-10);
}
.cases__eyebrow {
  margin: 0 0 var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.cases__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.case {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.case:hover {
  border-color: var(--text-tertiary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.case__media-link {
  display: block;
  line-height: 0; /* removes inline-image whitespace under <img> */
}
.case__media {
  display: block;
  width: 100%;
  height: auto;
  border-block-end: 1px solid var(--border);
  transition: opacity var(--dur) var(--ease);
}
.case__media-link:hover .case__media {
  opacity: 0.94;
}

.case__body {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--sp-6);
  padding: var(--sp-5) var(--sp-6);
}
.case__head { min-width: 0; }
.case__tag {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.case__name {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.case__result {
  margin: 0;
  font-size: 1rem;
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.45;
}

.case__details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.case__desc {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.55;
}
.case__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: start;
  color: var(--accent);
  text-decoration: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  transition: color var(--dur) var(--ease);
}
.case__link:hover {
  color: var(--accent-hover, var(--accent));
}
.case__link-arrow {
  transition: transform var(--dur) var(--ease);
  display: inline-block;
}
.case__link:hover .case__link-arrow {
  transform: translate(2px, -2px);
}

@media (max-width: 768px) {
  .case__body {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
  }
}

/* ─────────────────────────────────────────────────────────
   Work footnote — closing line under the case cards inside
   chapter I. Mono font + thin top border give the engineering-
   footnote character, consistent with the rest of the site.
   ───────────────────────────────────────────────────────── */
.work__footnote {
  margin: var(--sp-5) 0 0;
  padding-block-start: var(--sp-5);
  border-block-start: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.55;
  max-width: 70ch;
}

/* ─────────────────────────────────────────────────────────
   Chapter N (Numbers — Services) content.
   who — two audience cards: tag → title → desc. Static white
   cards on the chapter's subtle background. Not clickable, so
   no hover state (unlike the case cards in chapter I).
   ───────────────────────────────────────────────────────── */
.who {
  margin-block: 0 var(--sp-10);
}
.who__eyebrow {
  margin: 0 0 var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.who__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.who__item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: var(--sp-5) var(--sp-6);
}
.who__tag {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.who__title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.who__desc {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .who__list {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
}

/* ─────────────────────────────────────────────────────────
   services — five service rows as a hairline-separated list,
   same restrained style as .capabilities. Each row: meta column
   (tag / title / price) | body column (desc + includes).
   ───────────────────────────────────────────────────────── */
.services {
  margin-block: 0 var(--sp-10);
}
.services__subtitle {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 60ch;
}
.services__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.service {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: var(--sp-5);
  padding-block: var(--sp-5);
  border-block-start: 1px solid var(--border);
}
.service:last-child {
  border-block-end: 1px solid var(--border);
}
.service__meta {
  min-width: 0;
}
.service__tag {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.service__title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.service__price {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text);
}
.service__body {
  min-width: 0;
}
.service__desc {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.55;
}
.service__includes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.service__include {
  position: relative;
  padding-inline-start: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.45;
}
.service__include::before {
  content: "—";
  position: absolute;
  inset-inline-start: 0;
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .service {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
    padding-block: var(--sp-6);
  }
}

/* ─────────────────────────────────────────────────────────
   rapid — highlighted "working product in a day" card below
   the services list. Accent border + accent tag mark it as a
   special offer; it carries the only CTA in the services area.
   ───────────────────────────────────────────────────────── */
.rapid {
  margin-block: 0 var(--sp-10);
  padding: var(--sp-6);
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.rapid__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  margin-block-end: var(--sp-4);
}
.rapid__heading {
  min-width: 0;
}
.rapid__tag {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.rapid__title {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.rapid__price {
  margin: 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text);
}
.rapid__desc {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 60ch;
}
.rapid__includes {
  margin: 0 0 var(--sp-4);
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.rapid__include {
  position: relative;
  padding-inline-start: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.45;
}
.rapid__include::before {
  content: "—";
  position: absolute;
  inset-inline-start: 0;
  color: var(--text-tertiary);
}
.rapid__audience {
  margin: 0 0 var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  line-height: 1.45;
}
.rapid__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  transition: color var(--dur) var(--ease);
}
.rapid__cta:hover {
  color: var(--accent-hover, var(--accent));
}
.rapid__cta-arrow {
  display: inline-block;
  transition: transform var(--dur) var(--ease);
}
.rapid__cta:hover .rapid__cta-arrow {
  transform: translateX(2px);
}

@media (max-width: 768px) {
  .rapid {
    padding: var(--sp-5);
  }
  .rapid__head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }
}

/* ─────────────────────────────────────────────────────────
   process — closing block of chapter N. Eyebrow + title +
   subtitle, a 2-column steps grid, and a CTA row separated by
   a thin top border. CTA reuses the accent + arrow-shift style.
   ───────────────────────────────────────────────────────── */
.process {
  margin-block: 0;
}
.process__eyebrow {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.process__title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.process__subtitle {
  margin: 0 0 var(--sp-6);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 60ch;
}
.process__steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6) var(--sp-8);
  margin: 0 0 var(--sp-6);
  padding: 0;
  list-style: none;
}
.process__step {
  min-width: 0;
}
.process__step-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.3;
}
.process__step-desc {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.55;
}
.process__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-3) var(--sp-5);
  padding-block-start: var(--sp-5);
  border-block-start: 1px solid var(--border);
}
.process__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  transition: color var(--dur) var(--ease);
}
.process__cta:hover {
  color: var(--accent-hover, var(--accent));
}
.process__cta-arrow {
  display: inline-block;
  transition: transform var(--dur) var(--ease);
}
.process__cta:hover .process__cta-arrow {
  transform: translateX(2px);
}
.process__cta-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  line-height: 1.45;
}

@media (max-width: 768px) {
  .process__steps {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }
}

/* ─────────────────────────────────────────────────────────
   reach — chapter E (Expansion — Global reach). Header +
   five market-readiness aspects as a hairline-separated
   label/description list — same restrained style as
   .capabilities (label column on the left, description right).
   ───────────────────────────────────────────────────────── */
.reach {
  margin-block: 0 var(--sp-10);
}
.reach__title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.reach__subtitle {
  margin: 0 0 var(--sp-6);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 60ch;
}
.reach__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.reach__item {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: var(--sp-5);
  align-items: baseline;
  padding-block: var(--sp-4);
  border-block-start: 1px solid var(--border);
}
.reach__item:last-child {
  border-block-end: 1px solid var(--border);
}
.reach__label {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.3;
}
.reach__desc {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .reach__item {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
    padding-block: var(--sp-5);
  }
}

/* ─────────────────────────────────────────────────────────
   reach languages strip + CTA. Native-script language names
   as a positive proof of multilingual reach. var(--font-sans)
   routes each script to its font (Geist / IBM Plex Sans Arabic
   / Noto Sans SC) automatically.
   ───────────────────────────────────────────────────────── */
.reach__languages-label {
  margin: var(--sp-8) 0 var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.reach__languages {
  margin: 0 0 var(--sp-6);
  padding: 0;
  list-style: none;
  font-family: var(--font-sans);
}
.reach__lang {
  display: inline;
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  color: var(--text);
  line-height: 1.4;
}
.reach__lang:not(:first-child)::before {
  content: " · ";
  color: var(--text-tertiary);
}
.reach__lang-more {
  display: inline;
  margin-inline-start: var(--sp-3);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--text-tertiary);
}
.reach__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  transition: color var(--dur) var(--ease);
}
.reach__cta:hover {
  color: var(--accent-hover, var(--accent));
}
.reach__cta-arrow {
  display: inline-block;
  transition: transform var(--dur) var(--ease);
}
.reach__cta:hover .reach__cta-arrow {
  transform: translateX(2px);
}

/* ─────────────────────────────────────────────────────────
   about — chapter S (Studio — About). Prose: a lead paragraph
   (primary, slightly larger) followed by the body paragraphs
   (secondary), on a readable measure. Principles + closing are
   added in the next step.
   ───────────────────────────────────────────────────────── */
.about {
  margin-block: 0 var(--sp-10);
}
.about__title {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.about__lead {
  margin: 0 0 var(--sp-5);
  font-size: 1.125rem;
  color: var(--text);
  line-height: 1.6;
  max-width: 68ch;
}
.about__body {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 68ch;
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6) var(--sp-8);
  margin: var(--sp-8) 0 0;
  padding: 0;
  list-style: none;
}
.principle {
  min-width: 0;
}
.principle__title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.3;
}
.principle__desc {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.55;
}
.about__closing {
  margin: var(--sp-8) 0 0;
  padding-block-start: var(--sp-5);
  border-block-start: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .principles {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }
}

/* ─────────────────────────────────────────────────────────
   contact — chapter Q (Query — Contact). Two columns: contact
   (header + form) left, FAQ accordion right. Stacks on mobile.
   ───────────────────────────────────────────────────────── */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  align-items: start;
}
.contact__title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.contact__subtitle {
  margin: 0 0 var(--sp-6);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 50ch;
}
.faq {
  min-width: 0;
}
.faq__eyebrow {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.faq__title {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.faq__list {
  display: flex;
  flex-direction: column;
}
.faq__item {
  border-block-start: 1px solid var(--border);
}
.faq__item:last-child {
  border-block-end: 1px solid var(--border);
}
.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.4;
}
.faq__q::-webkit-details-marker {
  display: none;
}
.faq__q::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  transition: color var(--dur) var(--ease);
}
.faq__item[open] .faq__q::after {
  content: "−";
}
.faq__q:hover::after {
  color: var(--text);
}
.faq__a {
  margin: 0;
  padding-block-end: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 56ch;
}

@media (max-width: 768px) {
  .contact {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
}

/* ─────────────────────────────────────────────────────────
   cform — contact form (chapter Q). Stacked fields, mono
   labels, filled accent submit. Error styling + thank-you
   reveal are wired with the JS in the next step.
   ───────────────────────────────────────────────────────── */
.cform {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  max-width: 32rem;
  margin: 0 0 var(--sp-6);
}
.cform__field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.cform__label {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.cform__hint {
  color: var(--text-tertiary);
}
.cform__input,
.cform__select,
.cform__textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease);
}
.cform__input:focus,
.cform__select:focus,
.cform__textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.cform__textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.5;
}
.cform__field--consent {
  margin-block-start: var(--sp-2);
}
.cform__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
}
.cform__checkbox {
  flex: none;
  margin-block-start: 0.2em;
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.cform__consent-text {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.5;
}
.cform__consent-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cform__submit {
  align-self: flex-start;
  margin-block-start: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--accent-contrast);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.cform__submit:hover {
  background: var(--accent-hover);
}
.cform__submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.cform__error {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--error);
}

.cform__field--invalid .cform__input,
.cform__field--invalid .cform__select,
.cform__field--invalid .cform__textarea {
  border-color: var(--error);
}

.cform__send-error {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-small);
  color: var(--error);
  line-height: 1.5;
}
.cform__note {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  line-height: 1.5;
}
.cform__thanks {
  max-width: 32rem;
  margin: 0 0 var(--sp-6);
  padding: var(--sp-6);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
}
.cform__thanks-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text);
}
.cform__thanks-message {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--text-secondary);
}
.contact__direct {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-tertiary);
}
.contact__direct-link {
  color: var(--accent);
  text-decoration: none;
}
.contact__direct-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========================================================================
   Legal pages (privacy, cookies) — prose, requisites block, tables
   ======================================================================== */
.legal { color: var(--text); }

.legal__h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin-block: 0 var(--sp-6);
}

/* requisites (controller details) */
.legal__meta {
  display: grid;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-8);
  padding-block-end: var(--sp-6);
  border-block-end: 1px solid var(--border);
  font-size: var(--fs-small);
}
.legal__meta-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: var(--sp-3);
}
.legal__meta dt { color: var(--text-tertiary); }
.legal__meta dd { margin: 0; color: var(--text-secondary); }

/* sections */
.legal__section { margin-block-start: var(--sp-8); }
.legal__h2 {
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  margin-block: 0 var(--sp-4);
}
.legal__p {
  max-width: 68ch;
  margin-block: 0 var(--sp-4);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-secondary);
}
.legal__p:last-child { margin-block-end: 0; }

/* inline links + code inside legal prose */
.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal a:hover { color: var(--accent-hover); }
.legal code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

/* lists */
.legal__list {
  max-width: 68ch;
  margin: 0 0 var(--sp-4);
  padding-inline-start: var(--sp-5);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-secondary);
}
.legal__list li { margin-block: var(--sp-1); }

/* tables */
.legal__table-wrap { margin-block: var(--sp-4) var(--sp-5); overflow-x: auto; }
.legal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  line-height: var(--lh-snug);
}
.legal__table th,
.legal__table td {
  padding: var(--sp-3);
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--border);
}
.legal__table th {
  color: var(--text);
  font-weight: var(--fw-medium);
  border-block-end: 1px solid var(--border-strong);
}
.legal__table td { color: var(--text-secondary); }

/* mobile: stack requisites */
@media (max-width: 600px) {
  .legal__meta-row { grid-template-columns: 1fr; gap: var(--sp-1); }
}
