/* ============================================================
   R J Preston Ltd
   Design system — navy, harvest gold, warm paper
   ============================================================ */

/* ---------- 1. Tokens ---------- */

:root {
  /* Ink — deep navy scale, drawn from the brand banner */
  --ink-900: #050d1e;
  --ink-800: #0a1730;
  --ink-700: #102344;
  --ink-600: #17305a;
  --ink-500: #22447a;
  --ink-400: #3a5f9c;
  --ink-300: #7d9ac5;
  --ink-200: #b9cae3;
  --ink-100: #dfe8f4;

  /* Harvest gold — tussock, grain, late Canterbury light */
  --gold-700: #8a6717;
  --gold-600: #a67c1f;
  --gold-500: #c39a3e;
  --gold-400: #d9b464;
  --gold-300: #e8cd97;
  --gold-100: #f7eeda;

  /* Paper — warm neutrals, never clinical white */
  --paper: #fbfaf7;
  --paper-alt: #f2efe8;
  --paper-deep: #e8e3d8;
  --white: #ffffff;

  --text: #16202e;
  --text-muted: #5a6675;
  --text-soft: #7b8695;
  --line: #e2ddd2;
  --line-strong: #cfc8b8;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-script: "Dancing Script", cursive;

  /* Fluid type scale */
  --fs-display: clamp(2.6rem, 1.7rem + 3.5vw, 4.6rem);
  --fs-h1:      clamp(2.25rem, 1.5rem + 3vw, 4rem);
  --fs-h2:      clamp(1.75rem, 1.3rem + 1.9vw, 2.85rem);
  --fs-h3:      clamp(1.15rem, 1.02rem + 0.55vw, 1.45rem);
  --fs-lead:    clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  --fs-body:    1.0125rem;
  --fs-small:   0.875rem;
  --fs-eyebrow: 0.75rem;

  /* Space */
  --section-y: clamp(4rem, 2.5rem + 6vw, 8rem);
  --gutter: clamp(1.25rem, 0.75rem + 2vw, 2.5rem);

  /* Form */
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(10, 23, 48, 0.06), 0 2px 8px rgba(10, 23, 48, 0.05);
  --shadow: 0 4px 12px rgba(10, 23, 48, 0.07), 0 12px 32px rgba(10, 23, 48, 0.07);
  --shadow-lg: 0 8px 24px rgba(10, 23, 48, 0.10), 0 28px 64px rgba(10, 23, 48, 0.14);
  --shadow-gold: 0 10px 30px rgba(163, 124, 31, 0.22);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.55s;

  /* Subtle paper grain for dark panels */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

/* ---------- 2. Base ---------- */

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

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

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

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

::selection { background: var(--gold-300); color: var(--ink-900); }

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

/* ---------- 3. Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-weight: 600;
  color: var(--ink-800);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink-600); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--gold-600); }

strong { font-weight: 650; color: var(--ink-800); }

/* Fraunces' calligraphic ampersand reads as a glitch at small sizes —
   render ampersands in headings with the body face instead. */
.amp {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9em;
  padding-inline: 0.04em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 46ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--gold-500);
  flex: none;
}

/* Script motto */
.script {
  font-family: var(--font-script);
  font-weight: 700;
  line-height: 1;
  color: var(--gold-400);
  font-size: clamp(2.2rem, 1.4rem + 3vw, 4.25rem);
  display: block;
  width: fit-content;
}
.text-center .script, .cta .script { margin-inline: auto; }
.script-underline::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 0.18em;
  background: linear-gradient(90deg, transparent, var(--gold-500) 20%, var(--gold-500) 80%, transparent);
  opacity: 0.75;
}
.script-sm { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }

/* Reading measure */
.measure { max-width: 66ch; }
.measure-tight { max-width: 54ch; }

/* ---------- 4. Layout ---------- */

.container {
  width: min(100% - (var(--gutter) * 2), 1180px);
  margin-inline: auto;
}
.container-wide { width: min(100% - (var(--gutter) * 2), 1420px); margin-inline: auto; }
.container-narrow { width: min(100% - (var(--gutter) * 2), 780px); margin-inline: auto; }

section { padding-block: var(--section-y); position: relative; }
.pad-sm { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }

.bg-paper-alt { background: var(--paper-alt); }
.bg-ink {
  background: var(--ink-900);
  color: var(--ink-200);
  position: relative;
  isolation: isolate;
}
.bg-ink::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}
.bg-ink h1, .bg-ink h2, .bg-ink h3 { color: var(--white); }
.bg-ink .eyebrow { color: var(--gold-400); }
.bg-ink .lead { color: var(--ink-200); }
.bg-ink a { color: var(--gold-300); }
.bg-ink a:hover { color: var(--gold-100); }

/* Section heading block */
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 1.2rem + 2.4vw, 3.5rem); }
.section-head p { color: var(--text-muted); }
.bg-ink .section-head p { color: var(--ink-200); }

/* Split: text + media */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}
.split-40-60 { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
.split-60-40 { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
.split-start { align-items: start; }
@media (max-width: 860px) {
  .split, .split-40-60, .split-60-40 { grid-template-columns: minmax(0, 1fr); }
  .split-reverse-mobile > *:first-child { order: 2; }
}

.grid { display: grid; gap: clamp(1.25rem, 0.8rem + 1.6vw, 2rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

/* ---------- 5. Buttons ---------- */

.btn {
  --btn-bg: var(--gold-500);
  --btn-fg: var(--ink-900);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.9em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 620;
  letter-spacing: 0.005em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease);
  text-align: center;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
  color: var(--btn-fg);
}
.btn .arw { transition: transform 0.3s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

.btn-gold { --btn-bg: var(--gold-500); --btn-fg: var(--ink-900); }
.btn-gold:hover { --btn-bg: var(--gold-400); }

.btn-ink { --btn-bg: var(--ink-800); --btn-fg: var(--white); }
.btn-ink:hover { --btn-bg: var(--ink-700); box-shadow: var(--shadow-lg); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-bd: rgba(255, 255, 255, 0.38);
}
.btn-ghost:hover {
  --btn-bd: var(--gold-400);
  --btn-fg: var(--gold-300);
  box-shadow: none;
}

.btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--ink-700);
  --btn-bd: var(--line-strong);
}
.btn-outline:hover {
  --btn-bd: var(--gold-500);
  --btn-fg: var(--ink-900);
  --btn-bg: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 620;
  font-size: 0.9375rem;
  color: var(--ink-600);
}
.link-arrow .arw { transition: transform 0.3s var(--ease); }
.link-arrow:hover { color: var(--gold-600); }
.link-arrow:hover .arw { transform: translateX(4px); }

/* ---------- 6. Header ---------- */

.topbar {
  background: var(--ink-900);
  color: var(--ink-300);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  flex-wrap: wrap;
}
.topbar a { color: var(--ink-100); font-weight: 550; }
.topbar a:hover { color: var(--gold-300); }
.topbar-motto {
  font-family: var(--font-script);
  font-size: 1.1rem;
  color: var(--gold-400);
  line-height: 1;
}
@media (max-width: 700px) { .topbar-motto { display: none; } }

.demo-banner {
  background: var(--gold-500);
  color: var(--ink-900);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(10, 23, 48, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.9rem;
  transition: padding 0.3s var(--ease);
}
.site-header.is-scrolled .header-inner { padding-block: 0.55rem; }

.brand { display: flex; align-items: center; flex: none; }
.brand img {
  height: 42px;
  width: auto;
  transition: height 0.3s var(--ease);
}
.site-header.is-scrolled .brand img { height: 34px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  position: relative;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--ink-700);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.28rem;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.main-nav a:hover { color: var(--ink-900); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--ink-900); font-weight: 650; }

.header-cta { flex: none; }
@media (max-width: 1120px) { .header-cta { display: none; } }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--ink-800);
  color: var(--white);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 620;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 10px;
  position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.75px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle span::before { top: 0; }
.nav-toggle span::after { top: 8px; }
.nav-toggle[aria-expanded="true"] span::before { top: 4px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 4px; transform: rotate(-45deg); }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
  }
  .main-nav.open { max-height: 34rem; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .main-nav li + li { border-top: 1px solid var(--line); }
  .main-nav a { padding: 0.95rem 0.25rem; font-size: 1rem; }
  .main-nav a::after { display: none; }
  .main-nav a.active { color: var(--gold-600); }
}

/* ---------- 7. Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(30rem, 78vh, 46rem);
  padding-block: clamp(4rem, 3rem + 8vw, 8rem) clamp(3rem, 2rem + 5vw, 6rem);
  background: var(--ink-900);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img, .hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(5, 13, 30, 0.96) 0%, rgba(5, 13, 30, 0.72) 34%, rgba(5, 13, 30, 0.48) 62%, rgba(5, 13, 30, 0.62) 100%),
    linear-gradient(105deg, rgba(5, 13, 30, 0.82) 0%, rgba(5, 13, 30, 0.34) 58%, rgba(5, 13, 30, 0.2) 100%);
}
.hero-scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.06;
}

.hero-content { position: relative; }
.hero-content h1 { max-width: 20ch; }
.hero-page .hero-content h1 { max-width: 26ch; }
.hero .eyebrow { color: var(--gold-400); }
.hero .eyebrow::before { background: var(--gold-400); }
.hero h1 {
  color: var(--white);
  font-size: var(--fs-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.45em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}
.hero .lead {
  color: #e4ecf8;
  max-width: 52ch;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.42);
}
.hero .script { margin-bottom: 0.35em; }

/* Compact page hero */
.hero-page {
  min-height: clamp(20rem, 46vh, 28rem);
  align-items: center;
}
.hero-page h1 { font-size: var(--fs-h1); }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-pill);
  z-index: 2;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  background: var(--gold-400);
  border-radius: 2px;
  animation: cue 2s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { opacity: 0; transform: translateY(0); }
  35% { opacity: 1; }
  70% { opacity: 0; transform: translateY(12px); }
}

/* ---------- 8. Stat band ---------- */

.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--ink-800);
  padding: clamp(1.6rem, 1rem + 2vw, 2.6rem) clamp(1.2rem, 1rem + 1vw, 2rem);
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: clamp(2.4rem, 1.6rem + 2.6vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  color: var(--gold-400);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 550;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-300);
  line-height: 1.4;
}

/* ---------- 9. Cards ---------- */

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  overflow: hidden;
  height: 100%;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card:hover::before { transform: scaleX(1); }
.card h3 { margin-bottom: 0.55rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card .link-arrow { margin-top: 1.1rem; }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--ink-800), var(--ink-600));
  color: var(--gold-400);
  display: grid;
  place-items: center;
  margin-bottom: 1.35rem;
  box-shadow: 0 6px 16px rgba(16, 35, 68, 0.22);
}
.card-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.75; }

/* Numbered service list */
.card-num {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-600);
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
  display: block;
}

/* ---------- 10. Lists ---------- */

.check-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.check-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.7rem;
  color: var(--text-muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 4px var(--gold-100);
}
.bg-ink .check-list li { color: var(--ink-200); }
.bg-ink .check-list li::before { box-shadow: 0 0 0 4px rgba(195, 154, 62, 0.16); }

.two-col-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0 clamp(1.5rem, 1rem + 2vw, 3rem);
}

/* ---------- 11. Media ---------- */

.media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper-alt);
}
.media img { width: 100%; height: auto; }
.media-tall img { aspect-ratio: 3 / 4; object-fit: cover; }
.media-wide img { aspect-ratio: 16 / 10; object-fit: cover; }
.media-square img { aspect-ratio: 1 / 1; object-fit: cover; }

/* Framed media — gold offset rule.
   Overflow must stay visible here, so the image carries its own radius/shadow. */
.media-framed {
  position: relative;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.media-framed img {
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.media-framed::after {
  content: "";
  position: absolute;
  inset: 16px -16px -16px 16px;
  border: 2px solid var(--gold-400);
  border-radius: var(--radius);
  z-index: 0;
  opacity: 0.6;
}
@media (max-width: 860px) { .media-framed::after { display: none; } }

/* Full-bleed photo band with overlay text */
.band {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(22rem, 52vh, 32rem);
  padding-block: clamp(3rem, 2rem + 5vw, 6rem);
  background: var(--ink-900);
  overflow: hidden;
}
.band-media { position: absolute; inset: 0; z-index: -2; }
.band-media img { width: 100%; height: 100%; object-fit: cover; }
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(5, 13, 30, 0.92) 0%, rgba(5, 13, 30, 0.74) 46%, rgba(5, 13, 30, 0.34) 100%),
    linear-gradient(to top, rgba(5, 13, 30, 0.55), rgba(5, 13, 30, 0) 55%);
}
/* Centred variant needs an even scrim rather than a left-weighted one */
.band-center::before {
  background:
    linear-gradient(rgba(5, 13, 30, 0.74), rgba(5, 13, 30, 0.82)),
    radial-gradient(ellipse at center, rgba(5, 13, 30, 0.45) 0%, rgba(5, 13, 30, 0.1) 70%);
}
.band-center p { margin-inline: auto; }

.band h2, .band .script { color: var(--white); }
.band .script { color: var(--gold-400); }
.band p { color: #dde6f4; max-width: 54ch; }

/* ---------- 12. Pull quote / testimonial ---------- */

.quote-block {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) { .quote-block { grid-template-columns: minmax(0, 1fr); } }

.quote-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.quote-media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.quote-text { position: relative; }
.quote-mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.7;
  color: var(--gold-400);
  opacity: 0.5;
  display: block;
  margin-bottom: 0.1em;
}
.quote-text blockquote {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: clamp(1.1rem, 0.98rem + 0.75vw, 1.5rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-800);
  letter-spacing: -0.005em;
}
.bg-ink .quote-text blockquote { color: var(--white); }
.quote-cite {
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink-600);
  letter-spacing: 0.01em;
}
.quote-cite span { display: block; font-weight: 450; color: var(--text-soft); margin-top: 0.15rem; }
.bg-ink .quote-cite { color: var(--gold-300); }
.bg-ink .quote-cite span { color: var(--ink-300); }

/* ---------- 13. Partner logos ---------- */

.partner-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
}
.partner {
  display: grid;
  place-items: center;
  height: 84px;
  min-width: 150px;
  flex: 1 1 150px;
  padding: 0 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.partner:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--gold-300);
}
.partner img {
  max-height: 32px;
  max-width: 120px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.72;
  transition: filter 0.35s var(--ease), opacity 0.35s var(--ease);
}
.partner:hover img { filter: grayscale(0); opacity: 1; }
.partner-text {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-700);
  letter-spacing: -0.01em;
}

/* ---------- 14. Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: clamp(1.25rem, 0.8rem + 1.4vw, 1.9rem);
}

.team-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1.2rem + 0.8vw, 1.9rem);
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.team-card:hover, .team-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-300);
}

.team-photo {
  width: 132px;
  height: 132px;
  margin: 0 auto 1.2rem;
  position: relative;
  border-radius: 50%;
}
.team-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 4px solid var(--white);
  box-shadow: 0 6px 20px rgba(16, 35, 68, 0.18);
}
.team-photo::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--gold-400);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.team-card:hover .team-photo::after,
.team-card:focus-visible .team-photo::after { opacity: 1; transform: scale(1); }

.team-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--ink-700), var(--ink-500));
  color: var(--gold-300);
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: 2.2rem;
  font-weight: 600;
  border: 4px solid var(--white);
  box-shadow: 0 6px 20px rgba(16, 35, 68, 0.18);
}

.team-card h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.team-role {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.85rem;
}
.team-card .team-snippet {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  margin-bottom: 1rem;
}
.team-more {
  font-size: 0.83rem;
  font-weight: 650;
  color: var(--ink-600);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.team-card:hover .team-more { color: var(--gold-600); }
.team-card:hover .team-more .arw { transform: translateX(3px); }
.team-more .arw { transition: transform 0.3s var(--ease); }

.team-hero-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.team-hero-photo img { width: 100%; height: auto; }

/* Team modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(5, 13, 30, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-box {
  position: relative;
  width: min(100%, 660px);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 0.45s var(--ease-out), opacity 0.35s var(--ease);
}
.modal-overlay.open .modal-box { transform: none; opacity: 1; }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-800);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 3;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.modal-close:hover { background: var(--ink-800); color: var(--gold-300); transform: rotate(90deg); }

.modal-figure {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 46vh;
  background: linear-gradient(145deg, var(--ink-700), var(--ink-500));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.modal-figure img { width: 100%; height: 100%; object-fit: contain; }
.modal-figure .modal-initials {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: 4.5rem;
  font-weight: 600;
  color: var(--gold-300);
}

.modal-body { padding: clamp(1.5rem, 1.2rem + 1.4vw, 2.5rem); }
.modal-body h3 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); margin-bottom: 0.35rem; }
.modal-role {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 1rem;
}
.modal-email { display: inline-block; font-weight: 600; margin-bottom: 1.2rem; }
.modal-body p { color: var(--text-muted); }
.modal-note {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  background: var(--gold-100);
  border-left: 3px solid var(--gold-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.87rem;
  color: var(--gold-700);
}

/* ---------- 15. Tables, docs, glossary ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  background: var(--white);
}
.data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.data-table th, .data-table td {
  padding: 0.9rem 1.15rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  background: var(--ink-800);
  color: var(--ink-100);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td:first-child { font-weight: 600; color: var(--ink-800); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color 0.2s var(--ease); }
.data-table tbody tr:hover { background: var(--gold-100); }

.callout {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.callout strong { display: block; margin-bottom: 0.35rem; color: var(--ink-800); }
.callout p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

.glossary { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.5rem; margin: 0; }
.glossary dt { font-weight: 650; color: var(--gold-600); font-size: 0.9rem; }
.glossary dd { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.doc-list li:hover {
  border-color: var(--gold-300);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}
.doc-title { font-weight: 600; color: var(--ink-800); }
.doc-desc { display: block; font-weight: 400; font-size: 0.86rem; color: var(--text-soft); margin-top: 0.15rem; }
.doc-date { font-size: 0.82rem; color: var(--text-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 16. Contact ---------- */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 1rem;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.contact-card h3 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-600); font-family: var(--font-body); font-weight: 650; margin-bottom: 0.9rem; }
.contact-card p { font-size: 0.95rem; margin-bottom: 0.5rem; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card .label { display: block; font-size: 0.78rem; color: var(--text-soft); }
.contact-card a { font-weight: 600; color: var(--ink-700); }
.contact-card a:hover { color: var(--gold-600); }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem);
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 1.15rem; }
.form-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 620;
  letter-spacing: 0.03em;
  color: var(--ink-700);
  margin-bottom: 0.45rem;
}
.form-row input, .form-row textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px var(--gold-100);
}
.form-row textarea { resize: vertical; min-height: 7rem; }
.form-note { font-size: 0.8rem; color: var(--text-soft); margin-top: 0.9rem; text-align: center; }
.form-success {
  display: none;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--gold-100);
  border-left: 3px solid var(--gold-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--gold-700);
  font-weight: 600;
  font-size: 0.92rem;
}

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  line-height: 0;
}
.map-frame iframe { width: 100%; height: 380px; border: 0; }

/* ---------- 17. Video embed ---------- */

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-900);
  box-shadow: var(--shadow-lg);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- 18. CTA + footer ---------- */

.cta {
  position: relative;
  isolation: isolate;
  text-align: center;
  background: linear-gradient(150deg, var(--ink-900) 0%, var(--ink-700) 55%, var(--ink-600) 100%);
  color: var(--ink-200);
  overflow: hidden;
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.06;
  z-index: -1;
}
.cta h2 { color: var(--white); }
.cta p { color: var(--ink-200); max-width: 48ch; margin-inline: auto; }
.cta .btn-row { justify-content: center; }
.cta .script { margin-bottom: 0.25em; }

.site-footer {
  background: var(--ink-900);
  color: var(--ink-300);
  font-size: 0.9rem;
  position: relative;
  isolation: isolate;
}
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.045;
  z-index: -1;
  pointer-events: none;
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) 2.75rem;
}
@media (max-width: 900px) { .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .footer-main { grid-template-columns: minmax(0, 1fr); } }

.footer-brand img { height: 44px; width: auto; margin-bottom: 1.1rem; }
.footer-brand .script { display: block; margin-bottom: 0.75rem; font-size: 2rem; }
.footer-brand p { color: var(--ink-300); font-size: 0.88rem; max-width: 38ch; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a, .footer-col span { color: var(--ink-300); font-size: 0.88rem; }
.footer-col a:hover { color: var(--gold-300); }

.footer-regions {
  padding-block: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink-400);
}
.footer-bottom {
  padding-block: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-400);
}

/* ---------- 19. Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.965);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-scale.is-visible { opacity: 1; transform: none; }

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

/* ---------- 20. Utilities ---------- */

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; }
.mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
