/* ==========================================================
   Ascendra Altiora LTD: shared styles
   Sections: fonts, tokens, base, type, buttons, header, hero,
   sections, services, approach, about, contact, footer, pages,
   desktop screens, app mode (phones), motion.
   Breakpoints: 640 (large phone), 768 (tablet), 1024 (desktop).
   Modes: html.js (scripted), html.app (phones with JS: views
   and a tab bar instead of one long page).
   ========================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "AA Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/inter-400.woff) format("woff"); }
@font-face { font-family: "AA Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/inter-600.woff) format("woff"); }
@font-face { font-family: "AA Inter Display"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/inter-display-600.woff) format("woff"); }
@font-face { font-family: "AA Newsreader"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/newsreader-500.woff2) format("woff2"); }
@font-face { font-family: "AA Newsreader"; font-weight: 500; font-style: italic; font-display: swap; src: url(../fonts/newsreader-500-italic.woff2) format("woff2"); }

/* ---------- Design tokens ---------- */
:root {
  /* Brand colours (unchanged from the logo) */
  --navy-950: #070F1D;
  --navy-900: #0A1628;
  --navy-800: #0F2038;
  --navy-700: #1A2F4F;
  --gold: #B89B5E;
  --gold-bright: #D2B87E;
  --gold-deep: #7A6027;

  /* Surfaces and text */
  --ivory: #F6F4EF;
  --ivory-deep: #ECE8E0;
  --surface: #FFFFFF;
  --ink: #0F2038;
  --ink-muted: #4A5468;
  --on-dark: #F4F5F3;
  --on-dark-muted: #A9B4C6;
  --line-light: rgba(15, 32, 56, 0.14);
  --line-dark: rgba(244, 245, 243, 0.14);

  /* Type */
  --serif: "AA Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --display: "AA Inter Display", "Inter Display", "Inter", "SF Pro Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --sans: "AA Inter", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-hero: clamp(2.7rem, 1.5rem + 5.6vw, 6.4rem);
  --fs-h2: clamp(2.1rem, 1.35rem + 3.1vw, 3.9rem);
  --fs-lede: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
  --fs-small: 0.9rem;

  /* Space and layout */
  --gutter: clamp(1.25rem, 0.6rem + 3.2vw, 3.5rem);
  --max: 80rem;
  --section: clamp(4.5rem, 2.5rem + 7vw, 9.5rem);
  --header-h: 4.25rem;
  --radius: 1rem;
  --radius-lg: 1.75rem;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --rise: 2.75rem;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 1024px) { :root { --header-h: 5rem; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
/* With JS, anchor scrolling is eased in site.js; this is the fallback */
@media (prefers-reduced-motion: no-preference) { html:not(.js) { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }
.on-light :focus-visible, .on-tint :focus-visible { outline-color: var(--gold-deep); }
.on-light .on-dark :focus-visible { outline-color: var(--gold-bright); }
[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  padding: 0.75rem 1.1rem;
  background: var(--gold); color: var(--navy-900);
  font-weight: 600; border-radius: 999px; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Type ---------- */
.eyebrow {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-family: var(--sans); font-weight: 600;
  font-size: 0.78rem; line-height: 1.2; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-deep);
}
.eyebrow::before { content: ""; flex: none; width: 1.75rem; height: 1px; margin-top: 0.55em; background: currentColor; opacity: 0.7; }
.on-dark .eyebrow, .hero .eyebrow { color: var(--gold-bright); }

.h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: var(--fs-h2); line-height: 1.04; letter-spacing: -0.02em;
  text-wrap: balance;
}
.eyebrow + .h2 { margin-top: 1.25rem; }
.h2 em, .hero-title em { font-style: italic; }
.lede { max-width: 40rem; font-size: var(--fs-lede); line-height: 1.6; color: var(--ink-muted); }
.on-dark .lede { color: var(--on-dark-muted); }
* + .lede { margin-top: 1.4rem; }
.lede + .lede { margin-top: 1rem; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px;
  font-weight: 600; font-size: 0.98rem;
  text-decoration: none;
  color: var(--ink);
}
.text-link span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; text-decoration-color: var(--gold); }
.text-link svg { width: 1.1rem; height: 1.1rem; flex: none; transition: transform 0.3s var(--ease-out); }
.text-link:hover span { text-decoration-color: currentColor; }
.text-link:hover svg { transform: translateX(4px); }
.on-dark .text-link { color: var(--on-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.9rem 1.6rem;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; text-align: center;
  border: 1px solid transparent; border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.3s ease, translate 0.5s var(--ease-out);
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 1.1rem; height: 1.1rem; flex: none; transition: transform 0.3s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn .btn-icon { width: 1.15rem; height: 1.15rem; }
.btn:hover .btn-icon { transform: none; }
.btn--primary { background: var(--gold); color: var(--navy-900); }
.btn--primary:hover { background: var(--gold-bright); box-shadow: 0 12px 30px -12px rgba(184, 155, 94, 0.7); }
.btn--ghost { background: transparent; color: var(--on-dark); border-color: rgba(244, 245, 243, 0.32); }
.btn--ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); }
.btn--dark { background: var(--navy-900); color: var(--on-dark); }
.btn--dark:hover { background: var(--navy-700); box-shadow: 0 12px 30px -14px rgba(10, 22, 40, 0.7); }
.magnetic { translate: var(--mx, 0) var(--my, 0); }

/* ---------- Wordmark (logo lockup, unchanged) ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 0.7rem; min-height: 44px; color: inherit; text-decoration: none; }
.wordmark-mark { width: 2.15rem; height: 1.5rem; flex: none; color: var(--on-dark); }
.wordmark-text {
  font-family: var(--display); font-weight: 600;
  font-size: 1.1rem; letter-spacing: -0.015em; line-height: 1; white-space: nowrap;
}
.wordmark-ltd {
  margin-left: 0.4rem;
  font-family: var(--sans); font-weight: 400;
  font-size: 0.68rem; letter-spacing: 0.08em;
  color: var(--on-dark-muted);
}
@media (max-width: 380px) {
  .wordmark { gap: 0.5rem; }
  .wordmark-mark { width: 1.9rem; height: 1.33rem; }
  .wordmark-text { font-size: 0.98rem; }
  .wordmark-ltd { margin-left: 0.3rem; font-size: 0.6rem; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  color: var(--on-dark);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.site-header.is-solid {
  background: rgba(10, 22, 40, 0.96);
  box-shadow: 0 1px 0 var(--line-dark);
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .site-header.is-solid {
    background: rgba(10, 22, 40, 0.9);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
  }
}
.header-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0 1rem; min-height: var(--header-h);
}
.appbar-title { display: none; }

/* Reading progress, shown once the header is solid */
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); transform-origin: left; transform: scaleX(var(--p, 0)); }
.is-solid .progress { opacity: 1; }

/* Without JS on a phone the nav is a simple wrapped row under the logo */
.site-nav { position: relative; width: 100%; }
.nav-list { display: flex; flex-wrap: wrap; gap: 0 1.5rem; padding-bottom: 0.5rem; }
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.95rem; color: var(--on-dark-muted); text-decoration: none;
  transition: color 0.25s ease;
}
.nav-link:hover, .nav-link[aria-current="true"] { color: var(--on-dark); }
.nav-indicator { display: none; }

/* Language switch: sits beside the logo on phones, after the nav on larger screens */
.site-nav { order: 2; }
.lang-switch {
  order: 1; display: flex; gap: 0.15rem; padding: 0.2rem;
  border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-dark);
}
.lang-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; min-height: 2rem; padding: 0 0.5rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--on-dark-muted); text-decoration: none;
  transition: color 0.25s ease, background-color 0.25s ease;
}
.lang-link:hover { color: var(--on-dark); }
.lang-link[aria-current="true"] { color: var(--on-dark); background: rgba(244, 245, 243, 0.12); }

@media (min-width: 768px) and (max-width: 1023.98px) {
  /* Tablets: the AA mark alone keeps logo, nav and language switch on one row */
  .site-header .wordmark-text { display: none; }
}
@media (min-width: 768px) {
  .site-nav { width: auto; margin-left: auto; order: 1; }
  .lang-switch { order: 2; }
  .nav-list { flex-wrap: nowrap; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); padding: 0; }
  /* One gold line that glides between links */
  .js .nav-indicator {
    display: block; position: absolute; left: 0; bottom: 0.55rem; height: 1px;
    width: var(--w, 0px); transform: translateX(var(--x, 0px)); opacity: var(--o, 0);
    background: var(--gold-bright); pointer-events: none;
    transition: transform 0.55s var(--ease-out), width 0.55s var(--ease-out), opacity 0.3s ease;
  }
  html:not(.js) .nav-link:not(.nav-link--cta)[aria-current="true"] { text-decoration: underline; }
  .nav-link--cta {
    padding: 0 1.25rem; min-height: 2.75rem;
    font-weight: 600; color: var(--navy-900); background: var(--gold); border-radius: 999px;
    transition: background-color 0.25s ease, box-shadow 0.3s ease;
  }
  .nav-link--cta:hover, .nav-link--cta[aria-current="true"] { color: var(--navy-900); background: var(--gold-bright); box-shadow: 0 10px 24px -12px rgba(184, 155, 94, 0.8); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(2.5rem, 1rem + 6vw, 6rem));
  color: var(--on-dark);
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(46, 90, 156, 0.3), transparent 70%),
    var(--navy-900);
}
.hero-grid { position: relative; display: grid; gap: 2.5rem; }
.hero-copy { position: relative; z-index: 1; max-width: 46rem; }
.hero-title {
  margin-top: 1.5rem;
  font-family: var(--serif); font-weight: 500;
  font-size: var(--fs-hero); line-height: 0.98; letter-spacing: -0.025em;
}
.hero-title em { color: var(--gold-bright); }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.hero-title .line > span { display: inline-block; }
.hero-text { max-width: 36rem; margin-top: 1.75rem; font-size: var(--fs-lede); line-height: 1.6; color: var(--on-dark-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.hero-note { display: flex; align-items: center; gap: 0.55rem; margin-top: 1.25rem; font-size: 0.92rem; color: var(--on-dark-muted); }
.hero-note svg { width: 1.1rem; height: 1.1rem; flex: none; color: var(--gold-bright); }

/* Brand visual: the AA mark echoed as an ascending sequence, set on a fine grid */
.hero-visual {
  position: absolute; z-index: 0; right: -34%; top: -6%;
  width: 84%; max-width: 34rem; aspect-ratio: 1;
  opacity: 0.22; pointer-events: none;
}
.hero-visual svg { width: 100%; height: 100%; overflow: visible; }
.hv-grid line { stroke: rgba(244, 245, 243, 0.07); stroke-width: 1; }
.hv-tick { stroke: rgba(210, 184, 126, 0.55); stroke-width: 1; }
.hv-label { fill: rgba(169, 180, 198, 0.75); font-family: var(--sans); font-size: 11px; letter-spacing: 0.12em; }
.parallax { transform: translate(var(--px, 0px), var(--py, 0px)); }
/* Gradient fills and strokes are set as SVG attributes in the markup */
.echo--1 { opacity: 0.25; }
.echo--2 { opacity: 0.45; }
.echo--3 { opacity: 0.7; }

/* Facts strip along the bottom of the hero */
.hero-facts {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr;
  margin-top: clamp(3rem, 1.5rem + 5vw, 6rem);
  border-top: 1px solid var(--line-dark);
}
.fact {
  display: grid; grid-template-columns: 2.1rem 1fr; gap: 0.15rem 1rem; align-items: baseline;
  padding: 1.15rem 0; border-bottom: 1px solid var(--line-dark);
  color: inherit; text-decoration: none;
}
.fact-num { grid-row: span 2; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; color: var(--gold-bright); font-feature-settings: "tnum"; }
.fact-title { font-weight: 600; font-size: 1rem; color: var(--on-dark); transition: color 0.25s ease; }
.fact-text { font-size: var(--fs-small); color: var(--on-dark-muted); }
.fact-chevron { display: none; }
a.fact:hover .fact-title { color: var(--gold-bright); }

@media (min-width: 640px) {
  .hero-visual { right: -10%; width: 70%; opacity: 0.4; }
}
@media (min-width: 768px) {
  .hero-facts { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line-dark); }
  .fact { grid-template-columns: 1fr; padding: 1.5rem 1.5rem 1.75rem 0; border-bottom: 0; }
  .fact + .fact { padding-left: 1.5rem; border-left: 1px solid var(--line-dark); }
  .fact-num { grid-row: auto; margin-bottom: 0.6rem; }
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 3fr 2fr; align-items: center; gap: 3rem; }
  .hero-copy { max-width: none; }
  .hero-title { font-size: clamp(4rem, 1rem + 4.6vw, 5.75rem); }
  .hero-visual {
    position: relative; inset: auto; width: 100%; max-width: 32rem; opacity: 1;
    justify-self: end;
  }
  .fact { padding: 1.5rem 2rem 1.75rem 0; }
  .fact + .fact { padding-left: 2rem; }
}
@media (max-width: 639.98px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Generic sections ---------- */
.section { position: relative; padding-block: var(--section); }
.on-light { background: var(--ivory); color: var(--ink); }
.on-tint { background: var(--ivory-deep); color: var(--ink); }
.on-dark { background: var(--navy-800); color: var(--on-dark); }
.section-head { max-width: 46rem; }
.section-head--split { display: grid; gap: 1.25rem; max-width: none; }
.section-head--split .lede { margin-top: 0; }
@media (min-width: 1024px) {
  .section-head--split { grid-template-columns: 6fr 5fr; gap: 4rem; align-items: end; }
}

/* ---------- Problems ---------- */
.problems { display: grid; gap: 2.75rem; margin-top: clamp(2.75rem, 2rem + 3vw, 5rem); }
.problem-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ink); }
.problem-col-title { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.2; }
.problem-col-tag { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); }
.problem-list { counter-reset: problem; }
.problem-list li {
  counter-increment: problem;
  display: grid; grid-template-columns: 2rem 1fr; gap: 0.75rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line-light);
}
.problem-list li::before {
  content: counter(problem, decimal-leading-zero);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; color: var(--gold-deep);
  padding-top: 0.25rem; font-feature-settings: "tnum";
}
.problem-list p { font-size: 1.05rem; line-height: 1.5; }
.problem-col .text-link { margin-top: 1rem; }
@media (min-width: 768px) {
  .problems { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 5rem); }
}

/* ---------- Services ---------- */
.services-head { display: grid; gap: 1.5rem; }
.services-head-side .lede { margin-top: 0; }
@media (min-width: 1024px) {
  .services-head { grid-template-columns: 6fr 5fr; gap: 4rem; align-items: end; }
}

/* Segmented switch between the two practices (shown with JS) */
.seg {
  position: relative; display: none;
  margin-top: 1.5rem; padding: 0.3rem;
  border-radius: 999px;
  background: rgba(15, 32, 56, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-light);
  max-width: 100%;
}
.js .seg { display: inline-grid; grid-template-columns: 1fr 1fr; }
.seg-btn {
  position: relative; z-index: 1;
  min-height: 2.75rem; padding: 0 1.3rem;
  border: 0; border-radius: 999px; background: none;
  font-weight: 600; font-size: 0.95rem; white-space: nowrap;
  color: var(--ink-muted); cursor: pointer;
  transition: color 0.35s ease;
  touch-action: manipulation;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-selected="true"] { color: var(--on-dark); }
.seg-indicator {
  position: absolute; top: 0.3rem; bottom: 0.3rem; left: 0;
  width: var(--w, 50%); transform: translateX(var(--x, 0.3rem));
  border-radius: 999px; background: var(--navy-900);
  box-shadow: 0 8px 18px -10px rgba(10, 22, 40, 0.7);
  transition: transform 0.5s var(--ease-out), width 0.5s var(--ease-out);
}

.service-panels { margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.service { padding-top: 2rem; border-top: 1px solid var(--line-light); }
.service + .service { margin-top: 3rem; }
.js .service + .service { margin-top: 0; }
.service-grid { display: grid; gap: 2rem; }
.service-heading { display: flex; align-items: baseline; gap: 1rem; }
.service-index {
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: clamp(2.4rem, 2rem + 1.5vw, 3.25rem); line-height: 0.9;
  color: var(--gold-deep); font-feature-settings: "lnum";
}
.service-title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem); line-height: 1.05; letter-spacing: -0.015em; }
.service-for { margin-top: 1rem; font-weight: 600; font-size: 1rem; }
.service-intro .lede { margin-top: 0.6rem; font-size: 1.08rem; }

.panel {
  position: relative; overflow: hidden;
  aspect-ratio: 2 / 1; margin-top: 1.5rem;
  border-radius: var(--radius);
  background:
    radial-gradient(70% 70% at 80% 10%, rgba(46, 90, 156, 0.4), transparent 70%),
    linear-gradient(160deg, var(--navy-800), var(--navy-950));
}
.panel svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.capabilities { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
.capability { padding: 1.3rem 0 1.4rem; border-bottom: 1px solid var(--line-light); }
.capability-head { display: flex; gap: 0.9rem; align-items: baseline; }
.capability-num { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; color: var(--gold-deep); font-feature-settings: "tnum"; }
.capability-title { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.2; transition: transform 0.4s var(--ease-out); }
.capability-chevron { display: none; }
.capability-text { margin-top: 0.45rem; padding-left: 2.15rem; font-size: 0.97rem; line-height: 1.55; color: var(--ink-muted); }
.service-cta { margin-top: 1.5rem; }

/* What the client receives from each practice */
.tags-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.25rem; }
.tags-label { margin-right: 0.35rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); }
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  padding: 0.3rem 0.8rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; line-height: 1.4;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-light);
}

@media (min-width: 640px) {
  .capabilities { grid-template-columns: 1fr 1fr; column-gap: 2.25rem; }
  .capability-text { padding-left: 0; }
  .capability-head { flex-direction: column; gap: 0.5rem; }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .service-intro { display: grid; grid-template-columns: 1fr 0.85fr; gap: 0 2.5rem; align-items: start; }
  .service-intro .panel { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; aspect-ratio: 4 / 3; }
}
@media (min-width: 1024px) {
  .service-grid { grid-template-columns: 5fr 7fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
  .capabilities { margin-top: 0.25rem; }
}
@media (hover: hover) {
  .capability:hover .capability-title { transform: translateX(4px); }
}

/* ---------- Approach ---------- */
.approach {
  background:
    radial-gradient(50% 60% at 90% 0%, rgba(46, 90, 156, 0.28), transparent 70%),
    var(--navy-800);
}
.steps-wrap { margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.steps { display: grid; gap: 1rem; }
.step {
  position: relative;
  padding: 1.75rem 1.5rem 2rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(244, 245, 243, 0.07), rgba(244, 245, 243, 0.025));
  box-shadow: inset 0 0 0 1px var(--line-dark);
}
.step::before {
  content: ""; position: absolute; left: 1.5rem; right: 1.5rem; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform-origin: left;
}
.step-num {
  display: block;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 2.6rem; line-height: 1; color: var(--gold-bright);
}
.step-title { margin-top: 1.5rem; font-family: var(--serif); font-weight: 500; font-size: 1.6rem; line-height: 1.15; }
.step-text { margin-top: 0.6rem; font-size: 0.98rem; color: var(--on-dark-muted); }
.pager { display: none; }

/* Phones: a swipeable sequence with the next stage peeking in */
@media (max-width: 767.98px) {
  .steps-wrap { margin-inline: calc(var(--gutter) * -1); }
  .steps {
    grid-auto-flow: column; grid-auto-columns: 82%;
    gap: 0.75rem;
    padding: 0.25rem var(--gutter) 0.5rem;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { scroll-snap-align: start; }
  .js .pager { display: flex; justify-content: center; gap: 0.45rem; margin-top: 1.25rem; }
  .pager span { width: 0.45rem; height: 0.45rem; border-radius: 999px; background: rgba(244, 245, 243, 0.25); transition: width 0.4s var(--ease-out), background-color 0.3s ease; }
  .pager span.is-active { width: 1.5rem; background: var(--gold-bright); }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
}
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; align-items: start; }
  .step:nth-child(1) { margin-top: calc(var(--rise) * 3); }
  .step:nth-child(2) { margin-top: calc(var(--rise) * 2); }
  .step:nth-child(3) { margin-top: var(--rise); }
  .step { padding: 2rem 1.75rem 2.25rem; }
}
@media (hover: hover) and (min-width: 1024px) {
  .js [data-stagger].is-settled > .step { transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease, opacity 0.5s ease; }
  .step:hover { transform: translateY(-8px) !important; box-shadow: inset 0 0 0 1px rgba(210, 184, 126, 0.4), 0 30px 50px -30px rgba(0, 0, 0, 0.7); }
}

/* ---------- Deliverables ---------- */
.deliver-grid { display: grid; gap: 2.5rem; margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); counter-reset: deliver; }
.deliver-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ink); }
.deliver-col-title { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.2; }
.deliver-col-tag { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); }
.deliver-item {
  counter-increment: deliver;
  display: grid; grid-template-columns: 2rem 1fr; gap: 0.2rem 0.75rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line-light);
}
.deliver-item::before {
  content: counter(deliver, decimal-leading-zero); grid-row: span 2;
  padding-top: 0.35rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; color: var(--gold-deep); font-feature-settings: "tnum";
}
.deliver-title { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; line-height: 1.25; }
.deliver-text { font-size: 0.97rem; line-height: 1.5; color: var(--ink-muted); }
.deliver-note { display: flex; gap: 0.6rem; margin-top: 1.75rem; max-width: 46rem; font-size: 0.97rem; color: var(--ink-muted); }
.deliver-note svg { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex: none; color: var(--gold-deep); }
@media (min-width: 768px) {
  .deliver-grid { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 5rem); }
}
@media (min-width: 1024px) {
  .deliver-item { padding: 0.8rem 0; }
  .service-intro .panel { aspect-ratio: 5 / 2; }
  .capability { padding: 1.05rem 0 1.15rem; }
  .tags-wrap { margin-top: 1rem; }
  .service-cta { margin-top: 1.15rem; }
}

/* ---------- Engagements and pricing ---------- */
.pricing-grid { display: grid; gap: 2.5rem; margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.engagements { border-top: 1px solid var(--ink); }
.engagement {
  display: grid; grid-template-columns: 3rem 1fr; gap: 0.25rem 1rem;
  padding: 1.35rem 0; border-bottom: 1px solid var(--line-light);
}
.engagement-num { grid-row: span 2; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.9rem; line-height: 1; color: var(--gold-deep); }
.engagement-title { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; line-height: 1.2; }
.engagement-text { font-size: 0.98rem; line-height: 1.55; color: var(--ink-muted); }

.quote-card {
  position: relative; overflow: hidden;
  padding: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  border-radius: var(--radius-lg);
  color: var(--on-dark);
  background:
    radial-gradient(70% 70% at 100% 0%, rgba(46, 90, 156, 0.4), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(184, 155, 94, 0.14), transparent 70%),
    var(--navy-900);
}
.quote-card :focus-visible { outline-color: var(--gold-bright); }
.quote-title { font-family: var(--serif); font-weight: 500; font-size: 1.75rem; line-height: 1.15; }
.quote-intro { margin-top: 0.75rem; color: var(--on-dark-muted); }
.quote-factors { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.quote-factors li {
  padding: 0.35rem 0.85rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600;
  background: rgba(244, 245, 243, 0.06); box-shadow: inset 0 0 0 1px var(--line-dark);
}
.quote-free { display: flex; align-items: center; gap: 0.6rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-dark); }
.quote-free svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--gold-bright); }
.quote-card .btn { margin-top: 1.5rem; }
@media (min-width: 1024px) {
  .pricing-grid { grid-template-columns: 7fr 5fr; gap: clamp(2.5rem, 5vw, 5.5rem); align-items: center; }
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: 3rem; }
.principles { display: grid; gap: 0; margin-top: 2.5rem; border-top: 1px solid var(--line-light); }
.principle { padding: 1.25rem 0; border-bottom: 1px solid var(--line-light); }
.principle-title { font-weight: 600; font-size: 1.02rem; }
.principle-text { margin-top: 0.3rem; font-size: 0.98rem; color: var(--ink-muted); }

.audience-card {
  position: relative; overflow: hidden;
  padding: clamp(1.75rem, 1.2rem + 2vw, 3rem);
  border-radius: var(--radius-lg);
  color: var(--on-dark);
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(46, 90, 156, 0.35), transparent 70%),
    var(--navy-900);
}
.audience-card .eyebrow { color: var(--gold-bright); }
.audience-deco {
  position: absolute; right: -2.5rem; bottom: -2rem; width: 15rem; height: 10.5rem;
  color: var(--on-dark); opacity: 0.06; pointer-events: none;
}
.audience { position: relative; margin-top: 1.5rem; }
.audience-item { padding: 1.3rem 0; border-top: 1px solid var(--line-dark); }
.audience-term { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; line-height: 1.15; transition: color 0.3s ease; }
.audience-desc { margin-top: 0.4rem; font-size: 0.98rem; color: var(--on-dark-muted); }
@media (hover: hover) { .audience-item:hover .audience-term { color: var(--gold-bright); } }

@media (min-width: 768px) and (max-width: 1023.98px) {
  .principles { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; border-top: 0; }
  .principle { border-bottom: 0; border-top: 1px solid var(--ink); }
}
@media (min-width: 1024px) {
  .about-grid { grid-template-columns: 1.1fr 0.9fr; gap: clamp(3rem, 6vw, 7rem); align-items: center; }
}

/* ---------- Contact ---------- */
.contact-panel {
  position: relative; overflow: hidden;
  padding: clamp(1.75rem, 1rem + 4vw, 5rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(46, 90, 156, 0.35), transparent 70%),
    radial-gradient(40% 60% at 0% 100%, rgba(184, 155, 94, 0.12), transparent 70%),
    var(--navy-800);
  box-shadow: inset 0 0 0 1px rgba(244, 245, 243, 0.09);
}
.contact-deco {
  position: absolute; right: -3rem; bottom: -4rem; width: 28rem; height: 20rem;
  opacity: 0.06; color: var(--on-dark); pointer-events: none;
}
.contact-grid { position: relative; display: grid; gap: 2.75rem; }
.checklist { margin-top: 2rem; }
.checklist-title { font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-bright); }
.checklist ul { margin-top: 0.85rem; }
.checklist li { display: flex; gap: 0.75rem; padding: 0.55rem 0; color: var(--on-dark); }
.checklist li svg { width: 1.15rem; height: 1.15rem; margin-top: 0.3rem; flex: none; color: var(--gold-bright); }

.contact-card {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius);
  background: rgba(7, 15, 29, 0.45);
  box-shadow: inset 0 0 0 1px var(--line-dark);
}
.contact-email-label { font-size: var(--fs-small); color: var(--on-dark-muted); }
.contact-email {
  display: inline-block; margin-top: 0.4rem;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.35rem, 1rem + 1.8vw, 2.25rem); line-height: 1.2;
  color: var(--gold-bright);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em;
  overflow-wrap: break-word;
}
.contact-email:hover { color: var(--on-dark); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.copy-status { min-height: 1.5rem; margin-top: 0.75rem; font-size: var(--fs-small); color: var(--on-dark-muted); }
.topics { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line-dark); }
.topics-intro { font-size: var(--fs-small); color: var(--on-dark-muted); }
.topics-list { display: grid; gap: 0; margin-top: 0.4rem; }
.topics-list .text-link { color: var(--on-dark); }
.topics-list .text-link:hover { color: var(--gold-bright); }

@media (max-width: 639.98px) {
  .contact-panel { padding: 2rem 1.25rem; }
  .contact-card { padding: 1.5rem 0 0; background: none; box-shadow: none; border-top: 1px solid var(--line-dark); border-radius: 0; }
  .contact-email { font-size: clamp(1.1rem, 0.6rem + 3.4vw, 1.35rem); }
  .contact-actions .btn { flex: 1 1 100%; }
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 5fr 6fr; gap: clamp(3rem, 6vw, 6rem); align-items: center; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(3.5rem, 2.5rem + 3vw, 5.5rem) calc(2rem + var(--safe-b));
  color: var(--on-dark-muted); background: var(--navy-950);
  font-size: 0.95rem;
}
.footer-top { display: grid; gap: 2.5rem; padding-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); border-bottom: 1px solid var(--line-dark); }
.footer-claim { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.2rem); line-height: 1.05; letter-spacing: -0.015em; color: var(--on-dark); }
.footer-claim em { color: var(--gold-bright); }
.footer-grid { display: grid; gap: 2.25rem; padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.footer-brand .wordmark { color: var(--on-dark); }
.footer-brand p { max-width: 22rem; margin-top: 1rem; }
.footer-heading { margin-bottom: 0.75rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark); }
.footer-nav a, .footer-brand a:not(.wordmark), .legal-links a {
  display: inline-flex; align-items: center; min-height: 36px;
  text-underline-offset: 0.2em;
}
.footer-nav a:hover, .footer-brand a:not(.wordmark):hover, .legal-links a:hover { color: var(--gold-bright); }
.legal-list > div + div { margin-top: 0.4rem; }
.legal-list dt { display: inline; color: var(--on-dark); }
.legal-list dt::after { content: ": "; }
.legal-list dd { display: inline; }
.legal-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 0.75rem; }
.footer-base { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark); font-size: 0.875rem; }
@media (min-width: 768px) {
  .footer-top { grid-template-columns: 1fr auto; align-items: end; }
  .footer-grid { grid-template-columns: 1.2fr 0.8fr 1.4fr; gap: 3rem; }
}

/* ---------- Policy and 404 pages ---------- */
.page-main { padding-block: calc(var(--header-h) + clamp(3rem, 2rem + 4vw, 6rem)) var(--section); background: var(--ivory); color: var(--ink); }
.policy { width: min(100% - 2 * var(--gutter), 46rem); margin-inline: auto; }
.policy-back {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  font-size: 0.95rem; color: var(--ink-muted); text-decoration: none;
}
.policy-back svg { width: 1rem; height: 1rem; transform: rotate(180deg); }
.policy-back:hover { color: var(--gold-deep); }
.policy h1 {
  margin-top: 1.25rem;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.02em;
}
.policy-meta { margin-top: 1rem; color: var(--ink-muted); }
.policy-intro { margin-top: 1.75rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line-light); font-size: var(--fs-lede); color: var(--ink-muted); }
.policy h2 {
  margin-top: 2.75rem;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.85rem); line-height: 1.2; letter-spacing: -0.01em;
}
.policy p { margin-top: 1rem; }
.policy ul.policy-list { margin-top: 1rem; padding-left: 1.25rem; list-style: disc; }
.policy ul.policy-list li { margin-top: 0.5rem; padding-left: 0.25rem; }
.policy ul.policy-list li::marker { color: var(--gold-deep); }
.policy a:not(.policy-back):not(.btn) { color: var(--ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.policy a:not(.policy-back):not(.btn):hover { color: var(--gold-deep); }
.policy-card {
  margin-top: 1.5rem; padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-light);
}
.policy-card p { margin: 0; }
.policy-card p + p { margin-top: 0.35rem; }
.notfound-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

/* ==========================================================
   Desktop: every main section is one full screen, so the
   navigation lands on a complete, framed view.
   ========================================================== */
@media (min-width: 1024px) {
  html { scroll-padding-top: 0; }
  .screen {
    display: flex; flex-direction: column; justify-content: center;
    min-height: 100vh; min-height: 100svh;
    padding-top: calc(var(--header-h) + clamp(1.5rem, 4vh, 3.5rem));
    padding-bottom: clamp(1.5rem, 5vh, 4rem);
  }
  .screen > .container { flex: none; }
  .hero.screen { justify-content: flex-end; padding-bottom: 0; }
  .hero.screen .hero-grid { flex: 1; }
  .hero.screen > .container { flex: 1; display: flex; flex-direction: column; justify-content: center; }
  .hero-facts { margin-top: clamp(2rem, 6vh, 5rem); }
  .problems { margin-top: clamp(2rem, 6vh, 4.5rem); }
  .steps-wrap { margin-top: clamp(2rem, 5vh, 4rem); }
}
/* Laptops with short screens: tighten rhythm so each section still fits */
@media (min-width: 1024px) and (max-height: 860px) {
  :root { --fs-h2: clamp(2rem, 0.9rem + 2.4vw, 3rem); --rise: 1.75rem; }
  .screen { padding-top: calc(var(--header-h) + 1.25rem); padding-bottom: 1.25rem; }
  * + .lede { margin-top: 1rem; }
  .eyebrow + .h2 { margin-top: 0.9rem; }
  .seg { margin-top: 1rem; }
  .services-head-side .lede { font-size: 1rem; }
  .hero-title { margin-top: 1rem; font-size: clamp(3.4rem, 1rem + 4.2vw, 5rem); }
  .hero-text { margin-top: 1.25rem; }
  .hero-actions { margin-top: 1.75rem; }
  .hero-facts { margin-top: 1.75rem; }
  .fact { padding-block: 1.1rem 1.25rem; }
  .service-panels { margin-top: 1.25rem; }
  .service { padding-top: 1.25rem; }
  .service-for { margin-top: 0.6rem; }
  .service-title { font-size: clamp(1.7rem, 1rem + 1.2vw, 2.3rem); }
  .service-index { font-size: 2.3rem; }
  .service-intro .lede { font-size: 1rem; }
  .panel { aspect-ratio: 5 / 2; margin-top: 1rem; }
  .capability { padding: 0.9rem 0 1rem; }
  .capability-text { font-size: 0.93rem; }
  .service-cta { margin-top: 1rem; }
  .problems { margin-top: 1.75rem; }
  .problem-list li { padding: 0.75rem 0; }
  .principles { margin-top: 1.5rem; }
  .principle { padding: 0.85rem 0; }
  .audience-item { padding: 1rem 0; }
  .step { padding: 1.4rem 1.4rem 1.6rem; }
  .step-title { margin-top: 1rem; }
  .contact-panel { padding: 2.25rem 3rem; }
  .checklist { margin-top: 1.25rem; }
  .checklist li { padding: 0.35rem 0; }
  .hero-note { margin-top: 1rem; }
  .capability { padding: 0.7rem 0 0.8rem; }
  .tags-wrap { margin-top: 0.75rem; gap: 0.35rem; }
  .tags-label { font-size: 0.7rem; margin-right: 0; }
  .tags { gap: 0.3rem; }
  .tag { padding: 0.25rem 0.6rem; font-size: 0.8rem; }
  .service-cta { margin-top: 0.85rem; }
  .deliver-grid, .pricing-grid { margin-top: 1.5rem; }
  .deliver-item { padding: 0.6rem 0; }
  .deliver-note { margin-top: 1rem; }
  .engagement { padding: 1rem 0; }
  .quote-card { padding: 1.75rem 2rem; }
}
/* 720px-tall laptops */
@media (min-width: 1024px) and (max-height: 740px) {
  .screen { padding-top: calc(var(--header-h) + 0.75rem); padding-bottom: 0.75rem; }
  .deliver-grid { margin-top: 1.25rem; }
  .deliver-item { padding: 0.5rem 0; }
}
/* Gentle snapping between screens on large, tall viewports */
@media (min-width: 1024px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  html.js:not(.is-jumping):not(.app) { scroll-snap-type: y proximity; }
  .screen { scroll-snap-align: start; }
  .site-footer { scroll-snap-align: end; }
}

/* ==========================================================
   App mode (phones, with JS): an app bar, a bottom tab bar and
   one view at a time, with native-style transitions.
   ========================================================== */
.tabbar { display: none; }

.app {
  --header-h: calc(3.5rem + var(--safe-t));
  --tabbar-h: calc(4.25rem + var(--safe-b));
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
  overscroll-behavior-y: none;
}
.app body { padding-bottom: var(--tabbar-h); background: var(--ivory); }
.app main { overflow-x: clip; }
.app :is(a, button) { -webkit-touch-callout: none; }

/* App bar */
.app .site-header {
  padding-top: var(--safe-t);
  background: rgba(10, 22, 40, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.app .site-header.is-solid { box-shadow: 0 1px 0 var(--line-dark); }
.app .header-bar { position: relative; flex-wrap: nowrap; min-height: 3.5rem; }
.app .site-nav, .app .progress { display: none; }
.app .appbar-title {
  display: block; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif); font-weight: 500; font-size: 1.2rem; letter-spacing: -0.01em;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
}
.app[data-view]:not([data-view="home"]) .appbar-title { opacity: 1; }
.app .lang-link { min-width: 2rem; }
@media (max-width: 359.98px) {
  .app .appbar-title { font-size: 1.05rem; }
}
.app[data-view]:not([data-view="home"]) .site-header .wordmark-text { display: none; }

/* Tab bar */
.app .tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 0.4rem max(0.5rem, env(safe-area-inset-left, 0px)) calc(0.4rem + var(--safe-b));
  background: rgba(7, 15, 29, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  box-shadow: 0 -1px 0 var(--line-dark);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
  min-height: 3.45rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em; line-height: 1.1;
  color: var(--on-dark-muted); text-decoration: none;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
  transition: color 0.3s ease;
}
.tab-icon {
  display: grid; place-items: center;
  width: 3.4rem; height: 2rem; border-radius: 999px;
  transition: background-color 0.35s ease, transform 0.35s var(--ease-spring), color 0.3s ease;
}
.tab-icon svg { width: 1.45rem; height: 1.45rem; }
.tab[aria-current="page"] { color: var(--on-dark); }
.tab[aria-current="page"] .tab-icon { background: rgba(210, 184, 126, 0.18); color: var(--gold-bright); }
.tab:active .tab-icon { transform: scale(0.88); }

/* Views: only the active one is shown once the script has set it */
.app.views-ready .view:not(.is-active) { display: none; }
.app .view { min-height: calc(100svh - var(--tabbar-h)); }
.app .view.section, .app .view > .section { padding-block: 1.75rem 2.75rem; }
.app .view.section, .app .view > .section:first-child { padding-top: calc(var(--header-h) + 1.75rem); }
.app .view.enter-fwd { animation: view-fwd 0.42s var(--ease-out) both; }
.app .view.enter-back { animation: view-back 0.42s var(--ease-out) both; }
@keyframes view-fwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes view-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* Large titles */
.app .h2 { font-size: 2.15rem; }
.app .eyebrow + .h2 { margin-top: 0.85rem; }

/* Shared app surfaces: inset grouped lists */
.app .problem-list,
.app .capabilities,
.app .principles,
.app .deliver-list,
.app .engagements,
.app .topics-list {
  padding: 0 1rem;
  border: 0; border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 32, 56, 0.05), inset 0 0 0 1px var(--line-light);
}
.app .problem-list li:last-child,
.app .capability:last-child,
.app .principle:last-child,
.app .deliver-item:last-child,
.app .engagement:last-child { border-bottom: 0; }

/* How we work view */
.app .deliver-grid, .app .pricing-grid { gap: 1.75rem; margin-top: 1.75rem; }
.app .deliver-col-head { padding: 0 0.25rem 0.75rem; border-bottom: 0; }
.app .deliver-col-title { font-size: 1.3rem; }
.app .deliver-item { padding: 0.95rem 0; }
.app .deliver-title { font-size: 1.12rem; }
.app .engagement { grid-template-columns: 2.25rem 1fr; padding: 1rem 0; }
.app .engagement-num { font-size: 1.5rem; }
.app .engagement-title { font-size: 1.15rem; }
.app .quote-card { border-radius: 1.25rem; }
.app .quote-card .btn { width: 100%; }
.app .tags-wrap { margin-top: 1rem; }

/* Home */
.app .hero { padding-top: calc(var(--header-h) + 2rem); padding-bottom: 2rem; }
.app .hero-title { margin-top: 1rem; font-size: clamp(2.6rem, 1.6rem + 5vw, 3.4rem); }
.app .hero-text { margin-top: 1.25rem; font-size: 1.05rem; }
.app .hero-actions { margin-top: 1.75rem; }
.app .hero-facts {
  margin-top: 2rem; padding: 0 1rem;
  border: 0; border-radius: 1.1rem;
  background: rgba(244, 245, 243, 0.05);
  box-shadow: inset 0 0 0 1px var(--line-dark);
}
.app .fact { grid-template-columns: 2.1rem 1fr auto; padding: 1rem 0; }
.app .fact:last-child { border-bottom: 0; }
.app .fact-chevron { display: block; grid-column: 3; grid-row: 1 / span 2; align-self: center; width: 1.1rem; height: 1.1rem; color: var(--on-dark-muted); }
.app a.fact:active .fact-title { color: var(--gold-bright); }
.app .problems { gap: 2rem; margin-top: 2rem; }
.app .problem-col-head { padding: 0 0.25rem 0.75rem; border-bottom: 0; }
.app .problem-col-title { font-size: 1.3rem; }
.app .problem-list li { padding: 0.95rem 0; }
.app .problem-list p { font-size: 1rem; }
.app .problem-col .text-link { margin-top: 0.5rem; padding-left: 0.25rem; }

/* Services */
.app .services-head { gap: 1rem; }
.app .seg {
  position: sticky; top: calc(var(--header-h) + 0.6rem); z-index: 5;
  display: grid; width: 100%; margin-top: 1.25rem;
  background: rgba(236, 232, 224, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.app .seg-btn { padding: 0 0.5rem; font-size: 0.9rem; }
.app .service-panels { margin-top: 1.5rem; }
.app .service { padding-top: 0; border-top: 0; }
.app .service-grid { gap: 1.5rem; }
.app .service-index { display: none; }
.app .service-title { font-size: 1.8rem; }
.app .panel { margin-top: 1.25rem; }
.app .capability { display: grid; grid-template-rows: auto 0fr; padding: 0; transition: grid-template-rows 0.4s var(--ease-out); }
.app .capability.is-open { grid-template-rows: auto 1fr; }
.app .capability-head {
  flex-direction: row; align-items: center; gap: 0.75rem;
  min-height: 3.5rem; padding: 0.75rem 0; cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.app .capability-title { flex: 1; font-size: 1.15rem; }
.app .capability-chevron { display: block; width: 1.1rem; height: 1.1rem; flex: none; color: var(--ink-muted); transition: transform 0.4s var(--ease-out); }
.app .capability.is-open .capability-chevron { transform: rotate(90deg); }
.app .capability-text { overflow: hidden; min-height: 0; margin: 0; padding: 0 0 0 2.1rem; transition: padding 0.4s var(--ease-out); }
.app .capability.is-open .capability-text { padding-bottom: 1.1rem; }
.app .service-cta { width: 100%; margin-top: 1.25rem; }

/* Approach */
.app .steps-wrap { margin-top: 1.75rem; }

/* About */
.app .about-grid { gap: 2rem; }
.app .principles { margin-top: 1.75rem; }
.app .principle { padding: 1rem 0; }

/* Contact */
.app #contact .container { width: 100%; }
.app .contact-panel { border-radius: 0; padding: 0 var(--gutter); background: none; box-shadow: none; color: var(--ink); }
.app .contact-panel .eyebrow { color: var(--gold-deep); }
.app .contact-panel .lede { color: var(--ink-muted); }
.app .contact-panel :focus-visible { outline-color: var(--gold-deep); }
.app .contact-deco { display: none; }
.app .contact-grid { gap: 1.5rem; }
.app .checklist { margin-top: 1.5rem; }
.app .checklist-title { color: var(--gold-deep); }
.app .checklist li { color: var(--ink); }
.app .checklist li svg { color: var(--gold-deep); }
.app .contact-card {
  padding: 1.5rem 1.25rem;
  border: 0; border-radius: 1.25rem;
  color: var(--on-dark);
  background:
    radial-gradient(80% 80% at 100% 0%, rgba(46, 90, 156, 0.4), transparent 70%),
    var(--navy-900);
  box-shadow: 0 20px 40px -24px rgba(10, 22, 40, 0.6);
}
.app .contact-card :focus-visible { outline-color: var(--gold-bright); }
.app .topics { padding-top: 1rem; }
.app .topics-intro { color: var(--on-dark-muted); }
.app .topics-list { margin-top: 0.6rem; background: rgba(244, 245, 243, 0.06); box-shadow: inset 0 0 0 1px var(--line-dark); }
.app .topics-list li + li { border-top: 1px solid var(--line-dark); }
.app .topics-list .text-link { display: flex; justify-content: space-between; width: 100%; min-height: 3.25rem; }
.app .topics-list .text-link span { text-decoration: none; }

/* Footer becomes a compact legal block under each view */
.app .footer-top, .app .footer-nav { display: none; }
.app .site-footer { padding-block: 2.25rem 2rem; }
.app .footer-grid { padding-top: 0; gap: 1.75rem; }
.app .footer-base { margin-top: 1.75rem; }

/* Secondary pages in app mode keep the tab bar */
.app .page-main { padding-top: calc(var(--header-h) + 2rem); }

/* ==========================================================
   Motion. Everything below is skipped for reduced motion.
   ========================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: the headline rises line by line, the visual builds up */
  .js .hero-title .line > span { animation: line-up 1.1s var(--ease-out) both; }
  .js .hero-title .line:nth-child(2) > span { animation-delay: 0.14s; }
  .js .hero .eyebrow { animation: aa-fade 0.9s ease both; }
  .js .hero-text, .js .hero-actions { animation: aa-settle 1s var(--ease-out) both 0.3s; }
  .js .hero-actions { animation-delay: 0.42s; }
  .js .echo-wrap { opacity: 0; animation: aa-rise 1.5s var(--ease-out) forwards; animation-delay: calc(var(--i) * 140ms + 250ms); }

  /* Blocks fade up once as they enter the viewport */
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 1s var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  /* Section titles are unmasked from below */
  .js .reveal .h2 { clip-path: inset(0 0 100% 0); transform: translateY(0.3em); transition: clip-path 1.1s var(--ease-out) 0.1s, transform 1.1s var(--ease-out) 0.1s; }
  .js .reveal.is-in .h2 { clip-path: inset(-0.2em -0.2em -0.35em -0.2em); transform: none; }

  /* Lists and cards arrive one after another */
  .js [data-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.9s var(--ease-out); transition-delay: calc(var(--si, 0) * 90ms); }
  .js [data-stagger].is-in > * { opacity: 1; transform: none; }
  .js [data-stagger].is-settled > * { transition-delay: 0s; }
  .js .step::before { transform: scaleX(0); transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--si, 0) * 120ms + 0.45s); }
  .js .is-in > .step::before { transform: none; }

  /* Service illustrations draw themselves */
  .js .draw .draw-lines path, .js .draw .draw-out { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .draw.is-in .draw-lines path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s var(--ease-out); }
  .js .draw.is-in .draw-lines path:nth-child(2n) { transition-delay: 0.12s; }
  .js .draw.is-in .draw-lines path:nth-child(3n) { transition-delay: 0.24s; }
  .js .draw.is-in .draw-out { stroke-dashoffset: 0; transition: stroke-dashoffset 0.8s var(--ease-out) 0.9s; }
  .js .draw .nodes rect { opacity: 0; transition: opacity 0.6s ease; }
  .js .draw.is-in .nodes rect { opacity: 1; }
  .js .draw.is-in .nodes rect:nth-child(odd) { transition-delay: 0.15s; }
  .js .draw .node-core { transform-box: fill-box; transform-origin: center; transform: scale(0.6); opacity: 0; transition: transform 0.9s var(--ease-spring) 0.5s, opacity 0.5s ease 0.5s; }
  .js .draw.is-in .node-core { transform: none; opacity: 1; }

  /* Switching service */
  .js .service.is-entering .service-intro { animation: aa-slide 0.6s var(--ease-out) both; }
}
@keyframes line-up { from { transform: translateY(110%); } to { transform: none; } }
@keyframes aa-settle { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes aa-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes aa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes aa-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

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