/* ==========================================================================
   CWHaven Ltd — marketing site
   Brand tokens match the VMS Portal's own (src/app/globals.css in the
   portal repo) — same real company, same brand, deliberately consistent.
   ========================================================================== */

:root {
  --gold: #edb73e;
  --gold-dark: #b8842a;
  --gold-light: #fbeac4;
  --sage: #cfdfd4;
  --sage-dark: #5f7d6c;
  --sage-light: #eef4f0;

  --background: #f8f9f7;
  --surface: #ffffff;
  --foreground: #1e2420;
  --muted: #5b665f;
  --border: #dde3de;
  --ink-strip: #1b241f;

  --radius: 0.6rem;
  --max-width: 1120px;
  --shadow: 0 1px 2px rgba(27, 36, 31, 0.06), 0 10px 30px -12px rgba(27, 36, 31, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #12160f;
    --surface: #191f18;
    --foreground: #eef1ec;
    --muted: #a2ac9f;
    --border: #2a322d;
    --gold-light: #3a2f16;
    --sage-light: #1c2621;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; max-width: 62ch; }
p.lede { font-size: 1.125rem; color: var(--muted); max-width: 52ch; }

a { color: inherit; }
a.link { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 0.15em; }
a.link:hover { color: var(--foreground); }

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

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 0.75rem;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header / nav --------------------------------------------------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand img { height: 32px; width: auto; }

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
nav.primary-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
nav.primary-nav a:hover,
nav.primary-nav a[aria-current="page"] {
  color: var(--foreground);
  border-bottom-color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.15rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--gold); color: #24170a; }
.btn-primary:hover { filter: brightness(0.95); }
.btn-outline { border-color: var(--border); color: var(--foreground); background: transparent; }
.btn-outline:hover { border-color: var(--gold-dark); }
.btn-ink { background: var(--ink-strip); color: #fff; }
.btn-ink:hover { filter: brightness(1.15); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.65rem;
  font-size: 0.875rem;
  color: var(--foreground);
}

@media (max-width: 780px) {
  nav.primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
    display: none;
  }
  nav.primary-nav.open { display: flex; }
  nav.primary-nav a { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  nav.primary-nav .btn { margin-top: 0.75rem; }
  .menu-toggle { display: inline-flex; }
}

/* --- Hero ------------------------------------------------------------ */

.hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 1.6rem; }

.hero-panel {
  background: var(--ink-strip);
  color: #f2efe6;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-panel .eyebrow { color: var(--gold); }
.hero-panel dl { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin: 0; }
.hero-panel dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: #b7c2ba; margin-bottom: 0.2rem; }
.hero-panel dd { margin: 0; font-size: 0.95rem; color: #ece7d9; }

/* --- Generic sections -------------------------------------------------- */

section.section { padding: 3.75rem 0; }
section.section + section.section { border-top: 1px solid var(--border); }
.section-head { max-width: 60ch; margin-bottom: 2.25rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
}
.card .icon-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.65rem;
  background: var(--gold-light);
  color: var(--gold-dark);
  font-family: "Fraunces", serif;
  font-weight: 600;
  margin-bottom: 1rem;
}

.audience-card {
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--surface);
}
.audience-card.emphasis { background: var(--sage-light); border-color: color-mix(in srgb, var(--sage-dark) 30%, var(--border)); }
.audience-card ul { margin: 1.1rem 0 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: 0.55rem; }

.cta-band {
  background: var(--ink-strip);
  color: #f2efe6;
  border-radius: 1.25rem;
  padding: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cta-band h2 { color: #fff; margin-bottom: 0.35rem; }
.cta-band p { color: #cfd6cf; margin: 0; }

/* --- Contact page ------------------------------------------------------- */

.contact-detail { display: flex; flex-direction: column; gap: 1.6rem; }
.contact-detail dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.contact-detail dd { margin: 0.25rem 0 0; font-size: 1.0625rem; }
.contact-email {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 600;
  text-decoration-thickness: 1.5px;
}

/* --- Footer ------------------------------------------------------------- */

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.75rem 0 2.25rem;
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h3 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: "Public Sans", sans-serif; color: var(--muted); margin-bottom: 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.9375rem; }
.footer-grid ul a { text-decoration: none; }
.footer-grid ul a:hover { color: var(--gold-dark); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--muted);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

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