﻿/* =========================================================================
   crowetz.com — design system  (v3 — session 9, 2026-05-15)
   v3: + nav dropdown, + service-card-as-link, + 6-pillar structure
   v2 (session 8): warm neutral ramp + single orange accent rebuild.
   No build step, no framework, no external requests, system fonts.

   ACCENT CONTRAST RULE (WCAG AA):
     --accent        text-safe deep orange  — OK for text, fills, large type
     --accent-vivid  bright orange          — DECORATION ONLY, never text
   ========================================================================= */

/* --- Reset (modern, opinionated) ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* --- Tokens — LIGHT ------------------------------------------------------- */
:root {
  /* Warm neutral ramp — never pure #fff (kills the "too much white" problem) */
  --bg:        #fbfaf8;
  --surface:   #f3efe9;
  --surface-2: #e9e3da;
  --border:    #ddd6cb;
  --border-strong: #c9c0b2;
  --fg:        #1b1714;
  --fg-muted:  #544e46;
  --fg-subtle: #6f6860;

  /* Orange accent system */
  --accent:        #c2410c;   /* text-safe: 5.1:1 on --bg — fills, accent text, large type */
  --accent-hover:  #9a3412;
  --accent-vivid:  #f97316;   /* DECORATION ONLY — dividers, frames, glows. Fails text contrast. */
  --accent-fg:     #ffffff;
  --accent-soft:   #fbe6d4;   /* pale orange tint — badge / highlight backgrounds */

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(27,23,20,.06), 0 2px 6px rgba(27,23,20,.05);
  --shadow-md: 0 2px 6px rgba(27,23,20,.07), 0 10px 28px rgba(27,23,20,.09);
  --shadow-lg: 0 8px 22px rgba(27,23,20,.10), 0 24px 60px rgba(27,23,20,.14);

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* Scale (fluid) — bumped up one notch session 11 for readability
     (Alan: small fonts felt too small; titles already perfect) */
  --step--1: clamp(0.95rem, 0.90rem + 0.20vw, 1.05rem);
  --step-0:  clamp(1.13rem, 1.05rem + 0.35vw, 1.27rem);
  --step-1:  clamp(1.30rem, 1.18rem + 0.55vw, 1.52rem);
  --step-2:  clamp(1.44rem, 1.25rem + 0.95vw, 1.80rem);
  --step-3:  clamp(1.73rem, 1.40rem + 1.65vw, 2.30rem);
  --step-4:  clamp(2.07rem, 1.55rem + 2.60vw, 2.95rem);
  --step-5:  clamp(2.49rem, 1.65rem + 4.20vw, 3.70rem);
  --step-6:  clamp(2.95rem, 1.70rem + 6.45vw, 4.60rem);

  /* Layout */
  --container: 74rem;
  --container-narrow: 44rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 7px;
  --radius-lg: 22px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Tokens — DARK (system) ---------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14110e;
    --surface:   #1d1813;
    --surface-2: #271f18;
    --border:    #352c22;
    --border-strong: #4a3e30;
    --fg:        #f5f0e8;
    --fg-muted:  #b4aa9c;
    --fg-subtle: #8b8073;

    --accent:        #fb923c;   /* bright orange reads safely on dark */
    --accent-hover:  #fdba74;
    --accent-vivid:  #fb923c;
    --accent-fg:     #1a1106;
    --accent-soft:   #38240f;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.40), 0 2px 6px rgba(0,0,0,.35);
    --shadow-md: 0 2px 6px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.55);
    --shadow-lg: 0 8px 22px rgba(0,0,0,.55), 0 24px 60px rgba(0,0,0,.65);
  }
}

/* --- Manual override (data-theme set by site.js) ------------------------- */
[data-theme="light"] {
  --bg: #fbfaf8; --surface: #f3efe9; --surface-2: #e9e3da;
  --border: #ddd6cb; --border-strong: #c9c0b2;
  --fg: #1b1714; --fg-muted: #544e46; --fg-subtle: #6f6860;
  --accent: #c2410c; --accent-hover: #9a3412; --accent-vivid: #f97316;
  --accent-fg: #ffffff; --accent-soft: #fbe6d4;
  --shadow-sm: 0 1px 2px rgba(27,23,20,.06), 0 2px 6px rgba(27,23,20,.05);
  --shadow-md: 0 2px 6px rgba(27,23,20,.07), 0 10px 28px rgba(27,23,20,.09);
  --shadow-lg: 0 8px 22px rgba(27,23,20,.10), 0 24px 60px rgba(27,23,20,.14);
}
[data-theme="dark"] {
  --bg: #14110e; --surface: #1d1813; --surface-2: #271f18;
  --border: #352c22; --border-strong: #4a3e30;
  --fg: #f5f0e8; --fg-muted: #b4aa9c; --fg-subtle: #8b8073;
  --accent: #fb923c; --accent-hover: #fdba74; --accent-vivid: #fb923c;
  --accent-fg: #1a1106; --accent-soft: #38240f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.40), 0 2px 6px rgba(0,0,0,.35);
  --shadow-md: 0 2px 6px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.55);
  --shadow-lg: 0 8px 22px rgba(0,0,0,.55), 0 24px 60px rgba(0,0,0,.65);
}

/* --- Base ---------------------------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  color: var(--fg);
  background: var(--bg);
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

a { color: var(--accent); text-decoration: none; transition: color 150ms var(--ease); }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; font-weight: 650; }
h1 { font-size: var(--step-6); letter-spacing: -0.04em; font-weight: 800; }
h2 { font-size: var(--step-4); font-weight: 750; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-weight: 650; line-height: 1.25; }

p + p { margin-top: 1rem; }
strong { font-weight: 680; color: var(--fg); }

/* --- Layout primitives --------------------------------------------------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); position: relative; }

/* Section rhythm — explicit background bands kill the "too much white" flatness */
.section--tint { background: var(--surface); }
.section--dark {
  /* always-dark band, even in light mode — strong rhythm break */
  --bg: #14110e; --surface: #1d1813; --surface-2: #271f18;
  --border: #3a3127; --border-strong: #50432f;
  --fg: #f5f0e8; --fg-muted: #b9afa0; --fg-subtle: #8b8073;
  --accent: #fb923c; --accent-hover: #fdba74; --accent-vivid: #fb923c;
  --accent-fg: #1a1106; --accent-soft: #38240f;
  background: var(--bg); color: var(--fg);
}
/* Hairline dividers only between same-tone sections (avoids muddy seams) */
.section + .section:not(.section--tint):not(.section--dark) { border-top: 1px solid var(--border); }
.section--tint + .section--tint { border-top: 1px solid var(--border); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: ""; width: 1.75rem; height: 2px; background: var(--accent-vivid);
  border-radius: 2px; flex: none;
}
.eyebrow--muted { color: var(--fg-subtle); }
.eyebrow--muted::before { background: var(--fg-subtle); }

.lead {
  font-size: var(--step-1);
  color: var(--fg-muted);
  max-width: 40rem;
  line-height: 1.5;
}

/* --- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem;
}
/* Brand stack — name + tiny descriptor, left of nav */
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.05;
}
.brand::before {
  content: ""; width: 0.6rem; height: 0.6rem; border-radius: 2px;
  background: var(--accent-vivid); flex: none;
}
.brand-name {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--fg);
  text-transform: uppercase;
  display: block;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}
.brand:hover { color: var(--fg); }
.brand:hover .brand-tag { color: var(--accent-hover); }
@media (max-width: 540px) {
  .brand-tag { display: none; }
}
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a {
  color: var(--fg-muted);
  font-size: var(--step--1);
  font-weight: 500;
}
.nav a:hover { color: var(--fg); }
.nav .btn-primary { color: var(--accent-fg); }
/* Hamburger button (mobile only) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--fg);
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 1001;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px auto;
  border-radius: 2px;
  transition: transform 220ms var(--ease), opacity 180ms var(--ease);
}
.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); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(85vw, 320px);
    background: var(--bg);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 5rem 1.5rem 2rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    transform: translateX(100%);
    transition: transform 240ms var(--ease);
    z-index: 1000;
    overflow-y: auto;
  }
  .nav[data-open="true"] { transform: translateX(0); }
  .nav a, .nav-trigger { font-size: var(--step-0); padding: 0.5rem 0; }
  .nav-dropdown { width: 100%; }
  .nav-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: 0;
    padding: 0;
    margin: 0.5rem 0 0 1rem;
    background: transparent;
  }
  .nav-dropdown:not([data-open="true"]) > .nav-menu { display: none; }
  .nav .btn-primary { width: 100%; text-align: center; }
  body[data-nav-open="true"] { overflow: hidden; }
  body[data-nav-open="true"]::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
  }
}

/* --- Nav dropdown (Services menu) ---------------------------------------- */
.nav-dropdown { position: relative; }
.nav-trigger {
  background: transparent; border: 0; padding: 0;
  color: var(--fg-muted);
  font-size: var(--step--1);
  font-weight: 500;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 0.35rem;
  cursor: pointer;
  transition: color 150ms var(--ease);
}
.nav-trigger:hover,
.nav-trigger[aria-expanded="true"] { color: var(--fg); }
.nav-caret {
  display: inline-block;
  font-size: 0.7em;
  transition: transform 150ms var(--ease);
}
.nav-trigger[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

/* Hover-bridge fix: the gap between trigger and menu used to break :hover.
   Add an invisible bridge below the trigger so the dropdown stays open
   while moving the cursor down. */
.nav-trigger::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 0.85rem;       /* covers the visual gap to the menu */
  background: transparent;
}
.nav-trigger { position: relative; }

.nav-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 18rem;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 60;
}
.nav-dropdown[data-open="true"] > .nav-menu,
.nav-dropdown:hover > .nav-menu,
.nav-dropdown:focus-within > .nav-menu { display: block; }
.nav-menu li { list-style: none; margin: 0; }
.nav-menu a {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--fg);
  font-size: var(--step--1);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 120ms var(--ease), color 120ms var(--ease);
}
.nav-menu a:hover {
  background: var(--surface);
  color: var(--accent);
}
.nav-menu a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 720px) {
  .nav { gap: 1rem; }
  .nav a:not(.btn-primary) { display: none; }
  .nav-dropdown { display: none; }
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease),
              box-shadow 150ms var(--ease), border-color 150ms var(--ease);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary {
  background: var(--accent); color: var(--accent-fg);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--accent-hover); color: var(--accent-fg);
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent; color: var(--fg); border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); color: var(--fg); border-color: var(--fg-subtle); transform: translateY(-2px); }
.btn-lg { padding: 0.95rem 1.7rem; font-size: var(--step-0); }

/* --- Badge --------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge::before {
  content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: var(--accent-vivid); flex: none;
}

/* --- Hero ---------------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 9vw, 6rem) clamp(3rem, 7vw, 5rem); }
.hero h1 { max-width: 24ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 2rem; max-width: 62rem; }
.hero-actions { margin-top: 2.25rem; display: flex; gap: 0.85rem; flex-wrap: wrap; align-items: center; }

/* Stacked hero (session 12): title above, picture full-width, lead below.
   Title + lead remain left-aligned to the container; figure is centered with a
   generous cap so it uses the room it has. */
.hero-stack { display: block; }
.hero-stack > .hero-figure { margin: clamp(1.75rem, 4vw, 2.75rem) auto; }

/* Framed media figure — the WPTV credential card */
.hero-figure {
  position: relative;
  max-width: 64rem;       /* stacked layout — figure has the full container to use */
  width: 100%;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  transition: transform 300ms var(--ease);
}
.hero-figure::before {
  /* vivid accent edge — decoration only */
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-vivid), transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.hero-figure img {
  width: 100%; height: auto;
  border-radius: calc(var(--radius-lg) - 0.55rem);
  display: block;
}
.hero-figure figcaption {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 0.6rem 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}
.hero-figure figcaption strong { color: var(--fg); font-weight: 650; }
.hero-figure figcaption .dot {
  width: 0.4rem; height: 0.4rem; border-radius: 50%;
  background: var(--accent-vivid); flex: none;
}

@media (max-width: 860px) {
  .hero-stack > .hero-figure { margin-block: 2rem; }
  .hero .lead { margin-top: 1.5rem; }
}

/* --- Contact form -------------------------------------------------------- */
.contact-form { display: grid; gap: 1.1rem; margin-top: 1.75rem; }
.contact-form .field { display: grid; gap: 0.4rem; }
.contact-form label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.01em;
}
.contact-form label .req { color: var(--accent-vivid); margin-left: 0.15rem; }
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-size: var(--step-0);
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-vivid);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-vivid) 22%, transparent);
}
.contact-form textarea { min-height: 11rem; resize: vertical; line-height: 1.55; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.contact-form .turnstile-wrap { margin-top: 0.25rem; min-height: 65px; }
.contact-form .form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }
.contact-form .form-actions .btn[disabled] { opacity: 0.55; cursor: progress; }
.form-status { margin-top: 1rem; padding: 0.9rem 1.1rem; border-radius: var(--radius); display: none; line-height: 1.5; }
.form-status.is-success { display: block; background: color-mix(in srgb, #16a34a 14%, transparent); border: 1px solid #16a34a; color: var(--fg); }
.form-status.is-error   { display: block; background: color-mix(in srgb, #dc2626 12%, transparent); border: 1px solid #dc2626; color: var(--fg); }
.form-status.is-pending { display: block; background: var(--surface-2); border: 1px solid var(--border); color: var(--fg-muted); }

/* --- FAQ accordion (native details/summary) ------------------------------ */
.faq-list { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.faq-item[open] {
  border-color: var(--accent-vivid);
  box-shadow: var(--shadow);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--fg);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-weight: 400; font-size: 1.4rem; line-height: 1;
  color: var(--accent-vivid);
  flex: none;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body {
  padding: 0 1.15rem 1.1rem;
  color: var(--fg-muted);
  line-height: 1.65;
}
.faq-item .faq-body p { margin: 0; }
.faq-item .faq-body p + p { margin-top: 0.7rem; }

/* --- Stats grid ---------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
}
.stat {
  padding: 1.9rem 1.4rem;
  background: var(--bg);
  transition: background 150ms var(--ease);
}
.section--tint .stat { background: var(--surface); }
.stat:hover { background: var(--surface-2); }
.stat-value {
  font-family: var(--font-mono);
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label {
  font-size: var(--step--1);
  color: var(--fg-muted);
  margin-top: 0.6rem;
  line-height: 1.35;
}

/* --- Service cards ------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 3rem;
}
.service {
  background: var(--bg);
  padding: 2.1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  position: relative;
  transition: background 150ms var(--ease);
}
.section--tint .service { background: var(--surface); }
.service::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent-vivid);
  transform: scaleY(0); transform-origin: top;
  transition: transform 200ms var(--ease);
}
.service:hover { background: var(--surface-2); }
.service:hover::before { transform: scaleY(1); }
.service-num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.service h3 { font-size: var(--step-1); }
.service p { color: var(--fg-muted); font-size: var(--step-0); }

/* Service card as link (for the homepage 6-pillar grid) */
a.service {
  text-decoration: none;
  color: inherit;
}
a.service:hover { color: inherit; }
a.service h3 { color: var(--fg); }
.service-cta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: gap 150ms var(--ease), color 150ms var(--ease);
}
a.service:hover .service-cta {
  gap: 0.6rem;
  color: var(--accent-hover);
}

/* Responsive: 3 cols → 2 cols → 1 col (keeps the 6-card grid balanced) */
@media (max-width: 960px) {
  .services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
}

/* Sub-page H1 sizing (slightly smaller than homepage hero) */
.subpage-h1 { font-size: var(--step-5); max-width: 22ch; }

/* --- Media-credibility band --------------------------------------------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin-top: 2.75rem;
}
.media-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.media-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.media-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.media-card figcaption {
  padding: 1rem 1.15rem 1.15rem;
}
.media-card .media-outlet {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.media-card .media-desc {
  color: var(--fg-muted);
  font-size: var(--step--1);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* --- Trust list ---------------------------------------------------------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.85rem;
  margin-top: 2.5rem;
}
.trust-item {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-vivid);
  border-radius: var(--radius-sm);
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
}
.section--tint .trust-item { background: var(--bg); }
.trust-item:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }
.trust-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
}
.trust-name { color: var(--fg); font-weight: 550; }

/* --- Quote / pull -------------------------------------------------------- */
.pull {
  position: relative;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 1.4rem 1.6rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 2rem 0;
  font-size: var(--step-1);
  color: var(--fg);
  font-weight: 450;
  font-style: normal;
  line-height: 1.45;
}
.section--tint .pull { background: var(--bg); }
.pull cite {
  display: block; margin-top: 0.85rem;
  font-size: var(--step--1);
  color: var(--fg-muted);
  font-style: normal;
  font-weight: 500;
}

/* --- Testimonials (component for P4 — defined now, used later) ----------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
  margin-top: 2.75rem;
}
.quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.section--tint .quote { background: var(--bg); }
.quote p { color: var(--fg); font-size: var(--step-0); line-height: 1.5; }
.quote::before {
  content: "\201C"; font-size: 2.5rem; line-height: 0.1; color: var(--accent-vivid);
  font-family: Georgia, serif; height: 1rem;
}
.quote-cite { font-size: var(--step--1); color: var(--fg-muted); margin-top: auto; }
.quote-cite strong { color: var(--fg); display: block; }

/* --- Credentials list ---------------------------------------------------- */
.creds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.cred {
  padding-top: 1rem;
  border-top: 2px solid var(--accent-vivid);
}
.cred dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 0.4rem;
}
.cred dd { color: var(--fg); font-weight: 550; }

/* --- CTA section --------------------------------------------------------- */
.cta-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.section--tint .cta-block { background: var(--bg); }
.section--dark .cta-block { background: var(--surface); box-shadow: var(--shadow-md); }
.cta-block h2 { max-width: 22ch; }
.cta-block h2 em { font-style: normal; color: var(--accent); }
.cta-block .lead { margin-top: 1rem; }
.cta-actions { margin-top: 2rem; display: flex; gap: 0.85rem; flex-wrap: wrap; align-items: center; }

/* --- Portrait / figures (about page) ------------------------------------ */
.portrait {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.portrait img { width: 100%; height: auto; display: block; }
.portrait figcaption {
  padding: 0.85rem 1.1rem;
  font-size: var(--step--1);
  color: var(--fg-muted);
  background: var(--surface);
}
.media-figure-inline {
  margin: 2.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.media-figure-inline img { width: 100%; height: auto; }
.media-figure-inline figcaption {
  padding: 0.8rem 1.1rem;
  font-size: var(--step--1);
  color: var(--fg-muted);
  background: var(--surface);
}

/* --- Credentials, grouped (about + homepage) ----------------------------- */
.creds-grouped {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem 2rem;
  margin-top: 1.5rem;
}
.cred-group {
  padding-top: 1rem;
  border-top: 2px solid var(--accent-vivid);
}
.cred-group-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.cred-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.cred-list li {
  color: var(--fg);
  font-weight: 500;
  font-size: var(--step-0);
  line-height: 1.4;
}

/* --- Contact-page cards (small detail cards under hero) ------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.contact-card {
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.contact-card p { font-size: var(--step-0); color: var(--fg); margin: 0; }
.contact-card .eyebrow { margin-bottom: 0.5rem; }

/* --- Footer (rich, multi-column) ----------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
  font-size: var(--step--1);
  color: var(--fg-muted);
}
.site-footer a { color: var(--fg-muted); }
.site-footer a:hover { color: var(--accent); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

.footer-col--brand .footer-brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  margin-bottom: 1rem;
  line-height: 1.05;
}
.footer-col--brand .footer-brand::before {
  content: ""; width: 0.6rem; height: 0.6rem; border-radius: 2px;
  background: var(--accent-vivid); flex: none;
}
.footer-col--brand .brand-name {
  font-family: var(--font-mono);
  font-size: var(--step-0);
  font-weight: 700; letter-spacing: 0.14em;
  color: var(--fg); text-transform: uppercase;
  display: block;
}
.footer-col--brand .brand-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-top: 3px;
}
.footer-tag {
  color: var(--fg-muted);
  font-size: var(--step--1);
  line-height: 1.5;
  max-width: 26rem;
}

.footer-h {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  font-weight: 600;
  margin-bottom: 0.85rem;
}
.footer-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.footer-list li, .footer-list a {
  font-size: var(--step--1);
  line-height: 1.45;
}

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--fg-subtle);
}
.footer-bottom-right { color: var(--fg-subtle); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* --- Theme toggle -------------------------------------------------------- */
.theme-toggle {
  background: transparent; border: 1px solid var(--border-strong);
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 150ms var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 1rem; height: 1rem; }

/* --- Scroll reveal (progressive) ----------------------------------------
   Hidden state ONLY applies when <html class="js"> is set (inline head
   script). If JS is disabled, .reveal has no effect — content stays visible
   for crawlers and no-JS users. JS then adds .is-visible via IntersectionObserver. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  will-change: opacity, transform;
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* --- Utilities ----------------------------------------------------------- */
.muted { color: var(--fg-muted); }
.center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.accent-text { color: var(--accent); }

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

/* --- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal { opacity: 1 !important; transform: none !important; }
}
