/* ==========================================================================
   Ross the Roofer
   Tokens, then base, then layout, then components, then utilities.
   BEM-ish naming. No framework. Built by build.py into public/.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   Palette comes off the wordmark: purple, the script red, cream, and a warm
   accent. Everything else is derived from these.
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Purple, taken from the wordmark */
  --c-purple-950: #1C0E2B;
  --c-purple-900: #2B1642;
  --c-purple-800: #3D2059;
  --c-purple-700: #552A79;   /* logo purple */
  --c-purple-600: #6B3A95;
  --c-purple-500: #8452B0;
  --c-purple-200: #D6C6E8;
  --c-purple-100: #EFE7F6;

  /* Red, the script word in the wordmark */
  --c-red-700: #A61F1F;
  --c-red-600: #C62828;
  --c-red-500: #E14A3C;

  /* Warm accent */
  --c-butter-500: #D99A2B;
  --c-butter-400: #E8B44A;
  --c-butter-300: #F3D083;

  /* Warm neutrals */
  --c-ivory: #F7F1E4;
  --c-paper: #FFFCF5;
  --c-stone-100: #F0E8D8;
  --c-stone-200: #E2D8C4;
  --c-stone-300: #C9BCA2;
  --c-stone-500: #8B8069;
  --c-ink-900: #241B2E;
  --c-ink-700: #443A52;
  --c-ink-500: #6B6076;

  /* Semantic */
  --bg: var(--c-ivory);
  --bg-elevated: var(--c-paper);
  --fg: var(--c-ink-900);
  --fg-muted: var(--c-ink-500);
  --line: var(--c-stone-200);
  --accent: var(--c-butter-500);
  --brand: var(--c-purple-700);
  --focus: 0 0 0 3px rgba(85, 42, 121, .35);

  /* Slab display, brush script accent, condensed gothic for labels */
  --font-display: "Alfa Slab One", "Bookman Old Style", Georgia, serif;
  --font-script: "Pacifico", "Brush Script MT", cursive;
  --font-condensed: "Oswald", "Haettenschweiler", "Arial Narrow", sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: clamp(1rem, .95rem + .2vw, 1.0625rem);
  --fs-lg: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  --fs-h4: clamp(1.125rem, 1.05rem + .35vw, 1.3125rem);
  --fs-h3: clamp(1.375rem, 1.2rem + .7vw, 1.75rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.7vw, 2.875rem);
  --fs-h1: clamp(2.125rem, 1.5rem + 3vw, 4rem);
  --lh-tight: 1.03;
  --lh-snug: 1.12;
  --lh-body: 1.65;
  --tracking-caps: .12em;

  /* Space (8pt) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 8rem;
  --section-y: clamp(4rem, 3rem + 5vw, 7.5rem);

  /* Shape and motion. Offset shadows, not blurs. */
  --radius-sm: 3px;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(36, 27, 46, .07), 0 2px 8px rgba(36, 27, 46, .05);
  --shadow: 6px 6px 0 rgba(85, 42, 121, .12);
  --shadow-lg: 10px 10px 0 rgba(85, 42, 121, .16);
  --shadow-hard: 4px 4px 0 var(--c-purple-900);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .28s;

  --container: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 5rem;
}
/* --------------------------------------------------------------------------
   1b. Dark theme
   No attribute means follow the system. data-theme is set only when the
   visitor picks a side; main.js stores that choice.
   -------------------------------------------------------------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --c-ivory: #150C21;
  --c-paper: #1E1330;
  --c-stone-100: #241738;
  --c-stone-200: #322149;
  --c-stone-300: #45305F;
  --c-stone-500: #968AA6;
  --c-ink-900: #F7F1E4;
  --c-ink-700: #E2D9EA;
  --c-ink-500: #BCB1C9;
  --c-purple-100: #2C1E47;
  /* Semantic */
  --bg: var(--c-ivory);
  --bg-elevated: var(--c-paper);
  --fg: var(--c-ink-900);
  --fg-muted: var(--c-ink-500);
  --line: rgba(255, 255, 255, .1);
  --brand: #C3A8EC;
  --accent: var(--c-butter-400);
  --focus: 0 0 0 3px rgba(232, 180, 74, .5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow: 6px 6px 0 rgba(0, 0, 0, .35);
  --shadow-lg: 10px 10px 0 rgba(0, 0, 0, .45);
  --shadow-hard: 4px 4px 0 #000;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --c-ivory: #150C21;
  --c-paper: #1E1330;
  --c-stone-100: #241738;
  --c-stone-200: #322149;
  --c-stone-300: #45305F;
  --c-stone-500: #968AA6;
  --c-ink-900: #F7F1E4;
  --c-ink-700: #E2D9EA;
  --c-ink-500: #BCB1C9;
  --c-purple-100: #2C1E47;
  /* Semantic */
  --bg: var(--c-ivory);
  --bg-elevated: var(--c-paper);
  --fg: var(--c-ink-900);
  --fg-muted: var(--c-ink-500);
  --line: rgba(255, 255, 255, .1);
  --brand: #C3A8EC;
  --accent: var(--c-butter-400);
  --focus: 0 0 0 3px rgba(232, 180, 74, .5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow: 6px 6px 0 rgba(0, 0, 0, .35);
  --shadow-lg: 10px 10px 0 rgba(0, 0, 0, .45);
  --shadow-hard: 4px 4px 0 #000;
  }
}

/* What the token swap alone cannot reach */
:root[data-theme="dark"] .btn--outline { --btn-fg: var(--c-purple-200); --btn-bd: var(--c-purple-500); }
:root[data-theme="dark"] .btn--outline:hover { --btn-bg: var(--c-purple-600); --btn-bd: var(--c-purple-600); --btn-fg: #fff; }
:root[data-theme="dark"] .btn--primary { --btn-bg: var(--c-purple-600); --btn-bd: var(--c-purple-600); }
:root[data-theme="dark"] .btn--primary:hover { --btn-bg: var(--c-purple-500); --btn-bd: var(--c-purple-500); }
:root[data-theme="dark"] .site-header { background: rgba(26, 17, 48, .92); backdrop-filter: blur(12px); }
:root[data-theme="dark"] .nav__menu { background: var(--c-paper); }
:root[data-theme="dark"] .brand { color: #EAE3F5; }
:root[data-theme="dark"] .section--ink { background: #1D1338; }
:root[data-theme="dark"] .cta-band { background: var(--c-purple-800); }
:root[data-theme="dark"] .site-footer { background: #0D0719; border-top: 1px solid var(--line); }
:root[data-theme="dark"] .hero, :root[data-theme="dark"] .page-hero { background: #0F0920; }
:root[data-theme="dark"] .page-hero--light { background: var(--c-stone-100); }
:root[data-theme="dark"] .media img, :root[data-theme="dark"] .hero__bg img { filter: brightness(.9); }
:root[data-theme="dark"] .media-caption { background: rgba(13, 7, 25, .8); }
:root[data-theme="dark"] .prose blockquote { background: var(--c-paper); color: var(--c-ink-700); }
:root[data-theme="dark"] .callout { background: var(--c-purple-100); border-color: var(--c-purple-800); }
:root[data-theme="dark"] .callout--warn { background: rgba(158, 31, 43, .18); border-color: rgba(230, 90, 100, .35); }
:root[data-theme="dark"] .callout--warn strong { color: #F08A92; }
:root[data-theme="dark"] .field__error, :root[data-theme="dark"] .form__status.is-error { color: #F08A92; }
:root[data-theme="dark"] .field.is-invalid input, :root[data-theme="dark"] .field.is-invalid select, :root[data-theme="dark"] .field.is-invalid textarea { border-color: #F08A92; }
:root[data-theme="dark"] [style*="--c-red-600"] { color: #F08A92 !important; }
:root[data-theme="dark"] .sidebar__card--ink { background: var(--c-purple-800); }
:root[data-theme="dark"] .error-page__code { color: var(--c-purple-800); }
:root[data-theme="dark"] .choice span { background: var(--c-stone-100); }
:root[data-theme="dark"] .areas li a, :root[data-theme="dark"] .areas li span { background: var(--c-stone-100); }
/* Data-URI icons carry baked-in colours */
:root[data-theme="dark"] .check-list li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23D2B270' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .accordion__item summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23D2B270' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23B9B0C8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

@media (prefers-color-scheme: dark) {

/* What the token swap alone cannot reach */
:root:not([data-theme="light"]) .btn--outline { --btn-fg: var(--c-purple-200); --btn-bd: var(--c-purple-500); }
:root:not([data-theme="light"]) .btn--outline:hover { --btn-bg: var(--c-purple-600); --btn-bd: var(--c-purple-600); --btn-fg: #fff; }
:root:not([data-theme="light"]) .btn--primary { --btn-bg: var(--c-purple-600); --btn-bd: var(--c-purple-600); }
:root:not([data-theme="light"]) .btn--primary:hover { --btn-bg: var(--c-purple-500); --btn-bd: var(--c-purple-500); }
:root:not([data-theme="light"]) .site-header { background: rgba(26, 17, 48, .92); backdrop-filter: blur(12px); }
:root:not([data-theme="light"]) .nav__menu { background: var(--c-paper); }
:root:not([data-theme="light"]) .brand { color: #EAE3F5; }
:root:not([data-theme="light"]) .section--ink { background: #1D1338; }
:root:not([data-theme="light"]) .cta-band { background: var(--c-purple-800); }
:root:not([data-theme="light"]) .site-footer { background: #0D0719; border-top: 1px solid var(--line); }
:root:not([data-theme="light"]) .hero, :root:not([data-theme="light"]) .page-hero { background: #0F0920; }
:root:not([data-theme="light"]) .page-hero--light { background: var(--c-stone-100); }
:root:not([data-theme="light"]) .media img, :root:not([data-theme="light"]) .hero__bg img { filter: brightness(.9); }
:root:not([data-theme="light"]) .media-caption { background: rgba(13, 7, 25, .8); }
:root:not([data-theme="light"]) .prose blockquote { background: var(--c-paper); color: var(--c-ink-700); }
:root:not([data-theme="light"]) .callout { background: var(--c-purple-100); border-color: var(--c-purple-800); }
:root:not([data-theme="light"]) .callout--warn { background: rgba(158, 31, 43, .18); border-color: rgba(230, 90, 100, .35); }
:root:not([data-theme="light"]) .callout--warn strong { color: #F08A92; }
:root:not([data-theme="light"]) .field__error, :root:not([data-theme="light"]) .form__status.is-error { color: #F08A92; }
:root:not([data-theme="light"]) .field.is-invalid input, :root:not([data-theme="light"]) .field.is-invalid select, :root:not([data-theme="light"]) .field.is-invalid textarea { border-color: #F08A92; }
:root:not([data-theme="light"]) [style*="--c-red-600"] { color: #F08A92 !important; }
:root:not([data-theme="light"]) .sidebar__card--ink { background: var(--c-purple-800); }
:root:not([data-theme="light"]) .error-page__code { color: var(--c-purple-800); }
:root:not([data-theme="light"]) .choice span { background: var(--c-stone-100); }
:root:not([data-theme="light"]) .areas li a, :root:not([data-theme="light"]) .areas li span { background: var(--c-stone-100); }
/* Data-URI icons carry baked-in colours */
:root:not([data-theme="light"]) .check-list li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23D2B270' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root:not([data-theme="light"]) .accordion__item summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23D2B270' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
:root:not([data-theme="light"]) .field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23B9B0C8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

}

/* Theme switch: light, system, dark */
.theme-switch {
  display: inline-flex; gap: 2px; padding: 2px; flex: none;
  border: 2px solid var(--line); border-radius: 999px; background: var(--bg-elevated);
}
.theme-switch__btn {
  width: 1.85rem; height: 1.85rem; border-radius: 50%;
  display: grid; place-items: center; color: var(--fg-muted);
  transition: background var(--dur), color var(--dur);
}
.theme-switch__btn svg { width: 1rem; height: 1rem; }
.theme-switch__btn:hover { color: var(--brand); }
.theme-switch__btn[aria-pressed="true"] { background: var(--c-purple-700); color: #fff; }
.page--dark .site-header:not(.is-scrolled):not(.is-open) .theme-switch {
  border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08);
}
.page--dark .site-header:not(.is-scrolled):not(.is-open) .theme-switch__btn { color: rgba(255, 255, 255, .75); }
.page--dark .site-header:not(.is-scrolled):not(.is-open) .theme-switch__btn[aria-pressed="true"] { background: var(--c-butter-400); color: var(--c-purple-950); }

/* Services opens a menu; there is no overview page */
.nav__trigger { background: none; border: 0; cursor: pointer; font: inherit; }
.nav__trigger::after { bottom: 0; }
.nav__item--has-menu .nav__trigger { padding-right: 1.1rem; }
.nav__item--has-menu .nav__trigger::before {
  content: ""; position: absolute; right: 0; top: 50%; width: .45rem; height: .45rem;
  margin-top: -.32rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform var(--dur) var(--ease-out);
}
.nav__item--has-menu .nav__trigger[aria-expanded="true"]::before { transform: rotate(-135deg); margin-top: -.1rem; }

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;              /* Alfa Slab One ships a single weight */
  line-height: var(--lh-snug);
  color: var(--c-ink-900);
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: 1.08; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--c-purple-600); }
strong { font-weight: 600; }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }
address { font-style: normal; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

::selection { background: var(--c-purple-200); color: var(--c-purple-950); }

.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 200;
  padding: .75rem 1rem; background: var(--c-purple-700); color: #fff;
  border-radius: 0 0 var(--radius) var(--radius); font-weight: 600;
}
.skip-link:focus { top: 0; }

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

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}
.container--narrow { max-width: 48rem; }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--flush-top { padding-top: 0; }
.section--paper { background: var(--bg-elevated); }
.section--stone { background: var(--c-stone-100); }
.section--ink { background: var(--c-purple-900); color: var(--c-purple-100); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }
.section--ink .lede, .section--ink p { color: var(--c-purple-200); }
.section--ink .eyebrow { color: var(--c-butter-400); }
.section--ink a:not(.btn) { color: var(--c-butter-300); }

.section__head {
  max-width: 44rem;
  margin-bottom: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);
}
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--split {
  max-width: none;
  display: grid; gap: var(--s-5);
  align-items: end;
}
@media (min-width: 60em) {
  .section__head--split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .section__head--split > :last-child { justify-self: end; text-align: right; }
}

.grid { display: grid; gap: clamp(1.25rem, 1rem + 1.5vw, 2rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

.split {
  display: grid; gap: clamp(2rem, 1.5rem + 3vw, 5rem);
  align-items: center;
}
@media (min-width: 56em) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--wide-media { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .split--reverse > :first-child { order: 2; }
}
.split--top { align-items: start; }

.stack > * + * { margin-top: var(--s-4); }
.stack--lg > * + * { margin-top: var(--s-6); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); align-items: center; }

/* --------------------------------------------------------------------------
   4. Typography components
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  margin-bottom: var(--s-4);
  font-family: var(--font-condensed);
  font-size: .8125rem; font-weight: 600; letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--brand);
}
.eyebrow::before {
  content: ""; width: .5rem; height: .5rem; flex: none;
  background: var(--accent); transform: rotate(45deg);
}
.eyebrow--plain::before { display: none; }

.lede {
  font-size: var(--fs-lg); color: var(--fg-muted); line-height: 1.6;
  max-width: 40rem;
}
.section__head > h2 + .lede, .section__head > h1 + .lede { margin-top: var(--s-5); }
.section__head--center .lede { margin-inline: auto; }

.display-script {
  font-family: var(--font-script); font-weight: 400; font-style: normal;
  color: var(--c-red-600); letter-spacing: 0;
  font-size: 1.08em; line-height: 1.25; display: inline-block; padding-right: .06em;
}
.section--ink .display-script, .hero h1 .display-script { color: var(--c-butter-300); }

.prose { max-width: 44rem; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: var(--fs-h3); margin-top: 2.25em; }
.prose h3 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 600; margin-top: 2em; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose ul li { list-style: disc; margin-bottom: .5em; }
.prose ol li { list-style: decimal; margin-bottom: .5em; }
.prose blockquote {
  margin: 2em 0; padding: 1.25rem 1.5rem; border-left: 3px solid var(--accent);
  font-family: var(--font-display); font-size: var(--fs-h4); line-height: 1.4; color: var(--c-ink-700);
  background: var(--c-paper);
}
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: var(--fs-sm); color: var(--fg-muted); margin-top: .75rem; }

.check-list li {
  position: relative; padding-left: 2rem; margin-bottom: .75rem;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .35em;
  width: 1.125rem; height: 1.125rem; border-radius: 50%;
  background: var(--c-purple-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23552A79' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.section--ink .check-list li::before { background-color: rgba(255,255,255,.1); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--c-purple-700); --btn-fg: #fff; --btn-bd: var(--c-purple-700);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.7rem;
  font-family: var(--font-condensed); font-size: .9375rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  line-height: 1; text-decoration: none; white-space: nowrap;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd);
  border-radius: var(--radius-sm);
  box-shadow: 3px 3px 0 var(--btn-shadow, rgba(28, 14, 43, .3));
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--btn-shadow, rgba(28, 14, 43, .3)); color: var(--btn-fg); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--btn-shadow, rgba(28, 14, 43, .3)); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn--sm { padding: .7rem 1.15rem; font-size: .8125rem; box-shadow: 2px 2px 0 var(--btn-shadow, rgba(28, 14, 43, .3)); }
.btn--lg { padding: 1.15rem 2.1rem; font-size: 1.0625rem; }
.btn--block { width: 100%; }

.btn--primary { --btn-bg: var(--c-purple-700); --btn-bd: var(--c-purple-700); }
.btn--primary:hover { --btn-bg: var(--c-purple-600); --btn-bd: var(--c-purple-600); }
.btn--gold { --btn-bg: var(--c-butter-400); --btn-fg: var(--c-purple-950); --btn-bd: var(--c-purple-950); --btn-shadow: var(--c-purple-950); }
.btn--gold:hover { --btn-bg: var(--c-butter-300); --btn-bd: var(--c-butter-300); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--c-purple-700); --btn-bd: var(--c-purple-700); }
.btn--outline:hover { --btn-bg: var(--c-purple-700); --btn-fg: #fff; }
.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.45); }
/* Deliberately understated: the phone number is the primary action, not this. */
.btn--quiet {
  --btn-bg: transparent; --btn-fg: var(--c-ink-700); --btn-bd: var(--c-stone-300);
  font-weight: 500; letter-spacing: .05em; box-shadow: none;
}
.btn--quiet:hover {
  --btn-bg: transparent; --btn-fg: var(--brand); --btn-bd: var(--brand);
  box-shadow: none; transform: none;
}
.site-header__call svg { width: 1.05em; height: 1.05em; }
.btn--outline-light:hover { --btn-bg: rgba(255,255,255,.12); --btn-bd: #fff; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-condensed); font-weight: 600; font-size: .875rem;
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
}
.link-arrow::after {
  content: ""; width: 1.25rem; height: 1px; background: currentColor;
  transition: width var(--dur) var(--ease-out);
}
.link-arrow:hover::after { width: 2rem; }

/* --------------------------------------------------------------------------
   6. Header & navigation
   -------------------------------------------------------------------------- */
.advisory {
  background: var(--c-purple-950); color: var(--c-purple-200);
  font-size: var(--fs-sm);
}
.advisory__inner { display: flex; align-items: center; gap: var(--s-4); min-height: 2.5rem; padding-block: .4rem; }
.advisory__label {
  flex: none; font-family: var(--font-condensed); font-size: .8125rem; font-weight: 600;
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--c-butter-300);
}
.advisory__text { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.advisory__link { flex: none; color: #fff; font-weight: 600; }
@media (max-width: 48em) { .advisory__link, .advisory__label { display: none; } .advisory__text { white-space: normal; } }
/* While the mobile menu is open, drop the advisory so the sticky header sits at the very top
   and the fixed nav panel (top: var(--header-h)) lines up exactly beneath it. */
body.nav-open .advisory { display: none; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--c-paper);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

/* Transparent header over dark heroes. <main> is pulled up under the sticky
   header so the hero paints behind it until the page scrolls. */
.page--dark main { margin-top: calc(var(--header-h) * -1); }
.page--dark .site-header:not(.is-scrolled):not(.is-open) {
  background: transparent; border-color: transparent; color: #fff;
}
.page--dark .site-header:not(.is-scrolled):not(.is-open) .nav__link { color: #fff; }
.page--dark .site-header:not(.is-scrolled):not(.is-open) .brand__logo--dark { display: none; }
.page--dark .site-header:not(.is-scrolled):not(.is-open) .brand__logo--light { display: block; }
.page--dark .site-header:not(.is-scrolled):not(.is-open) .nav-toggle__bar, .page--dark .site-header:not(.is-scrolled):not(.is-open) .nav-toggle__bar::before, .page--dark .site-header:not(.is-scrolled):not(.is-open) .nav-toggle__bar::after { background: #fff; }

.brand { color: #fff; }
.page--dark .site-header:not(.is-scrolled):not(.is-open) .nav-toggle__bar, .page--dark .site-header:not(.is-scrolled):not(.is-open) .nav-toggle__bar::before, .page--dark .site-header:not(.is-scrolled):not(.is-open) .nav-toggle__bar::after { background: #fff; }
.page--dark .site-header.is-scrolled, .page--dark .site-header.is-open { position: sticky; }
/* When the header is fixed, the advisory bar scrolls away and the header sits on top of the hero */
.page--dark .advisory { position: relative; z-index: 101; }

.brand { display: inline-flex; align-items: center; text-decoration: none; line-height: 0; }
.brand__logo { height: 2.35rem; width: auto; display: block; }
.brand__logo--light { display: none; }
.brand--footer .brand__logo { height: 2.75rem; }
.brand--footer .brand__logo--dark { display: none; }
.brand--footer .brand__logo--light { display: block; }
@media (max-width: 30em) { .brand__logo { height: 1.9rem; } }

.nav__list { display: flex; align-items: center; gap: clamp(.85rem, .3rem + 1vw, 1.6rem); }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link {
  position: relative; display: inline-block; padding: .5rem 0;
  font-family: var(--font-condensed); font-size: .9375rem; font-weight: 500; letter-spacing: .03em;
  white-space: nowrap; color: var(--c-ink-700); text-decoration: none;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--c-red-600); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__item--mobile { display: none; }
.nav__mobile-cta { display: none; }

.nav__menu {
  position: absolute; top: calc(100% + 1rem); left: -1.5rem; z-index: 50;
  width: 40rem; padding: 1.25rem;
  background: var(--c-paper); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
}
.nav__item--has-menu:hover .nav__menu, .nav__item--has-menu:focus-within .nav__menu, .nav__menu.is-open {
  opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s;
}
.nav__menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; }
.nav__menu-link {
  display: grid; gap: .15rem; padding: .8rem 1rem; border-radius: var(--radius);
  text-decoration: none; color: var(--fg);
  transition: background var(--dur) var(--ease-out);
}
.nav__menu-link:hover { background: var(--c-purple-100); color: var(--fg); }
.nav__menu-link strong { font-size: var(--fs-sm); font-weight: 600; }
.nav__menu-link span { font-size: .8125rem; color: var(--fg-muted); }

.site-header__actions { display: flex; align-items: center; gap: var(--s-3); }

.nav-toggle {
  display: none; position: relative; width: 2.75rem; height: 2.75rem; margin-right: -.5rem;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
  position: absolute; left: 50%; width: 1.5rem; height: 2px; margin-left: -.75rem;
  background: var(--c-ink-900); border-radius: 2px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), background var(--dur);
}
.nav-toggle__bar { top: 50%; margin-top: -1px; }
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; }
.nav-toggle__bar::before { transform: translateY(-7px); }
.nav-toggle__bar::after { transform: translateY(7px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent !important; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: rotate(-45deg); }

@media (max-width: 68em) {
  .site-header__actions > .theme-switch { display: none; }   /* lives in the nav panel instead */
  .nav-toggle { display: block; }
  .site-header__actions { gap: var(--s-3); }

  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 90;
    padding: var(--s-6) var(--gutter) var(--s-8);
    background: var(--c-paper); overflow-y: auto;
    display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-7);
    transform: translateX(100%); visibility: hidden;
    transition: transform .45s var(--ease-out), visibility 0s linear .45s;
  }
  .nav.is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav__item--mobile { display: flex; }
  .nav__link { flex: 1; padding: 1.1rem 0; font-family: var(--font-display); font-size: 1.375rem; color: var(--c-ink-900); }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] { color: var(--brand); }
  .nav__item--has-menu .nav__trigger { width: 100%; text-align: left; padding-right: 2rem; }
  .nav__menu {
    position: static; width: auto; padding: 0 0 1rem; border: 0; box-shadow: none; background: transparent;
    opacity: 1; visibility: visible; transform: none; display: none; flex-basis: 100%;
  }
  .nav__menu.is-open { display: block; }
  .nav__item--has-menu:hover .nav__menu:not(.is-open) { display: none; }
  .nav__menu-grid { grid-template-columns: 1fr; }
  .nav__menu-link { padding: .6rem .75rem; }
  .nav__mobile-cta { display: grid; gap: var(--s-4); justify-items: center; }
  .nav__mobile-cta .theme-switch { margin-top: var(--s-2); }
  .nav__phone { font-size: 1.125rem; font-weight: 600; text-decoration: none; color: var(--c-ink-700); }
  body.nav-open { overflow: hidden; }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 58rem);
  display: flex; align-items: flex-end;
  padding-top: calc(var(--header-h) + var(--s-9));
  padding-bottom: var(--s-8);
  background: var(--c-purple-900); color: #fff;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 55% at 78% 30%, rgba(114, 86, 179, .45), transparent 70%),
    radial-gradient(45% 45% at 15% 80%, rgba(72, 46, 131, .6), transparent 70%),
    linear-gradient(180deg, var(--c-purple-900) 0%, var(--c-purple-950) 100%);
}
/* Subtle "slate course" line pattern — replace .hero__bg with a photograph (object-fit: cover) when imagery is ready */
.hero__bg::after {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image:
    repeating-linear-gradient(-8deg, transparent 0 46px, rgba(255,255,255,.25) 46px 47px),
    repeating-linear-gradient(82deg, transparent 0 118px, rgba(255,255,255,.14) 118px 119px);
  mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 85%, transparent 100%);
}
.hero__bg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 1;
}
.hero__bg:has(img)::after { display: none; }
.page-hero .hero__bg img { opacity: 1; }
/* Scrim: heavy under the copy, light over the photograph */
.hero__grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(100deg, rgba(43,22,66,.95) 0%, rgba(43,22,66,.88) 34%, rgba(43,22,66,.34) 64%, rgba(43,22,66,.55) 100%),
    linear-gradient(180deg, rgba(28,14,43,.55) 0%, rgba(28,14,43,0) 26%, rgba(28,14,43,.7) 100%);
}
/* Halftone dots */
.hero__grain::after {
  content: ""; position: absolute; inset: 0; opacity: .16;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.4px);
  background-size: 7px 7px;
  mask-image: linear-gradient(105deg, #000 0%, transparent 52%);
  -webkit-mask-image: linear-gradient(105deg, #000 0%, transparent 52%);
}
.hero__inner { position: relative; }
.hero__content { max-width: 52rem; }
.hero .eyebrow { color: var(--c-butter-400); }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; font-family: var(--font-script); color: var(--c-butter-300); font-size: 1.05em; }
.hero__actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-3); }

.hero__trust {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.14);
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}
.hero__trust-item { display: grid; gap: .15rem; }
.hero__trust-item strong { font-family: var(--font-display); font-size: 1.625rem; line-height: 1; color: var(--c-butter-300); }
.hero__trust-item span { font-size: .8125rem; color: #EDE6F5; letter-spacing: .02em; }

/* Page hero (interior pages) */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(3rem, 2rem + 4vw, 6rem));
  padding-bottom: clamp(3rem, 2rem + 4vw, 6rem);
  background: var(--c-purple-900); color: #fff;
}
.page-hero .hero__bg { z-index: -2; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(43,22,66,.95) 0%, rgba(43,22,66,.87) 38%, rgba(43,22,66,.42) 70%, rgba(43,22,66,.6) 100%),
    linear-gradient(180deg, rgba(28,14,43,.5) 0%, rgba(28,14,43,.1) 40%, rgba(28,14,43,.5) 100%);
}
.page-hero--light::before { display: none; }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero .eyebrow { color: var(--c-butter-400); }
.page-hero .lede { color: var(--c-purple-200); margin-top: var(--s-5); }
.page-hero--light { background: var(--c-stone-100); color: var(--fg); }
/* On light pages the header is opaque and in flow, so the hero needs no header offset */
.page--light .page-hero, .page--light .hero { padding-top: clamp(3rem, 2rem + 4vw, 6rem); }
.page-hero--light h1 { color: var(--c-ink-900); }
.page-hero--light .lede { color: var(--fg-muted); }
.page-hero--light .eyebrow { color: var(--brand); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--s-5); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; }
.breadcrumb li { display: flex; gap: .5rem; align-items: center; color: var(--c-purple-200); }
.breadcrumb li + li::before { content: "/"; opacity: .5; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.page-hero--light .breadcrumb li { color: var(--fg-muted); }
.page-hero--light .breadcrumb a:hover { color: var(--brand); }

/* --------------------------------------------------------------------------
   8. Media placeholders
   Swap: drop an <img> inside .media and remove the data-photo attribute.
   -------------------------------------------------------------------------- */
.media {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3; background: var(--c-purple-800);
  background-image:
    radial-gradient(80% 70% at 70% 20%, rgba(114, 86, 179, .55), transparent 70%),
    linear-gradient(160deg, var(--c-purple-700), var(--c-purple-950));
  box-shadow: var(--shadow);
}
.media::before {
  content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: repeating-linear-gradient(-6deg, transparent 0 34px, rgba(255,255,255,.35) 34px 35px);
}
.media[data-photo]::after {
  content: attr(data-photo); position: absolute; left: 1rem; bottom: 1rem; right: 1rem;
  font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7);
}
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.card:hover .media img { transform: scale(1.03); }
.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--stone { background: var(--c-stone-200); background-image: linear-gradient(160deg, var(--c-stone-100), var(--c-stone-300)); box-shadow: var(--shadow-sm); }
.media--stone::before { opacity: .25; background-image: repeating-linear-gradient(-6deg, transparent 0 34px, rgba(72,46,131,.25) 34px 35px); }
.media--stone[data-photo]::after { color: var(--c-ink-500); }
.media--gold { background-image: linear-gradient(160deg, #B8964B, #6E5628); }
.media--copper { background-image: linear-gradient(160deg, #B5734A, #4A2E1E 70%, #2F7A6D 140%); }
.media--cedar { background-image: linear-gradient(160deg, #A67C52, #4B3621); }
.media--slate { background-image: linear-gradient(160deg, #4E5A66, #1F262E); }
.media--flat { background-image: linear-gradient(160deg, #6E6E76, #2A2A30); }

.media-frame { position: relative; }
.media-frame::before {
  content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem; z-index: -1;
  border: 3px solid var(--c-butter-400); border-radius: var(--radius-lg);
}
.media-frame--left::before { inset: 1.25rem 1.25rem -1.25rem -1.25rem; }

.media-caption {
  position: absolute; left: 1.25rem; bottom: 1.25rem; z-index: 1;
  padding: .75rem 1rem; background: rgba(23,13,44,.7); backdrop-filter: blur(8px);
  color: #fff; border-radius: var(--radius); font-size: var(--fs-sm);
}
.media-caption strong { display: block; font-family: var(--font-display); font-size: 1rem; }
.media[data-photo] .media-caption ~ * { display: none; }

/* --------------------------------------------------------------------------
   9. Cards & content components
   -------------------------------------------------------------------------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-elevated); border: 2px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur);
}
.card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); border-color: var(--c-purple-700); }
.card .media { border-radius: 0; box-shadow: none; aspect-ratio: 3 / 2; }
.card__body { padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.card__body h3 { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.15; }
.card__body p { color: var(--fg-muted); font-size: var(--fs-sm); line-height: 1.6; }
.card__body .link-arrow { margin-top: auto; padding-top: .5rem; }
.card__link::after { content: ""; position: absolute; inset: 0; }
.card__meta { font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--c-butter-500); font-weight: 700; }

.card--service .card__body h3 { font-size: 1.25rem; }
.card--minimal { border: 0; background: transparent; }
.card--minimal:hover { box-shadow: none; }
.card--minimal .media { border-radius: var(--radius-lg); }
.card--minimal .card__body { padding: 1.25rem 0 0; }

/* Feature (icon) blocks */
.feature { display: grid; gap: .75rem; }
.feature__icon {
  width: 3rem; height: 3rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--c-purple-100); color: var(--brand); margin-bottom: .5rem;
}
.feature__icon svg { width: 1.4rem; height: 1.4rem; }
.feature h3 { font-family: var(--font-body); font-size: 1.125rem; font-weight: 600; }
.feature p { color: var(--fg-muted); font-size: var(--fs-sm); }
.section--ink .feature__icon { background: rgba(255,255,255,.08); color: var(--c-butter-400); }
.section--ink .feature h3 { color: #fff; }
.section--ink .feature p { color: var(--c-purple-200); }

/* Process steps */
.steps { counter-reset: step; display: grid; gap: var(--s-6); }
@media (min-width: 56em) { .steps { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }
.step { counter-increment: step; position: relative; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: -.85rem; left: 0; padding: 0 .45rem 0 0; background: var(--bg);
  font-family: var(--font-display); font-size: 1.25rem; color: var(--c-red-600);
}
.section--paper .step::before { background: var(--bg-elevated); }
.section--ink .step { border-color: rgba(255,255,255,.15); }
.section--ink .step::before { background: var(--c-purple-900); color: var(--c-butter-400); }
.step h3 { font-size: 1.1875rem; font-family: var(--font-display); margin-bottom: .5rem; }
.step p { font-size: var(--fs-sm); color: var(--fg-muted); }
.step__time { display: inline-block; margin-top: .75rem; font-family: var(--font-condensed); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); font-weight: 600; }
.section--ink .step__time { color: var(--c-butter-400); }

/* Timeline (vertical, process page) */
.timeline { position: relative; display: grid; gap: var(--s-7); padding-left: 3rem; counter-reset: tl; }
.timeline::before { content: ""; position: absolute; left: .55rem; top: .5rem; bottom: .5rem; width: 1px; background: var(--line); }
.timeline__item { position: relative; counter-increment: tl; }
.timeline__item::before {
  content: ""; position: absolute; left: -3rem; top: .35rem; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline__item h3 { font-size: 1.25rem; margin-bottom: .5rem; }
/* The step number is carried by .timeline__meta, so no counter prefix here */
.timeline__meta { font-family: var(--font-condensed); font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: .75rem; }
.timeline__item p { color: var(--fg-muted); }

/* Testimonials */
.testimonials { position: relative; }
.testimonials__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(100%, 26rem);
  gap: var(--s-5); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: var(--s-3); scrollbar-width: none;
}
.testimonials__track::-webkit-scrollbar { display: none; }
.testimonial {
  scroll-snap-align: start; display: flex; flex-direction: column; gap: var(--s-5);
  padding: clamp(1.5rem, 1.25rem + 1vw, 2.25rem);
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.testimonial__stars { display: flex; gap: .2rem; color: var(--accent); }
.testimonial__stars svg { width: 1rem; height: 1rem; }
.testimonial blockquote { margin: 0; font-size: 1.0625rem; line-height: 1.6; color: var(--c-ink-700); flex: 1; }
.testimonial blockquote::before { content: "\201C"; font-family: var(--font-display); color: var(--c-red-600); }
.testimonial blockquote::after { content: "\201D"; font-family: var(--font-display); color: var(--c-red-600); }
.testimonial figcaption { font-size: var(--fs-sm); }
.testimonial figcaption strong { display: block; font-family: var(--font-display); font-size: 1rem; }
.testimonial figcaption span { color: var(--fg-muted); }
.testimonials__controls { display: flex; gap: .5rem; }
.testimonials__btn {
  width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 50%; background: var(--bg-elevated);
  display: grid; place-items: center; color: var(--c-ink-700);
  transition: background var(--dur), border-color var(--dur), color var(--dur);
}
.testimonials__btn:hover { background: var(--c-purple-700); border-color: var(--c-purple-700); color: #fff; }
.testimonials__btn svg { width: 1.1rem; height: 1.1rem; }

/* Accordion (native details) */
.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  padding: 1.25rem 0; font-family: var(--font-display); font-size: 1.125rem; color: var(--c-ink-900);
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary::after {
  content: ""; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid var(--line);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23552A79' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 50% no-repeat;
  transition: transform var(--dur) var(--ease-out), background-color var(--dur);
}
.accordion__item[open] summary::after { transform: rotate(45deg); background-color: var(--c-purple-100); }
.accordion__item summary:hover { color: var(--brand); }
.accordion__body { padding: 0 0 1.5rem; color: var(--fg-muted); max-width: 44rem; }
.accordion__body p + p { margin-top: .75em; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-elevated); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 40rem; }
th, td { padding: 1rem 1.25rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--font-condensed); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-purple-700); font-weight: 600; background: var(--c-stone-100); }
tbody th { font-family: var(--font-display); font-size: .9375rem; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td em { color: var(--brand); font-style: normal; font-weight: 600; }

/* Trust bar (logos / credentials strip) */
.trust-bar { border-block: 1px solid var(--line); background: var(--bg-elevated); }
.trust-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-4) var(--s-7); padding-block: var(--s-5); }
.trust-bar__item { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-condensed); font-size: .875rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--c-ink-700); }
.trust-bar__item svg { width: 1.25rem; height: 1.25rem; color: var(--accent); }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--c-purple-800); color: #fff;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 80% at 90% 50%, rgba(210,178,112,.22), transparent 70%),
              radial-gradient(40% 60% at 5% 100%, rgba(114,86,179,.5), transparent 70%);
}
.cta-band__inner { display: grid; gap: var(--s-6); align-items: center; padding-block: clamp(3.5rem, 3rem + 3vw, 6rem); }
@media (min-width: 60em) { .cta-band__inner { grid-template-columns: minmax(0, 1.5fr) auto; } }
.cta-band h2 { color: #fff; }
.cta-band .eyebrow { color: var(--c-butter-400); }
.cta-band p { color: var(--c-purple-200); margin-top: var(--s-4); max-width: 38rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Emergency strip */
.emergency-strip { background: var(--c-red-600); color: #fff; }
.emergency-strip__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-4); }
.emergency-strip strong { font-family: var(--font-display); font-size: 1.25rem; }
.emergency-strip p { margin: 0; font-size: var(--fs-sm); opacity: .9; }
.emergency-strip .btn { --btn-bg: #fff; --btn-fg: var(--c-red-600); --btn-bd: #fff; }

/* Area chips */
.areas { display: flex; flex-wrap: wrap; gap: .6rem; }
.areas li a {
  display: inline-block; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: var(--fs-sm); text-decoration: none; color: var(--c-ink-700); background: var(--bg-elevated);
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.areas li a:hover { background: var(--c-purple-700); color: #fff; border-color: var(--c-purple-700); }
.areas li span { display: inline-block; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-size: var(--fs-sm); color: var(--c-ink-700); background: var(--bg-elevated); }

/* Weather panel (Toronto climate facts) */
.climate { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 40em) { .climate { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .climate { grid-template-columns: repeat(4, 1fr); } }
.climate__item { padding: var(--s-5); background: var(--bg-elevated); }
.climate__item strong { display: block; font-family: var(--font-display); font-size: 1.875rem; line-height: 1; color: var(--brand); }
.climate__item span { display: block; margin-top: .5rem; font-size: var(--fs-sm); color: var(--fg-muted); }
.climate__item small { display: block; margin-top: .75rem; font-size: var(--fs-xs); color: var(--c-stone-500); }
[data-filter-item][hidden] { display: none; }

/* Article */
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: var(--fs-sm); color: var(--fg-muted); margin-bottom: var(--s-6); }
.article-meta time { font-weight: 600; color: var(--c-ink-700); }
.callout { padding: 1.5rem; border-radius: var(--radius-lg); background: var(--c-purple-100); border: 1px solid var(--c-purple-200); }
.callout strong { color: var(--brand); }
.callout--warn { background: rgba(158,31,43,.06); border-color: rgba(158,31,43,.2); }
.callout--warn strong { color: var(--c-red-600); }

/* Sidebar layout */
.with-sidebar { display: grid; gap: var(--s-8); }
@media (min-width: 64em) { .with-sidebar { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; } }
.sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: var(--s-5); }
.sidebar__card { padding: 1.5rem; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.sidebar__card h3 { font-size: 1.25rem; margin-bottom: .75rem; }
.sidebar__card--ink { background: var(--c-purple-800); color: #fff; border-color: transparent; }
.sidebar__card--ink h3 { color: #fff; }
.sidebar__card--ink p { color: var(--c-purple-200); font-size: var(--fs-sm); }
.sidebar__links li { border-bottom: 1px solid var(--line); }
.sidebar__links li:last-child { border-bottom: 0; }
.sidebar__links a { display: block; padding: .7rem 0; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; color: var(--c-ink-700); }
.sidebar__links a:hover, .sidebar__links a[aria-current="page"] { color: var(--brand); }

/* --------------------------------------------------------------------------
   10. Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--s-5); }
.form__row { display: grid; gap: var(--s-5); }
@media (min-width: 40em) { .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form__row--3 { grid-template-columns: 1fr; }
@media (min-width: 48em) { .form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: var(--s-4); }
legend { padding: 0; margin-bottom: var(--s-4); font-family: var(--font-display); font-size: 1.1875rem; color: var(--c-ink-900); }
.field { display: grid; gap: .45rem; }
.field label, .field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink-700); }
.field label .optional { font-weight: 400; color: var(--fg-muted); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; font-size: var(--fs-base);
  color: var(--fg); background: var(--bg-elevated); border: 1px solid var(--c-stone-300); border-radius: var(--radius-sm);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.field select {
  appearance: none; padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%235F5870' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 1rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-purple-700); box-shadow: var(--focus); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--c-red-600); }
.field__error { font-size: var(--fs-xs); color: var(--c-red-600); font-weight: 600; display: none; }
.field.is-invalid .field__error { display: block; }

.choice-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: block; padding: .8rem 1rem; text-align: center; font-size: var(--fs-sm); font-weight: 600;
  border: 1px solid var(--c-stone-300); border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--c-ink-700);
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.choice input:checked + span { background: var(--c-purple-700); color: #fff; border-color: var(--c-purple-700); }
.choice input:focus-visible + span { box-shadow: var(--focus); }

.checkbox { display: flex; gap: .75rem; align-items: flex-start; font-size: var(--fs-sm); color: var(--fg-muted); }
.checkbox input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--c-purple-700); flex: none; }

.form__footer { display: grid; gap: var(--s-4); }
.form__status { font-size: var(--fs-sm); font-weight: 600; min-height: 1.5em; }
.form__status.is-error { color: var(--c-red-600); }
.form__status.is-success { color: var(--brand); }
.form__fine { font-size: var(--fs-xs); color: var(--fg-muted); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.contact-card { padding: clamp(1.5rem, 1.25rem + 1vw, 2.25rem); background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

.contact-details { display: grid; gap: var(--s-5); }
.contact-details__item { display: grid; gap: .25rem; padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.contact-details__item:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-details__item span { font-family: var(--font-condensed); font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-red-600); }
.contact-details__item a, .contact-details__item strong { font-family: var(--font-display); font-size: 1.1875rem; text-decoration: none; color: var(--c-ink-900); }
.contact-details__item a:hover { color: var(--brand); }
.contact-details__item p { font-size: var(--fs-sm); color: var(--fg-muted); }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--c-purple-950); color: var(--c-purple-200); padding-block: var(--s-9) var(--s-6); font-size: var(--fs-sm); }
.site-footer__grid { display: grid; gap: var(--s-7); }
@media (min-width: 48em) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.site-footer__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--s-5); }
.site-footer__badges li { padding: .35rem .7rem; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer__heading { font-family: var(--font-condensed); font-size: .875rem; font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--c-butter-300); margin-bottom: var(--s-4); }
.site-footer__col li + li { margin-top: .6rem; }
.site-footer a { color: var(--c-purple-200); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__contact { margin-bottom: var(--s-5); }
.site-footer__contact a { color: #fff; font-weight: 600; }
.site-footer__bottom {
  margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-xs);
}
.site-footer__legal { display: flex; gap: var(--s-5); }

/* --------------------------------------------------------------------------
   11b. Mid-century devices
   Seals, starbursts and awning stripes. Used sparingly.
   -------------------------------------------------------------------------- */

/* Guarantee seal, as painted on a van door */
.seal {
  --seal-size: 9.5rem;
  position: relative; flex: none;
  width: var(--seal-size); height: var(--seal-size); border-radius: 50%;
  display: grid; place-content: center; text-align: center; gap: .1rem;
  background: var(--c-red-600); color: #fff;
  border: 3px solid var(--c-butter-400);
  box-shadow: 0 0 0 3px var(--c-red-600), 5px 5px 0 rgba(28, 14, 43, .25);
  transform: rotate(-6deg);
}
.seal__top, .seal__bottom {
  font-family: var(--font-condensed); font-size: .6875rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--c-butter-300);
}
.seal__big { font-family: var(--font-display); font-size: 2rem; line-height: .95; }
.seal__word {
  font-family: var(--font-display); font-size: .95rem; line-height: 1.15;
  letter-spacing: -.01em; padding-inline: .5rem;
}
.seal__word--wide { color: var(--c-butter-300); }
.seal__sub { font-family: var(--font-script); font-size: 1rem; color: var(--c-butter-300); }
/* Floated over a photograph; moves clear of the caption on small screens */
.seal--float { position: absolute; right: -1.25rem; bottom: -1.75rem; z-index: 2; }
@media (max-width: 56em) {
  .seal--float { --seal-size: 7rem; right: -.75rem; bottom: auto; top: -1.25rem; }
}
@media (max-width: 48em) { .seal { --seal-size: 8rem; } }

/* Starburst flash */
.starburst {
  position: relative; flex: none;
  width: 7.5rem; height: 7.5rem;
  display: grid; place-content: center; text-align: center;
  background: var(--c-butter-400); color: var(--c-purple-950);
  clip-path: polygon(50% 0%, 60% 13%, 74% 6%, 78% 21%, 93% 20%, 90% 35%, 100% 45%, 90% 55%,
                     93% 70%, 78% 70%, 74% 85%, 60% 78%, 50% 100%, 40% 78%, 26% 85%, 22% 70%,
                     7% 70%, 10% 55%, 0% 45%, 10% 35%, 7% 20%, 22% 21%, 26% 6%, 40% 13%);
  transform: rotate(-8deg);
}
.starburst strong { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: .9; }
.starburst span {
  display: block; font-family: var(--font-condensed); font-size: .625rem;
  font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}

/* Awning stripe divider */
.stripe-rule {
  height: .6rem; border: 0; margin: 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--c-red-600) 0 14px,
    var(--c-butter-400) 14px 28px,
    var(--c-purple-700) 28px 42px,
    var(--c-stone-100) 42px 56px
  );
}

/* Plate: cream card, heavy keyline */
.plate {
  background: var(--c-paper);
  border: 3px solid var(--c-purple-700);
  border-radius: var(--radius-lg);
  box-shadow: 7px 7px 0 rgba(85, 42, 121, .18);
  padding: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
}

/* Roof estimator */
.estimator {
  --estimator-h: 44rem;
  position: relative; overflow: hidden;
  border: 3px solid var(--c-purple-700); border-radius: var(--radius-lg);
  background: var(--bg-elevated); box-shadow: 7px 7px 0 rgba(85, 42, 121, .18);
}
.estimator.is-loaded { min-height: var(--estimator-h); }
.estimator__placeholder {
  display: grid; justify-items: center; text-align: center; gap: var(--s-4);
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) var(--gutter);
}
.estimator__placeholder h3 { font-family: var(--font-display); font-size: var(--fs-h3); }
.estimator__placeholder p { max-width: 34rem; color: var(--fg-muted); }
.estimator__note { font-size: var(--fs-sm); }
.estimator__frame { display: block; width: 100%; height: var(--estimator-h); border: 0; }
.estimator__fallback { padding: var(--s-6); text-align: center; }

.estimate-cta { display: grid; gap: var(--s-5); align-items: center; }
@media (min-width: 56em) {
  .estimate-cta { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-7); }
}

/* --------------------------------------------------------------------------
   12. Motion & utilities
   -------------------------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }
.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: var(--s-4) !important; }
.mt-6 { margin-top: var(--s-6) !important; }
.mt-8 { margin-top: var(--s-8) !important; }
.muted { color: var(--fg-muted); }
.small { font-size: var(--fs-sm); }

.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-page__code { font-family: var(--font-display); font-size: clamp(5rem, 4rem + 7vw, 11rem); line-height: 1; color: var(--c-purple-200); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .advisory, .site-footer, .cta-band, .nav-toggle, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .page-hero, .hero { background: none; color: #000; padding-top: 0; }
  .page-hero h1, .hero h1 { color: #000; }
}
