/* Main stylesheet (single entry point) */

/* ==========================
   W4.2 Base Styles
   ========================== */

/* Color tokens */
:root {
  --color-bg: #0e0e0e;        /* near-black background */
  --color-text: #f2f2f2;      /* soft off-white text */
  --color-accent: #d4a373;    /* warm earthy tan */
  --color-accent-deep: #8c5e3c; /* richer brown accent */
  --header-h: 72px;  /* header height for layout offset */  

  * ============================================
   W4.8-A — Semantic color tokens (warm/earth)
   - Non-breaking: extends existing tokens
   - Use these going forward vs hard-coding hex
   ============================================ */

 /* Semantic surfaces */
  --surface-0: var(--color-bg);                /* page background */
  --surface-1: rgba(255,255,255,0.02);         /* subtle panels (cards/CTA) */
  --surface-2: rgba(255,255,255,0.05);         /* stronger panel/hover */
  --surface-3: rgba(255,255,255,0.08);         /* borders/dividers */

  /* Text hierarchy */
  --text-strong: rgba(255,255,255,0.98);
  --text-default: rgba(255,255,255,0.95);
  --text-muted: rgba(255,255,255,0.80);
  --text-subtle: rgba(255,255,255,0.65);

  /* Accent scale (earth/warm) */
  --accent: var(--color-accent);
  --accent-strong: var(--color-accent-deep);
  --accent-soft: color-mix(in oklab, var(--color-accent) 55%, white);
  --accent-tint: color-mix(in oklab, var(--color-accent) 25%, white);
  --accent-shade: color-mix(in oklab, var(--color-accent) 30%, black);

  /* Status colors (keep subtle on dark) */
  --ok: #4cc38a;        /* success (sage/green) */
  --warn: #f5a524;      /* warning (amber) */
  --danger: #e5484d;    /* error (crimson) */

  /* Borders & overlays */
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --overlay: rgba(0,0,0,0.5);

  /* Header height (centralized) */
  --header-h: 72px;
}

/* Optional helpers (use sparingly) */
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.surface-1 { background: var(--surface-1); border: 1px solid var(--border); }
.surface-2 { background: var(--surface-2); border: 1px solid var(--border-strong); }

/* Non-destructive enhancements to existing elements (no visual shock) */
.card {
  background: var(--surface-1);
  border-color: var(--border);
}
.cta .wrap {
  background: var(--surface-1);
  border-color: var(--border);
}
.site-footer { border-top-color: var(--border-strong); }
}

/* ============================================
   W4.8-B — Spacing & radius tokens
   ============================================ */
:root {
  /* Spacing scale (4px baseline) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.5rem;   /* 24px */
  --space-6: 2rem;     /* 32px */
  --space-7: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */

  /* Corners */
  --radius-1: 6px;
  --radius-2: 10px;
  --radius-3: 14px;
  --radius-round: 999px;

  /* Card/CTA defaults (used later) */
  --card-pad: var(--space-6);
  --card-radius: var(--radius-2);
}

/* Small, opt-in utilities (no global layout changes) */
.pad-4 { padding: var(--space-4); }
.pad-5 { padding: var(--space-5); }
.pad-6 { padding: var(--space-6); }

.radius-1 { border-radius: var(--radius-1); }
.radius-2 { border-radius: var(--radius-2); }
.radius-3 { border-radius: var(--radius-3); }
.round     { border-radius: var(--radius-round); }

/* Elevation (soft, warm shadows) */
--elev-0: none;
--elev-1: 0 2px 10px rgba(0,0,0,0.18);
--elev-2: 0 6px 24px rgba(0,0,0,0.22);
--elev-3: 0 12px 36px rgba(0,0,0,0.28);

/* Optional overlay for images/dialogs (used later) */
--overlay: rgba(0,0,0,0.4);

/* Elevation utilities */
.elev-0 { box-shadow: var(--elev-0); }
.elev-1 { box-shadow: var(--elev-1); }
.elev-2 { box-shadow: var(--elev-2); }
.elev-3 { box-shadow: var(--elev-3); }

/* Magazine-soft card styling (used by <article class="card">) */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--card-radius);
  padding: var(--card-pad);
  box-shadow: var(--elev-1);
  transition: box-shadow 220ms ease;
}

/* Gently lift on hover/focus for pointer devices */
@media (hover:hover) and (pointer:fine) {
  .card:hover,
  .card:focus-within { box-shadow: var(--elev-2); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
/* W4.8-D — Gentle section rhythm */
section {
  padding: 4rem 0;          /* vertical breathing room */
}

.wrap {
  max-width: 72rem;         /* already set earlier */
  margin: 0 auto;
  padding: 0 1.5rem;        /* add horizontal padding */
}

/* Global reset / base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings: editorial style */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

/* Basic spacing for sections */
section {
  padding: 3rem 1.5rem;
}

/* Wrap utility (centered max-width) */
.wrap {
  max-width: 72rem;
  margin: 0 auto;
}
/* ================================
   W4.3-A — Apply tokens globally
   ================================ */

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings use the editorial serif */
h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

/* Links in warm earth tone */
a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover, a:focus {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

/* Responsive container used throughout */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* Images never overflow their container */
img { max-width: 100%; height: auto; display: block; }

/* ================================
   W4.3-C — Typography hierarchy
   ================================ */

h1, h2, h3 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: var(--color-text);
  margin: 1.5rem 0 1rem;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.4;
}

/* Nav links */
.site-nav a,
.footer-nav a {
  color: var(--color-accent);
  text-decoration: none;
  margin-right: 1rem;
}

.site-nav a:hover,
.footer-nav a:hover {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

/* ================================
   W4.3-D — Buttons
   ================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Primary button */
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background-color: var(--color-accent-deep);
  color: var(--color-bg);
}

/* Ghost button */
.btn-ghost {
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-ghost:hover {
  border-color: var(--color-accent-deep);
  color: var(--color-accent-deep);
}

/* ================================
   W4.3-E — Links + fineprint
   ================================ */

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

a:hover {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

.fineprint {
  font-size: 0.875rem;
  color: #aaa; /* subtle gray for footer/legal text */
}

/* ================================
   W4.3-E — Links + fineprint
   ================================ */

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

a:hover {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

.fineprint {
  font-size: 0.875rem;
  color: #aaa; /* subtle gray for legal/footer notes */
}

/* ============================
   W4.3-G — Fine-tune typography
   ============================ */

/* Headings use Playfair; body stays Inter (already set above) */
h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.005em;
  margin: 0 0 0.6em;
}

/* Fluid, magazine-y sizes */
h1 { font-size: clamp(2.4rem, 4vw + 1rem, 4rem); line-height: 1.12; }
h2 { font-size: clamp(1.75rem, 1.4vw + 1rem, 2.4rem); line-height: 1.2; }
h3 { font-size: clamp(1.25rem, 0.9vw + 1rem, 1.6rem); line-height: 1.3; }

/* Body copy rhythm */
p { margin: 0 0 1.15em; }

/* “Lead” paragraph under hero title */
.lead {
  font-size: clamp(1.1rem, 0.6vw + 1rem, 1.35rem);
  line-height: 1.8;
}

/* Lists read cleanly in long-form sections */
ul, ol { margin: 0 0 1.2em 1.3em; }

/* Links are typographic accents (color already defined) */
a {
  color: var(--color-accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
}

/* Subtle bold/italic tuning */
strong { font-weight: 700; }
em     { font-style: italic; }

/* ===============================
   W4.3-H — Header/nav spacing & states
   =============================== */

.site-header {
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav a {
  margin-left: 2rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s ease;
}

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

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}
/* ===============================
   W4.3-I — Footer typography & spacing
   =============================== */

.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer .wrap {
  display: grid;
  gap: 1.25rem 2rem;
  align-items: center;
}

/* Brand row */
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
}

/* Footer nav */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--color-text);
  transition: color .2s ease;
  font-weight: 500;
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Fine print */
.fineprint {
  margin-top: .25rem;
  font-size: .9rem;
  color: rgba(255,255,255,.75);
}

/* Wider screens: put brand | nav | copyright on one line */
@media (min-width: 900px) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto 1fr;
  }
  .fineprint {
    justify-self: end;
    margin-top: 0;
  }
}

/* W4.9-A — Footer base styling */
.site-footer {
  padding: 2rem 0;
  background: var(--color-bg);
  color: var(--text-muted);
  font-size: 0.875rem; /* slightly smaller fineprint */
  text-align: center;
}

.site-footer a {
  margin: 0 0.75rem;
  color: var(--color-accent);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--color-accent-strong);
  text-decoration: underline;
}

.site-footer .brand-name {
  font-weight: 700;
  color: var(--color-accent);
  margin-right: 0.5rem;
}


/* ===============================
   W4.3-J — Hero image sizing & headline rhythm
   =============================== */

.hero picture img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: .5rem;
}

.hero-copy {
  margin-top: 2rem;
  text-align: center;
}

.hero-copy h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.hero-copy .lead {
  font-size: 1.15rem;
  max-width: 45ch;
  margin: 0 auto 2rem auto;
  color: rgba(255,255,255,.85);
}

.hero {
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.hero .wrap {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: auto;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
/* ===============================
   W4.3-K — Navigation bar styling
   =============================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14,14,14,0.85);        /* near-black with slight transparency */
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
}

.brand-name {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: .3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  display: inline-block;
  padding: .5rem .25rem;                  /* bigger hit area */
  color: var(--color-text);
  text-decoration: none;
  transition: color .2s ease, opacity .2s ease;
  opacity: .9;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-accent);
  opacity: 1;
}

/* ===============================
   W4.3-K.1 — Fixed header on top
   =============================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(14,14,14,0.85);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.site-header .wrap {
  min-height: var(--header-h);
  padding-block: 12px; /* comfortable vertical breathing */
}

/* offset the page so content doesn't hide under the fixed header */
body {
  padding-top: calc(var(--header-h) + 8px);
}

/* ===============================
   W4.3-L.1 — Section spacing + card base
   =============================== */

section {
  padding-block: 6rem;            /* big vertical breathing space */
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ===============================
   W4.3-L.2 — Card typography polish
   =============================== */

/* Card headings */
.card h3 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  letter-spacing: 0.2px;
}

/* Card body copy */
.card p {
  margin: 0;                 /* first paragraph tight to heading */
  color: rgb(228 228 228 / 92%);
  line-height: 1.65;
}

/* Space multiple paragraphs consistently when they occur */
.card p + p {
  margin-top: 0.75rem;
}

/* If a link appears inside a card, keep it warm and subtle */
.card a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.card a:hover,
.card a:focus {
  color: var(--color-accent-deep);
}

/* ============================================
   W4.3-L.3 — Responsive section spacing
   ============================================ */

/* 1) Comfortable vertical rhythm by default (desktop/tablet) */
section {
  padding-block: clamp(2.5rem, 6vw, 6rem); /* top & bottom only */
}

/* Give the global .wrap a little horizontal breathing room on all screens */
.wrap {
  padding-inline: 1.25rem; /* left & right */
}

/* 2) Phones: tighten vertical spacing a bit more */
@media (max-width: 640px) {
  section {
    padding-block: 2rem;
  }
  .wrap {
    padding-inline: 1rem;
  }
}

/* 3) Very large screens: slightly wider content column */
@media (min-width: 1280px) {
  .wrap {
    max-width: 76rem; /* was 72rem earlier; small, tasteful bump */
  }
}

/* ============================================
   W4.3-L.4 — Nav hover/focus polish + active
   ============================================ */

/* Base: remove default link underline in navs; we’ll control it */
.site-nav a,
.footer-nav a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-block: .25rem;
  transition: color .18s ease, border-color .18s ease, text-underline-offset .18s ease;
}

/* Hover/Focus: warm accent and subtle underline hint */
.site-nav a:hover,
.site-nav a:focus,
.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--color-accent);
  border-color: color-mix(in srgb, var(--color-accent) 65%, transparent);
  outline: none;                 /* we’ll use :focus-visible below */
  text-decoration: underline;    /* light editorial underline */
  text-underline-offset: .15em;
}

/* Keyboard focus: accessible but refined */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: .375rem;
}

/* “Current page” treatment (use either attribute or class in HTML later) */
.site-nav a[aria-current="page"],
.footer-nav a[aria-current="page"],
.site-nav a.is-active,
.footer-nav a.is-active {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ============================================
   W4.3-L.5 — Hero image & headline spacing
   ============================================ */

.hero {
  padding-top: 2rem; /* reduce extra gap above image now that header is fixed */
}

.hero picture img {
  max-height: 24rem;          /* trim height a bit for balance */
  border-radius: .5rem;
  object-fit: cover;
}

.hero-copy {
  margin-top: 2.5rem;          /* space between image and text */
  text-align: center;
}

.hero-copy h1 {
  margin-bottom: 1.25rem;      /* headline → lead */
}

.hero-copy .lead {
  margin-bottom: 2rem;         /* lead → button group */
}

.cta-row {
  gap: 1rem;
  justify-content: center;
}

/* ============================================
   W4.3-L.6 — Editorial stories split layout
   ============================================ */

.editorial {
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 60%);
}

/* Base stack (mobile-first) */
.editorial .split {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;   /* stack by default */
  align-items: center;
  margin-block: 3rem;
}

.editorial .media img {
  width: 100%;
  height: auto;
  border-radius: .5rem;
  object-fit: cover;
}

.editorial .copy h2 {
  margin-bottom: .6rem;
}

.editorial .copy p {
  color: rgba(255,255,255,0.88);
  margin-bottom: 1rem;
}

/* Wide screens: side-by-side split */
@media (min-width: 900px) {
  .editorial .split {
    grid-template-columns: 1.15fr 1fr;   /* slightly larger image column */
  }
  /* Reverse variant: image on the right, copy on the left */
  .editorial .split.reverse .media { order: 2; }
  .editorial .split.reverse .copy  { order: 1; }
}
/* ============================================
   W4.3-L.7 — CTA block framing
   ============================================ */

.cta {
  padding-block: clamp(2rem, 6vw, 5rem);
}

.cta .wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: clamp(1.25rem, 4vw, 2rem);
  text-align: center;
}

.cta h2 {
  margin: 0 0 .5rem 0;
}

.cta p {
  color: rgba(255,255,255,0.85);
  margin: 0 0 1rem 0;
}

/* ============================================
   W4.3-M — Accessibility + focus polish
   ============================================ */

/* Skip link (already in your HTML) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: .75rem 1rem;
  border-radius: .375rem;
  font-weight: 600;
  z-index: 200;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 1rem;
  left: 1rem;
  outline: 2px solid var(--color-accent-deep);
  outline-offset: 2px;
}

/* Clear visible focus ring on all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: .375rem;
}

/* Slightly stronger base text color for contrast */
body {
  color: rgba(255,255,255,0.95);
}

/* ============================================
   W4.3-N — Mobile responsiveness (nav + spacing)
   ============================================ */

/* Start with the toggle hidden on larger screens */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--color-text);
  padding: .4rem .6rem;
  border-radius: .5rem;
  font-size: 1rem;
}

/* Phone / small tablets */
@media (max-width: 820px) {
  /* Show the hamburger, hide the horizontal nav */
  .nav-toggle { display: inline-block; }
  .site-nav   { display: none; }

  /* Keep header content compact on mobile */
  :root { --header-h: 64px; }        /* slightly shorter header */
  .site-header .wrap { padding-block: 8px; }

  /* Slightly tighter section rhythm on small screens */
  section { padding-block: 2rem; }
  .cta .wrap { padding: 1.25rem; }

  /* Let grid cards stack cleanly */
  .feature-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* W4.3-O — show mobile nav when toggled */
@media (max-width: 820px) {
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-block: .5rem;
  }

/* Desktop: show nav as a row */
@media (min-width: 821px) {
  .site-nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
  }
  .nav-toggle { display: none; }  /* no hamburger on desktop */
}

/* Mobile: hide nav until toggled */
@media (max-width: 820px) {
  .site-nav {
    display: none;
  }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-block: .5rem;
  }
}

/* Keep header above content */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Ensure the button sits above the slide-down menu */
.nav-toggle {
  position: relative;
  z-index: 1300;
}
.site-nav {
  z-index: 1200; /* slide-down lives under the toggle */
}
/* W4.4-D — Mobile nav visibility */
@media (max-width: 960px) {
  .site-nav {
    display: none;                 /* hidden by default on small screens */
  }
  .site-nav.is-open {
    display: block;                /* shown when JS toggles the class */
  }
}

/* W4.4-F — Mobile nav spacing reset */
@media (max-width: 899px) {
  .site-nav a { 
    display: block; 
    padding: 0.75rem 0;
    margin: 0;                 /* no indent */
  }
  .site-nav a + a {
    margin-left: 0;            /* cancel desktop left-gap when stacked */
  }
}
/* W4.4-G — Improve mobile nav panel styling */
@media (max-width: 899px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.5rem;
    display: none; /* stays hidden until toggled */
    flex-direction: column;

     /* already present styles remain */
    overflow: hidden;

    /* animation bits */
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0;
    pointer-events: none;
    transition:
      opacity 240ms ease,
      transform 240ms ease,
      max-height 240ms ease;
  }

  .site-nav.is-open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    max-height: 60vh;           /* big enough for links */
    pointer-events: auto;
  }

  .site-nav a {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    text-align: center;
    text-decoration: none;
    color: var(--color-text); 
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

   .site-nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  } 
/* Respect reduced motion */
  @media (prefers-reduced-motion: reduce) {
    .site-nav,
    .site-nav.is-open {
      transition: none !important;
      transform: none !important;
    }
   
}
/* W4.5-B — Hero media framing & stability */
.hero .media {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  /* keep space even if image 404s */
  aspect-ratio: 16 / 9;
}

.hero .media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111; /* fallback tone behind transparent images */
}

/* Slightly taller frame on small screens for better feel */
@media (max-width: 899px) {
  .hero .media { aspect-ratio: 4 / 3; }
}

   /* W4.5-C — Editorial story media framing */
.editorial .media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #111;
  border: 1px solid rgba(255,255,255,0.06);
}
.editorial .media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

   /* W4.6-A — Section spacing & rhythm
   Gives each section comfortable breathing room and a consistent vertical rhythm.
   Uses clamp() so spacing adapts from mobile → desktop gracefully. */

section {
  padding-block: clamp(2rem, 4vw, 4rem);
}

/* Tighter top spacing when a section immediately follows the sticky header */
.site-header + main > section:first-child {
  padding-top: clamp(1.5rem, 3vw, 3rem);
}

   * W4.6-B — Editorial card/grid spacing
   Creates a clean magazine feel for features and stories. */

/* Features section — card grid */
.features {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);   /* breathing space between cards */
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  align-items: stretch;
}

/* Each feature card */
.feature {
  background: rgba(255, 255, 255, 0.03); /* subtle panel feel */
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Story split — editorial row layout */
.stories {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

/* Each story row becomes two columns on larger screens */
.story {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .story {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

/* Ensure story images scale properly */
.story img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

   /* W4.6-C — CTA + Footer spacing/polish */

/* CTA block */
.cta {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cta .wrap { max-width: 56rem; margin-inline: auto; }
.cta h2 { margin: 0 0 0.75rem; line-height: 1.15; }
.cta p  { margin: 0 0 1.25rem; color: rgba(255,255,255,0.8); }
.cta .btn { margin: 0.25rem 0.5rem; }

/* Footer */
.site-footer {
  padding: clamp(1.5rem, 4vw, 2rem) 1rem;
  margin-top: clamp(2rem, 6vw, 3rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255,255,255,0.75);
}
.site-footer .wrap { max-width: 72rem; margin-inline: auto; }
.footer-brand { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; margin-bottom: 0.75rem; }
.footer-nav a { color: var(--color-text); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.fineprint { font-size: 0.9rem; color: rgba(255,255,255,0.6); }

   /* W4.7-C — Header spacing refinement after icon removal */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand text only (no icon) */
.brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
}

/* Nav links stay inline on desktop */
.site-nav {
  display: flex;
  gap: 1.5rem;
}

/* On mobile, nav remains handled by previous is-open styles */
@media (max-width: 899px) {
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

/* ================================
   W4.9-D — Feature grid spacing & card balance
   ================================ */

.feature-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  padding-block: 3rem;
}

/* Each card sits on a subtle surface tone */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 2rem 1.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Lift gently on hover for mouse users */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  }
}

/* Typographic balance */
.card h3 {
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-strong);
}

.card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Adjust grid gap for small screens */
@media (max-width: 599px) {
  .feature-grid {
    gap: 1.75rem;
    padding-block: 2rem;
  }

  .card {
    padding: 1.5rem 1.25rem;
  }
}

/* ================================
   W4.9-E — CTA button harmony
   ================================ */

/* Base button */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-2, 10px);
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .08s ease;
  will-change: transform;
}

/* Primary (filled) */
.btn-primary {
  background: var(--accent);
  color: var(--color-bg);
  border: 1px solid var(--accent-shade);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-strong);
  color: var(--color-bg);
  border-color: var(--accent-strong);
}

/* Ghost (outline) */
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-ghost:hover,
.btn-ghost:focus {
  color: var(--accent-strong);
  border-color: var(--accent-strong);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
}

/* Subtle tap micro-feedback */
@media (hover:hover) and (pointer:fine) {
  .btn:active { transform: translateY(1px); }
}

/* Button row spacing */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

/* Tighten hero CTA spacing a touch on small screens */
@media (max-width: 599px) {
  .btn { padding: 0.7rem 1.1rem; }
}

   /* ================================
   W4.9-F — Stories typography polish
   ================================ */

.editorial .copy h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text-strong);
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 1.6vw + 1rem, 2.1rem);
  line-height: 1.25;
}

.editorial .copy p {
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 1rem;
  max-width: 60ch;
}

.editorial .copy .text-link {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
  transition: color .2s ease;
}

.editorial .copy .text-link:hover,
.editorial .copy .text-link:focus {
  color: var(--accent-strong);
  text-decoration: underline;
}

 /* HERO SECTION FIX */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 90vh;
  overflow: hidden;
  background-color: #111;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45; /* soft overlay for readability */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.hero-text {
  position: relative;
  z-index: 1;
  color: #f4f1ea;
  max-width: 600px;
  padding: 2rem;
}

.hero-text h1 {
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
  color: #e4b070;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.hero .btn-primary {
  background-color: #d98e4c;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s;
}

.hero .btn-primary:hover {
  background-color: #f1a55c;
}
