/* Migva's Table — tokens, reset, type, buttons, header, footer.
   Light is the default; dark is a complete second theme, not an overlay. */

:root, [data-theme="light"] {
  color-scheme: light;
  --page: #ffffff;
  --surface: #fdfcfa;
  --surface-2: #f6f4ef;
  --band: #f8f6f1;
  --band-deep: #eef2ed;
  --ink: #17201b;
  --ink-2: #4a544e;
  --muted: #7a837d;
  --line: #e7e3da;
  --line-strong: #cfc9bb;
  --green: #1f3a2d;
  --green-deep: #172b22;
  --green-soft: #e6eee8;
  --on-green: #f7f5f0;
  --on-green-2: #d3dcd5;
  --on-green-muted: #a9b7ad;
  --green-line: rgba(247, 245, 240, 0.16);
  --on-band: var(--ink);
  --on-band-2: var(--ink-2);
  --on-band-muted: var(--muted);
  --band-line: var(--line);
  --accent: #1f3a2d;
  --accent-hover: #172b22;
  --accent-ink: #f7f5f0;
  --gold: #9a7a48;
  --focus: #9a7a48;
  --shadow: 0 24px 60px -28px rgba(23, 32, 27, 0.28);
  --card-shadow: 0 1px 0 rgba(23, 32, 27, 0.02);
  --overlay: rgba(23, 32, 27, 0.5);
}



[data-theme="dark"] {
  color-scheme: dark;
  --page: #121614;
  --surface: #181d1a;
  --surface-2: #1c221e;
  --band: #161b18;
  --band-deep: #1a211c;
  --ink: #ede8dc;
  --ink-2: #c3cac2;
  --muted: #94a098;
  --line: #2a332d;
  --line-strong: #3b463f;
  --green: #dfe8e0;
  --green-deep: #cbd8ce;
  --green-soft: #22302a;
  --on-green: #121614;
  --on-green-2: #2a332d;
  --on-green-muted: #4a544e;
  --green-line: rgba(237, 232, 220, 0.14);
  --on-band: var(--ink);
  --on-band-2: var(--ink-2);
  --on-band-muted: var(--muted);
  --band-line: var(--line);
  --accent: #cfe0d3;
  --accent-hover: #e2eee5;
  --accent-ink: #121614;
  --gold: #cfae74;
  --focus: #cfae74;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 32px -20px rgba(0, 0, 0, 0.6);
  --overlay: rgba(10, 14, 12, 0.62);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; top: .5rem; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(1180px, 100% - 1.5rem); } }

/* ---------- type ---------- */
h1, h2, h3, .brand-name, .display, .deliver-num, .cap-num {
  font-family: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.05;
}
h1 { font-size: clamp(2.9rem, 6vw, 5rem); }
h2 { font-size: clamp(2.3rem, 4.2vw, 3.6rem); max-width: 20ch; }
h3 { font-size: 1.65rem; line-height: 1.2; }
.display { font-size: clamp(3.2rem, 7vw, 6rem); line-height: 1; }
.lede { font-size: clamp(1.08rem, 1.4vw, 1.2rem); line-height: 1.6; color: var(--ink-2); max-width: 56ch; font-weight: 400; }
.eyebrow {
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 500;
  color: var(--gold); display: flex; align-items: center; gap: .8rem; margin-bottom: 1.3rem;
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; opacity: .7; }
.eyebrow-light { color: var(--gold); }
.subhead { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 1.1rem; }
.footnote { font-size: .92rem; color: var(--muted); margin-top: 1.25rem; }

.section-head { max-width: 760px; margin: 0 auto clamp(3rem, 6vw, 5rem); text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-head h2 { margin: 0 auto 1.1rem; }
.section-head .lede { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  font-size: .74rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; line-height: 1;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
}
.btn:hover { transform: none; }
.btn-ico { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: var(--green-deep); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-outline-light { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-outline-light:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  border-bottom: 1px solid var(--line-strong); padding-bottom: .3rem;
}
.link-arrow:hover { border-color: var(--ink); }
.link-arrow::after { content: "→"; transition: transform .18s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 30px -22px rgba(0, 0, 0, .4); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5rem; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.7rem; font-style: italic; font-weight: 500; }
.brand-sub { font-size: .58rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin-top: .15rem; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav > a { text-decoration: none; font-size: .9rem; color: var(--ink-2); position: relative; padding: .25rem 0; letter-spacing: .01em; }
.nav > a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--gold); transition: right .2s; }
.nav > a:hover { color: var(--ink); }
.nav > a:hover::after { right: 0; }
.nav-actions { display: flex; gap: .6rem; margin-left: .6rem; }
.nav-actions .btn { padding: .75rem 1.2rem; font-size: .68rem; }
.header-tools { display: flex; align-items: center; gap: .5rem; }
.theme-toggle, .menu-toggle {
  width: 2.6rem; height: 2.6rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--line-strong); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ico-moon { display: none; }
[data-theme="dark"] .ico-moon { display: block; }
[data-theme="dark"] .ico-sun { display: none; }
.menu-toggle { display: none; flex-direction: column; gap: 4px; }
.menu-toggle span { width: 1.1rem; height: 1.5px; background: currentColor; transition: transform .2s, opacity .2s; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; height: calc(100dvh - 5rem); background: var(--page);
    flex-direction: column; align-items: flex-start; gap: .25rem; padding: 1.5rem 1.5rem 3rem;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .2s, transform .2s, visibility 0s .2s; overflow-y: auto; border-top: 1px solid var(--line);
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav > a { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.9rem; padding: .55rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav > a::after { display: none; }
  .nav-actions { flex-direction: column; width: 100%; margin: 1.2rem 0 0; gap: .75rem; }
  .nav-actions .btn { width: 100%; padding: 1rem; }
  body.nav-open { overflow: hidden; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
}

/* ---------- flash ---------- */
.flash-wrap { margin-top: 1rem; }
.flash { padding: .9rem 1.1rem; border-radius: .6rem; border: 1px solid var(--line-strong); background: var(--surface); font-size: .95rem; }
.flash-error { border-color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { background: var(--band); color: var(--ink-2); padding: 5rem 0 2rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem; }
.footer-grid a { display: block; text-decoration: none; color: var(--ink-2); padding: .22rem 0; font-size: .95rem; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-head { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: .7rem; font-weight: 500; }
.footer-brand .brand-name { color: var(--green); font-size: 2rem; }
.footer-tagline { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; color: var(--gold); margin: .35rem 0 .8rem; font-size: 1.1rem; }
.footer-text { max-width: 36ch; font-size: .95rem; color: var(--muted); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.4rem; font-size: .85rem; color: var(--muted); }
.footer-bottom a { color: inherit; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- narrow pages ---------- */
.page-narrow .wrap { max-width: 720px; }
.page-narrow h1 { margin-bottom: 1.2rem; }
.page-narrow p + p { margin-top: 1rem; }
.page-narrow a { color: var(--accent); }
