/* =========================================================================
   Fremantle Shipwrights, Phase 4 mockup stylesheet
   Implements the Phase 3 design system exactly: tokens, type scale, colour,
   the Waterline motif, and every component. Hard rules: border-radius:0
   everywhere, no glassmorphism, no ambient animation, 44px touch targets,
   full keyboard + reduced-motion support.
   ========================================================================= */

/* ---------------------------------------------------------------------------
   1. Tokens (:root)
   --------------------------------------------------------------------------- */
:root {
  /* Type families */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Fluid type sizes (clamp: mobile floor .. desktop target) */
  --fs-display:  clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);
  --fs-h1:       clamp(2.125rem, 1.55rem + 2.7vw, 3.25rem);
  --fs-h2:       clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem);
  --fs-h3:       clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --fs-h4:       clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-h5:       clamp(1.0625rem, 1.02rem + 0.2vw, 1.125rem);
  --fs-h6:       1rem;
  --fs-lead:     clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem);
  --fs-body:     clamp(1.0625rem, 1.02rem + 0.2vw, 1.125rem);
  --fs-body-sm:  1rem;
  --fs-small:    0.875rem;
  --fs-xs:       0.75rem;
  --fs-overline: clamp(0.75rem, 0.72rem + 0.1vw, 0.8125rem);
  --fs-quote:    clamp(1.3125rem, 1.1rem + 0.9vw, 1.625rem);

  /* Line heights */
  --lh-tight: 1.05;
  --lh-heading: 1.15;
  --lh-body: 1.65;
  --lh-snug: 1.4;

  /* Letter spacing */
  --ls-display: -0.02em;
  --ls-heading: -0.01em;
  --ls-overline: 0.14em;

  /* Raw palette (named, for reference) */
  --c-antifoul:  #16242E;
  --c-graphite:  #2C3A42;
  --c-gelcoat:   #F4F1EA;
  --c-teak:      #A4622B;
  --c-teak-oil:  #7A4214;
  --c-boottop:   #9A2D24;
  --c-brass:     #B89150;

  /* Semantic colour (light, default) */
  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --surface-sunk: #EAE5DA;
  --ink: #16242E;
  --ink-2: #2C3A42;
  --muted: #5C6B73;
  --line: #D8D1C2;
  --line-strong: #16242E;
  --accent: #A4622B;
  --accent-ink: #7A4214;
  --accent-contrast: #FFFFFF;
  --alert: #9A2D24;
  --brass: #B89150;

  /* Semantic colour (dark sections) */
  --bg-dark: #16242E;
  --surface-dark: #1E303A;
  --ink-on-dark: #F4F1EA;
  --muted-on-dark: #9DAAB1;
  --line-on-dark: #33454E;
  --accent-on-dark: #C9823F;

  /* Spacing scale (4px base, square rhythm) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2.5rem;
  --space-7: 4rem;
  --space-8: 6rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 768px;

  /* Motion (all <=200ms; disabled under reduced-motion) */
  --t-fast: 120ms;
  --t-base: 160ms;
  --t-slow: 200ms;
  --ease: cubic-bezier(0, 0, 0.2, 1);

  /* Borders (no radius, ever) */
  --radius: 0;
  --border: 1px solid var(--line);
  --border-strong: 2px solid var(--line-strong);
  --focus-ring: 3px solid var(--accent-ink);
}

/* ---------------------------------------------------------------------------
   2. Base / reset
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--ink);
  margin: 0 0 var(--space-4);
  font-optical-sizing: auto;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 {
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-h4);
  line-height: var(--lh-snug); margin: 0 0 var(--space-3); color: var(--ink);
}
h5 { font-family: var(--font-body); font-weight: 700; font-size: var(--fs-h5); margin: 0 0 var(--space-2); }
h6 { font-family: var(--font-body); font-weight: 700; font-size: var(--fs-h6); letter-spacing: 0.01em; margin: 0 0 var(--space-2); }

p { margin: 0 0 var(--space-4); max-width: 68ch; }

.lead {
  font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2);
  max-width: 60ch;
}

.overline {
  font-family: var(--font-body); font-weight: 700;
  font-size: var(--fs-overline); letter-spacing: var(--ls-overline);
  text-transform: uppercase; color: var(--accent-ink);
  margin: 0 0 var(--space-2);
}

small, .small { font-size: var(--fs-small); }

a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

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

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
li { margin-bottom: var(--space-2); max-width: 64ch; }

strong { font-weight: 700; }
em { font-style: italic; }

.tabular { font-variant-numeric: tabular-nums; }
.vessel { font-style: italic; }

/* Skip link */
.skip-link {
  position: absolute; left: var(--space-3); top: -3rem; z-index: 200;
  background: var(--ink); color: var(--ink-on-dark);
  padding: 0.75rem var(--space-4); font-weight: 700; text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--space-3); }

/* Global focus-visible */
:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }

/* Visually-hidden utility for accessible labels */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------------------
   3. The Waterline (signature motif)
   --------------------------------------------------------------------------- */
.waterline {
  position: relative;
  height: 2px;
  background: var(--line-strong);
  border: 0;
  margin: var(--space-7) 0;
}
.waterline::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 48px; height: 4px;
  background: var(--accent);
}
.waterline-eyebrow {
  display: block;
  width: 56px; height: 3px;
  background: var(--accent);
  margin-bottom: var(--space-3);
}
.section--dark .waterline { background: var(--line-on-dark); }
.section--dark .waterline::before { background: var(--accent-on-dark); }
.section--dark .waterline-eyebrow { background: var(--accent-on-dark); }
.section--dark .overline { color: var(--accent-on-dark); }

/* ---------------------------------------------------------------------------
   4. Layout helpers
   --------------------------------------------------------------------------- */
.section { padding-block: var(--space-7); }
.section--sunk { background: var(--surface-sunk); }
.section--dark { background: var(--bg-dark); color: var(--ink-on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3,
.section--dark h4, .section--dark h5, .section--dark h6 { color: var(--ink-on-dark); }
.section--dark .lead, .section--dark .body, .section--dark p { color: var(--ink-on-dark); }

.section__inner {
  max-width: var(--container); margin-inline: auto;
  padding-inline: var(--space-4);
}
.section__inner--narrow { max-width: var(--container-narrow); }
.section__head { max-width: 48rem; margin-bottom: var(--space-6); }
.section__head p:last-child { margin-bottom: 0; }

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

/* ---------------------------------------------------------------------------
   5. Header / navigation
   --------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t-base) var(--ease), min-height var(--t-base) var(--ease);
}
.site-header--condensed { box-shadow: 0 2px 0 0 var(--line); }
.site-header__inner {
  max-width: var(--container); margin-inline: auto;
  display: flex; align-items: center; gap: var(--space-5);
  min-height: 72px; padding-inline: var(--space-4);
  transition: min-height var(--t-base) var(--ease);
}
.site-header--condensed .site-header__inner { min-height: 60px; }

.site-header__brand {
  margin-right: auto;
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-display); font-weight: 900; font-size: 1.25rem;
  color: var(--ink); letter-spacing: -0.01em; text-decoration: none;
  min-height: 44px;
}
.site-header__brand:hover { color: var(--accent-ink); }
.site-header__brand img { width: 34px; height: 34px; }
.site-header__brand-text { line-height: 1.05; }
.site-header__brand-text span {
  display: block; font-family: var(--font-body); font-weight: 600;
  font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

.nav { display: flex; gap: var(--space-4); }
.nav__link {
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  color: var(--ink); text-decoration: none; padding: 0.5rem 0;
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0.35rem;
  height: 2px; width: 0; background: var(--accent);
  transition: width var(--t-base) var(--ease);
}
.nav__link:hover { color: var(--accent-ink); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { width: 100%; }
.nav__link[aria-current="page"] { color: var(--accent-ink); }

.header__actions { display: flex; align-items: center; gap: var(--space-4); }
.header__phone {
  font-family: var(--font-body); font-weight: 700; color: var(--ink);
  text-decoration: none; font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; min-height: 44px; gap: 0.4rem;
}
.header__phone:hover { color: var(--accent-ink); }
.header__phone svg { width: 18px; height: 18px; flex: none; }

.header__phone-icon {
  display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  color: var(--ink); text-decoration: none;
}
.header__phone-icon:hover { color: var(--accent-ink); }
.header__phone-icon svg { width: 22px; height: 22px; }

.nav-toggle {
  display: none; width: 44px; height: 44px;
  background: var(--ink); color: var(--accent-contrast);
  border: 0; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle:hover { background: var(--accent-ink); }
.nav-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
  position: fixed; inset: 72px 0 0 0; z-index: 99;
  background: var(--bg-dark); color: var(--ink-on-dark);
  display: flex; flex-direction: column;
  padding: var(--space-5) var(--space-4); gap: var(--space-2);
  transform: translateY(-100%); visibility: hidden;
  transition: transform var(--t-slow) var(--ease), visibility var(--t-slow);
  overflow-y: auto;
}
.mobile-nav[data-open="true"] { transform: translateY(0); visibility: visible; }
.mobile-nav a.mobile-nav__link {
  font-family: var(--font-display); font-weight: 600; font-size: 1.75rem;
  color: var(--ink-on-dark); text-decoration: none;
  padding: var(--space-3) 0; border-bottom: 1px solid var(--line-on-dark);
  min-height: 44px; display: flex; align-items: center;
}
.mobile-nav a.mobile-nav__link:hover,
.mobile-nav a.mobile-nav__link[aria-current="page"] { color: var(--accent-on-dark); }
.mobile-nav__foot { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.mobile-nav__phone {
  font-family: var(--font-body); font-weight: 700; font-size: 1.125rem;
  color: var(--ink-on-dark); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
}
.mobile-nav__phone:hover { color: var(--accent-on-dark); }

/* ---------------------------------------------------------------------------
   6. Buttons
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  line-height: 1; letter-spacing: 0.01em;
  min-height: 48px; padding: 0 var(--space-4);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--accent-contrast); }

.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--bg); }

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

.btn--alert { background: var(--alert); color: var(--accent-contrast); border-color: var(--alert); }
.btn--alert:hover { filter: brightness(0.92); color: var(--accent-contrast); }

.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------------------------------------------------------------------------
   7. Hero
   --------------------------------------------------------------------------- */
.hero { position: relative; background: var(--bg-dark); color: var(--ink-on-dark); }
.hero__media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg,
    rgba(22,36,46,0.88) 0%,
    rgba(22,36,46,0.74) 48%,
    rgba(22,36,46,0.34) 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--container); margin-inline: auto;
  padding: clamp(3rem, 8vw, 6.5rem) var(--space-4);
}
.hero__content { max-width: 42rem; }
.hero__eyebrow { color: var(--accent-on-dark); }
.hero h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--ls-display);
  font-optical-sizing: auto; color: var(--ink-on-dark); margin: 0 0 var(--space-4);
}
.hero__sub {
  font-size: var(--fs-lead); color: var(--ink-on-dark);
  max-width: 38rem; margin-bottom: var(--space-5); line-height: 1.5;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Compact page hero for inner pages (photo + navy overlay, no big H1 split) */
.page-hero { position: relative; background: var(--bg-dark); color: var(--ink-on-dark); }
.page-hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.page-hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(22,36,46,0.90) 0%, rgba(22,36,46,0.78) 50%, rgba(22,36,46,0.55) 100%);
}
.page-hero__inner {
  position: relative; z-index: 2;
  max-width: var(--container); margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--space-4);
}
.page-hero__content { max-width: 46rem; }
.page-hero h1 { color: var(--ink-on-dark); margin-bottom: var(--space-4); }
.page-hero .overline { color: var(--accent-on-dark); }
.page-hero .lead { color: var(--ink-on-dark); }
.page-hero .waterline-eyebrow { background: var(--accent-on-dark); }
.page-hero__actions { margin-top: var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------------------------------------------------------------------------
   8. Trust strip
   --------------------------------------------------------------------------- */
.trust { background: var(--bg); border-bottom: 1px solid var(--line); }
.trust__inner {
  max-width: var(--container); margin-inline: auto;
  padding: var(--space-5) var(--space-4);
  display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr);
}
.trust__item { display: flex; flex-direction: column; gap: 0.25rem; }
.trust__stat {
  font-family: var(--font-display); font-weight: 700; font-size: 1.75rem;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.05;
}
.trust__label { font-size: var(--fs-small); color: var(--ink-2); }

.insurer-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4);
  padding: var(--space-4); border-top: 1px solid var(--line);
  max-width: var(--container); margin-inline: auto;
}
.insurer-strip__label {
  font-size: var(--fs-small); font-weight: 700; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.insurer-strip img { height: 36px; width: auto; filter: grayscale(1); opacity: 0.8;
  transition: filter var(--t-base) var(--ease), opacity var(--t-base) var(--ease); }
.insurer-strip img:hover { filter: none; opacity: 1; }
/* Text-badge fallback for insurer marks (no logo permission confirmed) */
.insurer-badge {
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-small);
  letter-spacing: 0.04em; color: var(--ink-2);
  border: 1px solid var(--line); padding: 0.5rem var(--space-3);
  display: inline-flex; align-items: center; min-height: 40px;
  background: var(--surface);
}

/* ---------------------------------------------------------------------------
   9. Cards (service)
   --------------------------------------------------------------------------- */
.card-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; position: relative;
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-slow) var(--ease);
}
.card:hover, .card:focus-within { border-color: var(--ink); transform: translateY(-2px); }
.card:hover::before, .card:focus-within::before { transform: scaleX(1); }

.card__media { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; display: block; }
.card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.card__title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.375rem;
  line-height: 1.18; color: var(--ink); margin: 0;
}
.card__text { font-size: var(--fs-body-sm); color: var(--ink-2); margin: 0; flex: 1; }
.card__link {
  font-family: var(--font-body); font-weight: 700; color: var(--accent-ink);
  text-decoration: underline; text-underline-offset: 3px;
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; margin-top: auto;
}
.card__link:hover { color: var(--accent); }
.card__link::after { content: ""; position: absolute; inset: 0; }
.card__link:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }

/* Service hierarchy: lead group spans two columns at desktop */
.card--lead .card__title { font-size: 1.625rem; }

/* Plain service list block (anchored sections on /services) */
.service-block { border-top: 1px solid var(--line); padding-top: var(--space-6); margin-top: var(--space-6); scroll-margin-top: 90px; }
.service-block:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.service-block__group {
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-small);
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink);
  margin-bottom: var(--space-2);
}
.service-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
.service-item { scroll-margin-top: 90px; }
.service-item h3 { margin-bottom: var(--space-3); }

/* ---------------------------------------------------------------------------
   10. Category cards (Work filter grid)
   --------------------------------------------------------------------------- */
.cat-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, 1fr); }
.cat-card {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
  color: var(--ink-on-dark); text-decoration: none; border: 1px solid var(--line);
}
.cat-card__media {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.cat-card:hover .cat-card__media { transform: scale(1.04); }
.cat-card__foot {
  position: absolute; inset: auto 0 0 0; padding: var(--space-3);
  background: linear-gradient(0deg, rgba(22,36,46,0.92), rgba(22,36,46,0));
}
.cat-card__label { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--ink-on-dark); }
.cat-card__count { font-size: var(--fs-small); color: var(--muted-on-dark); font-variant-numeric: tabular-nums; display: block; }
.cat-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------------------
   11. Before / after comparison
   --------------------------------------------------------------------------- */
.casestudy { border: 1px solid var(--line); background: var(--surface); padding: var(--space-5); margin-bottom: var(--space-6); }
.casestudy:last-child { margin-bottom: 0; }
.casestudy__cat {
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-small);
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink);
  margin-bottom: var(--space-2);
}
.casestudy__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); color: var(--ink); margin-bottom: var(--space-4); }
.casestudy__title em { font-style: italic; }

.beforeafter { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.beforeafter__frame { position: relative; }
.beforeafter__img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  border: 1px solid var(--line);
}
.beforeafter__tag {
  position: absolute; top: 0; left: 0;
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-small);
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--ink); color: var(--ink-on-dark); padding: 0.4rem 0.7rem;
}
.beforeafter__tag--after { background: var(--accent); color: var(--accent-contrast); }
.casestudy__body { color: var(--ink-2); }
.casestudy__body p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------------------
   12. Testimonials
   --------------------------------------------------------------------------- */
.testimonial-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.testimonial {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3);
}
.testimonial__quote {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: var(--fs-quote); line-height: 1.4; color: var(--ink); margin: 0; max-width: none;
}
.testimonial__cite {
  font-family: var(--font-body); font-weight: 700; font-style: normal;
  color: var(--ink-2); margin-top: auto;
}
.testimonial__cite em { font-weight: 600; color: var(--muted); font-style: italic; }
.section--dark .testimonial { background: var(--surface-dark); border-color: var(--line-on-dark); border-left-color: var(--accent-on-dark); }
.section--dark .testimonial__quote { color: var(--ink-on-dark); }
.section--dark .testimonial__cite { color: var(--muted-on-dark); }

/* ---------------------------------------------------------------------------
   13. Steps (numbered)
   --------------------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: var(--space-5); }
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; }
.step__num {
  counter-increment: step; font-family: var(--font-display); font-weight: 900;
  font-size: 1.75rem; color: var(--accent-ink); font-variant-numeric: tabular-nums; line-height: 1;
}
.step__num::before { content: counter(step); }
.section--dark .step__num { color: var(--accent-on-dark); }
.step__title { margin-bottom: var(--space-2); }
.step__text { color: var(--ink-2); margin: 0; }
.section--dark .step__text { color: var(--muted-on-dark); }

/* ---------------------------------------------------------------------------
   14. Forms
   --------------------------------------------------------------------------- */
.form { max-width: 40rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: var(--space-4); }
.field label { font-family: var(--font-body); font-weight: 700; font-size: 1rem; color: var(--ink); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.input, .textarea, .select {
  font-family: var(--font-body); font-size: 1.0625rem; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line-strong);
  padding: 0.75rem var(--space-3); min-height: 48px; width: 100%;
}
.textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(164, 98, 43, 0.35);
}
.required { color: var(--alert); }
.field__error { color: var(--alert); font-size: var(--fs-small); font-weight: 600; }
.field--error .input { border-color: var(--alert); }

.radio-row { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.radio-option { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: 600; }
.radio-option input { width: 20px; height: 20px; accent-color: var(--accent); }

.form-note { font-size: var(--fs-small); color: var(--muted); margin-top: var(--space-3); }

/* ---------------------------------------------------------------------------
   15. Materials callout / pill list
   --------------------------------------------------------------------------- */
.materials { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.material-pill {
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-small);
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  padding: 0.5rem var(--space-3); display: inline-flex; align-items: center; min-height: 40px;
}
.section--dark .material-pill { background: var(--surface-dark); border-color: var(--line-on-dark); color: var(--ink-on-dark); }

/* Filter chips (work page; static, decorative anchors) */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
.chip {
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-small);
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  padding: 0.5rem var(--space-3); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;
  transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.chip:hover { background: var(--ink); color: var(--bg); }
.chip:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }

/* ---------------------------------------------------------------------------
   16. Split / media+text rows
   --------------------------------------------------------------------------- */
.split { display: grid; gap: var(--space-5); grid-template-columns: 1fr; align-items: center; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.split__body p:last-child { margin-bottom: 0; }

.feature-list { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: grid; gap: var(--space-3); }
.feature-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start; max-width: 60ch; margin: 0; }
.feature-list .tick {
  width: 24px; height: 24px; flex: none; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-contrast); font-weight: 700; font-size: 0.875rem;
}
.section--dark .feature-list .tick { background: var(--accent-on-dark); color: var(--ink); }

/* ---------------------------------------------------------------------------
   17. Instagram strip
   --------------------------------------------------------------------------- */
.instagram-strip { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, 1fr); margin-top: var(--space-5); }
.ig-tile {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden; display: block;
  border: 1px solid var(--line); text-decoration: none;
}
.ig-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.ig-tile:hover img { transform: scale(1.04); }
.ig-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------------------
   18. Map placeholder (contact)
   --------------------------------------------------------------------------- */
.map-frame {
  width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: var(--surface);
  display: block;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------------------------------------------------------------------------
   19. CTA band
   --------------------------------------------------------------------------- */
.cta-band__inner { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4); }
.cta-band h2 { margin-bottom: var(--space-3); }

/* ---------------------------------------------------------------------------
   20. Definition / detail lists (contact details, role facts)
   --------------------------------------------------------------------------- */
.detail-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
.detail-block h3 { font-family: var(--font-body); font-weight: 700; font-size: var(--fs-h5); margin-bottom: var(--space-2); }
.detail-block p { margin-bottom: 0; color: var(--ink-2); }
.detail-block a { font-weight: 700; }

/* ---------------------------------------------------------------------------
   21. Scroll reveal
   --------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------------
   22. Footer
   --------------------------------------------------------------------------- */
.site-footer { background: var(--bg-dark); color: var(--ink-on-dark); padding-block: var(--space-7) var(--space-5); }
.site-footer .waterline { background: var(--line-on-dark); margin-top: 0; }
.footer__cols {
  max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4);
  display: grid; gap: var(--space-5); grid-template-columns: 1fr;
}
.footer__brand-name { font-family: var(--font-display); font-weight: 900; font-size: 1.375rem; color: var(--ink-on-dark); margin-bottom: var(--space-2); }
.footer__brand p { color: var(--muted-on-dark); font-size: var(--fs-body-sm); max-width: 32ch; }
.footer__head { font-family: var(--font-body); font-weight: 700; font-size: 1rem; letter-spacing: 0.01em; margin-bottom: var(--space-3); color: var(--ink-on-dark); }
.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin: 0; }
.footer__cols a { color: var(--muted-on-dark); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.footer__cols a:hover { color: var(--accent-on-dark); text-decoration: underline; }
.footer__cols address { font-style: normal; color: var(--muted-on-dark); font-size: var(--fs-body-sm); line-height: 1.5; }
.footer__social { display: flex; gap: var(--space-3); margin-top: var(--space-3); }
.footer__social a { min-height: 44px; min-width: 44px; align-items: center; justify-content: center; border: 1px solid var(--line-on-dark); color: var(--ink-on-dark); }
.footer__social a:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); text-decoration: none; }
.footer__social svg { width: 22px; height: 22px; }
.footer__trust-tags { color: var(--muted-on-dark); font-size: var(--fs-body-sm); line-height: 1.6; }
.footer__baseline {
  max-width: var(--container); margin: var(--space-5) auto 0;
  padding: var(--space-4) var(--space-4) 0; border-top: 1px solid var(--line-on-dark);
  font-size: var(--fs-small); color: var(--muted-on-dark);
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); justify-content: space-between;
}
.footer__baseline a { color: var(--muted-on-dark); }
.footer__baseline a:hover { color: var(--accent-on-dark); }

/* ---------------------------------------------------------------------------
   23. Prose helpers for body sections
   --------------------------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose p { color: var(--ink-2); }
.prose h2, .prose h3 { margin-top: var(--space-6); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }

.intro-band__lead { font-size: var(--fs-lead); color: var(--ink-2); max-width: 60ch; }

/* ---------------------------------------------------------------------------
   24. Responsive
   --------------------------------------------------------------------------- */
@media (min-width: 480px) {
  .instagram-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .nav { display: flex; }
  .header__phone-icon { display: none; }
  .nav-toggle { display: none; }

  .trust__inner { grid-template-columns: repeat(4, 1fr); }
  .beforeafter { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__media { order: 2; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .instagram-strip { grid-template-columns: repeat(4, 1fr); }
  .footer__cols { grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr; }
}

@media (min-width: 1080px) {
  .card-grid--services { grid-template-columns: repeat(3, 1fr); }
  .card--lead { grid-column: span 2; }
  .card-grid--services .card--lead .card__media { aspect-ratio: 16 / 9; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  .nav { display: none; }
  .header__phone { display: none; }
  .header__phone-icon { display: inline-flex; }
  .nav-toggle { display: inline-flex; }
  .header__quote-desktop { display: none; }
  .hero__overlay { background: linear-gradient(90deg, rgba(22,36,46,0.92) 0%, rgba(22,36,46,0.86) 100%); }
  .btn--hero { width: 100%; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .footer__baseline { flex-direction: column; }
}

/* ---------------------------------------------------------------------------
   25. Reduced motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .card:hover { transform: none; }
  .cat-card:hover .cat-card__media { transform: none; }
  .ig-tile:hover img { transform: none; }
}

/* ---------------------------------------------------------------------------
   26. Print (assessor-friendly)
   --------------------------------------------------------------------------- */
@media print {
  .site-header, .mobile-nav, .nav-toggle, .hero__media, .hero__overlay,
  .page-hero__media, .page-hero__overlay, .insurer-strip img, .skip-link,
  .instagram-strip, .map-frame, .footer__social { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .section--dark, .hero, .page-hero { background: #fff !important; color: #000 !important; }
  .section--dark h1, .section--dark h2, .section--dark h3, .section--dark p,
  .hero h1, .hero__sub, .page-hero h1, .page-hero .lead { color: #000 !important; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #333; }
  .beforeafter { grid-template-columns: 1fr 1fr; break-inside: avoid; }
  .casestudy { break-inside: avoid; }
  .waterline, .waterline-eyebrow { background: #000 !important; }
}
