/* ==========================================================================
   My TTM — main.css
   Mobile-first, no frameworks. Design tokens per docs/SPEC.md.
   Sections: tokens, reset, typography, layout, buttons, header, hero,
   sections, feature tiles, logo wall, testimonials, cards, forms, cta band,
   footer, prose, reveal, error page, admin, utilities.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  --gold: #C9A227;
  --gold-dark: #7D600F;      /* text-safe gold: 5.9:1 on white, 5.1:1 on --gold-soft, 5.5:1 on --bg-soft (AA) */
  --gold-soft: #F7EFD4;
  --ink: #111318;
  --ink-2: #3A3F4B;
  --muted: #646A77;          /* 5.1:1 on --bg-soft, 5.6:1 on white (AA) */
  --line: #E6E8EC;
  --bg: #FFFFFF;
  --bg-soft: #F6F7F9;
  --navy: #1F2340;
  --navy-2: #2A2F54;
  --on-navy: #FFFFFF;
  --on-navy-muted: #B9BDD3;
  --success: #1E7F4F;
  --success-bg: #E6F4EC;
  --danger: #B42318;
  --danger-bg: #FDECEA;

  --text: var(--ink);
  --text-2: var(--ink-2);
  --surface: var(--bg);
  --surface-2: var(--bg-soft);
  --link: var(--gold-dark);
  --focus: #2563EB;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, 0.06), 0 1px 3px rgba(17, 19, 24, 0.08);
  --shadow-md: 0 8px 24px rgba(17, 19, 24, 0.10);
  --shadow-lg: 0 20px 50px rgba(17, 19, 24, 0.16);

  --container: 1200px;
  --gutter: 16px;
  --header-h: 72px;
  --section-y: clamp(56px, 8vw, 112px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 240ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F3F4F6;
    --ink-2: #C9CDD6;
    --muted: #9AA0AE;
    --line: #2A2E3A;
    --bg: #0F1116;
    --bg-soft: #171A21;
    --navy: #1A1D33;
    --navy-2: #232747;
    --gold-soft: #2B2616;
    --gold-dark: #D8B33A;   /* lighter so small text keeps contrast on dark */
    --success-bg: #11291D;
    --success: #5DD39E;
    --danger-bg: #331512;
    --danger: #F5837A;
    --focus: #7AA2FF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F3F4F6;
  --ink-2: #C9CDD6;
  --muted: #9AA0AE;
  --line: #2A2E3A;
  --bg: #0F1116;
  --bg-soft: #171A21;
  --navy: #1A1D33;
  --navy-2: #232747;
  --gold-soft: #2B2616;
  --gold-dark: #D8B33A;
  --success-bg: #11291D;
  --success: #5DD39E;
  --danger-bg: #331512;
  --danger: #F5837A;
  --focus: #7AA2FF;
  color-scheme: dark;
}

/* ---------- 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
ul[class], ol[class] { list-style: none; padding: 0; }
address { font-style: normal; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- 3. Typography ------------------------------------------------ */
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); }
h3, .h3 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem); }
h4, .h4 { font-size: 1.125rem; }
p { max-width: 70ch; }
.lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--text-2); }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
}
.section-title { margin-bottom: 0.75rem; }
.section-intro { color: var(--text-2); margin-bottom: 2.5rem; }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center p { margin-inline: auto; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold-dark); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* ---------- 4. Layout ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(800px + var(--gutter) * 2); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section--soft { background: var(--surface-2); }
.section--navy { background: var(--navy); color: var(--on-navy); }
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy .section-title { color: var(--on-navy); }
.section--navy p, .section--navy .lead { color: var(--on-navy-muted); }
.section--navy .eyebrow { color: var(--gold); }
.section--navy a:not(.btn) { color: var(--gold); }
.section--hero-sm { padding-block: clamp(48px, 7vw, 96px); }
.page-header { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 48px); }
.page-header h1 { margin-bottom: 0.75rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); }
  .split--reverse > :first-child { order: 2; }
}
.split__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.75rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn-row--center { justify-content: center; }

/* ---------- 5. Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 38px; padding: 0.45rem 1rem; font-size: 0.875rem; }
.btn-lg { min-height: 52px; padding: 0.85rem 1.75rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--gold); color: #111318; border-color: var(--gold); }
.btn-primary:hover { background: #D9B33A; border-color: #D9B33A; color: #111318; box-shadow: 0 6px 18px rgba(201, 162, 39, 0.35); }

.btn-dark { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }
.btn-dark:hover { background: var(--navy-2); border-color: var(--navy-2); color: #FFFFFF; }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-outline--light { color: #FFFFFF; border-color: rgba(255, 255, 255, 0.7); }
.btn-outline--light:hover { background: #FFFFFF; color: var(--navy); border-color: #FFFFFF; }
.btn-outline--dark { color: #111318; border-color: #111318; }
.btn-outline--dark:hover { background: #111318; color: #FFFFFF; }

.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #FFFFFF; }

/* ---------- 6. Focus + skip link ----------------------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 2px; }
.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 120ms var(--ease);
}
.skip-link:focus { transform: translateY(0); outline-color: var(--gold); }
main:focus { outline: none; }

/* ---------- 7. Header / navigation -------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg); /* fallback for browsers without color-mix() (Safari < 16.2) */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.site-header__brand { display: inline-flex; align-items: center; flex-shrink: 0; }
/* Logo is a near-square lockup (200x181: cloud mark + "MY TTM" wordmark): 56px keeps the wordmark legible inside the 72px bar. */
.site-header__brand img { height: 56px; width: auto; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-toggle__bar {
  display: block;
  width: 100%; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile: nav is a dropdown panel below the header bar */
.site-nav {
  position: absolute;
  top: 100%; left: 0; right: 0;
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem var(--gutter) 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}
.site-nav.is-open { display: flex; }
/* No-JS fallback: the hamburger cannot work, so the nav is simply shown inline below the bar. */
html:not(.js) .nav-toggle { display: none; }
@media (max-width: 959.98px) {
  html:not(.js) .site-header__inner { flex-wrap: wrap; }
  html:not(.js) .site-nav { display: flex; position: static; flex-basis: 100%; box-shadow: none; border-bottom: 0; padding-inline: 0; }
}
.site-nav__list { display: flex; flex-direction: column; }
.site-nav__link {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--line);
}
.site-nav__link:hover { color: var(--ink); background: var(--surface-2); }
.site-nav__link.is-active { color: var(--ink); }
.site-nav__link.is-active::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 0.5rem; vertical-align: middle; }
.site-nav__actions { display: flex; flex-direction: column; gap: 0.6rem; }
.site-nav__actions .btn { width: 100%; }
body.nav-open { overflow: hidden; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }
  .site-nav__list { flex-direction: row; gap: 0.25rem; }
  .site-nav__link {
    position: relative;
    padding: 0.5rem 0.75rem;
    border: 0;
    font-size: 0.95rem;
  }
  .site-nav__link:hover { background: transparent; }
  .site-nav__link.is-active::before { display: none; }
  .site-nav__link::after {
    content: "";
    position: absolute;
    left: 0.75rem; right: 0.75rem; bottom: 0.15rem;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease);
  }
  .site-nav__link:hover::after, .site-nav__link.is-active::after { transform: scaleX(1); }
  .site-nav__actions { flex-direction: row; gap: 0.5rem; }
  .site-nav__actions .btn { width: auto; }
  body.nav-open { overflow: auto; }
}

/* ---------- 8. Hero ------------------------------------------------------ */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(82vh, 760px);
  display: flex;
  align-items: center;
  background: var(--navy);
  color: #FFFFFF;
  overflow: hidden;
}
.hero__slides { position: absolute; inset: 0; z-index: -1; }
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1200ms ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__slide::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 19, 24, 0.86) 0%, rgba(17, 19, 24, 0.55) 55%, rgba(17, 19, 24, 0.25) 100%),
    linear-gradient(180deg, rgba(17, 19, 24, 0.2) 0%, rgba(17, 19, 24, 0.6) 100%);
}
/* Text block is constrained but shares the page container's left edge (the .container wrapper is
   full width; only this inner block has a max-width). */
.hero__content {
  position: relative;
  padding-block: clamp(72px, 12vw, 140px);
  max-width: 760px;
}
.hero__eyebrow { color: var(--gold); }
/* All headline variants are stacked in one grid cell so the h1 is always as tall as the longest
   title: the lead and CTA buttons never move when the slide changes. Inactive titles are
   visibility:hidden (removed from the accessibility tree, like display:none). */
.hero__title {
  display: grid;
  color: #FFFFFF;
  font-size: clamp(2.1rem, 1.3rem + 4vw, 3.9rem);
  margin-bottom: 1.25rem;
}
.hero__title-slide { grid-area: 1 / 1; display: block; visibility: hidden; }
.hero__title-slide.is-active { visibility: visible; animation: hero-fade 900ms var(--ease) both; }
@keyframes hero-fade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.hero__lead { color: rgba(255, 255, 255, 0.85); font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem); margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__controls {
  position: absolute;
  left: 0; right: 0; bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.hero__dots { display: flex; align-items: center; gap: 8px; }
/* Pause/resume control (WCAG 2.2.2): same look as the carousel buttons, on the dark hero. */
.hero__pause {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(17, 19, 24, 0.35);
  color: #FFFFFF;
  transition: border-color var(--dur), background-color var(--dur), color var(--dur);
}
.hero__pause:hover { border-color: var(--gold); background: var(--gold); color: #111318; }
.hero__pause:focus-visible { outline-color: var(--gold); }
.hero__pause-icon--play, .hero__pause[aria-pressed="true"] .hero__pause-icon--pause { display: none; }
.hero__pause[aria-pressed="true"] .hero__pause-icon--play { display: block; }
.hero__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 2px solid transparent;
  transition: background-color var(--dur), transform var(--dur);
}
.hero__dot:hover { background: rgba(255, 255, 255, 0.8); }
.hero__dot[aria-current="true"] { background: var(--gold); transform: scale(1.15); }
.hero__dot:focus-visible { outline-color: var(--gold); }
/* No-JS fallback: show the first slide */
.hero__slide:first-child { opacity: 1; }
.hero__title-slide:first-child { visibility: visible; }
.hero.is-ready .hero__slide:first-child:not(.is-active) { opacity: 0; }
.hero.is-ready .hero__title-slide:first-child:not(.is-active) { visibility: hidden; }
html:not(.js) .hero__controls { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; }
  .hero__title-slide.is-active { animation: none; }
}

/* ---------- 9. Feature tiles --------------------------------------------- */
.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 150px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.feature-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.feature-tile__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gold-soft);
}
.feature-tile__icon img { width: 30px; height: 30px; object-fit: contain; }
.feature-tile__title { font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.feature-tile__text { font-size: 0.9rem; color: var(--muted); }

/* Feature groups (features-benefits page) */
.feature-group {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature-group__head { display: flex; align-items: center; gap: 1rem; }
.feature-group__head .feature-tile__icon { flex-shrink: 0; }
.feature-group__title { font-size: 1.2rem; }
.feature-group__points { display: grid; gap: 0.5rem; padding-left: 0; }
.feature-group__points li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-2);
}
.feature-group__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 0.9rem; height: 0.9rem;
  border-radius: 50%;
  background: var(--gold);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M8 0a8 8 0 110 16A8 8 0 018 0zm3.3 5.3L7 9.6 4.7 7.3 3.3 8.7 7 12.4l5.7-5.7z'/></svg>") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M8 0a8 8 0 110 16A8 8 0 018 0zm3.3 5.3L7 9.6 4.7 7.3 3.3 8.7 7 12.4l5.7-5.7z'/></svg>") center / contain no-repeat;
}

/* Check list (generic) */
.check-list { display: grid; gap: 0.6rem; }
.check-list li { position: relative; padding-left: 1.8rem; }
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.35em;
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: var(--gold);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M8 0a8 8 0 110 16A8 8 0 018 0zm3.3 5.3L7 9.6 4.7 7.3 3.3 8.7 7 12.4l5.7-5.7z'/></svg>") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M8 0a8 8 0 110 16A8 8 0 018 0zm3.3 5.3L7 9.6 4.7 7.3 3.3 8.7 7 12.4l5.7-5.7z'/></svg>") center / contain no-repeat;
}

/* ---------- 10. Logo wall ------------------------------------------------ */
.logo-wall { padding-block: var(--section-y); }
.logo-wall__heading { text-align: center; margin-bottom: 2rem; }
.logo-wall__grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) { .logo-wall__grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 760px) { .logo-wall__grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .logo-wall__grid { grid-template-columns: repeat(6, 1fr); } }
.logo-wall__tile {
  display: grid;
  place-items: center;
  height: 96px;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.logo-wall__tile img {
  max-height: 56px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter var(--dur) var(--ease), opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.logo-wall__tile:hover, .logo-wall__tile:focus-within { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.logo-wall__tile:hover img, .logo-wall__tile:focus-within img { filter: none; opacity: 1; transform: scale(1.04); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-wall__tile { background: #FFFFFF; border-color: transparent; }
}
:root[data-theme="dark"] .logo-wall__tile { background: #FFFFFF; border-color: transparent; }
.logo-wall--compact { padding-block: calc(var(--section-y) * 0.5); }
.logo-wall--compact .logo-wall__grid { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin-inline: auto; }
@media (min-width: 640px) { .logo-wall--compact .logo-wall__grid { grid-template-columns: repeat(4, 1fr); } }
.logo-wall--compact .logo-wall__tile { height: 84px; }

/* ---------- 11. Testimonials carousel ----------------------------------- */
.testimonials { position: relative; }
.carousel { position: relative; }
.carousel__viewport { overflow: hidden; touch-action: pan-y; }
.carousel__track { display: grid; gap: 1.5rem; }
/* With JS: slides stack on top of each other, one visible */
.carousel.is-ready .carousel__track { display: grid; grid-template-areas: "slide"; }
.carousel.is-ready .carousel__slide {
  grid-area: slide;
  opacity: 0;
  visibility: hidden;
  transform: translateX(16px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease), visibility 0s linear 500ms;
}
.carousel.is-ready .carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.carousel.is-ready .carousel__slide.is-active ~ .carousel__slide { transform: translateX(16px); }
.carousel.is-ready .carousel__slide.is-prev { transform: translateX(-16px); }
.testimonial {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.testimonial__quote {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink);
  max-width: 60ch;
}
.testimonial__quote::before { content: "\201C"; color: var(--gold); font-size: 2.6em; line-height: 0; vertical-align: -0.4em; margin-right: 0.15em; font-weight: 800; }
.testimonial__who { display: flex; align-items: center; gap: 1rem; }
.testimonial__logo {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px;
}
.testimonial__logo img { max-height: 48px; width: auto; object-fit: contain; }
.testimonial__name { font-weight: 700; color: var(--ink); }
.testimonial__role { font-size: 0.9rem; color: var(--muted); }
.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.carousel__btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.2rem;
  transition: border-color var(--dur), background-color var(--dur), color var(--dur);
}
.carousel__btn:hover { border-color: var(--gold); background: var(--gold); color: #111318; }
.carousel__btn--pause { width: 36px; height: 36px; }
.carousel__icon--play, .carousel__btn--pause[aria-pressed="true"] .carousel__icon--pause { display: none; }
.carousel__btn--pause[aria-pressed="true"] .carousel__icon--play { display: block; }
.carousel__dots { display: flex; gap: 8px; }
.carousel__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line);
  transition: background-color var(--dur), transform var(--dur);
}
.carousel__dot:hover { background: var(--muted); }
.carousel__dot[aria-current="true"] { background: var(--gold); transform: scale(1.2); }
.carousel:not(.is-ready) .carousel__controls { display: none; }
.section--navy .testimonial { background: var(--navy-2); border-color: rgba(255,255,255,0.08); }
.section--navy .testimonial__quote, .section--navy .testimonial__name { color: #FFFFFF; }
.section--navy .testimonial__role { color: var(--on-navy-muted); }
.section--navy .carousel__btn { background: transparent; color: #FFFFFF; border-color: rgba(255,255,255,0.3); }
.section--navy .carousel__dot { background: rgba(255,255,255,0.3); }
.section--navy .carousel__dot[aria-current="true"] { background: var(--gold); }

/* ---------- 12. Cards ---------------------------------------------------- */
.card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card--soft { background: var(--surface-2); box-shadow: none; }
.card--accent { border-top: 4px solid var(--gold); }
.card__title { margin-bottom: 0.5rem; }
.card__text { color: var(--text-2); }
.card--contact .card__title { display: flex; align-items: center; gap: 0.5rem; }
.contact-lines { display: grid; gap: 0.35rem; color: var(--text-2); }
.contact-lines a { font-weight: 600; }

.stat { text-align: center; }
.stat__value { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 800; color: var(--gold-dark); line-height: 1; }
.stat__label { color: var(--muted); font-size: 0.95rem; margin-top: 0.4rem; }

.pricing-band { text-align: center; }
.pricing-band p { margin-inline: auto; }

/* ---------- 13. Forms ---------------------------------------------------- */
.lead-form { display: grid; gap: 1.25rem; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-field--full { grid-column: 1 / -1; }
}
.form-field { display: grid; gap: 0.35rem; }
.form-label { font-weight: 600; font-size: 0.925rem; color: var(--ink); }
.form-req { color: var(--danger); }
.form-opt { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.form-input {
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.form-input::placeholder { color: var(--muted); }
.form-input:hover { border-color: var(--muted); }
.form-input:focus-visible {
  outline: none;
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.25);
}
.form-input[aria-invalid="true"] { border-color: var(--danger); }
.form-input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.2); }
.form-textarea { min-height: 140px; resize: vertical; }
.form-select {
  appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%236B7280' d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 14px;
}
.form-error { font-size: 0.85rem; color: var(--danger); min-height: 0; }
.form-error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-status { font-size: 0.95rem; padding: 0.8rem 1rem; border-radius: var(--radius-sm); }
.form-status:empty { display: none; }
.form-status.is-error { background: var(--danger-bg); color: var(--danger); }
.form-status.is-success { background: var(--success-bg); color: var(--success); }
.form-status.is-info { background: var(--surface-2); color: var(--ink-2); }
.form-success {
  display: grid;
  gap: 0.75rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--success-bg);
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
  border-radius: var(--radius);
}
.form-success__title { color: var(--success); display: flex; align-items: center; gap: 0.5rem; }
.form-success p { color: var(--ink-2); }
.lead-form.is-sending { opacity: 0.85; }
/* Honeypot: off-screen, not display:none (bots check), never focusable */
.hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}
.cf-turnstile { min-height: 65px; }
.section--navy .form-label { color: #FFFFFF; }
.section--navy .form-input { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); color: #FFFFFF; }
.section--navy .form-note { color: var(--on-navy-muted); }

/* ---------- 14. CTA band ------------------------------------------------- */
.cta-band { padding-block: clamp(48px, 7vw, 88px); }
.cta-band--navy { background: var(--navy); color: #FFFFFF; }
.cta-band--navy .cta-band__heading { color: #FFFFFF; }
.cta-band--navy .cta-band__body { color: var(--on-navy-muted); }
.cta-band--gold { background: var(--gold); color: #111318; }
.cta-band--gold .cta-band__heading { color: #111318; }
.cta-band--gold .cta-band__body { color: rgba(17, 19, 24, 0.8); }
.cta-band__inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 860px) {
  .cta-band__inner { grid-template-columns: 1fr auto; gap: 3rem; }
}
.cta-band__heading { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem); margin-bottom: 0.5rem; }
.cta-band__body { font-size: 1.05rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- 15. Footer --------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: var(--on-navy-muted);
  padding-block: clamp(48px, 6vw, 80px) 2rem;
  margin-top: auto;
}
.site-footer a { color: #FFFFFF; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; } }
.site-footer__brand img {
  height: 64px; width: auto;
  background: #FFFFFF;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.site-footer__tagline { margin-top: 1rem; max-width: 36ch; }
.site-footer__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.site-footer__actions .btn { text-decoration: none; }
.site-footer__actions .btn-primary:hover { color: #111318; text-decoration: none; }
.site-footer__heading { font-size: 1rem; color: #FFFFFF; margin-bottom: 0.75rem; letter-spacing: 0.01em; }
.site-footer__address { line-height: 1.75; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  font-size: 0.875rem;
}
.site-footer__copy { flex: 1 1 100%; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer__top { margin-left: auto; }
@media (min-width: 760px) {
  .site-footer__copy { flex: 1 1 auto; }
}

/* ---------- 16. Prose (legal pages) ------------------------------------- */
.prose { max-width: 76ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.4em; margin-bottom: 0.6em; font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem); padding-top: 0.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; margin-bottom: 0.4em; font-size: 1.15rem; }
.prose p, .prose li { color: var(--text-2); max-width: none; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4em; }
.prose a { font-weight: 500; }
.prose strong { color: var(--ink); }
.prose__meta { font-size: 0.9rem; color: var(--muted); }
.prose hr { margin: 2.5em 0; }

/* ---------- 17. Reveal animation ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms var(--ease), transform 650ms var(--ease);
}
/* Compositor hint only while the element still has to animate; dropped once revealed so 30+
   layers are not kept alive for the life of the page. */
.reveal:not(.is-visible) { will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 90ms; }
.reveal-delay-2 { transition-delay: 180ms; }
.reveal-delay-3 { transition-delay: 270ms; }
.reveal-delay-4 { transition-delay: 360ms; }
/* Staggered children: add .reveal-stagger to a parent whose children are .reveal */
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger > .reveal:nth-child(n+7) { transition-delay: 460ms; }
/* Without JS or with reduced motion, everything is visible */
html.no-js .reveal, html:not(.js) .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 18. Error page ----------------------------------------------- */
.error-page { text-align: center; max-width: 640px; margin-inline: auto; }
.error-page p { margin-inline: auto; }
.error-page__title { margin-bottom: 1rem; }
.error-page .btn-row { justify-content: center; }
.error-page__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; margin-top: 2rem; font-weight: 500; }

/* ---------- 19. Admin ---------------------------------------------------- */
.admin__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.admin__title { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); }
.admin__session { display: flex; gap: 0.5rem; }
.admin__login { max-width: 480px; display: grid; gap: 1rem; }
.admin__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 1rem; }
.admin__toolbar .form-input { width: auto; min-height: 40px; padding-block: 0.4rem; }
.admin__count { margin-left: auto; color: var(--muted); font-size: 0.9rem; }
.admin__pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; }
.admin__page { color: var(--muted); font-size: 0.9rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 900px; }
.admin-table th, .admin-table td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { background: var(--surface-2); font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tr.is-unread td { font-weight: 500; }
.admin-table tr.is-unread td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.admin-table td.cell-message { max-width: 320px; }
.admin-table .msg-text { white-space: pre-wrap; word-break: break-word; }
.admin-table .msg-text.is-collapsed { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.admin-table .msg-toggle { font-size: 0.8rem; color: var(--link); font-weight: 600; margin-top: 0.25rem; }
.admin-table .cell-actions { white-space: nowrap; }
.admin-table .cell-actions .btn + .btn { margin-left: 0.35rem; }
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge--contact { background: var(--gold-soft); color: var(--gold-dark); }
.badge--demo { background: var(--navy); color: #FFFFFF; }
.badge--read { background: var(--success-bg); color: var(--success); }
.badge--unread { background: var(--danger-bg); color: var(--danger); }
.admin-table .empty { text-align: center; color: var(--muted); padding: 2rem; }

/* ---------- 20. Utilities ------------------------------------------------ */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2.5rem !important; }
.mx-auto { margin-inline: auto !important; }
.flow > * + * { margin-top: 1em; }
.hidden, [hidden] { display: none !important; }
.badge-pill { display: inline-block; padding: 0.3rem 0.8rem; border-radius: var(--radius-pill); background: var(--gold-soft); color: var(--gold-dark); font-size: 0.8rem; font-weight: 600; }
