/* ===========================================================
   Proximiteq — Design System
   Author: JT-sg project
   Stack: vanilla HTML/CSS/JS
   =========================================================== */

/* ---------- Tokens ---------- */
/* v0.2 palette — deep teal + brand red (echoes the existing Proximiteq
   colour scheme, modernised and harmonised). Token names retained from
   v0.1 for compatibility: --ink is now teal, --gold is now red. */
:root {
  /* Brand palette */
  --ink:        #0A4747;   /* deep teal — primary chrome */
  --ink-2:      #0F5A5A;   /* lifted teal — surfaces on dark */
  --ink-3:      #147070;   /* bright teal — hover */
  --gold:       #E04A45;   /* brand red — accent */
  --gold-2:     #B0322D;   /* deep red — hover */
  --gold-soft:  #F2B6B3;   /* soft pink — highlights on dark */
  --cream:      #F8F4EE;   /* warm off-white — body */
  --white:      #FFFFFF;
  --mute:       #5C6B6E;   /* secondary text */
  --mute-2:     #90A4A7;
  --line:       #E6DCD0;
  --line-dark:  rgba(255,255,255,0.10);

  /* Typography */
  --font-serif: "Fraunces", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Type scale (fluid) */
  --fs-display: clamp(2.6rem, 5.2vw + 1rem, 5.5rem);
  --fs-h1:      clamp(2.2rem, 3.4vw + 1rem, 3.75rem);
  --fs-h2:      clamp(1.7rem, 2vw + 1rem, 2.6rem);
  --fs-h3:      clamp(1.25rem, 0.6vw + 1rem, 1.5rem);
  --fs-lead:    clamp(1.05rem, 0.4vw + 0.9rem, 1.25rem);
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-micro:   0.75rem;

  /* Spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  /* Layout */
  --container: 1240px;
  --container-narrow: 880px;
  --radius:   14px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(10,71,71,.06), 0 1px 1px rgba(10,71,71,.04);
  --shadow:    0 10px 30px -12px rgba(10,71,71,.18), 0 4px 12px -6px rgba(10,71,71,.08);
  --shadow-lg: 0 30px 60px -20px rgba(10,71,71,.28), 0 12px 30px -10px rgba(10,71,71,.12);
  --ease:      cubic-bezier(.22,.61,.36,1);
  --t-fast:    180ms;
  --t-base:    280ms;
  --t-slow:    520ms;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--gold-2); }
button { font: inherit; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 450;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--s-4);
  line-height: 1.12;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4 { font-size: 1.05rem; line-height: 1.35; }
p  { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--gold);
}

.lead {
  font-size: var(--fs-lead);
  color: var(--mute);
  line-height: 1.6;
  max-width: 60ch;
}

.display {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0 0 var(--s-5);
}
.display em {
  font-style: italic;
  color: var(--gold-2);
  font-weight: 400;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.container--narrow { max-width: var(--container-narrow); }

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
.section--tight { padding-block: clamp(2.5rem, 5vw, 4.5rem); }

.section--dark {
  background: var(--ink);
  color: var(--cream);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--cream); }
.section--dark .lead { color: var(--mute-2); }

.section--cream { background: var(--cream); }
.section--white { background: var(--white); }

.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,244,238,0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.site-header.is-scrolled {
  background: rgba(248,244,238,0.92);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding-block: var(--s-4);
}
.brand {
  display: inline-flex;
  align-items: center;
}
.brand img { height: 44px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-block: 6px;
}
.nav-links a[aria-current="page"]::after,
.nav-links a:hover::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--gold);
}

.nav-cta { display: inline-flex; }
/* Desktop: text label only; the chat-bubble <img> icon stays hidden. */
.nav-cta__icon { display: none; }
.nav-cta__label { display: inline; }

.nav-toggle {
  display: none;
  background: transparent; border: 0; padding: 8px;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 880px) {
  /* Bigger logo, icon-only CTA stays visible, drawer for the rest.

     Header top padding combines three signals so it works in EVERY browser:
       1. --safe-top  : measured at runtime in main.js (visualViewport.offsetTop
                        on Safari / dynamic-island devices, otherwise 0).
       2. env(safe-area-inset-top) : iOS Safari when viewport-fit=cover is set.
       3. 12px floor  : guarantees breathing room on Chrome Android, desktop
                        emulators, and any browser that reports 0 for the above. */
  .site-header {
    padding-top: max(var(--safe-top, 0px), env(safe-area-inset-top, 0px), 12px);
  }
  .nav { gap: var(--s-3); padding-block: var(--s-4); align-items: center; }
  .brand { min-height: 44px; display: inline-flex; align-items: center; }
  .brand img { height: 44px; display: block; }

  /* Drawer pinned to viewport top, full width.
     padding-top reserves space for the header so menu items don't sit under
     the logo. translateY(-100%) on a full-height-of-its-content drawer
     guarantees it's fully off-screen when closed — no more "Contact" peeking
     through above the header. */
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding:
      calc(max(var(--safe-top, 0px), env(safe-area-inset-top, 0px), 12px) + 76px)
      var(--s-5)
      var(--s-5);
    transform: translateY(-100%);
    transition: transform var(--t-base) var(--ease);
    visibility: hidden;                  /* belt-and-braces: hide entirely when closed */
    will-change: transform;
  }
  .nav-links.is-open {
    transform: translateY(0);
    visibility: visible;
  }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }

  /* Mobile: icon-only Request button. Circular, 44px tap target.

     IMPORTANT: we draw the icon with ::AFTER (not ::before) because the
     base .btn class already owns a .btn::before { content: "" } rule
     for the hover sheen effect. Same specificity, later in the source
     → .btn::before wins and our envelope content gets clobbered. Using
     ::after avoids the conflict entirely.
     Specificity is also bumped (.btn.nav-cta::after instead of plain
     .nav-cta::after) so this rule beats any future ::after on .btn. */
  .btn.nav-cta {
    width: 44px; height: 44px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    /* defeat the global .btn font-size for crisp glyph centering */
    font-size: 0;
    line-height: 0;
  }
  .btn.nav-cta::after {
    content: "\2709";                         /* ✉ U+2709 ENVELOPE */
    display: inline-block;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
                 "Noto Color Emoji", system-ui, sans-serif;
    font-size: 22px;
    line-height: 1;
    color: var(--cream);
    font-variant-emoji: text;
  }
  .nav-cta__icon  { display: none; }
  .nav-cta__label { display: none; }
  .nav-toggle { display: inline-flex; padding: 6px; }
  .nav-toggle svg { width: 24px; height: 24px; }
}
@media (max-width: 520px) {
  .nav { gap: var(--s-2); }
  .brand { min-height: 40px; }
  .brand img { height: 40px; }
  .btn.nav-cta { width: 40px; height: 40px; }
  .btn.nav-cta::after { font-size: 20px; }
  .nav-links {
    padding-top:
      calc(max(var(--safe-top, 0px), env(safe-area-inset-top, 0px), 12px) + 72px);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn--primary {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.btn--primary:hover {
  background: var(--gold-2);
  border-color: var(--gold-2);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn--ink {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.btn--ink:hover {
  background: var(--ink-3);
  border-color: var(--ink-3);
  color: var(--cream);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--cream);
}
.btn--ghost-light {
  background: transparent;
  color: var(--cream);
  border-color: rgba(248,244,238,0.4);
}
.btn--ghost-light:hover {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}
.btn--lg { padding: 1rem 1.85rem; font-size: 1rem; }

.arrow { transition: transform var(--t-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../assets/images/hero-pattern.svg");
  background-size: cover;
  background-position: center;
  z-index: -1;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--s-8);
  align-items: center;
  padding-block: clamp(5rem, 10vw, 9rem);
}
.hero h1 { color: var(--cream); }
.hero .lead { color: rgba(248,244,238,0.78); font-size: clamp(1.1rem, 0.5vw + 1rem, 1.35rem); max-width: 52ch; }
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-6); }

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(224,74,69,0.18), rgba(224,74,69,0) 60%),
    linear-gradient(180deg, #11696B 0%, #0A4747 100%);
  border: 1px solid rgba(224,74,69,0.25);
  box-shadow: var(--shadow-lg);
  padding: var(--s-6);
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 12px;
  border: 1px solid rgba(224,74,69,0.15);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}
.room-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: var(--s-5);
}
.room-panel .key {
  aspect-ratio: 1/1;
  background: rgba(248,244,238,0.05);
  border: 1px solid rgba(224,74,69,0.16);
  border-radius: 12px;
  display: flex;
  flex-direction: column;       /* stack primary + small label vertically */
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--gold-soft);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* Static shadow — never animated. Toggling .is-on no longer triggers a box-shadow paint. */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  /* Single 280ms ease-out fade for cheap, paint-light properties.
     box-shadow / border-color / transform are NOT transitioned. */
  transition:
    background-color 280ms ease-out,
    color 280ms ease-out;
  /* No always-on will-change — was costing memory across 9 live layers. */
}
.room-panel .key::after {
  /* Compositor-cheap opacity-only glow carries the 'lit' state. */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 55%, rgba(224,74,69,0.55), transparent 65%);
  opacity: 0;
  transition: opacity 280ms ease-out;
  pointer-events: none;
  will-change: opacity;
}
.room-panel .key.is-on {
  background: rgba(224,74,69,0.20);
  color: var(--gold);
  /* border-color, box-shadow, transform deliberately omitted —
     visual depth comes from the ::after radial glow only. */
}
.room-panel .key.is-on::after { opacity: 0.55; }
.room-panel .key small {
  display: block;
  font-size: 9.5px;
  opacity: 0.75;
  font-weight: 500;
  letter-spacing: 0.10em;
  transition: opacity 280ms ease-out;
}
.room-panel .key.is-on small { opacity: 0.95; }
/* Defence-in-depth: skip transitions on phones (JS also gates by matchMedia) */
@media (max-width: 719px) {
  .room-panel .key,
  .room-panel .key::after,
  .room-panel .key small { transition: none; }
}
.hero-visual .visual-label {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
}
.hero-visual .visual-temp {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--cream);
  margin: 0;
  line-height: 1;
}
.hero-visual .visual-temp sup { font-size: 1.2rem; color: var(--gold); vertical-align: super; }
.hero-visual .visual-meta {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(248,244,238,0.55);
  margin-top: var(--s-4);
}

@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    /* Tighter top padding so the headline + CTAs land inside the first viewport. */
    padding-block: clamp(2.25rem, 7vw, 4rem) clamp(2.5rem, 8vw, 5rem);
  }
  .hero-visual {
    /* Drop the aspect-ratio cap so the 3x3 keypad isn't clipped at the bottom.
       Width is the container, height grows to fit content. */
    aspect-ratio: auto;
    max-width: 460px;
    padding: var(--s-5);
  }
  .hero-visual .visual-temp { font-size: 2.4rem; }
  .room-panel { gap: 8px; margin-top: var(--s-4); }
  .room-panel .key { font-size: 10px; }
  .room-panel .key small { font-size: 9px; }
  .hero-actions .btn--lg { padding: 0.85rem 1.4rem; font-size: 0.95rem; }
}

/* ---------- Page header (sub pages) ---------- */
.page-hero {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(5rem, 9vw, 8rem) clamp(3.5rem, 6vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute; right: -8%; top: -20%;
  width: 520px; height: 520px;
  background: radial-gradient(closest-side, rgba(224,74,69,0.18), transparent 70%);
  pointer-events: none;
}
.page-hero h1 { color: var(--cream); max-width: 22ch; }
.page-hero .lead { color: rgba(248,244,238,0.75); max-width: 56ch; }
.crumbs {
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: var(--s-5);
}
.crumbs a { color: var(--gold-soft); }
.crumbs span { opacity: 0.5; margin-inline: var(--s-2); }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-6);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  height: 100%;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.card .icon {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cream);
  border-radius: 12px;
  color: var(--gold-2);
}
.card .icon svg { width: 28px; height: 28px; }
.card h3 { margin: 0; }
.card p { color: var(--mute); margin: 0; }
.card-link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-weight: 600; font-size: 0.9rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.card-link::after {
  content: "→";
  transition: transform var(--t-fast) var(--ease);
}
.card:hover .card-link::after { transform: translateX(4px); }

.card--dark {
  background: var(--ink-2);
  border-color: rgba(224,74,69,0.15);
  color: var(--cream);
}
.card--dark h3 { color: var(--cream); }
.card--dark p { color: rgba(248,244,238,0.72); }
.card--dark .icon { background: rgba(224,74,69,0.10); color: var(--gold); }
.card--dark:hover { border-color: rgba(224,74,69,0.35); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

.stat {
  padding: var(--s-6) var(--s-5);
  border-left: 1px solid rgba(224,74,69,0.25);
}
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-num sup { font-size: 0.55em; color: var(--gold-soft); vertical-align: super; margin-left: 2px; }
.stat-label {
  margin-top: var(--s-3);
  font-size: var(--fs-small);
  color: rgba(248,244,238,0.7);
  letter-spacing: 0.06em;
}

/* ---------- Feature row / split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  align-items: center;
}
.split--reverse > :first-child { order: 2; }
@media (max-width: 880px) {
  .split, .split--reverse { grid-template-columns: 1fr; gap: var(--s-6); }
  .split--reverse > :first-child { order: 0; }
}

.feature-list {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
}
.feature-list li {
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list svg { flex: 0 0 auto; color: var(--gold-2); width: 20px; height: 20px; margin-top: 2px; }
.section--dark .feature-list li { border-color: var(--line-dark); }

.visual-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: var(--s-6);
  box-shadow: var(--shadow);
  position: relative;
}
.visual-card--dark {
  background: var(--ink-2);
  border-color: rgba(224,74,69,0.18);
  color: var(--cream);
}

/* ---------- Partner / Logo strip ---------- */
.partner-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-7);
  padding-block: var(--s-6);
  opacity: 0.85;
}
.partner-strip span {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--mute);
}
@media (max-width: 720px) {
  /* On phones, 3rem gaps across 5 items + 4 separators built a tall, awkward
     stack that pushed the next section's eyebrow down. Tighten gap + size. */
  .partner-strip { gap: var(--s-3); padding-block: var(--s-4); row-gap: var(--s-2); }
  .partner-strip span { font-size: 0.95rem; }
}

/* ---------- Process / steps ---------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--s-5);
}
.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-5);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold-2);
  line-height: 1;
}
.step h3 { margin: 0 0 var(--s-2); }
.step p { color: var(--mute); margin: 0; }

/* ---------- Quote ---------- */
.quote {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  line-height: 1.3;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  max-width: 36ch;
}
.section--dark .quote { color: var(--cream); }
.quote::before { content: "“"; color: var(--gold); margin-right: 2px; }
.quote::after  { content: "”"; color: var(--gold); margin-left: 2px; }
.quote-cite {
  display: block;
  margin-top: var(--s-5);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.section--dark .quote-cite { color: var(--gold-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    linear-gradient(120deg, var(--ink) 0%, var(--ink-2) 70%, var(--ink-3) 100%);
  color: var(--cream);
  border-radius: var(--radius);
  padding: clamp(2.5rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: var(--s-6);
  align-items: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -80px; bottom: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(closest-side, rgba(224,74,69,0.22), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { color: var(--cream); margin: 0; }
.cta-band p { color: rgba(248,244,238,0.78); margin: var(--s-3) 0 0; }
@media (max-width: 760px) {
  .cta-band { grid-template-columns: 1fr; }
}

/* ---------- Form ---------- */
.form {
  display: grid;
  gap: var(--s-4);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.field input, .field textarea, .field select {
  font: inherit;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(224,74,69,0.15);
}
.form-msg {
  display: none;
  padding: var(--s-4);
  background: rgba(224,74,69,0.12);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: var(--fs-small);
}
.form-msg.is-visible { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--mute-2);
  padding-block: var(--s-8) var(--s-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--s-7);
  padding-bottom: var(--s-7);
  border-bottom: 1px solid var(--line-dark);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand img { height: 36px; margin-bottom: var(--s-4); }
.footer-brand p { color: rgba(248,244,238,0.6); max-width: 36ch; font-size: var(--fs-small); }
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 var(--s-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.footer-col a { color: rgba(248,244,238,0.72); font-size: 0.92rem; }
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-5);
  font-size: var(--fs-small);
  color: rgba(248,244,238,0.45);
  gap: var(--s-4);
  flex-wrap: wrap;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* ---------- Utilities ---------- */
.tac { text-align: center; }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }
.max-prose { max-width: 65ch; }
.divider { height: 1px; background: var(--line); margin-block: var(--s-7); }
.section--dark .divider { background: var(--line-dark); }
.muted { color: var(--mute); }
.section--dark .muted { color: rgba(248,244,238,0.65); }
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(224,74,69,0.12);
  color: var(--gold-2);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--cream);
  padding: var(--s-3) var(--s-4); border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ===========================================================
   High-end micro-interactions pass (v0.2.1)
   Adds softened transitions, magnetic CTAs, hover lifts,
   refined link underlines, page-load intro, scroll-reveal stagger.
   =========================================================== */

/* Page-load intro: gentle fade-up of <main> on first paint */
@keyframes pq-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
main { animation: pq-enter 700ms cubic-bezier(.22,.61,.36,1) both; }

/* Nav links — animated underline using a scaleX pseudo */
.nav-links a {
  position: relative;
  transition: color 320ms cubic-bezier(.22,.61,.36,1);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 380ms cubic-bezier(.22,.61,.36,1);
  border-radius: 2px;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* Buttons — softer ease, longer travel, light specular sweep on hover */
.btn {
  position: relative;
  overflow: hidden;
  transition:
    background 420ms cubic-bezier(.22,.61,.36,1),
    border-color 420ms cubic-bezier(.22,.61,.36,1),
    color 420ms cubic-bezier(.22,.61,.36,1),
    box-shadow 420ms cubic-bezier(.22,.61,.36,1),
    transform 320ms cubic-bezier(.22,.61,.36,1);
}
.btn::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -120%;
  width: 60%;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(255,255,255,0.18) 50%,
    transparent 100%);
  transform: skewX(-18deg);
  transition: left 700ms cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.btn:hover::before { left: 130%; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: 80ms; }
.btn--primary:hover { box-shadow: 0 14px 32px -14px rgba(224,74,69,0.55); }
.btn--ink:hover     { box-shadow: 0 14px 32px -14px rgba(10,71,71,0.55); }
.arrow { transition: transform 320ms cubic-bezier(.22,.61,.36,1); }
.btn:hover .arrow { transform: translateX(5px); }

/* Cards — gentle lift + soft accent border on hover */
.card {
  transition:
    transform 420ms cubic-bezier(.22,.61,.36,1),
    box-shadow 420ms cubic-bezier(.22,.61,.36,1),
    border-color 420ms cubic-bezier(.22,.61,.36,1),
    background 420ms cubic-bezier(.22,.61,.36,1);
  will-change: transform, box-shadow;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(224,74,69,0.32);
}
.card .icon {
  transition: transform 420ms cubic-bezier(.22,.61,.36,1), background 420ms cubic-bezier(.22,.61,.36,1);
}
.card:hover .icon { transform: scale(1.08) rotate(-2deg); }
.card-link::after { transition: transform 320ms cubic-bezier(.22,.61,.36,1); }
.card:hover .card-link::after { transform: translateX(6px); }

/* Stats — number 'set' bloom when counter finishes */
.stat-num {
  transition: color 520ms cubic-bezier(.22,.61,.36,1), text-shadow 520ms cubic-bezier(.22,.61,.36,1);
}
.stat-num.is-set {
  text-shadow: 0 0 24px rgba(224,74,69,0.25);
}

/* Section reveal — softer travel, more deliberate easing */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 900ms cubic-bezier(.22,.61,.36,1),
    transform 900ms cubic-bezier(.22,.61,.36,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Stagger children of a .reveal-group automatically */
.reveal-group > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 800ms cubic-bezier(.22,.61,.36,1),
    transform 800ms cubic-bezier(.22,.61,.36,1);
}
.reveal-group.is-in > *           { opacity: 1; transform: none; }
.reveal-group.is-in > *:nth-child(1) { transition-delay:  60ms; }
.reveal-group.is-in > *:nth-child(2) { transition-delay: 140ms; }
.reveal-group.is-in > *:nth-child(3) { transition-delay: 220ms; }
.reveal-group.is-in > *:nth-child(4) { transition-delay: 300ms; }
.reveal-group.is-in > *:nth-child(5) { transition-delay: 380ms; }
.reveal-group.is-in > *:nth-child(6) { transition-delay: 460ms; }

/* Header — refined elevation on scroll */
.site-header {
  transition:
    background 420ms cubic-bezier(.22,.61,.36,1),
    border-color 420ms cubic-bezier(.22,.61,.36,1),
    box-shadow 420ms cubic-bezier(.22,.61,.36,1),
    backdrop-filter 420ms cubic-bezier(.22,.61,.36,1);
}
.site-header.is-scrolled {
  box-shadow: 0 8px 24px -16px rgba(10,71,71,0.18);
}

/* Brand wordmark — subtle interaction on hover */
.brand img { transition: transform 520ms cubic-bezier(.22,.61,.36,1); }
.brand:hover img { transform: rotate(-2deg) scale(1.04); }

/* Hero visual — soft float that doesn't compete with the keypad */
@keyframes pq-hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.hero-visual { animation: pq-hero-float 9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .hero-visual { animation: none; }
  main         { animation: none; }
}

/* Inline text links inside body copy — animated underline */
.prose a, .lead a, p > a:not(.btn):not(.card-link) {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 380ms cubic-bezier(.22,.61,.36,1), color 320ms cubic-bezier(.22,.61,.36,1);
}
.prose a:hover, .lead a:hover, p > a:not(.btn):not(.card-link):hover {
  background-size: 100% 1px;
}

/* Form fields — smoother focus */
input, textarea, select {
  transition:
    border-color 320ms cubic-bezier(.22,.61,.36,1),
    box-shadow 320ms cubic-bezier(.22,.61,.36,1),
    background 320ms cubic-bezier(.22,.61,.36,1);
}
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 4px rgba(224,74,69,0.15);
}

/* ============================================================
   Language switcher — country-flag picker in the header
   ============================================================
   Markup is mounted by js/i18n.js into [data-lang-switcher].
   Structure:
     <div class="lang-switcher" data-lang-switcher>
       <button class="lang-trigger">flag + code + chev</button>
       <ul class="lang-menu" role="listbox">
         <li class="lang-opt">flag + native name</li> ...
       </ul>
     </div>
*/
.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-trigger {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: border-color 200ms, background 200ms, color 200ms;
}
.lang-trigger:hover,
.lang-switcher.is-open .lang-trigger {
  border-color: var(--ink);
  background: var(--cream);
}
.lang-trigger .lang-flag {
  font-size: 1.05rem;
  line-height: 1;
  /* iOS/macOS render colour-emoji here; Win/Linux fall back gracefully. */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
               "Twemoji Mozilla", system-ui, sans-serif;
}
.lang-trigger .lang-code { color: inherit; }
.lang-trigger .lang-chev {
  width: 10px; height: 10px;
  color: currentColor;
  opacity: 0.55;
  transition: transform 200ms;
}
.lang-switcher.is-open .lang-trigger .lang-chev { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 48px -16px rgba(10, 71, 71, 0.22),
              0 4px 12px -2px rgba(10, 71, 71, 0.08);
  z-index: 80;
}
.lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.2;
  transition: background 140ms;
}
.lang-opt:hover,
.lang-opt:focus { background: var(--cream); outline: none; }
.lang-opt.is-current { background: rgba(10, 71, 71, 0.06); font-weight: 600; }
.lang-opt .lang-flag {
  font-size: 1.1rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
               "Twemoji Mozilla", system-ui, sans-serif;
}
.lang-opt .lang-name { color: inherit; }

/* Dark-on-dark variant (if the switcher is dropped on a dark section). */
.site-header.is-scrolled .lang-trigger { border-color: rgba(10, 71, 71, 0.18); }

/* Mobile: tighten the trigger to a 44px circular flag-only button so it
   sits comfortably alongside the envelope CTA + hamburger. */
@media (max-width: 880px) {
  .lang-trigger {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 50%;
  }
  .lang-trigger .lang-code,
  .lang-trigger .lang-chev { display: none; }
  .lang-trigger .lang-flag { font-size: 1.3rem; }
  .lang-menu {
    right: 0;
    /* sit just below the header; respects safe-area top padding */
    min-width: 220px;
  }
}
@media (max-width: 520px) {
  .lang-trigger { width: 40px; height: 40px; }
  .lang-trigger .lang-flag { font-size: 1.2rem; }
}

