/* ==========================================================================
   TBA Heating & Plumbing Ltd — shared stylesheet
   Design system tokens first: swap these values for your own system.
   ========================================================================== */

:root {
  /* ---- Colors ---- */
  --color-ink: #16181d;            /* near-black text + primary buttons */
  --color-ink-soft: #3a3f47;       /* secondary text */
  --color-muted: #6e7480;          /* metadata, captions */
  --color-canvas: #ffffff;         /* default page surface */
  --color-stone: #efede8;          /* warm neutral cards */
  --color-pale-blue: #eaf3fa;      /* pale water wash sections */
  --color-deep-blue: #0b2b45;      /* dark water band (Cohere deep-green analogue) */
  --color-deep-blue-2: #071e31;    /* darker band variant */
  --color-water: #2e7fb8;          /* water accent / links */
  --color-water-bright: #3f97d6;   /* pop blue — the "Get a free quote" CTA */
  --color-copper: #b06a3b;         /* heat/copper accent (chips, markers) */
  --color-copper-soft: #ecd3bd;    /* pale copper chip fill */
  --color-hairline: #dcdde0;       /* rules and dividers */
  --color-border-light: #e7e8ea;   /* soft card borders */
  --color-on-dark: #ffffff;
  --color-on-dark-muted: rgba(255, 255, 255, 0.66);
  --color-focus: #2e7fb8;          /* keyboard focus ring */
  --color-error: #b30000;

  /* ---- Typography ---- */
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  --font-body: "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --text-hero: clamp(2.6rem, 7.2vw, 5.5rem);       /* hero display */
  --text-display: clamp(2.2rem, 5vw, 3.75rem);     /* section display */
  --text-heading: clamp(1.7rem, 3.4vw, 2.5rem);    /* section heading */
  --text-card: 1.45rem;                            /* card heading */
  --text-feature: 1.2rem;                          /* feature heading */
  --text-lead: 1.125rem;                           /* lead paragraph */
  --text-body: 1rem;
  --text-caption: 0.875rem;
  --text-micro: 0.75rem;

  /* ---- Spacing ---- */
  --space-xxs: 2px;
  --space-xs: 6px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-3xl: 48px;
  --space-section: clamp(64px, 10vw, 112px);

  /* ---- Radius ---- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 32px;
  --radius-full: 9999px;

  /* ---- Layout ---- */
  --container: 1200px;
  --container-wide: 1360px;
}

/* ==========================================================================
   Page transitions — native cross-document View Transitions, zero JS.
   Unsupported browsers (Firefox, Safari) just navigate normally: no polyfill needed.
   ========================================================================== */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 220ms cubic-bezier(0.4, 0, 0.2, 1) both tba-zoom-out;
}

::view-transition-new(root) {
  animation: 320ms cubic-bezier(0.2, 0, 0.2, 1) both tba-zoom-in;
}

@keyframes tba-zoom-out {
  to { transform: scale(1.04); opacity: 0; }
}

@keyframes tba-zoom-in {
  from { transform: scale(0.97); opacity: 0; }
}

/* ==========================================================================
   Reset + base
   ========================================================================== */

/* ponytail: one self-hosted display weight; body stays native — fast, offline-safe */
@font-face {
  font-family: "Bricolage Grotesque";
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/BricolageGrotesque-600.ttf") format("truetype");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--color-ink);
  background: var(--color-canvas);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 var(--space-lg);
  color: inherit;
}

h1 {
  font-size: var(--text-hero);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--text-card);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--text-feature);
  line-height: 1.3;
}

p {
  margin: 0 0 var(--space-lg);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-water);
}

ul, ol {
  margin: 0 0 var(--space-lg);
  padding-left: 1.25em;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-ink);
  color: var(--color-on-dark);
  padding: var(--space-md) var(--space-xl);
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - 40px, var(--container-wide));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-section);
}

.section-tight {
  padding-block: calc(var(--space-section) * 0.6);
}

/* Small copper eyebrow label above headings */
.kicker {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-copper);
  display: block;
  margin-bottom: var(--space-md);
}

.kicker-caps {
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.on-dark .kicker {
  color: var(--color-copper-soft);
}

.lead {
  font-size: var(--text-lead);
  line-height: 1.5;
  color: var(--color-ink-soft);
  max-width: 56ch;
}

.on-dark .lead {
  color: var(--color-on-dark-muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 600;
  line-height: 1;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}

.btn-primary {
  background: var(--color-ink);
  color: var(--color-on-dark);
}

.btn-primary:hover {
  background: var(--color-deep-blue);
  color: var(--color-on-dark);
}

.btn-light {
  background: var(--color-canvas);
  color: var(--color-ink);
}

.btn-light:hover {
  background: var(--color-pale-blue);
  color: var(--color-ink);
}

.btn-copper {
  background: var(--color-copper);
  color: var(--color-on-dark);
}

.btn-copper:hover {
  background: #955730;
  color: var(--color-on-dark);
}

.btn-quote {
  background: var(--color-water-bright);
  color: var(--color-on-dark);
  box-shadow: 0 4px 14px rgba(63, 151, 214, 0.35);
}

.btn-quote:hover {
  background: var(--color-water);
  color: var(--color-on-dark);
  box-shadow: 0 8px 22px rgba(46, 127, 184, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}

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

.on-dark .btn-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--color-on-dark);
}

.on-dark .btn-outline:hover {
  background: var(--color-canvas);
  color: var(--color-ink);
}

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* ==========================================================================
   Announcement bar + header
   ========================================================================== */

.announce {
  background: var(--color-deep-blue);
  color: var(--color-on-dark);
  font-size: var(--text-micro);
  text-align: center;
  padding: 9px 16px;
  letter-spacing: 0.04em;
}

.announce a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-hairline);
}

.nav-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  font-family: var(--font-display);
}

.brand:hover {
  color: inherit;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
}

.brand-text {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.site-header .brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  white-space: nowrap;
}

.site-header .brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.site-header .brand-tagline {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--color-ink-soft);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(14px, 2.4vw, 30px);
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--color-ink-soft);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--color-ink);
  border-bottom-color: var(--color-copper);
}

.nav-links a[aria-current="page"] {
  color: var(--color-ink);
  border-bottom-color: var(--color-water);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-phone {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  text-decoration: none;
  color: var(--color-ink-soft);
  white-space: nowrap;
}

/* CSS-only mobile nav */
.nav-toggle-input {
  position: absolute;
  opacity: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle-input:focus-visible + .nav-toggle {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-canvas);
    border-bottom: 1px solid var(--color-hairline);
    display: none;
    padding: var(--space-lg) 20px var(--space-xl);
  }

  .nav-toggle-input:checked ~ .nav-menu {
    display: block;
  }

  .nav-toggle-input:checked + .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle-input:checked + .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle-input:checked + .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    flex-direction: column;
    gap: 4px;
  }

  .nav-links a {
    display: block;
    padding: 12px 4px;
    font-size: var(--text-body);
    border-bottom: 1px solid var(--color-border-light);
  }

  .nav-links a[aria-current="page"],
  .nav-links a:hover {
    border-bottom-color: var(--color-water);
  }

  .nav-menu .nav-cta {
    margin-top: var(--space-lg);
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .nav-cta-desktop {
    display: none;
  }
}

@media (min-width: 901px) {
  .nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
  }

  .nav-menu .nav-cta {
    display: none;
  }
}

/* Dropdown nav (Services, Portfolio) — hover on desktop only, hidden on mobile (flat top-level links there), no JS */
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-links .caret {
  width: 9px;
  height: 6px;
  color: var(--color-muted);
  transition: transform 160ms ease;
}

.has-dropdown {
  position: relative;
}

.has-dropdown:hover .caret,
.has-dropdown:focus-within .caret {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  padding-top: 10px; /* part of the hoverable box — keeps the gap from breaking :hover */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease;
  z-index: 60;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown-menu {
  list-style: none;
  margin: 0;
  min-width: 216px;
  background: var(--color-canvas);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(11, 43, 69, 0.14);
  padding: 8px;
}

.dropdown-menu li + li {
  margin-top: 2px;
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--color-ink-soft);
  border-bottom: none;
  white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background: var(--color-pale-blue);
  color: var(--color-ink);
}

@media (max-width: 900px) {
  .nav-links .caret {
    display: none;
  }

  .dropdown {
    display: none;
  }
}

/* ==========================================================================
   Water flow motif — used by inline illustration SVGs (media-card)
   ========================================================================== */

@keyframes flow {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -296; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-block: clamp(56px, 9vw, 104px) clamp(40px, 6vw, 72px);
}

.hero-bg {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-media svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(11,43,69,0.82) 0%, rgba(11,43,69,0.55) 45%, rgba(11,43,69,0.15) 75%);
}

.hero-bg .container {
  position: relative;
  z-index: 2;
}

.hero-head {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  padding-block: clamp(40px, 8vw, 96px);
}

.hero-head .hero-actions {
  justify-content: center;
}

.hero-head .lead {
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xl);
  margin-top: var(--space-xxl);
}

.hero-media {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-xl);
  margin-top: clamp(40px, 6vw, 72px);
}

@media (max-width: 768px) {
  .hero-media {
    grid-template-columns: 1fr;
  }
}

.media-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  background: var(--color-stone);
}

.media-card svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Dark "job sheet" console card — Cohere agent-console analogue */
.console-card {
  background: var(--color-ink);
  color: var(--color-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.console-title {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-on-dark-muted);
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}

.console-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-caption);
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.chip-booked { background: rgba(46, 127, 184, 0.28); color: #9fd0f0; }
.chip-done   { background: rgba(90, 160, 90, 0.25);  color: #b9e4b9; }
.chip-onway  { background: rgba(176, 106, 59, 0.3);  color: #f0c9a8; }

/* ==========================================================================
   Trust strip
   ========================================================================== */

.trust-strip {
  text-align: center;
}

.trust-strip p {
  font-size: var(--text-caption);
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
}

.trust-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 6vw, 72px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--color-ink-soft);
}

.trust-logos span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.trust-logos svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Cards + grids
   ========================================================================== */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-canvas);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-xxl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.card p {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-caption);
  line-height: 1.6;
}

.card .text-link {
  margin-top: auto;
  font-size: var(--text-caption);
}

.card-icon {
  width: 44px;
  height: 44px;
  color: var(--color-water);
  margin-bottom: var(--space-sm);
}

.card:hover {
  border-color: var(--color-water);
}

.card-stone {
  background: var(--color-stone);
  border-color: transparent;
}

.card-stone:hover {
  border-color: var(--color-copper);
}

/* Section headers */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-xxl);
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head p {
  margin: 0;
  color: var(--color-ink-soft);
}

@media (max-width: 768px) {
  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* ==========================================================================
   Dark bands
   ========================================================================== */

.band {
  background: var(--color-deep-blue);
  color: var(--color-on-dark);
}

.band-darker {
  background: var(--color-deep-blue-2);
}

.band .card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--color-on-dark);
}

.band .card p {
  color: var(--color-on-dark-muted);
}

.band .card-icon {
  color: var(--color-copper-soft);
}

.band .card:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.pale-section {
  background: var(--color-pale-blue);
}

.stone-section {
  background: var(--color-stone);
}

/* ==========================================================================
   Process timeline — "how a callout works"
   ========================================================================== */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  counter-reset: step;
}

@media (max-width: 900px) {
  .timeline { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .timeline { grid-template-columns: 1fr; }
}

.timeline li {
  counter-increment: step;
  position: relative;
  padding-top: var(--space-3xl);
}

.timeline li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.1em;
  color: var(--color-copper);
}

.timeline h3 {
  font-size: var(--text-feature);
  margin-bottom: var(--space-sm);
}

.timeline p {
  font-size: var(--text-caption);
  color: var(--color-ink-soft);
  margin: 0;
}

.on-dark .timeline p {
  color: var(--color-on-dark-muted);
}

/* ==========================================================================
   Comparison table
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  font-size: var(--text-caption);
}

table.compare caption {
  text-align: left;
  padding: var(--space-lg) var(--space-xl);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

table.compare th,
table.compare td {
  padding: var(--space-lg) var(--space-xl);
  text-align: left;
  border-top: 1px solid var(--color-border-light);
  vertical-align: top;
}

table.compare thead th {
  font-family: var(--font-display);
  font-size: var(--text-body);
  border-top: none;
  background: var(--color-stone);
}

table.compare tbody th {
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-ink-soft);
}

table.compare .good { color: #2e6b2e; font-weight: 600; }
table.compare .fair { color: var(--color-copper); font-weight: 600; }

/* ==========================================================================
   FAQ accordion (CSS-only)
   ========================================================================== */

.faq {
  border-top: 1px solid var(--color-hairline);
}

.faq details {
  border-bottom: 1px solid var(--color-hairline);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl) var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--text-feature);
  font-weight: 500;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--color-copper);
  flex: none;
  transition: transform 160ms ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details > div {
  padding: 0 var(--space-xs) var(--space-xl);
  color: var(--color-ink-soft);
  max-width: 65ch;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.quote-card {
  background: var(--color-stone);
  border-radius: var(--radius-sm);
  padding: var(--space-xxl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.quote-card blockquote {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.6;
}

.quote-card figcaption {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: auto;
}

.quote-card svg {
  width: 26px;
  height: 26px;
  color: var(--color-copper);
}

/* ==========================================================================
   Stats / credentials tiles
   ========================================================================== */

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 900px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .stat-tiles { grid-template-columns: 1fr; }
}

.stat-tile {
  border-top: 2px solid var(--color-water);
  padding-top: var(--space-lg);
}

.stat-tile strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-card);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
}

.stat-tile span {
  font-size: var(--text-caption);
  color: var(--color-ink-soft);
}

.on-dark .stat-tile span {
  color: var(--color-on-dark-muted);
}

/* ==========================================================================
   Portfolio: before / after
   ========================================================================== */

.ba-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 640px) {
  .ba-pair { grid-template-columns: 1fr; }
}

.ba-panel {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
}

.ba-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Reusable "photo coming soon" tile — swap for a real <img> as photos come in */
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--color-stone);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--color-muted);
}

.photo-placeholder svg {
  width: 30px;
  height: 30px;
}

.photo-placeholder span {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-tile {
  margin: 0;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.gallery-tile figcaption {
  padding: 12px 14px;
  font-size: var(--text-caption);
  color: var(--color-ink-soft);
  border-top: 1px solid var(--color-border-light);
}

.ba-panel .ba-label {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--color-ink);
  color: var(--color-on-dark);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.ba-panel .ba-label.after {
  background: var(--color-water);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-block: var(--space-3xl);
  border-top: 1px solid var(--color-hairline);
}

.project:first-of-type {
  border-top: none;
}

@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; }
}

.project-meta {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-card {
  background: var(--color-canvas);
  color: var(--color-ink);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg) var(--space-xl);
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: var(--text-caption);
  font-weight: 600;
}

.field .hint {
  font-size: var(--text-micro);
  color: var(--color-muted);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  color: inherit;
  padding: 12px 14px;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-xs);
  background: var(--color-canvas);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 1px;
  border-color: var(--color-focus);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--color-error);
}

.check-row {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  font-size: var(--text-caption);
  color: var(--color-ink-soft);
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  background: var(--color-deep-blue);
  color: var(--color-on-dark);
  position: relative;
  overflow: hidden;
}

.cta-band .container {
  position: relative;
  z-index: 1;
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-3xl);
  align-items: center;
}

@media (max-width: 820px) {
  .cta-inner { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-ink);
  color: var(--color-on-dark);
  padding-block: var(--space-section) var(--space-xxl);
  font-size: var(--text-caption);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-on-dark-muted);
  margin-bottom: var(--space-lg);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-grid a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--color-on-dark);
  text-decoration: underline;
}

.footer-brand p {
  color: var(--color-on-dark-muted);
  max-width: 34ch;
}

.social-row {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.social-row a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
}

.social-row a:hover {
  border-color: var(--color-on-dark);
  background: rgba(255, 255, 255, 0.08);
}

.social-row svg {
  width: 17px;
  height: 17px;
}

.footer-legal {
  padding-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-xxl);
  justify-content: space-between;
  color: var(--color-on-dark-muted);
  font-size: var(--text-micro);
}

.footer-legal p {
  margin: 0;
  max-width: 70ch;
}

.footer-legal button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.footer-legal button:hover {
  color: var(--color-on-dark);
}

/* ==========================================================================
   Cookie banner (the only JS-driven element on the site)
   ========================================================================== */

.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 300;
  background: var(--color-deep-blue-2);
  color: var(--color-on-dark);
  border-top: 2px solid var(--color-water);
  padding: var(--space-lg) 20px;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-inner {
  width: min(100%, var(--container));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg) var(--space-xxl);
}

.cookie-inner p {
  margin: 0;
  font-size: var(--text-caption);
  color: var(--color-on-dark-muted);
  flex: 1 1 340px;
}

.cookie-inner p a {
  color: var(--color-on-dark);
}

.cookie-actions {
  display: flex;
  gap: var(--space-md);
}

.cookie-actions .btn {
  padding: 11px 22px;
}

/* ==========================================================================
   Page hero (inner pages)
   ========================================================================== */

.page-hero {
  padding-block: clamp(48px, 8vw, 88px);
  border-bottom: 1px solid var(--color-hairline);
}

.page-hero h1 {
  font-size: var(--text-display);
  max-width: 20ch;
}

.page-hero .lead {
  margin-bottom: 0;
}

/* Legal pages */
.legal-body {
  max-width: 72ch;
}

.legal-body h2 {
  font-size: var(--text-card);
  margin-top: var(--space-3xl);
}

.legal-body h3 {
  font-size: var(--text-feature);
  margin-top: var(--space-xxl);
}

.legal-body p,
.legal-body li {
  color: var(--color-ink-soft);
}

.updated-stamp {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ==========================================================================
   Service area list
   ========================================================================== */

.area-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: 0;
}

.area-cloud li {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  background: var(--color-canvas);
}

.on-dark .area-cloud li {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Split layouts */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.checklist li {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  color: var(--color-ink-soft);
}

.on-dark .checklist li {
  color: var(--color-on-dark-muted);
}

.checklist svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 3px;
  color: var(--color-water);
}

.on-dark .checklist svg {
  color: var(--color-copper-soft);
}
