/* ==========================================================================
   Cedar Global Trust (CGT) — brochure site stylesheet
   Single stylesheet, no build step, no framework.
   Palette: cedar green (Lebanon / integrity) + bronze (certification seal)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --cedar-950: #082115;
  --cedar-900: #0C2A1B;
  --cedar-800: #133F28;
  --cedar-700: #1B5636;
  --cedar-600: #246E45;
  --cedar-100: #E3EDE7;
  --cedar-050: #F1F6F2;

  --bronze-700: #8C6529;
  --bronze-600: #A87A34;
  --bronze-500: #BE9048;
  --bronze-200: #E8D8B8;
  --bronze-050: #FAF4E8;

  /* Neutrals */
  --paper:   #FBF9F5;
  --paper-2: #F3EFE7;
  --paper-3: #E9E3D8;
  --ink:     #171A17;
  --ink-2:   #474C46;
  --ink-3:   #6E736C;
  --white:   #FFFFFF;

  --line:        rgba(19, 63, 40, 0.12);
  --line-strong: rgba(19, 63, 40, 0.22);

  /* Type */
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;

  /* Fluid type scale
     Ramped from a phone-appropriate minimum (~375px) to the desktop maximum
     (~1440px). The minimums matter: a display size that only looks right on a
     laptop is what makes a technically-responsive site feel broken on a phone. */
  --fs-display: clamp(1.95rem, 1.04rem + 3.85vw, 4.5rem);  /* 31 / 46 / 72px */
  --fs-h1:      clamp(1.62rem, 1.04rem + 2.52vw, 3.3rem);  /* 26 / 36 / 53px */
  --fs-h2:      clamp(1.38rem, 1.01rem + 1.54vw, 2.4rem);  /* 22 / 28 / 38px */
  --fs-h3:      clamp(1.10rem, 1.02rem + 0.42vw, 1.45rem); /* 18 / 20 / 23px */
  --fs-lead:    clamp(1.02rem, 0.98rem + 0.32vw, 1.3rem);  /* 17 / 18 / 21px */
  --fs-body:    1rem;
  --fs-sm:      0.9rem;
  --fs-xs:      0.8rem;

  /* Spacing */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.5rem;   --sp-6: 2rem;
  --sp-7: 3rem;     --sp-8: 4rem;     --sp-9: 6rem;
  --section-y: clamp(2.75rem, 1.6rem + 5vw, 7rem);

  /* Header height — the mobile nav drawer hangs off this, so it must stay in
     sync with the header's real height at every breakpoint. */
  --header-h: 74px;

  /* Shape & depth */
  --r-sm: 4px;  --r-md: 8px;  --r-lg: 14px;  --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(12, 42, 27, 0.06), 0 2px 6px rgba(12, 42, 27, 0.05);
  --shadow-md: 0 4px 10px rgba(12, 42, 27, 0.07), 0 12px 28px rgba(12, 42, 27, 0.07);
  --shadow-lg: 0 10px 24px rgba(12, 42, 27, 0.09), 0 28px 60px rgba(12, 42, 27, 0.10);

  --container: 1180px;
  --container-narrow: 780px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* The UA rule for [hidden] is only `display: none` at element specificity, so
   any class rule that sets display (e.g. `.contact-list li { display: flex }`)
   silently overrides it and the element stays visible. Enforce it. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0 0 var(--sp-4);
  color: var(--cedar-900);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 650; letter-spacing: -0.005em; }

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--cedar-700);
  text-decoration-color: var(--bronze-200);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.18s var(--ease), text-decoration-color 0.18s var(--ease);
}
a:hover { color: var(--bronze-700); text-decoration-color: var(--bronze-500); }

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

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
li { margin-bottom: var(--sp-2); }
li:last-child { margin-bottom: 0; }

strong { font-weight: 650; color: var(--cedar-900); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-7) 0; }

:focus-visible {
  outline: 2.5px solid var(--bronze-600);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: var(--bronze-200); color: var(--cedar-900); }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.62); }
.section--paper2 { background: var(--paper-2); }
.section--cedar { background: var(--cedar-900); color: var(--cedar-100); }
.section--cedar h1, .section--cedar h2, .section--cedar h3 { color: var(--white); }
.section--cedar a { color: var(--bronze-200); }

.section-head { max-width: 62ch; margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Service pillar cards. Five of them, so three per row reads better than four
   (which would strand a single card on the second row). */
.grid-pillars { grid-template-columns: repeat(3, 1fr); }

/* Two-column split, usually text + image */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--reverse > :first-child { order: 2; }

/* --------------------------------------------------------------------------
   4. Small components
   -------------------------------------------------------------------------- */
.eyebrow {
  /* flex (not inline-flex) so that when the label wraps on a narrow screen the
     text forms its own block beside the rule, instead of the second line
     sliding under the rule. */
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze-700);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: "";
  flex: 0 0 26px;
  height: 1.5px;
  background: var(--bronze-500);
}
.section--cedar .eyebrow { color: var(--bronze-200); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-2);
}
.section--cedar .lead { color: var(--cedar-100); opacity: 0.88; }

.badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 100px;
  background: var(--bronze-050);
  color: var(--bronze-700);
  border: 1px solid var(--bronze-200);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease),
              box-shadow 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--cedar-800);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--cedar-700); color: var(--white); box-shadow: var(--shadow-md); }

.btn--bronze { background: var(--bronze-600); color: var(--white); }
.btn--bronze:hover { background: var(--bronze-700); color: var(--white); }

/* WhatsApp green, with dark text rather than white — white on #25D366 only
   reaches about 2.3:1, which fails contrast. Dark on green clears 8:1 and the
   colour is still instantly recognisable. */
.btn--whatsapp {
  background: #25D366;
  color: #0A2E1F;
}
.btn--whatsapp:hover { background: #1EBE5A; color: #0A2E1F; }
.btn--whatsapp svg { flex-shrink: 0; }

/* Shown inside the form status only when mailto: failed to open anything. */
.btn--copy {
  margin-top: 0.75rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

.btn--ghost {
  background: transparent;
  color: var(--cedar-800);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--cedar-050); border-color: var(--cedar-700); color: var(--cedar-800); }

.btn--on-dark {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn--on-dark:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); border-color: rgba(255, 255, 255, 0.6); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* Per-service call to action, sitting at the end of each service block rather
   than relying on one global button in the header. */
.service-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.service-cta__note {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  max-width: 30ch;
}
.section--cedar .service-cta { border-top-color: rgba(255, 255, 255, 0.16); }
.section--cedar .service-cta__note { color: rgba(227, 237, 231, 0.7); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  color: var(--cedar-700);
}
.arrow-link::after { content: "\2192"; transition: transform 0.2s var(--ease); }
.arrow-link:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--cedar-800); color: var(--white);
  padding: 0.75rem 1.25rem; border-radius: 0 0 var(--r-md) 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; color: var(--white); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 245, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 14px rgba(12, 42, 27, 0.05);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--cedar-900);
  flex-shrink: 0;
}
.logo:hover { color: var(--cedar-900); }
.logo__mark { width: 38px; height: 38px; flex-shrink: 0; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__name {
  font-family: var(--font-serif);
  font-size: 1.16rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.logo__tag {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--bronze-700);
  margin-top: 2px;
}

/* Nav */
.nav { display: flex; align-items: center; gap: var(--sp-5); }
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.9rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__list li { margin: 0; }
.nav__link {
  position: relative;
  font-size: 0.93rem;
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.4rem 0;
  white-space: nowrap;
}

/* The in-menu CTA is for the mobile drawer only; desktop uses the
   standalone button beside the nav. */
.nav__cta { display: none; }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 0; height: 2px;
  background: var(--bronze-500);
  transition: width 0.22s var(--ease);
}
.nav__link:hover { color: var(--cedar-800); }
.nav__link:hover::after { width: 100%; }
.nav__link[aria-current="page"] { color: var(--cedar-900); font-weight: 650; }
.nav__link[aria-current="page"]::after { width: 100%; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle__bars { position: relative; width: 19px; height: 12px; }
.nav-toggle__bars span {
  position: absolute; left: 0;
  width: 100%; height: 1.8px;
  background: var(--cedar-900);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease), top 0.25s var(--ease);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5px; }
.nav-toggle__bars span:nth-child(3) { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   7. Media / image system
   Every site image sits in a fixed-ratio frame, so swapping a placeholder for
   a real photo never shifts the layout. Override the ratio with --ratio.
   -------------------------------------------------------------------------- */
.media {
  position: relative;
  aspect-ratio: var(--ratio, 3 / 2);
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--paper-3);
}
.media > img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--focal, center);
}
.media--portrait { --ratio: 4 / 5; }
.media--square   { --ratio: 1 / 1; }
.media--wide     { --ratio: 16 / 9; }
.media--tall     { --ratio: 3 / 4; }
.media--framed {
  box-shadow: var(--shadow-lg);
  outline: 1px solid var(--line);
}
.media--bronze-edge { border: 1px solid var(--bronze-200); }

.media-caption {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  line-height: 1.5;
}

/* Decorative offset outline behind an image */
.media-stack { position: relative; isolation: isolate; }
.media-stack::after {
  content: "";
  position: absolute;
  inset: auto -14px -14px auto;
  width: 58%; height: 58%;
  border: 1.5px solid var(--bronze-200);
  border-radius: var(--r-lg);
  z-index: -1;
}

/* Hidden images: switched off in js/config.js
   The image's frame is marked hidden, and each layout closes up around it so
   nothing looks missing. A card simply keeps its text, and the hero falls back
   to its plain dark green, so neither needs a rule of its own. */
figure:has(> .media[hidden]),
.media-stack:has(> .media[hidden]) { display: none; }

/* Text-and-image sections: remove the empty column and let the text take the
   row, held to a comfortable reading width rather than the full container. */
.split:has(.media[hidden]) { grid-template-columns: 1fr; }
.split > :has(.media[hidden]) { display: none; }
.split:has(.media[hidden]) > * { max-width: 46rem; }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--cedar-900);
  color: var(--cedar-100);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.32;
}
.hero::after {
  /* Legibility scrim over the background photo */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg,
    rgba(8, 33, 21, 0.94) 0%,
    rgba(8, 33, 21, 0.78) 45%,
    rgba(8, 33, 21, 0.42) 100%);
}
.hero__inner {
  padding-block: clamp(4.5rem, 3rem + 10vw, 9rem);
  max-width: 46rem;
}
.hero h1 {
  font-size: var(--fs-display);
  color: var(--white);
  margin-bottom: var(--sp-5);
}
.hero h1 em { font-style: normal; color: var(--bronze-200); }
.hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: rgba(227, 237, 231, 0.86);
  max-width: 40rem;
  margin-bottom: var(--sp-6);
}

/* Trust strip under the hero */
.trust-strip {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
}
.trust-strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5) clamp(1.5rem, 5vw, 4rem);
  padding-block: var(--sp-5);
  align-items: flex-start;
}
.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--fs-sm);
  color: rgba(227, 237, 231, 0.82);
  max-width: 17rem;
}
.trust-item svg { flex-shrink: 0; margin-top: 2px; color: var(--bronze-500); }

/* Interior page hero */
.page-hero {
  background: var(--cedar-900);
  color: var(--cedar-100);
  padding-block: clamp(3.2rem, 2rem + 6vw, 5.5rem);
}
.page-hero h1 { color: var(--white); max-width: 30ch; }
.page-hero .lead { max-width: 58ch; }

.crumb {
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: rgba(227, 237, 231, 0.6);
  margin-bottom: var(--sp-4);
}
.crumb a { color: rgba(227, 237, 231, 0.85); text-decoration: none; }
.crumb a:hover { color: var(--bronze-200); }

/* --------------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card__body { padding: var(--sp-5); flex: 1; display: flex; flex-direction: column; }
.card__body > h3 { margin-bottom: var(--sp-3); }
.card__body > .arrow-link { margin-top: auto; padding-top: var(--sp-4); }
.card .media { border-radius: 0; }

.card__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--bronze-700);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}

.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--cedar-050);
  border: 1px solid var(--cedar-100);
  color: var(--cedar-700);
  margin-bottom: var(--sp-4);
}
.card__icon svg { width: 22px; height: 22px; }

/* Problem cards (the Trust Gap) */
.problem-card {
  padding: var(--sp-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bronze-500);
  border-radius: var(--r-md);
}
.problem-card h3 { margin-bottom: var(--sp-3); }
.problem-card p { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   10. Steps
   -------------------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: var(--sp-5);
  padding-block: var(--sp-6);
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num {
  counter-increment: step;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--bronze-500);
  line-height: 1;
}
.step__num::before { content: counter(step, decimal-leading-zero); }
.step__body h3 { margin-bottom: var(--sp-2); }
.step__body p { color: var(--ink-2); max-width: 62ch; }

/* --------------------------------------------------------------------------
   11. Check list
   -------------------------------------------------------------------------- */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.check-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0;
  line-height: 1.55;
}
.check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--cedar-050) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B5636' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
  border: 1px solid var(--cedar-100);
}
.section--cedar .check-list li::before {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   12. IVR sample panel
   -------------------------------------------------------------------------- */
.ivr-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.ivr-panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--cedar-900);
  color: var(--white);
}
.ivr-panel__bar strong { color: var(--white); font-size: 0.95rem; }
.ivr-panel__bar span {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--bronze-200);
  letter-spacing: 0.04em;
}
.ivr-panel__body { padding: var(--sp-5); }
.ivr-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-4);
  padding-block: 0.75rem;
  border-bottom: 1px dashed var(--line);
  font-size: var(--fs-sm);
  align-items: center;
}
.ivr-row:last-child { border-bottom: 0; }
.ivr-row__label { color: var(--ink-2); }
.ivr-row__value { font-weight: 600; color: var(--cedar-900); }
.ivr-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cedar-700);
  padding: 0.3rem 0.6rem;
  border: 1.5px solid var(--cedar-600);
  border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   13. Pull statement
   -------------------------------------------------------------------------- */
.pull {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2.15rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--cedar-900);
  max-width: 34ch;
  margin: 0;
}
.section--cedar .pull { color: var(--white); }
.pull__attrib {
  display: block;
  margin-top: var(--sp-4);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--bronze-700);
}
.section--cedar .pull__attrib { color: var(--bronze-200); }

/* --------------------------------------------------------------------------
   14. CTA band
   -------------------------------------------------------------------------- */
.cta {
  background: linear-gradient(135deg, var(--cedar-800) 0%, var(--cedar-950) 100%);
  color: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(2.2rem, 1.5rem + 4vw, 4rem);
  text-align: center;
}
.cta h2 { color: var(--white); max-width: 26ch; margin-inline: auto; }
.cta p { color: rgba(227, 237, 231, 0.85); max-width: 50ch; margin-inline: auto; margin-bottom: var(--sp-6); }
.cta .btn-row { justify-content: center; }
/* Social media icons: Contact and About pages. Each icon, and the row
   itself, stays hidden until an address is set in js/config.js. */
.social__label {
  display: block;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--cedar-900);
}
.social__links { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;                 /* a comfortable tap target on a phone */
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  color: var(--cedar-800);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.social__link:hover { background: var(--cedar-800); border-color: var(--cedar-800); color: var(--white); }
.social__link svg { width: 20px; height: 20px; }

/* Inside a card: set apart from the list above it */
.card .social { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line); }

/* On a dark background, centred: the closing box on the About page */
.social--on-dark { margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 1px solid rgba(255, 255, 255, 0.12); }
.social--on-dark .social__label { color: rgba(227, 237, 231, 0.85); }
.social--on-dark .social__links { justify-content: center; }
.social--on-dark .social__link { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: var(--white); }
.social--on-dark .social__link:hover { background: var(--white); border-color: var(--white); color: var(--cedar-900); }

/* --------------------------------------------------------------------------
   15. Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--sp-5); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--cedar-900); }
.field label .req { color: var(--bronze-700); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cedar-600);
  box-shadow: 0 0 0 3px rgba(36, 110, 69, 0.13);
}
.field__hint { font-size: var(--fs-xs); color: var(--ink-3); }
.form__note { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.55; }

/* "Remember my details" tick box */
.field-check { display: flex; align-items: flex-start; gap: var(--sp-3); }
.field-check input {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.1rem 0 0;
  accent-color: var(--cedar-700);
  cursor: pointer;
}
.field-check label { font-size: var(--fs-sm); font-weight: 600; color: var(--cedar-900); cursor: pointer; }
.field-check .field__hint { margin: 0.2rem 0 0; }

/* Shown when the fields were filled in from a previous enquiry */
.remember-notice {
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--cedar-050);
  border: 1px solid var(--cedar-100);
  color: var(--cedar-800);
  font-size: var(--fs-sm);
}

/* A button that reads as a text link */
.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--cedar-700);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-button:hover { color: var(--cedar-900); }

.form-status {
  display: none;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}
.form-status.is-visible { display: block; }
.form-status--info  { background: var(--cedar-050); border: 1px solid var(--cedar-100); color: var(--cedar-800); }
.form-status--error { background: #FDF2F0; border: 1px solid #F2CFC8; color: #8A2C1B; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-5); }
.contact-list li { display: flex; gap: var(--sp-4); margin: 0; }
.contact-list svg { flex-shrink: 0; color: var(--bronze-600); margin-top: 3px; }
.contact-list strong { display: block; font-size: var(--fs-sm); }
.contact-list span { font-size: var(--fs-sm); color: var(--ink-2); }

/* --------------------------------------------------------------------------
   16. FAQ
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: 0; }
.faq details { border-top: 1px solid var(--line); padding-block: var(--sp-4); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cedar-900);
  padding-block: var(--sp-2);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--bronze-600);
  line-height: 1;
  transition: transform 0.22s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-top: var(--sp-3); color: var(--ink-2); max-width: 68ch; }

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--cedar-950);
  color: rgba(227, 237, 231, 0.72);
  padding-block: var(--sp-8) var(--sp-5);
  font-size: var(--fs-sm);
}
.site-footer a { color: rgba(227, 237, 231, 0.8); text-decoration: none; }
.site-footer a:hover { color: var(--bronze-200); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--sp-6) var(--sp-5);
  padding-bottom: var(--sp-7);
}
.footer-grid h4 {
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--bronze-200);
  margin-bottom: var(--sp-4);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.footer-grid li { margin: 0; }
.site-footer .logo { color: var(--white); margin-bottom: var(--sp-4); }
.site-footer .logo:hover { color: var(--white); }
.site-footer .logo__name { color: var(--white); }
.footer-blurb { max-width: 32ch; line-height: 1.6; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-xs);
  color: rgba(227, 237, 231, 0.55);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: var(--sp-4); list-style: none; margin: 0; padding: 0; }
.footer-bottom li { margin: 0; }

/* --------------------------------------------------------------------------
   18. Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   19. Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.measure { max-width: 68ch; }

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */
/* --- Large tablet landscape / small laptop (<= 1080px) ---------------------
   Four pillar cards at 1024px were only ~214px wide — an image, a heading, a
   paragraph and a link cannot share that. Drop to two columns. */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-pillars { grid-template-columns: repeat(2, 1fr); }
}

/* --- Nav switches to a drawer (<= 1000px) ---------------------------------
   Measured: at 900px the logo plus the desktop nav needed 824px of the 820px
   available, so the header crowded before the old 860px breakpoint hit. */
@media (max-width: 1000px) {
  .nav__list {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-3) clamp(1.15rem, 4vw, 2.5rem) var(--sp-5);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  }
  .nav__list.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__link::after { display: none; }
  .nav__cta { display: block; margin-top: var(--sp-4); }
  .nav__cta .btn { width: 100%; }
  .nav__cta .nav__link { border-bottom: 0; padding: 0; }
  .nav-toggle { display: inline-flex; }
  .nav { gap: var(--sp-3); }
  .nav > .btn { display: none; }
}

/* --- Tablet portrait (<= 900px) -------------------------------------------
   Splits were 384px per column with an image in one of them, and the engine
   cards 255px. Both stack. */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--sp-6); }
  .split--reverse > :first-child { order: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-blurb { max-width: 48ch; }

  /* Images get shorter on tablet so a stacked split does not become a
     full screen of photograph before any text appears. */
  .split .media { --ratio: 16 / 9; }
  .split .media--tall,
  .split .media--portrait { --ratio: 4 / 3; max-width: 26rem; }
  .media-stack::after { display: none; }
}

/* --- Large phone / small tablet (<= 720px) -------------------------------- */
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-pillars { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: var(--sp-3); }
  .step__num { font-size: 1.5rem; }
  .trust-item { max-width: none; }
}

/* --- Phone (<= 640px) ------------------------------------------------------ */
@media (max-width: 640px) {
  :root { --header-h: 64px; }

  .logo__mark { width: 32px; height: 32px; }
  .logo__name { font-size: 1.02rem; }
  .logo__tag { font-size: 0.55rem; letter-spacing: 0.13em; }
  .logo { gap: 0.55rem; }

  /* The label is long; tighten it so it holds one line on a 360px screen. */
  .eyebrow { font-size: 0.72rem; letter-spacing: 0.09em; }
  .eyebrow::before { flex-basis: 18px; }

  .hero__inner { padding-block: clamp(3rem, 2rem + 8vw, 4.5rem); }
  .hero::after {
    /* Stronger scrim: on a phone the headline sits directly over the photo. */
    background: linear-gradient(170deg,
      rgba(8, 33, 21, 0.92) 0%,
      rgba(8, 33, 21, 0.86) 55%,
      rgba(8, 33, 21, 0.70) 100%);
  }
  .hero__bg img { opacity: 0.26; }

  /* Full-width buttons: larger tap targets, no awkward half-width stack. */
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }

  /* Label above value rather than squeezed onto one line. */
  .ivr-row { grid-template-columns: 1fr; gap: 2px; padding-block: 0.6rem; }
  .ivr-row__value, .ivr-stamp { justify-self: start; }
  .ivr-panel__bar { flex-direction: column; align-items: flex-start; gap: 0.25rem; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--sp-2); }
  .footer-bottom ul { flex-direction: column; gap: var(--sp-1); }

  .faq summary { font-size: 1rem; }
  .cta { border-radius: var(--r-lg); }
  .split .media--tall,
  .split .media--portrait { max-width: none; }
}

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

@media print {
  .site-header, .site-footer, .nav-toggle, .cta, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .page-hero, .section--cedar { background: #fff !important; color: #000 !important; }
  .hero h1, .page-hero h1, .section--cedar h2, .section--cedar h3 { color: #000 !important; }
  .hero::after, .hero__bg { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
