/* ==========================================================================
   Avenue Business Services · homepage
   World: a bright terminal hall with one working arrivals board. The page is
   light by default; dark mode exists only behind the toggle.
   Radius rule: board, panels and photos 14px · blades 4px · inputs 10px ·
   buttons, chips and segmented controls are pills.
   Colour rule: logo blue carries structure and wayfinding, logo orange is
   reserved for the live state and the primary action.
   Layout uses logical properties only, so EN works by flipping `dir`.
   ========================================================================== */

:root {
  --ground: #F2F4F6;
  --surface: #FFFFFF;
  --surface-2: #E8ECF0;
  --ink: #0E1A26;
  --ink-2: #4A5A6A;
  --ink-3: #5E6E7E;
  --line: #D6DDE4;

  --blue: #0C73B7;
  --blue-ink: #0A5F98;
  --blue-wash: #E3EEF7;
  --brand-orange: #E04E16;
  --action: #C64716;
  --action-hover: #AC3C11;
  --orange-ink: #B5441A;
  --orange-wash: #FBE9E1;

  --board: #0A2238;
  --board-edge: #061727;
  --blade-top: #16395A;
  --blade-bot: #11304D;
  --blade-hi: #1D4A73;
  --blade-ink: #F2F5F8;
  --blade-ink-2: #9FB6CC;
  --blade-seam: rgba(2, 10, 18, 0.62);
  --live: #F08A5D;

  --shadow-board: 0 40px 80px -40px rgba(10, 34, 56, 0.55), 0 12px 24px -12px rgba(10, 34, 56, 0.35);
  --shadow-soft: 0 18px 40px -24px rgba(14, 40, 64, 0.28);

  --font-display: "Changa", "Almarai", system-ui, sans-serif;
  --font-body: "Almarai", "Changa", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --r-panel: 14px;
  --r-blade: 4px;
  --r-input: 10px;

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1320px;
  --section-y: clamp(4.5rem, 9vw, 8rem);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --ground: #070B10;
  --surface: #0E151D;
  --surface-2: #141D27;
  --ink: #E8EEF3;
  --ink-2: #A9B6C3;
  --ink-3: #8D9BA9;
  --line: #222D39;
  --blue: #4FA3E0;
  --blue-ink: #6CB4EA;
  --blue-wash: #0F2335;
  --orange-ink: #F08A5D;
  --orange-wash: #2A1A14;
  --board: #0F2E4D;
  --board-edge: #2B5680;
  --blade-top: #1B4A76;
  --blade-bot: #17416A;
  --blade-hi: #23588A;
  --shadow-board: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  --shadow-soft: 0 18px 40px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: 88px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.9;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  caret-color: var(--action);
  transition: background-color 240ms ease, color 240ms ease;
}
@media (min-width: 1024px) { body { font-size: 1.0625rem; } }

html[lang="en"] body { line-height: 1.65; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, h4, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: color-mix(in srgb, var(--brand-orange) 26%, transparent); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

html { scrollbar-color: color-mix(in srgb, var(--ink-3) 55%, transparent) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink-3) 45%, transparent); border-radius: 10px; border: 3px solid var(--ground); }

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  inset-block-start: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--ground);
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: inset-block-start 200ms var(--ease-out);
}
.skip:focus { inset-block-start: 12px; }

/* ---------- type ---------- */

.h2,
.h3,
.h4,
.board__headline,
.stop__title {
  font-family: var(--font-display);
  letter-spacing: normal;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.9rem);
  font-weight: 600;
  line-height: 1.32;
  max-width: 22ch;
}
.h3 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem);
  font-weight: 600;
  line-height: 1.35;
}
.h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-2);
}
.lead {
  margin-block-start: 1rem;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.15rem);
  max-width: 60ch;
}

html[lang="en"] .h2 { line-height: 1.12; letter-spacing: -0.02em; max-width: 24ch; }
html[lang="en"] .h3 { line-height: 1.2; letter-spacing: -0.015em; }

/* ---------- buttons ---------- */

.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.6em 1.5em;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn .ph { font-size: 1.25em; }

.btn--primary {
  --btn-bg: var(--action);
  --btn-ink: #FFFFFF;
  box-shadow: 0 10px 22px -14px rgba(8, 20, 32, 0.55);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn--sm { min-height: 42px; padding-inline: 1.2em; font-size: 0.95rem; }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { --btn-bg: var(--action-hover); }
  .btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
  .btn--ghost:hover .ph-arrow-left { transform: translateX(-3px); }
  [dir="ltr"] .btn--ghost:hover .ph-arrow-left { transform: scaleX(-1) translateX(-3px); }
}
.btn .ph-arrow-left { transition: transform 200ms var(--ease-out); }
[dir="ltr"] .ph-arrow-left { transform: scaleX(-1); }

.btn[disabled] { opacity: 0.7; cursor: progress; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 1.3rem;
  transition: background-color 180ms ease, transform 160ms var(--ease-out);
}
.icon-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--surface-2); } }

/* ---------- blades: the split-flap module ---------- */

.blade {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 1.9em;
  padding: 0.22em 0.6em;
  border-radius: var(--r-blade);
  background: linear-gradient(180deg, var(--blade-top) 0 50%, var(--blade-bot) 50% 100%);
  color: var(--blade-ink);
  font-family: var(--font-display);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 1px 0 rgba(0, 0, 0, 0.35),
    0 2px 3px -1px rgba(0, 0, 0, 0.35);
  transition: color 200ms ease, background 200ms ease;
}
.blade::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 50%;
  height: 1px;
  background: var(--blade-seam);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
  z-index: 3;
  pointer-events: none;
}
.blade__t { position: relative; z-index: 1; }

/* the moving halves created by avenue.js */
.flap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: inherit;
  background: inherit;
  color: inherit;
  border-radius: inherit;
  justify-content: inherit;
  z-index: 2;
  backface-visibility: hidden;
  will-change: transform;
}
.flap--top { clip-path: inset(0 0 50% 0); }
.flap--bot { clip-path: inset(50% 0 0 0); }
.flap--top { box-shadow: inset 0 -12px 16px -14px rgba(0, 0, 0, 0.55); }

.blade--chip {
  min-height: 1.75em;
  padding: 0.1em 0.55em;
  font-size: 0.82rem;
  font-weight: 600;
}
.blade--live { color: var(--live); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--ground) 94%, transparent);
  border-block-end: 1px solid transparent;
  transition: border-color 200ms ease, background-color 240ms ease;
}
.nav.is-stuck { border-block-end-color: var(--line); }

.nav__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand__mark { width: 46px; height: auto; }
.brand__text { display: grid; line-height: 1; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.34em;
  color: var(--brand-orange);
  margin-inline-end: -0.34em;
}
.brand__sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-block-start: 5px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-2);
}
.brand__sub::before {
  content: "";
  width: 16px;
  height: 1.5px;
  background: var(--brand-orange);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  margin-inline-start: auto;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
}
.nav__links a {
  position: relative;
  text-decoration: none;
  color: var(--ink-2);
  padding-block: 8px;
  white-space: nowrap;
  transition: color 160ms ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 2px;
  height: 1.5px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--ink); }
  .nav__links a:hover::after { transform: scaleX(1); }
}

.nav__tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-toggle {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 42px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  border-radius: 8px;
}
.lang-toggle .blade { font-size: 0.85rem; min-width: 2.6em; justify-content: center; }
.lang-toggle:active .blade { transform: scale(0.95); }

.menu-btn { display: none; }

.mobile-menu {
  border-block-start: 1px solid var(--line);
}
.mobile-menu__inner {
  display: grid;
  gap: 4px;
  padding-block: 12px 20px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
}
.mobile-menu__inner a:not(.btn) {
  text-decoration: none;
  padding: 12px 8px;
  border-block-end: 1px solid var(--line);
}
.mobile-menu__inner .btn { margin-block-start: 14px; }

@media (max-width: 1120px) {
  .nav__links { gap: 16px; font-size: 0.92rem; }
}
@media (max-width: 1023px) {
  .nav__links { display: none; }
  .menu-btn { display: inline-grid; }
  .nav__tools { margin-inline-start: auto; }
}
@media (max-width: 520px) {
  .nav__cta { display: none; }
  .brand__mark { width: 40px; }
  .brand__word { font-size: 1rem; }
}

/* ---------- hero: the arrivals board ---------- */

.hero { padding-block: clamp(8px, 1vw, 12px) 0; }

.board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "headline"
    "lede"
    "checkin"
    "routes";
  background-color: var(--board);
  color: var(--blade-ink);
  border-radius: var(--r-panel);
  padding: 20px;
  box-shadow: var(--shadow-board), inset 0 0 0 1px var(--board-edge);
}
@media (min-width: 900px) { .board { padding: 28px; } }
@media (min-width: 1280px) { .board { padding: 32px; } }

.board__head {
  grid-area: head;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block-end: clamp(14px, 1.6vw, 20px);
  border-block-end: 1px solid rgba(159, 182, 204, 0.14);
}
.board__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  color: var(--blade-ink-2);
  font-size: 0.92rem;
}
.board__title .ph { font-size: 1.4rem; color: var(--live); }
[dir="rtl"] .board__title .ph { transform: scaleX(-1); }
.board__place { padding-inline-start: 6px; }

.board__clock {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  color: var(--blade-ink-2);
  font-size: 0.9rem;
}
.clock { display: inline-flex; align-items: center; gap: 3px; }
.blade--digit {
  justify-content: center;
  min-width: 1.45em;
  min-height: 1.9em;
  padding: 0.1em 0.2em;
  font-size: 1.15rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.clock__sep {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--live);
  padding-inline: 2px;
  animation: blink 2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .clock__sep { animation: none; } }

.board__headline {
  grid-area: headline;
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-block-start: clamp(18px, 2vw, 26px);
  font-size: clamp(1.9rem, 0.9rem + 3.2vw, 3.7rem);
  font-weight: 600;
}
.headline__row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.blade--ghost {
  flex: 1;
  min-width: 2.5em;
  opacity: 0.55;
}
.blade--line {
  min-height: 1.5em;
  max-width: 100%;
  padding: 0.04em 0.32em 0.1em;
  line-height: 1.32;
  border-radius: 6px;
}
html[lang="en"] .blade--line { line-height: 1.18; padding-block: 0.08em 0.1em; letter-spacing: -0.02em; }

.board__lede {
  grid-area: lede;
  margin-block-start: clamp(14px, 1.6vw, 20px);
  max-width: 56ch;
  color: var(--blade-ink-2);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.13rem);
  line-height: 1.85;
}
html[lang="en"] .board__lede { line-height: 1.6; }

/* routes table */
.routes {
  grid-area: routes;
  width: 100%;
  margin-block-start: clamp(22px, 2.6vw, 34px);
  border-collapse: separate;
  border-spacing: 0 6px;
  table-layout: fixed;
  font-size: clamp(0.92rem, 0.85rem + 0.25vw, 1.02rem);
}
.routes caption {
  caption-side: bottom;
  text-align: start;
  padding-block-start: 6px;
  color: var(--blade-ink-2);
  font-size: 0.82rem;
}
.routes thead th {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--blade-ink-2);
  text-align: start;
  padding: 0 4px 2px;
}
.routes col, .routes th, .routes td { vertical-align: middle; }
.routes thead th:nth-child(1) { width: 26%; }
.routes thead th:nth-child(2) { width: 23%; }
.routes thead th:nth-child(3) { width: 15%; }
.routes thead th:nth-child(4) { width: 15%; }
.routes thead th:nth-child(5) { width: 14%; }
.routes thead th:nth-child(6) { width: 7%; }
.routes .routes__gate-h { text-align: center; }

.routes tbody th,
.routes tbody td { padding: 0 3px; font-weight: 500; }
.routes tbody .blade { display: flex; width: 100%; min-height: 2.4em; padding-inline: 0.75em; }
.routes tbody th .blade { font-weight: 600; }
.routes .blade--num { font-variant-numeric: tabular-nums; }

.routes tbody tr { cursor: pointer; }
.routes tbody tr .blade { transition: color 200ms ease, background 200ms ease, box-shadow 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .routes tbody tr:hover .blade {
    background: linear-gradient(180deg, var(--blade-hi) 0 50%, var(--blade-top) 50% 100%);
  }
}
.routes tbody tr.is-lit th .blade,
.routes tbody tr.is-lit .blade--status { color: var(--live); }
.routes tbody tr.is-lit th .blade { box-shadow: inset 0 0 0 1px rgba(240, 138, 93, 0.55), 0 1px 0 rgba(0, 0, 0, 0.35); }

.routes__gate { text-align: center; }
.gate-chip {
  display: inline-grid;
  place-items: center;
  width: 2.5em;
  height: 2.5em;
  border-radius: var(--r-blade);
  box-shadow: inset 0 0 0 1.5px rgba(159, 182, 204, 0.55);
  color: var(--blade-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}
.gate-chip:focus-visible { outline-color: var(--live); }
@media (hover: hover) and (pointer: fine) {
  .gate-chip:hover { background: var(--live); color: var(--board); box-shadow: none; }
}
.routes tbody tr.is-lit .gate-chip { box-shadow: inset 0 0 0 1.5px var(--live); color: var(--live); }

/* check-in counter */
.checkin {
  grid-area: checkin;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-block-start: clamp(16px, 2vw, 22px);
}
@media (min-width: 1100px) {
  .board {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "head head"
      "headline headline"
      "lede checkin"
      "routes routes";
    column-gap: clamp(24px, 3vw, 48px);
  }
  .board__lede { align-self: end; max-width: 48ch; }
  .checkin { align-self: end; flex-wrap: nowrap; justify-content: flex-end; }
  .checkin__status { position: absolute; }
  .checkin { position: relative; }
  .checkin__status { inset-block-start: calc(100% + 6px); inset-inline-end: 0; }
}
.checkin__field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkin label {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--blade-ink-2);
  white-space: nowrap;
}
.checkin__go { margin-inline-start: auto; min-height: 52px; padding-inline: 1.9em; font-size: 1.05rem; }
.checkin__status {
  flex-basis: 100%;
  min-height: 0;
  color: var(--live);
  font-family: var(--font-display);
  font-size: 0.92rem;
}
.checkin__status:empty { display: none; }

.select {
  position: relative;
  display: inline-flex;
}
.select select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 52px;
  padding-block: 0;
  padding-inline: 1em 2.6em;
  border: 0;
  border-radius: var(--r-blade);
  background: linear-gradient(180deg, var(--blade-top) 0 50%, var(--blade-bot) 50% 100%);
  color: var(--blade-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.select select:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
.select option { background: var(--board); color: var(--blade-ink); }
.select .ph {
  position: absolute;
  inset-inline-end: 0.9em;
  inset-block-start: 50%;
  translate: 0 -50%;
  pointer-events: none;
  color: var(--blade-ink-2);
}
.select::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 50%;
  height: 1px;
  background: var(--blade-seam);
  pointer-events: none;
}

/* board on narrower screens: rows become stacked arrivals cards */
@media (max-width: 899px) {
  .board {
    grid-template-areas:
      "head"
      "headline"
      "lede"
      "checkin"
      "routes";
  }
  .board__place { display: none; }
  .blade--ghost { display: none; }
  .board__date { display: none; }
  .blade--line { white-space: normal; }

  .checkin__field { flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 6px; }
  .checkin label { font-size: 0.9rem; }
  .select, .select select { width: 100%; }
  .checkin__go { flex: 1 1 100%; margin-inline-start: 0; }

  .routes { display: block; border-spacing: 0; margin-block-start: 26px; }
  .routes thead { display: none; }
  .routes tbody { display: grid; gap: 10px; }
  .routes caption { display: block; padding-block: 0 10px; }
  .routes tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "svc gate"
      "a   gate"
      "b   b"
      "c   c"
      "d   d";
    gap: 6px 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 1px rgba(159, 182, 204, 0.12);
  }
  .routes tbody th, .routes tbody td { display: block; padding: 0; }
  .routes tbody th { grid-area: svc; }
  .routes tbody td:nth-of-type(1) { grid-area: a; }
  .routes tbody td:nth-of-type(2) { grid-area: b; }
  .routes tbody td:nth-of-type(3) { grid-area: c; }
  .routes tbody td:nth-of-type(4) { grid-area: d; }
  .routes tbody td.routes__gate { grid-area: gate; align-self: start; }
  .routes tbody td[data-label] { display: flex; align-items: center; gap: 10px; }
  .routes tbody td[data-label]::before {
    content: attr(data-label);
    flex: none;
    width: 4.6em;
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--blade-ink-2);
  }
  .routes tbody td .blade { flex: 1; min-width: 0; min-height: 2.2em; font-size: 0.92rem; white-space: normal; }
  .routes tbody th .blade { white-space: normal; min-height: 2.5em; }
  .routes tbody th, .routes tbody td { min-width: 0; }
}

/* ---------- section scaffolding ---------- */

.section { padding-block: calc(var(--section-y) * 0.55); }
.gates { padding-block-start: var(--section-y); }

/* ---------- gates ---------- */

.signs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-block-start: clamp(2rem, 4vw, 3rem);
}
.sign {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 16px 10px 12px;
  padding-inline: 12px 16px;
  border: 0;
  border-radius: var(--r-panel);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.15rem);
  text-align: start;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease, transform 160ms var(--ease-out);
}
.sign:active { transform: scale(0.985); }
.sign__letter {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 4px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 700;
  font-size: 1.15rem;
  transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}
.sign .ph { font-size: 1.45rem; color: var(--ink-3); transition: color 220ms ease; }
.sign__label { flex: 1; }
.sign__arrow { opacity: 0; transform: translateX(6px); transition: opacity 200ms ease, transform 220ms var(--ease-out); }
[dir="ltr"] .sign__arrow { transform: scaleX(-1) translateX(6px); }

.sign[aria-selected="true"] {
  background: var(--board);
  color: var(--blade-ink);
  box-shadow: var(--shadow-soft);
}
.sign[aria-selected="true"] .sign__letter { background: var(--live); color: var(--board); box-shadow: none; }
.sign[aria-selected="true"] .ph { color: var(--blade-ink-2); }
.sign[aria-selected="true"] .sign__arrow { opacity: 1; transform: none; color: var(--live); }
[dir="ltr"] .sign[aria-selected="true"] .sign__arrow { transform: scaleX(-1); }

@media (hover: hover) and (pointer: fine) {
  .sign[aria-selected="false"]:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
}

.gate-panels { margin-block-start: 14px; }
.gate {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding: clamp(14px, 1.6vw, 20px);
  border-radius: calc(var(--r-panel) + 6px);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.gate:focus-visible { outline-offset: 4px; }
.js .gate[hidden] { display: none; }
.gate.is-entering { animation: gate-in 260ms var(--ease-out); }
@keyframes gate-in {
  from { opacity: 0; filter: blur(4px); transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .gate.is-entering { animation: gate-fade 160ms ease; }
  @keyframes gate-fade { from { opacity: 0; } }
}
.no-js .gate + .gate, .gate + .gate { margin-block-start: 14px; }

.gate__media {
  overflow: hidden;
  align-self: stretch;
  min-height: 460px;
  border-radius: var(--r-panel);
  background: var(--surface-2);
}
.gate__media img { width: 100%; height: 100%; object-fit: cover; }

.gate__body {
  display: grid;
  gap: 1.1rem;
  padding-block: clamp(4px, 1.6vw, 24px);
  padding-inline-end: clamp(0px, 1.6vw, 20px);
  align-content: start;
}
.gate__body > p { color: var(--ink-2); max-width: 56ch; }

.gate__cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.5rem;
  margin-block-start: 0.4rem;
}
.ticks, .docs { display: grid; gap: 0.4rem; margin-block-start: 0.6rem; }
.ticks li, .docs li {
  position: relative;
  padding-inline-start: 1.7em;
  line-height: 1.7;
}
.ticks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.15em;
  inset-block-start: 0.5em;
  width: 0.85em;
  height: 0.45em;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}
.docs li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.2em;
  inset-block-start: 0.55em;
  width: 0.7em;
  height: 0.7em;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1.5px var(--ink-3);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-block: 0.6rem 0.4rem;
  border-block: 1px solid var(--line);
}
.facts > div { padding: 12px 16px; }
.facts > div:first-child { padding-inline-start: 0; }
.facts > div + div { border-inline-start: 1px solid var(--line); }
.facts dt {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-3);
}
.facts dd {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.45;
}
.gate__body .btn { justify-self: start; margin-block-start: 0.4rem; }

@media (max-width: 899px) {
  .signs { grid-template-columns: 1fr; }
  .sign { min-height: 58px; }
  .gate { grid-template-columns: 1fr; }
  .gate__media { aspect-ratio: 16 / 10; min-height: 0; }
  .gate__cols { grid-template-columns: 1fr; gap: 1rem; }
  .facts { grid-template-columns: 1fr; }
  .facts > div + div { border-inline-start: 0; border-block-start: 1px solid var(--line); }
  .facts > div { padding-inline: 0; }
  .gate__body { padding-inline: 6px; }
}

/* ---------- residency calculator ---------- */

.calc__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.calc .h2 { max-width: 18ch; }

.seg {
  display: inline-flex;
  gap: 4px;
  margin-block-start: 2rem;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg__opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: 1.2em;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-weight: 600;
  transition: background-color 220ms var(--ease-out), color 200ms ease;
}
.seg__opt .ph { font-size: 1.2rem; }
.seg__opt[aria-checked="true"] { background: var(--ink); color: var(--ground); }

.amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-block-start: 2.2rem;
}
.amount__label { font-family: var(--font-display); font-weight: 500; color: var(--ink-2); }
.amount__out {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.range { margin-block-start: 1rem; position: relative; }
.range input[type="range"] {
  --pf: 0.357;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.range input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(to right, var(--blue) 0 calc(14px + (100% - 28px) * var(--pf)), var(--line) 0);
}
[dir="rtl"] .range input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to left, var(--blue) 0 calc(14px + (100% - 28px) * var(--pf)), var(--line) 0);
}
.range input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--line); }
.range input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--blue); }
.range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--blue), 0 4px 10px -4px rgba(12, 115, 183, 0.6);
  transition: transform 160ms var(--ease-out);
}
.range input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: 2px solid var(--blue);
  border-radius: 6px;
  background: var(--surface);
}
.range input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.08); }
.range input[type="range"]:focus-visible { outline: none; }
.range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 4px color-mix(in srgb, var(--blue) 30%, transparent); }

.ruler { position: relative; height: 34px; margin-block-start: 4px; margin-inline: 14px; }
.ruler__mark {
  position: absolute;
  inset-inline-start: var(--at);
  inset-block-start: 0;
  translate: 50% 0;
  padding-block-start: 12px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
}
[dir="ltr"] .ruler__mark { translate: -50% 0; }
.ruler__mark::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  width: 1.5px;
  height: 8px;
  background: var(--ink-3);
}
.ruler__mark.is-passed { color: var(--blue-ink); }
.ruler__mark.is-passed::before { background: var(--blue); }
.range__hint { margin-block-start: 6px; font-size: 0.88rem; color: var(--ink-3); }

.readout {
  display: grid;
  gap: 1rem;
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--r-panel);
  background: var(--board);
  color: var(--blade-ink);
  box-shadow: var(--shadow-board), inset 0 0 0 1px var(--board-edge);
}
.readout__label { font-family: var(--font-display); color: var(--blade-ink-2); font-size: 0.95rem; }
.readout__value { display: flex; align-items: center; gap: 10px; }
.blade--big {
  justify-content: center;
  min-width: 1.35em;
  padding: 0 0.18em;
  font-size: clamp(4rem, 3rem + 4vw, 6.2rem);
  font-weight: 700;
  line-height: 1.25;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.blade--unit { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-weight: 600; min-height: 1.8em; }
.readout.is-none .blade--big { color: var(--blade-ink-2); }
.readout__note { color: var(--blade-ink-2); line-height: 1.8; min-height: 3.6em; }

.tiers { display: grid; gap: 6px; }
.tiers li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-blade);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--blade-ink-2);
  transition: color 200ms ease, background-color 200ms ease, box-shadow 200ms ease, opacity 200ms ease;
}
.tiers li.is-reached { color: var(--blade-ink); }
.tiers li.is-current { color: var(--live); box-shadow: inset 0 0 0 1px rgba(240, 138, 93, 0.6); background: rgba(240, 138, 93, 0.08); }
.tiers li.is-off { opacity: 0.35; text-decoration: line-through; text-decoration-thickness: 1px; }
.readout .btn { justify-self: start; }
.readout__fine { font-size: 0.82rem; color: var(--blade-ink-2); line-height: 1.7; }

@media (max-width: 899px) {
  .calc__grid { grid-template-columns: 1fr; }
  .seg { display: flex; }
  .seg__opt { flex: 1; justify-content: center; }
}

/* ---------- route ---------- */

.route__track { position: relative; margin-block-start: clamp(2.5rem, 5vw, 4rem); }
.route__rail {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 11px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.route__fill {
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform: scaleX(var(--route, 0));
  transform-origin: right center;
  transition: transform 700ms var(--ease-in-out);
}
[dir="ltr"] .route__fill { transform-origin: left center; }

.route__stops {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}
.stop { display: grid; align-content: start; gap: 8px; }
.stop__mark {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--ground);
  box-shadow: inset 0 0 0 2px var(--line);
  transition: background-color 260ms ease, box-shadow 260ms ease, transform 260ms var(--ease-out);
}
.stop__where {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-3);
}
.stop__where .ph { font-size: 1.1rem; }
.stop__title { margin-block-start: 14px; font-size: clamp(1.2rem, 1rem + 0.6vw, 1.45rem); font-weight: 600; line-height: 1.35; }
.stop__text { color: var(--ink-2); font-size: 0.97rem; line-height: 1.8; }

.stop.is-next .stop__mark { box-shadow: inset 0 0 0 2px var(--brand-orange), 0 0 0 5px color-mix(in srgb, var(--brand-orange) 18%, transparent); transform: scale(1.08); }
.stop.is-reached .stop__mark { background: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.stop.is-reached .stop__where { color: var(--blue-ink); }

@media (max-width: 899px) {
  .route__rail {
    inset-inline-start: 11px;
    inset-inline-end: auto;
    inset-block: 6px 6px;
    width: 2px;
    height: auto;
  }
  .route__fill { transform: scaleY(var(--route, 0)); transform-origin: center top; }
  [dir="ltr"] .route__fill { transform-origin: center top; }
  .route__stops { grid-template-columns: 1fr; gap: 28px; }
  .stop {
    grid-template-columns: 24px 1fr;
    column-gap: 18px;
    row-gap: 4px;
  }
  .stop__mark { grid-row: 1 / span 3; }
  .stop__title { margin-block-start: 0; }
}

/* ---------- proof ---------- */

.proof__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
}
.sample-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--orange-wash);
  color: var(--orange-ink);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
}

.log {
  margin-block-start: clamp(1.8rem, 3vw, 2.5rem);
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow-x: auto;
}
.log__table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.log__table th {
  padding: 16px 20px 10px;
  text-align: start;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--ink-3);
}
.log__table td { padding: 14px 20px; line-height: 1.6; }
.log__table tbody tr:nth-child(odd) { background: color-mix(in srgb, var(--ground) 70%, transparent); }
.log__table td:first-child { font-family: var(--font-display); font-weight: 600; }
.log__table .num { font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.status--done { background: var(--blue-wash); color: var(--blue-ink); }
.status--live { background: var(--orange-wash); color: var(--orange-ink); }

.quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-block-start: clamp(2.5rem, 5vw, 4rem);
}
.quote { display: grid; gap: 1.1rem; align-content: start; padding-block-start: 1.4rem; border-block-start: 2px solid var(--ink); }
.quote blockquote { margin: 0; }
.quote p {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  font-weight: 400;
  line-height: 1.65;
  max-width: 40ch;
}
html[lang="en"] .quote p { line-height: 1.4; }
.quote figcaption { display: grid; gap: 2px; }
.quote__name { font-family: var(--font-display); font-weight: 600; }
.quote__role { color: var(--ink-3); font-size: 0.92rem; }

@media (max-width: 767px) {
  .quotes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .log { overflow: visible; background: transparent; box-shadow: none; }
  .log__table, .log__table tbody { display: grid; gap: 10px; min-width: 0; }
  .log__table thead { display: none; }
  .log__table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 14px 16px;
    border-radius: var(--r-panel);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .log__table tbody tr:nth-child(odd) { background: var(--surface); }
  .log__table td { padding: 0; }
  .log__table td:nth-child(2) { grid-column: 1; color: var(--ink-2); }
  .log__table td:nth-child(3) { grid-column: 1; font-size: 0.88rem; }
  .log__table td:nth-child(4) { grid-column: 2; grid-row: 1; align-self: start; }
}

/* ---------- faq ---------- */

.faq__wrap { max-width: 880px; }
.faq__list { margin-block-start: clamp(1.8rem, 3vw, 2.6rem); display: grid; gap: 10px; }
.qa {
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 200ms ease;
  interpolate-size: allow-keywords;
}
.qa[open] { box-shadow: inset 0 0 0 1px var(--ink-3); }
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.15rem);
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-panel);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ph {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--ground);
  font-size: 1rem;
  transition: transform 260ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.qa[open] summary .ph { transform: rotate(45deg); background: var(--ink); color: var(--ground); }
.qa__a { padding: 0 22px 20px; color: var(--ink-2); max-width: 70ch; }
.qa::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 280ms var(--ease-out), content-visibility 280ms allow-discrete;
}
.qa[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) { .qa::details-content { transition: none; } }

/* ---------- contact ---------- */

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.desk {
  display: grid;
  align-content: start;
  gap: 1.1rem;
  padding: clamp(20px, 2.4vw, 30px);
  border-radius: var(--r-panel);
  background-color: var(--board);
  color: var(--blade-ink);
  box-shadow: var(--shadow-board), inset 0 0 0 1px var(--board-edge);
}
.desk__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block-end: 14px;
  border-block-end: 1px solid rgba(159, 182, 204, 0.14);
}
.desk__tag {
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(240, 138, 93, 0.6);
  color: var(--live);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.desk__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  font-weight: 600;
  line-height: 1.35;
}
.desk__rows { display: grid; gap: 8px; }
.desk__row {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.desk__row dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--blade-ink-2);
}
.desk__row dt .ph { font-size: 1.2rem; color: var(--live); }
.desk__row .blade {
  display: flex;
  width: 100%;
  min-height: 2.6em;
  padding-inline: 0.8em;
  white-space: normal;
  font-weight: 600;
  text-decoration: none;
}
[dir="rtl"] .desk__row .blade__t[dir="ltr"] { text-align: right; }
@media (hover: hover) and (pointer: fine) {
  .desk__row a.blade:hover { background: linear-gradient(180deg, var(--blade-hi) 0 50%, var(--blade-top) 50% 100%); }
}
.desk__row a.blade:focus-visible { outline-color: var(--live); }
.desk__fine { font-size: 0.82rem; color: var(--blade-ink-2); line-height: 1.7; }

.form { margin-block-start: 2rem; }
.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.field { display: grid; gap: 6px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}
.field__opt { color: var(--ink-3); font-weight: 400; }
.field input,
.field textarea,
.select--field select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--r-input);
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 180ms ease;
}
.field textarea { resize: vertical; min-height: 104px; line-height: 1.7; }
.field input:hover, .field textarea:hover, .select--field select:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.field input:focus-visible,
.field textarea:focus-visible,
.select--field select:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent);
}
.field.has-error input,
.field.has-error select { box-shadow: inset 0 0 0 2px var(--action); }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field__help { font-size: 0.84rem; color: var(--ink-3); line-height: 1.5; }
.field__error { font-size: 0.86rem; color: var(--orange-ink); font-weight: 700; line-height: 1.5; }
.field__error:empty { display: none; }

.select--field { display: flex; }
.select--field select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 2.6em;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  background: var(--surface);
}
.select--field::after { display: none; }
.select--field .ph { color: var(--ink-3); }
.select--field option { background: var(--surface); color: var(--ink); }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-block-start: 22px; }
.form__submit { min-width: 12rem; }
.form__spin { display: none; }
.form.is-loading .form__spin { display: inline-block; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__alert {
  flex: 1 1 100%;
  padding: 12px 16px;
  border-radius: var(--r-input);
  background: var(--orange-wash);
  color: var(--orange-ink);
  font-weight: 700;
  font-size: 0.92rem;
}

.form-done {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-block-start: 2rem;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.form-done[hidden] { display: none; }
.form-done p { color: var(--ink-2); }
.form-done .blade { font-size: 0.9rem; }

@media (max-width: 899px) {
  .contact__grid { grid-template-columns: 1fr; }
  .desk { order: 2; }
}
@media (max-width: 600px) {
  .form__grid { grid-template-columns: 1fr; }
  .desk__row { grid-template-columns: 1fr; gap: 4px; }
  .form__submit { width: 100%; }
}

/* ---------- footer ---------- */

.footer {
  margin-block-start: 0;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  background: var(--surface);
  border-block-start: 1px solid var(--line);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.footer__brand { display: grid; gap: 1rem; align-content: start; justify-items: start; }
.footer__logo { width: 112px; height: auto; }
.footer__logo--dark { display: none; }
:root[data-theme="dark"] .footer__logo--light { display: none; }
:root[data-theme="dark"] .footer__logo--dark { display: block; }
.footer__brand p { color: var(--ink-2); max-width: 32ch; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__h { font-family: var(--font-display); font-size: 0.85rem; font-weight: 500; color: var(--ink-3); margin-block-end: 4px; }
.footer__col a { text-decoration: none; color: var(--ink); width: fit-content; }
@media (hover: hover) and (pointer: fine) { .footer__col a:hover { color: var(--blue-ink); } }
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-block-start: 3rem;
  padding-block-start: 1.4rem;
  border-block-start: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.85rem;
}

@media (max-width: 899px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ---------- language switch crossfade for non-blade text ---------- */

.is-swapping [data-swap] { animation: swap-in 260ms var(--ease-out); }
@keyframes swap-in { from { opacity: 0; filter: blur(3px); } }
@media (prefers-reduced-motion: reduce) {
  .is-swapping [data-swap] { animation: none; }
}
