/* ==========================================================================
   Maa Meldi General Stores — design system
   Single typeface (Manrope). Flat backgrounds. Tailwind type + radius scale.
   Fixed spacing tokens. All motion on one spring curve.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Spacing — the only permitted values */
  --s-0:   0px;
  --s-25:  2px;
  --s-50:  4px;
  --s-75:  8px;
  --s-100: 12px;
  --s-200: 16px;
  --s-300: 24px;
  --s-400: 32px;
  --s-500: 40px;
  --s-600: 48px;
  --s-700: 64px;
  --s-800: 80px;
  --s-900: 96px;

  /* Radius — Tailwind scale */
  --r-sm:   2px;
  --r:      4px;
  --r-md:   6px;
  --r-lg:   8px;
  --r-xl:   12px;
  --r-2xl:  16px;
  --r-3xl:  24px;
  --r-full: 9999px;

  /* Surfaces — flat, never gradients */
  --bg:         #ffffff;
  --bg-subtle:  #fafafa;
  --bg-muted:   #f5f5f5;
  --bg-invert:  #0a0a0a;

  /* Text */
  --text:        #0a0a0a;
  --text-muted:  #525252;
  --text-subtle: #737373;
  --text-invert: #ffffff;
  --text-invert-muted: #a3a3a3;

  /* Lines */
  --line:        #e5e5e5;
  --line-strong: #d4d4d4;

  /* Accent — single restrained brand colour */
  --accent:       #0b6e4f;
  --accent-hover: #095a40;
  --accent-soft:  #eef6f2;
  --accent-line:  #c9e3d8;

  /* Feedback */
  --danger:      #b42318;
  --danger-soft: #fef3f2;
  --danger-line: #fecdca;

  /* Motion — every transition resolves through this curve */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --t-fast: 200ms var(--ease);
  --t-base: 400ms var(--ease);
  --t-slow: 700ms var(--ease);

  --font: 'Manrope', system-ui, sans-serif;

  --maxw: 1200px;
  --measure: 680px;

  --shadow-sm: 0 1px 2px rgba(10, 10, 10, .06);
  --shadow-md: 0 4px 16px rgba(10, 10, 10, .08);
  --shadow-lg: 0 12px 40px rgba(10, 10, 10, .10);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--s-900);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* No italics anywhere in the interface */
i, em, blockquote, q, cite, address { font-style: normal; }

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

ul, ol { list-style: none; }

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

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--text-invert); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-muted); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-full); border: 2px solid var(--bg-muted); }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

.skip-link {
  position: absolute;
  left: var(--s-200);
  top: calc(-1 * var(--s-800));
  z-index: 200;
  padding: var(--s-100) var(--s-200);
  background: var(--bg-invert);
  color: var(--text-invert);
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  transition: top var(--t-base);
}
.skip-link:focus { top: var(--s-200); color: var(--text-invert); }

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

/* --------------------------------------------------------------------------
   3. Type scale — Tailwind steps only
   -------------------------------------------------------------------------- */
.t-xs   { font-size: 12px; line-height: 16px; }
.t-sm   { font-size: 14px; line-height: 20px; }
.t-base { font-size: 16px; line-height: 24px; }
.t-lg   { font-size: 18px; line-height: 28px; }
.t-xl   { font-size: 20px; line-height: 28px; }
.t-2xl  { font-size: 24px; line-height: 32px; }
.t-3xl  { font-size: 30px; line-height: 36px; }
.t-4xl  { font-size: 36px; line-height: 40px; }
.t-5xl  { font-size: 48px; line-height: 1; }
.t-6xl  { font-size: 60px; line-height: 1; }

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s-300);
}

.section { padding-block: var(--s-900); }
.section-tight { padding-block: var(--s-700); }
.section-muted { background: var(--bg-subtle); }
.section-invert { background: var(--bg-invert); }

.divider { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-75);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-200);
}
.section-invert .eyebrow { color: var(--text-invert-muted); }

.section-head { max-width: var(--measure); margin-bottom: var(--s-700); }
.section-head h2 { font-size: 36px; line-height: 40px; margin-bottom: var(--s-200); }
.section-head p { font-size: 18px; line-height: 28px; color: var(--text-muted); }
.section-invert .section-head h2 { color: var(--text-invert); }
.section-invert .section-head p { color: var(--text-invert-muted); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-75);
  padding: var(--s-75) var(--s-100);
  min-height: 44px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast);
}
.btn i { font-size: 18px; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--text-invert); }
.btn-primary:hover { background: var(--accent-hover); color: var(--text-invert); }

.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg-muted); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }

.btn-invert { background: var(--bg); color: var(--text); }
.btn-invert:hover { background: var(--bg-muted); color: var(--text); }

.btn-sm { min-height: 36px; padding: var(--s-50) var(--s-100); font-size: 14px; line-height: 20px; }
.btn-block { width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-100); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-50);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.link-arrow i { transition: transform var(--t-base); }
.link-arrow:hover i { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. Island navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  /* Above .nav-overlay (95) so the hamburger stays reachable once it
     morphs into the close X. */
  z-index: 100;
  padding-inline: var(--s-300);
  pointer-events: none;
}

.nav-island {
  display: flex;
  align-items: center;
  gap: var(--s-300);
  width: max-content;
  max-width: var(--maxw);
  margin: var(--s-300) auto 0;
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
  transition: box-shadow var(--t-slow), background var(--t-slow), margin var(--t-slow);
}
.site-header.is-stuck .nav-island {
  margin-top: var(--s-100);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-md);
}

.nav-brand {
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-brand span {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-subtle);
  letter-spacing: 0;
}
.nav-brand:hover { color: var(--text); }

.nav-menu { display: flex; align-items: center; gap: var(--s-50); }
.nav-menu a {
  display: block;
  padding: var(--s-50) var(--s-100);
  border-radius: var(--r-full);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-menu a:hover { background: var(--bg-muted); color: var(--text); }
.nav-menu a[aria-current="page"] { background: var(--bg-muted); color: var(--text); font-weight: 600; }

.nav-actions { display: flex; align-items: center; gap: var(--s-50); }

/* Hamburger — two bars that rotate into a perfect X, never disappearing */
.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.nav-toggle:hover { background: var(--bg-muted); }
.nav-toggle-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  margin-left: -8px;
  background: var(--text);
  border-radius: var(--r-full);
  transition: transform var(--t-slow), background var(--t-fast);
}
.nav-toggle-bar:nth-child(1) { transform: translateY(-4px) rotate(0deg); }
.nav-toggle-bar:nth-child(2) { transform: translateY(3px) rotate(0deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(0) rotate(-45deg); }

/* Screen filling menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-900) var(--s-300) var(--s-600);
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-slow), visibility var(--t-slow);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nav-overlay.is-open { opacity: 1; visibility: visible; }

.nav-overlay-links { display: flex; flex-direction: column; gap: var(--s-50); }
.nav-overlay-links a {
  display: block;
  padding: var(--s-100) 0;
  color: var(--text);
  font-size: 30px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  /* Staggered mask reveal: slide up out of an invisible box */
  opacity: 0;
  transform: translateY(48px);
  transition: opacity var(--t-slow), transform var(--t-slow), color var(--t-fast);
}
.nav-overlay-links a[aria-current="page"] { color: var(--accent); }
.nav-overlay.is-open .nav-overlay-links a { opacity: 1; transform: translateY(0); }
.nav-overlay.is-open .nav-overlay-links a:nth-child(1) { transition-delay: 100ms; }
.nav-overlay.is-open .nav-overlay-links a:nth-child(2) { transition-delay: 150ms; }
.nav-overlay.is-open .nav-overlay-links a:nth-child(3) { transition-delay: 200ms; }
.nav-overlay.is-open .nav-overlay-links a:nth-child(4) { transition-delay: 250ms; }
.nav-overlay.is-open .nav-overlay-links a:nth-child(5) { transition-delay: 300ms; }
.nav-overlay.is-open .nav-overlay-links a:nth-child(6) { transition-delay: 350ms; }

.nav-overlay-foot {
  margin-top: var(--s-700);
  padding-top: var(--s-300);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--s-100);
  opacity: 0;
  transform: translateY(48px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.nav-overlay.is-open .nav-overlay-foot { opacity: 1; transform: translateY(0); transition-delay: 400ms; }
.nav-overlay-foot .t-sm { color: var(--text-subtle); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--s-900) var(--s-800); }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-700);
  align-items: center;
}

.hero h1 {
  max-width: var(--measure);
  font-size: 48px;
  line-height: 1;
  margin-bottom: var(--s-300);
  /* The one permitted gradient: hero heading text, light theme */
  background-image: linear-gradient(90deg, #000000 0%, #666666 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: var(--measure);
  font-size: 18px;
  line-height: 28px;
  color: var(--text-muted);
  margin-bottom: var(--s-400);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-75) var(--s-200);
  margin-top: var(--s-400);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-subtle);
}
.hero-proof i { color: var(--accent); font-size: 16px; }
.hero-proof span { display: inline-flex; align-items: center; gap: var(--s-50); }

/* Hero visual: a composed quote summary, not stock imagery */
.quote-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.quote-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-200);
  padding: var(--s-200);
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}
.quote-card-head .t-xs { color: var(--text-subtle); }
.quote-card-head strong { display: block; color: var(--text); font-size: 14px; line-height: 20px; }
.quote-status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-50);
  padding: var(--s-50) var(--s-75);
  /* Nested radius: 16px outer minus 8px gap */
  border-radius: var(--r-lg);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}
.quote-card-body { padding: var(--s-200); display: flex; flex-direction: column; gap: var(--s-100); }
.quote-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-200);
  padding: var(--s-100);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.quote-line div { min-width: 0; }
.quote-line strong { display: block; color: var(--text); font-size: 14px; line-height: 20px; font-weight: 600; }
.quote-line small { color: var(--text-subtle); font-size: 12px; line-height: 16px; }
.quote-line b { color: var(--text); font-size: 14px; line-height: 20px; font-weight: 700; white-space: nowrap; }
.quote-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-200);
  padding: var(--s-200);
  border-top: 1px solid var(--line);
  background: var(--bg-subtle);
}
.quote-card-foot span { color: var(--text-subtle); font-size: 12px; line-height: 16px; }
.quote-card-foot b { color: var(--text); font-size: 20px; line-height: 28px; }

/* --------------------------------------------------------------------------
   8. Trust strip
   -------------------------------------------------------------------------- */
.trust { padding-block: var(--s-500); border-block: 1px solid var(--line); background: var(--bg-subtle); }
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-300);
}
.trust-label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); }
.trust-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-300); }
.trust-list li { color: var(--text-muted); font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; }

/* --------------------------------------------------------------------------
   9. Cards and grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--s-300); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  padding: var(--s-300);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { font-size: 18px; line-height: 28px; margin-bottom: var(--s-75); }
.card p { font-size: 14px; line-height: 20px; color: var(--text-muted); }

.card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--s-200);
  /* Nested radius: 16px outer minus 24px gap is under 2, so square off at lg */
  border-radius: var(--r-lg);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 20px;
}

.card-invert {
  background: #181818;
  border-color: #272727;
}
.card-invert h3 { color: var(--text-invert); }
.card-invert p { color: var(--text-invert-muted); }
.card-invert:hover { border-color: #313131; }

/* Numbered steps */
.step { position: relative; padding-top: var(--s-300); border-top: 1px solid var(--line); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: var(--s-200);
  border-radius: var(--r-full);
  background: var(--bg-invert);
  color: var(--text-invert);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}
.step h3 { font-size: 20px; line-height: 28px; margin-bottom: var(--s-75); }
.step p { font-size: 16px; line-height: 24px; color: var(--text-muted); }

/* Benefit list */
.benefit-list { display: flex; flex-direction: column; gap: var(--s-300); }
.benefit-list li { display: flex; gap: var(--s-100); }
.benefit-list i { flex-shrink: 0; margin-top: 2px; color: var(--accent); font-size: 20px; }
.benefit-list strong { display: block; color: var(--text); font-size: 16px; line-height: 24px; font-weight: 700; }
.benefit-list p { font-size: 14px; line-height: 20px; color: var(--text-muted); }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-300); }
.stat { padding-top: var(--s-200); border-top: 1px solid #272727; }
.stat b {
  display: block;
  color: var(--text-invert);
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-75);
}
.stat span { color: var(--text-invert-muted); font-size: 14px; line-height: 20px; }

/* Testimonials */
.quote-block { display: flex; flex-direction: column; gap: var(--s-300); height: 100%; }
.quote-block p { font-size: 18px; line-height: 28px; color: var(--text); }
.quote-who { display: flex; align-items: center; gap: var(--s-100); margin-top: auto; }
.quote-who img { width: 40px; height: 40px; border-radius: var(--r-full); object-fit: cover; }
.quote-who strong { display: block; color: var(--text); font-size: 14px; line-height: 20px; }
.quote-who span { color: var(--text-subtle); font-size: 12px; line-height: 16px; }

/* --------------------------------------------------------------------------
   10. Tagline reveal
   -------------------------------------------------------------------------- */
.tagline { padding-block: var(--s-900); }
.tagline p {
  max-width: 900px;
  font-size: 48px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}
.tagline-word {
  color: rgba(10, 10, 10, .3);
  transition: color var(--t-slow);
}
.tagline-word.is-on { color: var(--text); }

/* --------------------------------------------------------------------------
   11. FAQ
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-200);
  width: 100%;
  padding: var(--s-300) 0;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  transition: color var(--t-fast);
}
.faq-q:hover { color: var(--accent); }
.faq-q i { flex-shrink: 0; font-size: 20px; color: var(--text-subtle); transition: transform var(--t-slow); }
.faq-item.is-open .faq-q i { transform: rotate(180deg); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height var(--t-slow), opacity var(--t-base), padding var(--t-slow);
}
.faq-a p { font-size: 16px; line-height: 24px; color: var(--text-muted); max-width: var(--measure); }
.faq-item.is-open .faq-a { max-height: 400px; opacity: 1; padding-bottom: var(--s-300); }

/* --------------------------------------------------------------------------
   12. CTA band
   -------------------------------------------------------------------------- */
.cta-band { background: var(--bg-invert); padding-block: var(--s-900); }
.cta-band h2 { color: var(--text-invert); font-size: 36px; line-height: 40px; max-width: var(--measure); margin-bottom: var(--s-200); }
.cta-band p { color: var(--text-invert-muted); font-size: 18px; line-height: 28px; max-width: var(--measure); margin-bottom: var(--s-400); }
.cta-assure { display: flex; flex-wrap: wrap; gap: var(--s-200); margin-top: var(--s-300); }
.cta-assure span { display: inline-flex; align-items: center; gap: var(--s-50); color: var(--text-invert-muted); font-size: 14px; line-height: 20px; }
.cta-assure i { color: var(--text-invert); font-size: 16px; }

/* --------------------------------------------------------------------------
   13. Page header (interior pages)
   -------------------------------------------------------------------------- */
.page-head { padding-block: var(--s-800) var(--s-600); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: var(--measure); font-size: 48px; line-height: 1; margin-bottom: var(--s-200); }
.page-head p { max-width: var(--measure); font-size: 18px; line-height: 28px; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   14. Prose (legal pages)
   -------------------------------------------------------------------------- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 24px; line-height: 32px; margin: var(--s-600) 0 var(--s-200); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; line-height: 28px; margin: var(--s-300) 0 var(--s-75); }
.prose p { font-size: 16px; line-height: 24px; color: var(--text-muted); margin-bottom: var(--s-200); }
.prose ul { margin: 0 0 var(--s-300); display: flex; flex-direction: column; gap: var(--s-75); }
.prose li {
  position: relative;
  padding-left: var(--s-300);
  font-size: 16px;
  line-height: 24px;
  color: var(--text-muted);
}
.prose li::before {
  content: '';
  position: absolute;
  left: var(--s-75);
  top: 10px;
  width: 4px; height: 4px;
  border-radius: var(--r-full);
  background: var(--line-strong);
}
.prose strong { color: var(--text); font-weight: 600; }

.note {
  padding: var(--s-200);
  margin-bottom: var(--s-300);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-xl);
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
}
.note i { color: var(--accent); margin-right: var(--s-50); }

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-50);
  padding: var(--s-50) var(--s-100);
  background: var(--bg-muted);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--text-muted);
}

.toc {
  padding: var(--s-300);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  margin-bottom: var(--s-600);
}
.toc h2 { font-size: 14px; line-height: 20px; margin: 0 0 var(--s-200); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); }
.toc ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-50); }
.toc a {
  display: block;
  /* Nested radius: 16px outer minus 24px gap is under 2, so hold at md */
  padding: var(--s-50) var(--s-75);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
  transition: background var(--t-fast), color var(--t-fast);
}
.toc a:hover { background: var(--bg-muted); color: var(--text); }

/* --------------------------------------------------------------------------
   15. Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--s-50); margin-bottom: var(--s-200); }
.field label { color: var(--text); font-size: 14px; line-height: 20px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: var(--s-75) var(--s-100);
  min-height: 44px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  font-size: 16px;
  line-height: 24px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 104px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-subtle); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-error {
  display: none;
  color: var(--danger);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}
.field-error.is-shown { display: block; }

.check { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-75); margin-bottom: var(--s-300); }
.check .field-error { flex-basis: 100%; }
.check input { width: 16px; height: 16px; margin-top: 4px; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; }
.check label { font-size: 12px; line-height: 16px; color: var(--text-muted); cursor: pointer; }

.form-alert {
  display: none;
  align-items: center;
  gap: var(--s-75);
  padding: var(--s-100);
  margin-bottom: var(--s-200);
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  border-radius: var(--r-lg);
  color: var(--danger);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.form-alert.is-shown { display: flex; }

.btn.is-loading { pointer-events: none; color: transparent; position: relative; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: var(--r-full);
  animation: spin 600ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   16. Modal
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-300);
  background: rgba(10, 10, 10, .4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
  overflow-y: auto;
}
.modal.is-open { opacity: 1; visibility: visible; }

.modal-panel {
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg);
  transform: translateY(24px);
  transition: transform var(--t-slow);
}
.modal.is-open .modal-panel { transform: translateY(0); }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-200);
  padding: var(--s-300) var(--s-300) var(--s-200);
}
.modal-head h2 { font-size: 20px; line-height: 28px; margin-bottom: var(--s-50); }
.modal-head p { font-size: 14px; line-height: 20px; color: var(--text-muted); }
.modal-close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.modal-close:hover { background: var(--bg-muted); color: var(--text); }

.modal-body { padding: 0 var(--s-300) var(--s-300); }
.modal-foot {
  padding: var(--s-200) var(--s-300);
  border-top: 1px solid var(--line);
  background: var(--bg-subtle);
  border-radius: 0 0 var(--r-2xl) var(--r-2xl);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-muted);
  text-align: center;
}

.modal-done { padding: var(--s-600) var(--s-300); text-align: center; }
.modal-done i {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin: 0 auto var(--s-200);
  border-radius: var(--r-full);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 24px;
}
.modal-done h3 { font-size: 20px; line-height: 28px; margin-bottom: var(--s-75); }
.modal-done p { font-size: 14px; line-height: 20px; color: var(--text-muted); margin-bottom: var(--s-300); }

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--bg-subtle); border-top: 1px solid var(--line); padding-block: var(--s-800) var(--s-400); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: var(--s-600); }
.footer-brand strong { display: block; color: var(--text); font-size: 16px; line-height: 24px; margin-bottom: var(--s-75); }
.footer-brand p { font-size: 14px; line-height: 20px; color: var(--text-muted); max-width: 280px; }
.footer-col h2 {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: var(--s-200);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--s-75); }
.footer-col a, .footer-col li { color: var(--text-muted); font-size: 14px; line-height: 20px; }
.footer-col a:hover { color: var(--text); }
.footer-contact li { display: flex; gap: var(--s-75); }
.footer-contact i { flex-shrink: 0; margin-top: 2px; color: var(--text-subtle); font-size: 16px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-200);
  margin-top: var(--s-700);
  padding-top: var(--s-300);
  border-top: 1px solid var(--line);
}
.footer-bottom p, .footer-bottom a { font-size: 12px; line-height: 16px; color: var(--text-subtle); }
.footer-bottom a:hover { color: var(--text); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--s-200); }

/* --------------------------------------------------------------------------
   18. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(64px);
  filter: blur(12px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease), filter 800ms var(--ease);
}
.reveal.is-in { opacity: 1; transform: translateY(0); filter: blur(0); }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

/* --------------------------------------------------------------------------
   19. Error page
   -------------------------------------------------------------------------- */
.error-page { min-height: 70vh; display: flex; align-items: center; }
.error-page .code {
  font-size: 96px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--line-strong);
  margin-bottom: var(--s-200);
}

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  .hero h1 { font-size: 60px; line-height: 1; }
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-500); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .nav-menu, .nav-actions { display: none; }
  .nav-toggle { display: block; }
  .nav-island {
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    gap: var(--s-200);
    padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  }
  .nav-brand { min-width: 0; }

  /* While the menu is open the pill sits on top of the overlay, so it needs
     an opaque surface of its own rather than the page showing through. */
  body.nav-is-open .nav-island {
    background: var(--bg);
    box-shadow: var(--shadow-md);
  }

  .nav-overlay { padding-top: 120px; }

  .hero { padding-block: var(--s-700) var(--s-600); }
  .hero-inner { grid-template-columns: 1fr; gap: var(--s-500); }
  .hero h1 { font-size: 36px; line-height: 40px; }

  .section { padding-block: var(--s-700); }
  .section-tight { padding-block: var(--s-600); }
  .section-head { margin-bottom: var(--s-500); }
  .section-head h2 { font-size: 30px; line-height: 36px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .tagline p { font-size: 30px; line-height: 36px; }
  .tagline { padding-block: var(--s-700); }
  .cta-band { padding-block: var(--s-700); }
  .cta-band h2 { font-size: 30px; line-height: 36px; }
  .page-head { padding-block: var(--s-700) var(--s-500); }
  .page-head h1 { font-size: 36px; line-height: 40px; }
  .toc ul { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-400); }
  .error-page .code { font-size: 60px; }
}

@media (max-width: 520px) {
  .wrap { padding-inline: var(--s-200); }
  .site-header { padding-inline: var(--s-200); }
  .stat-grid { grid-template-columns: 1fr; }
  .nav-overlay-links a { font-size: 24px; line-height: 32px; }
  .trust-inner { flex-direction: column; align-items: flex-start; gap: var(--s-200); }
  .modal { padding: var(--s-200); align-items: flex-end; }
  .modal-panel { max-height: 92vh; }
}

/* --------------------------------------------------------------------------
   21. Preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .tagline-word { color: var(--text); }
}

@media print {
  .site-header, .nav-overlay, .site-footer, .modal, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
}
