/* ==========================================================================
   TN Websites — styles
   One family (Archivo, variable width + weight), one accent (sign yellow).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --ink: #0f2340;          /* primary text, dark surfaces */
  --ink-soft: #1b3358;     /* raised surface on dark */
  --paper: #ffffff;        /* page background */
  --mist: #eef2f7;         /* quiet alternate surface */
  --steel: #53627a;        /* secondary text (5.9:1 on white) */
  --line: #d3dbe6;         /* borders, dividers */
  --brand-navy: #1d3f7a;   /* logo navy (wordmark) */
  --sign: #ffc83d;         /* the one accent */
  --sign-deep: #f2b100;    /* accent hover */
  --error: #b42318;
  --success: #116a3a;

  /* Type */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-small: 0.9375rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 0.6vw + 1rem, 1.3125rem);
  --fs-h3: clamp(1.25rem, 0.5vw + 1.1rem, 1.5rem);
  --fs-h2: clamp(2rem, 3.6vw + 0.9rem, 3.75rem);
  --fs-h1: clamp(2.75rem, 6.4vw + 0.9rem, 6.75rem);
  --fs-statement: clamp(1.75rem, 3.2vw + 0.8rem, 3.25rem);

  /* Space (8pt rhythm) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;
  --section: clamp(4rem, 8vw, 8rem);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 76rem;

  /* Shape */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --t-fast: 140ms;
  --t-mid: 260ms;
  --t-slow: 520ms;

  /* Layers */
  --z-header: 40;
  --z-menu: 50;
  --z-skip: 100;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3 { line-height: 1.05; text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: var(--s-2);
  top: -4rem;
  z-index: var(--z-skip);
  background: var(--sign);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus { top: var(--s-2); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--sign); }

/* ---------- Layout ---------- */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--max));
  margin-inline: auto;
}
.section { padding-block: var(--section); }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink); color: var(--paper); }

.measure { max-width: 38rem; }

/* ---------- Type ---------- */
.display {
  font-size: var(--fs-h1);
  font-weight: 820;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 0.94;
}
.h2 {
  font-size: var(--fs-h2);
  font-weight: 780;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}
.h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  font-stretch: 104%;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--steel);
  max-width: 36rem;
}
.section--ink .lead,
.on-dark .lead { color: #c4cfdf; }
.muted { color: var(--steel); }

.section-head { margin-bottom: var(--s-6); }
.section-head .h2 + .lead,
.section-head .h2 + p { margin-top: var(--s-3); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.5rem;
  border: 2px solid var(--btn-bg);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-stretch: 104%;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color var(--t-fast) ease,
    border-color var(--t-fast) ease,
    color var(--t-fast) ease,
    transform var(--t-fast) var(--ease-out);
}
.btn:hover { --btn-bg: var(--ink-soft); }
.btn:active { transform: scale(0.97); }

.btn--sign { --btn-bg: var(--sign); --btn-fg: var(--ink); }
.btn--sign:hover { --btn-bg: var(--sign-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); background: transparent; }
.on-dark .btn--ghost { color: var(--paper); border-color: rgba(255,255,255,.3); }
.on-dark .btn--ghost:hover { border-color: var(--paper); }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.text-link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--sign-deep);
  transition: text-decoration-color var(--t-fast) ease;
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) ease;
  view-transition-name: site-header;
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(12px); }
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  min-height: 44px;
}
.brand-mark { display: block; width: auto; height: 2rem; flex: none; }
/* Mirrors the logo lockup: mark | TN WEBSITES */
.brand-name {
  padding-left: 0.7rem;
  border-left: 2px solid var(--brand-navy);
  line-height: 1.75rem;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--brand-navy);
  white-space: nowrap;
}
.brand-name b { font-weight: 800; }
@media (max-width: 420px) {
  .brand { gap: 0.5rem; font-size: 1rem; }
  .brand-mark { height: 1.75rem; }
  .brand-name { padding-left: 0.5rem; letter-spacing: 0.02em; line-height: 1.5rem; }
}
@media (max-width: 340px) {
  .brand-name { font-size: 0.875rem; }
}
.footer-logo { display: block; width: min(100%, 260px); height: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--steel);
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.nav-list a:hover { color: var(--ink); background: var(--mist); }
.nav-list a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--sign);
  border-radius: 0;
}
.nav-cta { margin-left: var(--s-1); }
.site-nav .nav-list .btn {
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border: 2px solid var(--btn-bg);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 1rem;
  box-shadow: none;
}
.site-nav .nav-list .btn:hover { --btn-bg: var(--sign-deep); background: var(--btn-bg); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.menu-toggle-icon { width: 18px; height: 18px; }
.menu-toggle-icon line {
  transition: transform var(--t-mid) var(--ease-out), opacity var(--t-fast) ease;
  transform-origin: center;
}
.menu-toggle[aria-expanded="true"] .l1 { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .l2 { opacity: 0; }
.menu-toggle[aria-expanded="true"] .l3 { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    position: fixed;
    inset: 4.5rem 0 auto 0;
    z-index: var(--z-menu);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--s-2) var(--gutter) var(--s-4);
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition:
      opacity var(--t-fast) var(--ease-in),
      transform var(--t-fast) var(--ease-in),
      visibility 0s linear var(--t-fast);
  }
  .js .site-nav.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition:
      opacity var(--t-mid) var(--ease-out),
      transform var(--t-mid) var(--ease-out),
      visibility 0s;
  }
  .site-nav .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav .nav-list a {
    font-size: 1.25rem;
    font-stretch: 108%;
    padding: 0.85rem 0;
    min-height: 56px;
    border-radius: 0;
    border-bottom: 1px solid var(--mist);
    color: var(--ink);
  }
  .site-nav .nav-list a:hover { background: transparent; }
  .site-nav .nav-list a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--sign); padding-left: 0.9rem; }
  .nav-cta { margin: var(--s-3) 0 0; }
  .site-nav .nav-list .btn { width: 100%; min-height: 3.25rem; padding-inline: 1.15rem; font-size: 1.0625rem; border-bottom-width: 2px; }
  /* No-JS fallback: nav simply wraps below the brand */
  .no-js .header-bar { flex-wrap: wrap; padding-block: var(--s-1); }
  .no-js .site-nav .nav-list { flex-direction: row; flex-wrap: wrap; }
  .no-js .site-nav .nav-list a { font-size: 1rem; border: 0; padding: 0 0.75rem; min-height: 44px; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5.5rem) var(--section);
  overflow: clip;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.hero-copy .display { margin-bottom: var(--s-4); }
.hero-copy .lead { margin-bottom: var(--s-4); }
.hero-note {
  margin-top: var(--s-3);
  font-size: var(--fs-small);
  color: var(--steel);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-brand { justify-self: center; width: min(100%, 400px); }
}

/* ---------- Hero: the TN mark assembling, Build · Design · Grow ---------- */
.hero-brand {
  position: relative;
  width: min(100%, 400px);
  justify-self: end;
}
.stage {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3.2vw, 2.25rem);
  box-shadow: 0 30px 60px -24px rgba(15, 35, 64, 0.35);
}
.stage::before {
  /* the sign-yellow slab behind the card */
  content: "";
  position: absolute;
  inset: 16% -12% -7% 32%;
  background: var(--sign);
  border-radius: var(--r-lg);
  z-index: -1;
}
.stage-mark { display: block; width: 100%; height: auto; overflow: visible; }
.stage-rule {
  display: block;
  width: 30%;
  height: 6px;
  margin: var(--s-3) 0 var(--s-2);
  background: var(--sign);
  border-radius: 3px;
  transform-origin: left center;
}
.stage-steps li {
  display: grid;
  grid-template-columns: 6.25rem 1fr;
  gap: var(--s-2);
  align-items: baseline;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.stage-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.stage-word {
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-navy);
}
.stage-text { font-size: var(--fs-small); line-height: 1.4; color: var(--ink); }

.demo-caption {
  margin-top: var(--s-3);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-2);
  font-size: var(--fs-small);
  color: var(--steel);
}
.demo-replay {
  display: none;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  font-size: var(--fs-small);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color var(--t-fast) ease, transform var(--t-fast) var(--ease-out);
}
.demo-replay:hover { border-color: var(--ink); }
.demo-replay:active { transform: scale(0.96); }
.demo-replay svg { width: 16px; height: 16px; }

/* The choreography only runs when motion is OK.
   Without it the logo shows its finished state — nothing is ever hidden. */
@media (prefers-reduced-motion: no-preference) {
  .js .demo-replay { display: inline-flex; }
  /* Hold the sequence until the card is actually on screen. */
  .js .is-playing:not(.in-view) *,
  .js .is-playing:not(.in-view) *::before { animation-play-state: paused; }

  .is-playing .piece        { transform-box: fill-box; }
  .is-playing .piece--t     { animation: piece-drop 760ms var(--ease-out) 250ms both; }
  .is-playing .piece--stem  { animation: piece-rise 760ms var(--ease-out) 600ms both; }
  .is-playing .piece--n     { animation: piece-slide 820ms var(--ease-out) 950ms both; }
  .is-playing .stage-steps li { animation: rise-in 560ms var(--ease-out) both; }
  .is-playing .stage-steps li:nth-child(1) { animation-delay: 450ms; }
  .is-playing .stage-steps li:nth-child(2) { animation-delay: 800ms; }
  .is-playing .stage-steps li:nth-child(3) { animation-delay: 1150ms; }
  .is-playing .stage-rule   { animation: grow-x 700ms var(--ease-out) 1550ms both; }
}

@keyframes rise-in     { from { opacity: 0; transform: translateY(14px); } }
@keyframes piece-drop  { from { opacity: 0; transform: translateY(-40px); } }
@keyframes piece-rise  { from { opacity: 0; transform: translateY(40px); } }
@keyframes piece-slide { from { opacity: 0; transform: translateX(48px); } }
@keyframes grow-x      { from { transform: scaleX(0); } }

/* ---------- Services overview (home) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--s-2);
}
.svc {
  position: relative;
  border-radius: var(--r-md);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  transition: transform var(--t-mid) var(--ease-out), background-color var(--t-mid) ease;
}
.svc:active { transform: scale(0.99); }
.svc-icon { width: 2.25rem; height: 2.25rem; }
.svc p { max-width: 30rem; }
.svc-more {
  margin-top: auto;
  padding-top: var(--s-2);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.svc--main {
  grid-row: span 2;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-lg);
}
.svc--main .svc-icon { color: var(--sign); }
.svc--main .h2 { color: var(--sign); font-size: clamp(2rem, 3vw + 1rem, 3.25rem); }
.svc--main p { color: #c4cfdf; font-size: var(--fs-lead); }
.svc--main .svc-more { text-decoration-color: var(--sign); }
.svc--main:hover { background: var(--ink-soft); }

.svc--side { background: var(--paper); border: 2px solid var(--line); }
.svc--side:hover { border-color: var(--ink); }
.svc--side p { color: var(--steel); }
.svc--side .svc-more { text-decoration-color: var(--sign-deep); }

@media (max-width: 760px) {
  .services-grid { grid-template-columns: 1fr; }
  .svc--main { grid-row: auto; min-height: 0; }
}

/* ---------- Statement: who it's for ---------- */
.statement {
  font-size: var(--fs-statement);
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 22em;
}
.statement .quiet { color: #8ea0b9; }

/* ---------- Feature list ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5) var(--s-6);
}
.feature { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-3); align-items: start; }
.feature-icon {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: var(--sign);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.feature-icon svg { width: 1.375rem; height: 1.375rem; }
.feature .h3 { margin-bottom: 0.4rem; }
.feature p { color: var(--steel); }
@media (max-width: 700px) { .features { grid-template-columns: 1fr; } }

/* ---------- Steps (a real sequence, so numbered) ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
  counter-reset: step;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: calc(25% - 3rem); /* ends at the centre of the last circle */
  top: 1.5rem;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,.15);
}
.steps::after {
  background: var(--sign);
  transform-origin: left center;
}
.step { position: relative; z-index: 1; counter-increment: step; }
.step-num {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sign);
  color: var(--ink);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.125rem;
  margin-bottom: var(--s-3);
  box-shadow: 0 0 0 6px var(--ink);
}
.step .h3 { margin-bottom: 0.5rem; }
.step p { color: #c4cfdf; }

/* Line fills as the steps scroll into view, where the browser supports it. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .steps::after {
      animation: fill-line linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 55%;
    }
  }
}
@keyframes fill-line { from { transform: scaleX(0); } }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: var(--s-4); }
  .steps::before, .steps::after {
    left: 1.5rem; right: auto;
    top: 1.5rem; bottom: 1.5rem;
    width: 3px; height: auto;
    transform: translateX(-50%);
    transform-origin: center top;
  }
  .step { display: grid; grid-template-columns: auto 1fr; gap: 0 var(--s-3); }
  .step-num { margin: 0; grid-row: span 2; }
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .steps::after { animation-name: fill-line-v; animation-range: entry 20% cover 70%; }
    }
  }
}
@keyframes fill-line-v { from { transform: translateX(-50%) scaleY(0); } }

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--s-6);
  align-items: start;
}
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; gap: var(--s-4); } }

.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  min-height: 56px;
  padding: var(--s-3) 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-stretch: 104%;
  font-size: 1.125rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-icon {
  flex: none;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  transition: transform var(--t-mid) var(--ease-out), background-color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.faq-icon svg { width: 14px; height: 14px; }
.faq summary:hover .faq-icon { border-color: var(--ink); }
.faq details[open] .faq-icon { transform: rotate(45deg); background: var(--sign); border-color: var(--sign); }
.faq-answer { padding: 0 0 var(--s-3); color: var(--steel); max-width: 40rem; }
.faq-answer p + p { margin-top: var(--s-2); }

@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .faq-answer { animation: answer-in var(--t-mid) var(--ease-out); }
}
@keyframes answer-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--sign); padding-block: clamp(3.5rem, 7vw, 6rem); }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-4);
}
.cta-inner .h2 { max-width: 14em; }
.cta-inner p { margin-top: var(--s-2); max-width: 34rem; font-size: var(--fs-lead); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4.5rem); }
.page-hero .display { font-size: clamp(2.5rem, 5.4vw + 0.8rem, 5.5rem); max-width: 13em; }
.page-hero .lead { margin-top: var(--s-4); }
.page-hero .btn-row { margin-top: var(--s-4); }

/* ---------- Service detail (services page) ---------- */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--s-6);
  padding-block: var(--s-6);
  border-top: 2px solid var(--ink);
}
.detail:last-of-type { border-bottom: 2px solid var(--ink); }
.detail-intro .h2 { font-size: clamp(2rem, 3vw + 1rem, 3.25rem); margin-bottom: var(--s-3); }
.detail-intro p { color: var(--steel); max-width: 30rem; }
.detail-intro .svc-icon { margin-bottom: var(--s-3); width: 2.75rem; height: 2.75rem; }
.checklist { display: grid; gap: 0; }
.checklist li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: var(--s-2);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
}
.checklist li:first-child { padding-top: 0; }
.checklist svg { width: 1.5rem; height: 1.5rem; color: var(--ink); margin-top: 0.1rem; }
.checklist strong { display: block; font-weight: 700; }
.checklist span { color: var(--steel); }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; gap: var(--s-4); } }

/* ---------- Process page ---------- */
.timeline { display: grid; gap: 0; counter-reset: tl; }
.tl-item {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-4);
  padding-block: var(--s-5);
  border-top: 1px solid var(--line);
}
.tl-item:first-child { border-top: 2px solid var(--ink); }
.tl-num {
  font-size: clamp(2.5rem, 4vw + 1rem, 4rem);
  font-weight: 820;
  font-stretch: 118%;
  line-height: 1;
  color: var(--ink);
  -webkit-text-stroke: 0;
}
.tl-item .h2 { font-size: clamp(1.75rem, 2.4vw + 1rem, 2.75rem); margin-bottom: var(--s-2); }
.tl-item p { color: var(--steel); }
.tl-aside {
  background: var(--mist);
  border-radius: var(--r-md);
  padding: var(--s-3);
  align-self: start;
}
.tl-aside h3 { font-size: 1rem; font-weight: 700; margin-bottom: var(--s-1); }
.tl-aside ul { padding-left: 1.1rem; color: var(--steel); display: grid; gap: 0.35rem; }
@media (max-width: 860px) {
  .tl-item { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-6);
  align-items: start;
}
.about-grid p + p { margin-top: var(--s-2); }
.about-grid .prose { font-size: var(--fs-lead); color: var(--steel); }
.about-grid .prose strong { color: var(--ink); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: var(--s-4); } }

.values { display: grid; gap: var(--s-2); }
.value {
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--ink-soft);
}
.value .h3 { color: var(--sign); margin-bottom: 0.5rem; }
.value p { color: #c4cfdf; }

/* ---------- Contact / estimate ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

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

.field { display: grid; gap: 0.4rem; }
.field label, .field legend { font-weight: 700; }
.field .req { color: var(--error); margin-left: 0.15rem; }
.field .hint { font-size: var(--fs-small); color: var(--steel); }
.field input,
.field textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: #9fb0c6; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.55);
}
.field [aria-invalid="true"],
.field [aria-invalid="true"]:hover { border-color: var(--error); }
.field-error {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--error);
}
.field-error svg { width: 1rem; height: 1rem; flex: none; }
.field.has-error .field-error { display: flex; }
.send-error { margin-top: var(--s-2); font-size: var(--fs-small); font-weight: 600; color: var(--error); }

fieldset.field { border: 0; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: 0.25rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.choice span svg {
  width: 20px; height: 20px;
  padding: 3px;
  border: 2px solid #9fb0c6;
  border-radius: 50%;
  color: transparent;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-mid) var(--ease-spring);
}
.choice input:hover + span { border-color: #9fb0c6; }
.choice input:checked + span { border-color: var(--ink); background: var(--sign); }
.choice input:checked + span svg { background: var(--ink); border-color: var(--ink); color: var(--sign); transform: scale(1.08); }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

.error-summary {
  border: 2px solid var(--error);
  border-radius: var(--r-sm);
  padding: var(--s-3);
  background: #fff5f4;
}
.error-summary h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: var(--s-1); color: var(--error); }
.error-summary ul { padding-left: 1.1rem; }
.error-summary a { color: var(--error); font-weight: 600; }

.form-success {
  border-radius: var(--r-md);
  padding: var(--s-4);
  background: var(--mist);
  border-left: 6px solid var(--success);
}
.form-success h2 { font-size: 1.375rem; margin-bottom: var(--s-1); }
.form-success p { color: var(--steel); }
.form-success p + p { margin-top: var(--s-2); }
@media (prefers-reduced-motion: no-preference) {
  .form-success:not([hidden]) { animation: rise-in var(--t-slow) var(--ease-out); }
}

.contact-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: sticky;
  top: 6rem;
}
.contact-card .h3 { color: var(--sign); margin-bottom: var(--s-3); }
.contact-list { display: grid; gap: var(--s-3); }
.contact-list li { display: grid; grid-template-columns: 1.5rem 1fr; gap: var(--s-2); }
.contact-list svg { width: 1.5rem; height: 1.5rem; color: var(--sign); }
.contact-list .label { display: block; font-size: var(--fs-small); color: #b9c6d8; }
.contact-list div > a { display: flex; align-items: center; width: fit-content; min-height: 40px; }
.contact-list a { font-weight: 700; font-size: 1.125rem; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; text-decoration-color: var(--sign); text-underline-offset: 0.2em; }
.contact-card hr { border: 0; border-top: 1px solid rgba(255,255,255,.15); margin: var(--s-4) 0; }
.contact-card p { color: #c4cfdf; font-size: var(--fs-small); }
@media (max-width: 900px) { .contact-card { position: static; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c4cfdf;
  padding-block: var(--s-6) var(--s-4);
  font-size: var(--fs-small);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-footer .brand { color: var(--paper); margin-bottom: var(--s-2); }
.site-footer h2 { font-size: 1rem; font-weight: 700; color: var(--paper); margin-bottom: var(--s-2); }
.footer-links { display: grid; gap: 0.15rem; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}
.footer-links a:hover { color: var(--paper); text-decoration: underline; text-decoration-color: var(--sign); text-underline-offset: 0.2em; }
.footer-base { padding-top: var(--s-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s-4); } }

/* ---------- Page transitions (cross-document, progressive) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out 160ms var(--ease-in) both; }
  ::view-transition-new(root) { animation: vt-in 360ms var(--ease-out) both; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Reduced motion: final safety net ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .cta-band, .demo-caption { display: none; }
  body { color: #000; }
}

/* ---------- About: full logo beside the page title ---------- */
.page-hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.logo-card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 48px -24px rgba(15, 35, 64, 0.3);
}
.logo-card::before {
  content: "";
  position: absolute;
  inset: 22% -5% -10% 40%;
  background: var(--sign);
  border-radius: var(--r-lg);
  z-index: -1;
}
.logo-card img { display: block; width: 100%; height: auto; }
@media (max-width: 860px) {
  .page-hero-split { grid-template-columns: 1fr; }
  .logo-card { max-width: 420px; }
}
