/* ==========================================================================
   epiTex — premium redesign
   One stylesheet for every page.
   Type: Newsreader (headlines, long reading) + Hanken Grotesk (interface, body)
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted, SIL Open Font License — see assets/fonts) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-latin-opsz.woff2") format("woff2-variations"),
       url("../assets/fonts/newsreader-latin-opsz.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations"),
       url("../assets/fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../assets/fonts/hanken-grotesk-latin-wght.woff2") format("woff2-variations"),
       url("../assets/fonts/hanken-grotesk-latin-wght.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #0e1b3d;          /* headings, dark sections */
  --ink-2: #16264f;        /* dark section surface */
  --slate: #4a5876;        /* body text */
  --slate-2: #6b7896;      /* secondary text */
  --blue: #1565e0;         /* brand + actions */
  --blue-deep: #0b4bb3;    /* hover */
  --blue-soft: #dbe9fd;    /* tints */
  --sky: #f2f8fd;          /* soft surfaces (matches image backgrounds) */
  --mist: #dce7f5;         /* rules, borders */
  --leaf: #1fa971;         /* checks, quality states */
  --white: #ffffff;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type scale (1.25 ratio) */
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.625rem;
  --fs-xl: clamp(2rem, 1.4rem + 2.2vw, 2.875rem);
  --fs-2xl: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 76px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(14, 27, 61, .06), 0 12px 32px -12px rgba(14, 27, 61, .18);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 500; }
h1, h2 { font-family: var(--serif); font-optical-sizing: auto; letter-spacing: -.015em; line-height: 1.08; }
h3 { font-family: var(--sans); font-size: var(--fs-md); font-weight: 650; line-height: 1.3; letter-spacing: -.005em; }
h4 { font-family: var(--sans); font-size: var(--fs-base); font-weight: 650; line-height: 1.35; }
strong { color: var(--ink); font-weight: 650; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 3000;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: var(--white); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 62ch; }

/* Section rhythm: one spacing rule, applied by a single class */
.band { padding: clamp(64px, 9vw, 120px) 0; }
.band--sky { background: var(--sky); }
.band--ink { background: var(--ink); color: #c7d2ea; }
.band--ink h2, .band--ink h3 { color: var(--white); }

.band-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.band-head h2 { font-size: var(--fs-xl); margin-bottom: 16px; }
.band-head p { font-size: var(--fs-md); line-height: 1.55; margin: 0; }
.band-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font-family: var(--sans); font-size: var(--fs-base); font-weight: 650; line-height: 1;
  border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); color: var(--white); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--mist); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--blue-soft); color: var(--ink); }
.btn .play {
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: var(--white);
  display: grid; place-items: center;
}
.text-link { font-weight: 650; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }

/* Check list (used in hero + accessibility) */
.checks { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.checks li { display: flex; align-items: center; gap: 9px; font-size: var(--fs-sm); color: var(--ink); font-weight: 500; }
.checks li::before {
  content: ""; flex: 0 0 20px; height: 20px; border-radius: 50%;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* ---------- 4. Navbar (injected by js/components.js) ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto; z-index: 1000; height: var(--nav-h);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.site-nav.scrolled { border-bottom-color: var(--mist); background: rgba(255, 255, 255, .95); }
.site-nav .container { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { flex: 0 0 auto; display: block; }
.brand img { width: 118px; height: auto; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links > li { position: relative; }
.nav-links > li > a,
.nav-links .dd-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 999px;
  font-family: var(--sans); font-size: var(--fs-sm); font-weight: 550; color: var(--ink);
  background: none; border: 0; cursor: pointer;
}
.nav-links > li > a:hover, .nav-links .dd-toggle:hover { background: var(--sky); color: var(--blue); }
.dd-toggle svg { width: 12px; height: 12px; transition: transform .2s ease; }
.dropdown.open .dd-toggle svg { transform: rotate(180deg); }

.dd-menu {
  position: absolute; top: calc(100% + 10px); left: 50%;
  width: 520px; padding: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.dropdown:hover .dd-menu, .dropdown.open .dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dropdown::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.dd-menu a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink); }
.dd-menu a:hover { background: var(--sky); color: var(--ink); }
.dd-menu a span { display: block; font-weight: 600; font-size: var(--fs-sm); }
.dd-menu a small { display: block; color: var(--slate-2); font-size: var(--fs-xs); line-height: 1.4; margin-top: 2px; }
.dd-menu .dd-head { grid-column: 1 / -1; display: block; border-top: 1px solid var(--mist); margin-top: 6px; padding: 14px 12px 4px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.dd-menu .dd-all { grid-column: 1 / -1; border-top: 1px solid var(--mist); margin-top: 6px; padding-top: 12px; border-radius: 0; font-weight: 650; font-size: var(--fs-sm); color: var(--blue); }

.nav-cta { margin-left: 8px; min-height: 44px; padding: 0 20px; font-size: var(--fs-sm); }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 50%;
  background: var(--sky); border: 0; cursor: pointer; position: relative;
}
.nav-toggle span { position: absolute; left: 13px; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease, top .25s ease; }
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

main { padding-top: var(--nav-h); }

/* ---------- 5. Home hero ---------- */
.hero { background: var(--sky); overflow: hidden; position: relative; }
.hero::before { /* faint typesetting baseline grid — the page is about typesetting */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to bottom, rgba(21, 101, 224, .055) 1px, transparent 1px);
  background-size: 100% 28px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 45%, transparent 75%);
          mask-image: linear-gradient(90deg, #000 0%, #000 45%, transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); align-items: center; gap: 24px; min-height: min(760px, calc(100vh - var(--nav-h))); padding-top: 48px; padding-bottom: 56px; }
.hero h1 { font-size: var(--fs-2xl); font-weight: 450; margin-bottom: 24px; max-width: 13ch; }
.hero .lede { font-size: var(--fs-md); line-height: 1.55; max-width: 34em; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.hero-art { position: relative; margin-right: calc(var(--gutter) * -1); }
.hero-art img {
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
          mask-composite: intersect;
}

/* the single orchestrated page-load moment */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .08s; }
  .hero-copy > *:nth-child(3) { animation-delay: .16s; }
  .hero-copy > *:nth-child(4) { animation-delay: .24s; }
  .hero-art { animation: settle 1s cubic-bezier(.2, .7, .2, 1) .1s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes settle { from { opacity: 0; transform: translateX(24px) scale(.98); } to { opacity: 1; transform: none; } }
}

/* Platforms strip */
.platforms { border-bottom: 1px solid var(--mist); }
.platforms .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 36px; padding-top: 26px; padding-bottom: 26px; }
.platforms p { margin: 0; font-size: var(--fs-sm); color: var(--slate-2); }
.platforms ul { display: flex; flex-wrap: wrap; gap: 10px 34px; }
.platforms li { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); font-weight: 500; }

/* ---------- 6. Intro (home) ---------- */
.intro .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.intro h2 { font-size: var(--fs-xl); margin-bottom: 22px; }
.intro p { font-size: var(--fs-md); line-height: 1.6; }
.intro .note { font-size: var(--fs-base); color: var(--slate-2); border-left: 3px solid var(--blue); padding-left: 18px; margin-top: 28px; }
.intro figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; }
.intro figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- 7. Home services (editorial, not identical cards) ---------- */
.svc-grid { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.svc {
  position: relative; display: grid; gap: 18px; align-content: start;
  padding: 32px; border-radius: var(--radius-lg); background: var(--white); color: var(--slate);
  border: 1px solid transparent; transition: border-color .2s ease;
}
.svc:hover { border-color: var(--blue-soft); color: var(--slate); }
.svc--lead { grid-row: span 2; padding: 40px; }
.svc .svc-img { height: 190px; display: flex; align-items: center; }
.svc--lead .svc-img { height: 300px; justify-content: center; }
.svc .svc-img img { max-height: 100%; width: auto; }
.svc--side { grid-template-columns: 150px 1fr; align-items: center; }
.svc--side .svc-img { height: 130px; justify-content: center; }
.svc h3 { font-family: var(--serif); font-weight: 500; font-size: var(--fs-lg); letter-spacing: -.01em; margin-bottom: 8px; }
.svc p { margin: 0 0 12px; font-size: var(--fs-sm); }
.svc .more { font-weight: 650; font-size: var(--fs-sm); color: var(--blue); }
.svc-footer { margin-top: 28px; }

/* ---------- 8. Reflow demo — the signature moment ---------- */
.reflow .container { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.reflow h2 { font-size: var(--fs-xl); margin-bottom: 18px; }
.reflow p { color: #c7d2ea; }
.mode-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--ink-2); border: 1px solid #263a6b; margin: 10px 0 24px; }
.mode-switch button {
  font-family: var(--sans); font-size: var(--fs-sm); font-weight: 650; color: #c7d2ea;
  padding: 10px 18px; border-radius: 999px; border: 0; background: none; cursor: pointer;
}
.mode-switch button[aria-pressed="true"] { background: var(--white); color: var(--ink); }
.range-row label { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--white); font-weight: 600; margin-bottom: 10px; }
.range-row output { color: #c7d2ea; font-weight: 500; font-variant-numeric: tabular-nums; }
.range-row input[type=range] { width: 100%; accent-color: var(--blue); height: 28px; cursor: ew-resize; }
.mode-note { min-height: 3.3em; margin-top: 18px; font-size: var(--fs-sm); }

.stage { display: flex; justify-content: center; align-items: center; min-height: 520px; }
.device {
  width: var(--w, 420px); max-width: 100%;
  padding: 14px; border-radius: 30px; background: #0a1430;
  border: 1px solid #2a3d6e;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), inset 0 0 0 2px #1b2b55;
}
.screen { position: relative; height: 460px; border-radius: 18px; overflow: hidden; background: #fbfaf7; }
.screen-bar { display: flex; justify-content: space-between; padding: 10px 16px; font-size: 11px; color: #8a8f9c; border-bottom: 1px solid #ecebe6; }
.page-flow { height: 410px; overflow: hidden; padding: 18px 20px; font-family: var(--serif); color: #23242a; }
.page-flow .chap { font-size: 12px; letter-spacing: .02em; color: #8a8f9c; margin-bottom: 4px; font-family: var(--sans); }
.page-flow h4 { font-family: var(--serif); font-size: 22px; font-weight: 500; margin-bottom: 12px; color: #111; }
.reflow .page-flow p { color: #2a2c33; }
.reflow .fixed-page p { color: #2a2c33; }
.page-flow p { font-size: 15.5px; line-height: 1.6; margin: 0 0 .7em; text-indent: 1.2em; }
.page-flow p.first { text-indent: 0; }

.fixed-wrap { position: absolute; inset: 37px 0 0; display: none; align-items: flex-start; justify-content: center; overflow: hidden; background: #e9ecf2; }
.fixed-page {
  width: 520px; height: 680px; flex: 0 0 auto; transform-origin: top center;
  background: #fffdf8; padding: 34px 36px; font-family: var(--serif); color: #23242a;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}
.fixed-page .fp-title { font-size: 34px; line-height: 1.05; margin-bottom: 16px; color: #111; }
.fixed-page img { width: 100%; height: 210px; object-fit: cover; border-radius: 4px; margin-bottom: 16px; }
.fixed-page .cols { columns: 2; column-gap: 22px; font-size: 13.5px; line-height: 1.55; text-align: justify; }
.fixed-page .cols p { margin: 0 0 .6em; }
.popup-flag {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  background: var(--ink); color: var(--white); font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap; opacity: 0; transition: opacity .2s ease;
}
.popup-flag.show { opacity: 1; }
.is-fixed .page-flow { visibility: hidden; }
.is-fixed .fixed-wrap { display: flex; }

/* ---------- 9. Features (ruled grid, no cards) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--mist); }
.feature { padding: 34px 28px 36px 0; border-bottom: 1px solid var(--mist); }
.feature + .feature { padding-left: 28px; border-left: 1px solid var(--mist); }
.feature:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
.feature .ico { width: 44px; height: 44px; color: var(--blue); margin-bottom: 22px; }
.feature h3 { font-size: var(--fs-md); margin-bottom: 10px; }
.feature p { font-size: var(--fs-sm); margin: 0; }

/* ---------- 10. Accessibility ---------- */
.a11y-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.a11y-hero figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; }
.a11y-hero figure img { width: 100%; }
.a11y-hero h2 { font-size: var(--fs-xl); margin-bottom: 18px; }
.a11y-hero .lede { font-size: var(--fs-md); line-height: 1.55; }
.a11y-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(40px, 6vw, 64px); }
.a11y-cols article { background: var(--white); border-radius: var(--radius); padding: 28px 30px; display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.a11y-cols article img { width: 56px; }
.a11y-cols p { margin: 0; font-size: var(--fs-sm); }
.a11y-cols h3 { margin-bottom: 8px; }

/* ---------- 11. Process (a real sequence, so it is numbered) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { counter-increment: step; }
.step figure { margin: 0 0 22px; border-radius: var(--radius); overflow: hidden; }
.step figure img { width: 100%; }
.step .num { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-family: var(--serif); font-size: var(--fs-lg); color: var(--blue); }
.step .num::before { content: counter(step); }
.step .num::after { content: ""; flex: 1; height: 1px; background: var(--mist); }
.step h3 { margin-bottom: 8px; }
.step p { font-size: var(--fs-sm); margin: 0; }

/* ---------- 12. Who are we + categories ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-grid figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; }
.about-grid figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 40% center; }
.about-grid h2 { font-size: var(--fs-xl); margin-bottom: 20px; }
.about-grid p { font-size: var(--fs-md); line-height: 1.6; }

.shelf-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: clamp(56px, 8vw, 96px) 0 26px; }
.shelf-head h3 { font-family: var(--serif); font-weight: 500; font-size: var(--fs-lg); }
.shelf { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.shelf li { text-align: center; }
.shelf .cover { height: 150px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; border-bottom: 2px solid var(--mist); margin-bottom: 12px; }
.shelf .cover img { max-height: 132px; width: auto; }
.shelf .spine { /* typographic cover for categories without artwork */
  width: 96px; height: 128px; border-radius: 3px 8px 8px 3px; padding: 14px 10px;
  display: flex; align-items: flex-end; text-align: left;
  font-family: var(--serif); font-size: 15px; line-height: 1.1; color: var(--white);
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, .18), 0 10px 18px -10px rgba(14, 27, 61, .5);
}
.spine--history { background: #7a4a2b; }
.spine--bio { background: #2f5e4e; }
.shelf span.label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }

/* ---------- 13. Contact (form + map) ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-grid h2 { font-size: var(--fs-xl); margin-bottom: 16px; }
.contact-grid .lede { font-size: var(--fs-md); line-height: 1.55; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 30px 0 34px; counter-reset: flow; }
.flow li { counter-increment: flow; text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); line-height: 1.3; }
.flow .fimg { height: 74px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.flow img { max-height: 70px; width: auto; }
.flow li::before { content: counter(flow); display: block; font-family: var(--serif); color: var(--blue); font-size: var(--fs-md); margin-bottom: 4px; }
.contact-lines li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--mist); }
.contact-lines li:last-child { border-bottom: 1px solid var(--mist); }
.contact-lines svg { width: 22px; height: 22px; color: var(--blue); flex: 0 0 22px; }
.contact-lines a, .contact-lines span { color: var(--ink); font-weight: 600; }

.form-card { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.form-card h3 { font-family: var(--serif); font-weight: 500; font-size: var(--fs-lg); margin-bottom: 6px; }
.form-card > p { font-size: var(--fs-sm); margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--slate-2); }
.input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  font-family: var(--sans); font-size: var(--fs-base); color: var(--ink);
  background: var(--sky); border: 1.5px solid transparent; border-radius: var(--radius-sm);
  transition: border-color .15s ease, background-color .15s ease;
}
.input:focus { outline: none; border-color: var(--blue); background: var(--white); }
.input::placeholder { color: #93a0bb; }
textarea.input { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-status { margin: 14px 0 0; font-size: var(--fs-sm); font-weight: 600; color: var(--leaf); }
.form-status.error { color: #c4352b; }
.form-card .btn { width: 100%; margin-top: 6px; }

.map { margin-top: clamp(48px, 7vw, 80px); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--mist); }
.map iframe { display: block; width: 100%; height: 380px; border: 0; filter: saturate(.85); }

/* ---------- 14. CTA band + footer (shared) ---------- */
.cta-band { background: var(--ink); color: #c7d2ea; overflow: hidden; }
.cta-band .container { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 40px; padding-top: 64px; padding-bottom: 64px; }
.cta-band h2 { color: var(--white); font-size: var(--fs-xl); margin-bottom: 14px; }
.cta-band p { font-size: var(--fs-md); line-height: 1.55; margin-bottom: 28px; max-width: 36em; }
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-band .btn-ghost-light { color: var(--white); border-color: #34497d; background: transparent; }
.cta-band .btn-ghost-light:hover { border-color: var(--white); color: var(--white); }
.cta-band figure { margin: 0 0 -64px; align-self: end; }
.cta-band figure img { border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: 100%; max-height: 330px; object-fit: cover; object-position: top; }

.site-footer { background: var(--sky); padding: clamp(56px, 7vw, 80px) 0 0; font-size: var(--fs-sm); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 48px; }
.foot-grid .brand img { width: 130px; margin-bottom: 18px; }
.foot-grid h4 { font-size: var(--fs-sm); margin-bottom: 16px; color: var(--ink); }
.foot-grid li { margin-bottom: 10px; }
.foot-grid a { color: var(--slate); }
.foot-grid a:hover { color: var(--blue); }
.foot-grid address { font-style: normal; line-height: 1.7; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--ink); border: 1px solid var(--mist); }
.social a:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.social svg { width: 17px; height: 17px; }
.newsletter { display: flex; gap: 8px; margin-top: 14px; }
.newsletter .input { background: var(--white); border-color: var(--mist); min-height: 46px; }
.newsletter .btn { min-height: 46px; padding: 0 18px; font-size: var(--fs-sm); flex: 0 0 auto; }
.foot-bottom { border-top: 1px solid var(--mist); padding: 22px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; color: var(--slate-2); font-size: var(--fs-xs); }
.foot-bottom nav { display: flex; gap: 20px; }
.foot-bottom a { color: var(--slate); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--slate); cursor: pointer; }
.link-btn:hover { color: var(--blue); }

/* ---------- 15. Support dialog (shared) ---------- */
.dialog { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(14, 27, 61, .6); }
.dialog.open { display: flex; }
.dialog .form-card { width: 100%; max-width: 480px; position: relative; }
.dialog .close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sky); font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; }

/* ---------- 16. Inner page header ---------- */
.page-head { background: var(--sky); padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.page-head .crumbs { font-size: var(--fs-sm); margin-bottom: 14px; color: var(--slate-2); }
.page-head .crumbs a { color: var(--slate-2); }
.page-head h1 { font-size: var(--fs-2xl); font-weight: 450; margin-bottom: 16px; }
.page-head p { font-size: var(--fs-md); line-height: 1.55; max-width: 44em; margin: 0; }
.page-head--split .container { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center; }
.page-head--split img { justify-self: end; max-height: 260px; width: auto; }

/* ---------- 17. Services page ---------- */
.svc-nav { position: sticky; top: var(--nav-h); z-index: 50; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--mist); }
.svc-nav ul { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.svc-nav ul::-webkit-scrollbar { display: none; }
.svc-nav a { display: block; white-space: nowrap; padding: 8px 14px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; color: var(--slate); }
.svc-nav a:hover { background: var(--sky); color: var(--ink); }
.svc-nav a.active { background: var(--ink); color: var(--white); }

.svc-detail { padding: clamp(56px, 8vw, 96px) 0; border-bottom: 1px solid var(--mist); }
.svc-detail .container { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.svc-detail:nth-of-type(even) .container { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.svc-detail:nth-of-type(even) .svc-art { order: 2; }
.svc-art { background: var(--sky); border-radius: var(--radius-lg); aspect-ratio: 1 / .85; display: flex; align-items: center; justify-content: center; padding: 32px; position: relative; }
.svc-art img { max-height: 100%; width: auto; max-width: 100%; }
.svc-art .quads { position: absolute; inset: 22% 30%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; pointer-events: none; }
.svc-art .quads span { border: 2px dashed var(--blue); border-radius: 6px; background: rgba(21, 101, 224, .06); }
.svc-detail h2 { font-size: var(--fs-xl); margin-bottom: 22px; }
.svc-detail p { max-width: 64ch; }
.svc-detail .key { font-size: var(--fs-md); line-height: 1.55; color: var(--ink); }
.support-list { display: grid; gap: 0; margin-top: 8px; }
.support-list li { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid var(--mist); }
.support-list img { width: 52px; height: 52px; object-fit: contain; }
.support-list h3 { font-size: var(--fs-base); margin-bottom: 4px; }
.support-list p { margin: 0; font-size: var(--fs-sm); }
.segments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.segments li { padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--mist); font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }

/* ---------- 18. Blog ---------- */
.post-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.post-card { display: grid; color: var(--slate); }
.post-card .thumb { border-radius: var(--radius-lg); overflow: hidden; background: var(--sky); margin-bottom: 22px; }
.post-card .thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .thumb img { transform: scale(1.03); }
.post-card h2 { font-size: var(--fs-lg); line-height: 1.2; margin-bottom: 10px; }
.post-card:hover h2 { color: var(--blue); }
.post-card p { font-size: var(--fs-sm); margin-bottom: 12px; }
.post-card .more { font-weight: 650; font-size: var(--fs-sm); color: var(--blue); }

.article-head { background: var(--sky); padding: clamp(48px, 7vw, 88px) 0 0; }
.article-head .container { max-width: 900px; }
.article-head h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem); font-weight: 450; margin-bottom: 20px; }
.article-head .meta { font-size: var(--fs-sm); color: var(--slate-2); margin-bottom: 36px; }
.article-head figure { margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; background: var(--white); }
.article-head figure img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.prose { max-width: 700px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(64px, 9vw, 110px); font-family: var(--serif); font-size: 1.2rem; line-height: 1.75; color: #2b3550; }
.prose p { margin: 0 0 1.15em; }
.prose > p:first-of-type::first-letter { float: left; font-size: 3.6em; line-height: .85; padding: .06em .1em 0 0; color: var(--blue); }
.prose h2 { font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; margin: 1.8em 0 .7em; }
.prose h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 1.6em 0 .6em; }
.prose strong { font-family: var(--sans); font-size: .9em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .5em; padding-left: .2em; }
.prose blockquote { margin: 1.6em 0; padding: 0 0 0 24px; border-left: 3px solid var(--blue); font-style: italic; color: var(--ink); }
.post-nav { border-top: 1px solid var(--mist); margin-top: 3em; padding-top: 1.5em; font-family: var(--sans); font-size: var(--fs-sm); }

/* ---------- 19. Legal pages ---------- */
.legal-body { max-width: 780px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(64px, 9vw, 110px); font-size: var(--fs-base); }
.legal-body h2 { font-family: var(--sans); font-size: var(--fs-md); font-weight: 700; margin: 2em 0 .7em; }
.legal-body ul { list-style: disc; padding-left: 1.3em; margin: 0 0 1em; }
.legal-body li { margin-bottom: .45em; }

/* ---------- 20. Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links > li > a, .nav-links .dd-toggle { padding: 10px 10px; }
  .shelf { grid-template-columns: repeat(4, 1fr); row-gap: 28px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h));
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 12px var(--gutter) 32px; background: var(--white);
    overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links > li { border-bottom: 1px solid var(--mist); }
  .nav-links > li > a, .nav-links .dd-toggle { padding: 18px 4px; font-size: var(--fs-md); border-radius: 0; width: 100%; justify-content: space-between; }
  .nav-links > li > a:hover, .nav-links .dd-toggle:hover { background: none; }
  .dd-menu { position: static; width: auto; transform: none; box-shadow: none; border: 0; padding: 0 0 14px; grid-template-columns: 1fr; display: none; opacity: 1; visibility: visible; }
  .dropdown:hover .dd-menu { transform: none; }
  .dropdown.open .dd-menu { display: grid; }
  .dropdown::after { display: none; }
  .nav-links .mobile-cta { border: 0; padding-top: 24px; }
  .nav-links .mobile-cta a.btn { padding: 0 26px; font-size: var(--fs-base); color: var(--white); border-radius: 999px; }
  .nav-links .mobile-cta a { justify-content: center; width: 100%; }

  .hero .container, .intro .container, .reflow .container, .a11y-hero, .about-grid, .contact-grid, .cta-band .container, .page-head--split .container { grid-template-columns: minmax(0, 1fr); }
  .hero .container { min-height: 0; padding-top: 40px; }
  .hero-art { margin: 0 calc(var(--gutter) * -1); }
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .svc--lead { grid-row: auto; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature:nth-child(n) { padding: 30px 22px 30px 0; border-left: 0; }
  .feature:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--mist); }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .a11y-cols { grid-template-columns: 1fr; }
  .svc-detail .container, .svc-detail:nth-of-type(even) .container { grid-template-columns: minmax(0, 1fr); }
  .svc-detail:nth-of-type(even) .svc-art { order: 0; }
  .svc-art { aspect-ratio: 16 / 10; }
  .cta-band figure { margin: 0 0 -64px; }
  .page-head--split img { justify-self: start; max-height: 200px; }
  .stage { min-height: 0; }
}

@media (max-width: 640px) {
  :root { --nav-h: 66px; }
  .brand img { width: 104px; }
  .hero h1 { max-width: none; }
  .hero-actions .btn { width: 100%; }
  .platforms .container { flex-direction: column; align-items: flex-start; }
  .svc, .svc--lead { padding: 26px; }
  .svc--side { grid-template-columns: 1fr; }
  .svc--lead .svc-img { height: 220px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature:nth-child(n) { padding: 26px 0; border-left: 0; }
  .steps { grid-template-columns: 1fr; }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .flow { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .post-list { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .a11y-cols article { grid-template-columns: 1fr; }
  .screen { height: 420px; }
  .page-flow { height: 370px; }
  .map iframe { height: 300px; }
}

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