:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --text: #1c1f26;
  --muted: #5e6472;
  --accent: #b8956a;
  --accent-hover: #9a7a52;
  --navy: #0f1623;
  --navy-soft: #1a2438;
  --gold: #c9a962;
  --gold-light: #e8d5a8;
  --border: #e2ddd4;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 22, 35, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 22, 35, 0.12);
  --legal-max: 800px;
  --ink: #0f1623;
  --header-bg: rgba(255, 255, 255, 0.92);
  --panel: linear-gradient(135deg, #f8f6f2 0%, #efe9df 100%);
  --contact-grad: linear-gradient(180deg, var(--bg) 0%, #ebe7e0 100%);
  --input-bg: #faf9f7;
  --note-bg: rgba(255, 255, 255, 0.6);
  --hero-top: #0a0f18;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-hover);
  text-decoration: none;
  transition: color 0.2s;
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ----- Local banner ----- */
.local-banner {
  background: #1a2438;
  color: #c9d4e8;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  text-align: center;
}

.local-banner a {
  color: #fde68a;
  font-weight: 600;
}

.privacy-promise {
  margin-top: 1.25rem;
  padding: 1.25rem 1.35rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
}

.privacy-promise h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.privacy-promise p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.contact-cta {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1rem;
  line-height: 1.35;
}

.contact-cta-preview {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0.5rem 0 1rem;
  line-height: 1.35;
  padding: 0.75rem 1rem;
  background: var(--panel);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
}

.edit-contact-heading {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.5rem;
  background: rgba(201, 169, 98, 0.08);
  border: 1px dashed rgba(201, 169, 98, 0.45);
  border-radius: 6px;
}

.edit-contact-cta {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  background: rgba(201, 169, 98, 0.08);
  border: 1px dashed rgba(201, 169, 98, 0.45);
  border-radius: 6px;
}

.edit-contact-intro {
  display: block;
  width: 100%;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.65rem;
  background: rgba(201, 169, 98, 0.06);
  border: 1px dashed rgba(201, 169, 98, 0.35);
  border-radius: 6px;
  resize: vertical;
}

.contact-intro-preview {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.local-banner code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  contain: layout style;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  display: block;
  color: var(--gold);
}

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
}

.site-header nav a {
  margin-left: 1.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--ink);
}

.site-header nav a:first-child {
  margin-left: 0;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
  color: #f8f6f2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  contain: strict;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(201, 169, 98, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(90, 120, 160, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, var(--hero-top) 0%, var(--navy) 40%, var(--navy-soft) 100%);
}

.hero-inner {
  position: relative;
  padding: 5rem 1.5rem 4.5rem;
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(201, 169, 98, 0.4);
  border-radius: 100px;
  background: rgba(201, 169, 98, 0.08);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}

.hero-lead {
  margin: 0 0 2rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(248, 246, 242, 0.82);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.hero-cta-box {
  max-width: 520px;
  margin: 0 0 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 169, 98, 0.35);
  border-left: 3px solid var(--gold);
  background: rgba(15, 22, 35, 0.45);
  backdrop-filter: blur(4px);
}

.hero-cta-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gold-light);
  margin: 0 0 1rem;
}

.hero-cta-box .btn-primary {
  width: 100%;
  text-align: center;
}

.section-contact-early {
  padding-top: 2.5rem;
  margin-top: -1.5rem;
}

.stats-bar + .section-contact-early {
  margin-top: -2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #a88b4a 100%);
  color: var(--navy);
  box-shadow: 0 4px 20px rgba(201, 169, 98, 0.35);
}

.btn-primary:hover {
  color: var(--navy);
  box-shadow: 0 6px 28px rgba(201, 169, 98, 0.45);
}

.btn-ghost {
  background: transparent;
  color: #f8f6f2;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-full {
  width: 100%;
}

/* ----- Stats bar ----- */
.stats-bar {
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
  padding-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.stat {
  background: var(--surface);
  padding: 1.35rem 1.25rem;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

/* ----- Sections ----- */
.section {
  padding: 4.5rem 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}

.stats-bar {
  content-visibility: auto;
  contain-intrinsic-size: auto 120px;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.section-label.center {
  text-align: center;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 1rem;
}

.center-heading {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.center-sub {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

.split-content p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.split-content p:first-of-type {
  font-size: 1.05rem;
  color: var(--text);
}

.quote-card {
  background: var(--navy);
  color: #f0ece4;
  padding: 2rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow);
}

.quote-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
  margin: 0 0 1.25rem;
}

.quote-attr {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

/* ----- Features ----- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature {
  padding: 2rem 1.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  color: var(--accent-hover);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.feature p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ----- Process ----- */
.process h2 {
  margin-bottom: 2rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.steps li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.steps li:last-child {
  border-bottom: none;
}

.step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--gold);
  opacity: 0.9;
}

.steps h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.steps p {
  margin: 0;
  color: var(--muted);
}

/* ----- Contact / opt-in ----- */
.section-contact {
  background: var(--contact-grad);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3rem;
  align-items: start;
}

.contact-intro p {
  color: var(--muted);
}

.contact-details {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.contact-details li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.contact-details strong {
  display: inline-block;
  width: 5rem;
  color: var(--ink);
  font-weight: 600;
}


.form-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.form-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.form-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.field .optional {
  font-weight: 400;
  text-transform: none;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.2);
}

.field {
  margin-bottom: 1rem;
}

.consent-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1.25rem 0 1.5rem;
}

.consent-box input {
  margin-top: 0.3rem;
  flex-shrink: 0;
  accent-color: var(--navy);
}

.consent-box label {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--navy);
  color: rgba(248, 246, 242, 0.75);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: #f8f6f2;
  margin: 0 0 0.35rem;
}

.footer-meta {
  margin: 0.15rem 0;
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--gold-light);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-legal {
  text-align: right;
  font-size: 0.85rem;
}

.footer-legal p {
  margin: 0.2rem 0;
}

.footer-address {
  opacity: 0.7;
}

/* ----- Legal pages ----- */
body.legal {
  background: var(--bg);
}

.legal .site-header,
header:not(.site-header) {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.legal header .wrap,
header:not(.site-header) .wrap {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.legal .brand,
header:not(.site-header) .brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.legal nav a,
header:not(.site-header) nav a {
  margin-left: 1.25rem;
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--muted);
}

.legal main,
body.legal main {
  max-width: var(--legal-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.legal h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.legal .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.35rem;
}

.legal footer,
body.legal footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.legal footer .wrap,
body.legal footer .wrap {
  max-width: 960px;
  margin: 0 auto;
}

.legal footer a {
  margin: 0 0.75rem;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .site-header .wrap {
    gap: 0.75rem;
  }

  .site-header nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.85rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
  }

  .site-header nav::-webkit-scrollbar {
    display: none;
  }

  .site-header nav a {
    margin-left: 0;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-legal {
    text-align: center;
  }

  .footer-links {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  html {
    scroll-padding-top: 4.25rem;
  }

  .site-header .wrap {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.5rem;
    padding-top: 0.65rem;
    padding-bottom: 0.6rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-name {
    font-size: 1.12rem;
  }

  /* Too long for a phone: it wrapped to two lines, made the brand block wide
     enough to claim the whole first row, and pushed the toggle onto a row of
     its own. The name alone carries the brand at this size. */
  .brand-sub {
    display: none;
  }

  /* Brand + toggle on row one, nav links on their own scrollable row two.
     Cramming five links beside the brand squeezed the nav to zero width and
     left the brand text sitting on top of the toggle, so taps opened the
     logo link instead of switching theme. */
  .brand {
    min-width: 0;
    flex: 0 1 auto;
  }

  .brand-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .theme-toggle {
    order: 2;
  }


  .site-header nav {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 1.1rem;
    padding-bottom: 0.15rem;
  }

  .site-header nav a {
    margin-right: 0;
    font-size: 0.76rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 2.75rem 1.25rem 3rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .hero-lead {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta-text {
    font-size: 1.2rem;
  }

  .stats-bar {
    margin-top: -1.25rem;
    padding-bottom: 2rem;
  }

  .stats-bar + .section-contact-early {
    margin-top: -1rem;
  }

  .section-contact-early {
    margin-top: 0;
    padding-top: 2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: 0;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .steps li {
    grid-template-columns: 56px 1fr;
  }
}

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

/* --- Lead form: honeypot + privacy note --- */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-privacy {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted, #6b7280);
  text-align: center;
}

.cf-turnstile:empty {
  display: none;
}

.form-status {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: rgba(21, 128, 61, 0.08);
  border: 1px solid rgba(21, 128, 61, 0.35);
  color: #15803d;
}

.form-status.is-error {
  background: rgba(185, 28, 28, 0.07);
  border: 1px solid rgba(185, 28, 28, 0.3);
  color: #b91c1c;
}

/* ============================================================
   Theme: dark palette + toggle
   Light values live in :root above; these blocks only swap tokens.
   ============================================================ */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8eaef;
    --bg: #0b111c;
    --surface: #131b2a;
    --text: #e8eaef;
    --muted: #97a1b5;
    --accent: #c9a962;
    --accent-hover: #dcc188;
    --border: #26314a;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
    --header-bg: rgba(11, 17, 28, 0.9);
    --panel: linear-gradient(135deg, #17212f 0%, #111a26 100%);
    --contact-grad: linear-gradient(180deg, #0b111c 0%, #0e1723 100%);
    --input-bg: #0e1622;
    --note-bg: rgba(255, 255, 255, 0.04);
    --hero-top: #060a11;
  }
}

:root[data-theme="dark"] {
  --ink: #e8eaef;
  --bg: #0b111c;
  --surface: #131b2a;
  --text: #e8eaef;
  --muted: #97a1b5;
  --accent: #c9a962;
  --accent-hover: #dcc188;
  --border: #26314a;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --header-bg: rgba(11, 17, 28, 0.9);
  --panel: linear-gradient(135deg, #17212f 0%, #111a26 100%);
  --contact-grad: linear-gradient(180deg, #0b111c 0%, #0e1723 100%);
  --input-bg: #0e1622;
  --note-bg: rgba(255, 255, 255, 0.04);
  --hero-top: #060a11;
}

/* The gold button keeps navy ink in both themes - it is a light surface. */
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .btn-primary:hover {
  color: #0f1623;
}

/* ----- Toggle button ----- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  /* The mobile nav is a flex row that scrolls sideways; without this the
     button is the only child allowed to shrink and collapses to 19px wide. */
  flex: 0 0 38px;
  min-width: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(201, 169, 98, 0.08);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  display: block;
}

/* Show the icon for the theme you would switch TO. */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}

:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }

.field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Checkbox tick follows the theme accent rather than a fixed navy. */
.consent-box input[type="checkbox"] {
  accent-color: var(--accent);
}

/* Keyboard skip link. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--navy);
  color: #f8f6f2;
  border-radius: 0 0 8px 0;
  font-size: 0.9rem;
  font-weight: 500;
}

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