/* =========================================================
   Cynthia Ricks Pollard — shared base
   Theme tokens are set per-page in a :root block; this file
   holds structure, type, nav, footer, buttons, reveals,
   page transitions, and responsive behaviour.
   ========================================================= */

:root {
  /* fallbacks — pages override */
  --bg: #f3f1ea;
  --bg-alt: #e9ece3;
  --ink: #16201b;
  --ink-soft: #54605a;
  --accent: #2f7d6b;
  --accent-deep: #143a31;
  --line: #d6d3c7;
  --on-accent: #f3f1ea;
  --shell: 1240px;
  --gut: 56px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- page transition veil ---------- */
.veil {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  pointer-events: none;
  opacity: 1;
  transition: opacity .7s ease;
}
body.ready .veil { opacity: 0; }
body.leaving .veil { opacity: 1; pointer-events: all; transition: opacity .45s ease; }

/* ---------- layout ---------- */
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gut); }
section { position: relative; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.display {
  font-family: var(--serif); font-weight: 500;
  line-height: 0.98; letter-spacing: -0.01em;
  color: var(--ink); margin: 0;
  font-size: clamp(48px, 8vw, 104px);
}
.display em { font-style: italic; font-weight: 400; }
.h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 5vw, 60px); line-height: 1.04;
  letter-spacing: -0.01em; color: var(--ink); margin: 0;
}
.h2 em { font-style: italic; font-weight: 400; color: var(--accent); }
.h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(23px, 2.6vw, 30px); line-height: 1.15; margin: 0;
}
.lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.62; color: var(--ink-soft); }
p { text-wrap: pretty; }
.measure { max-width: 56ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em; padding: 16px 28px; border-radius: 2px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), background .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.btn svg { transition: transform .35s cubic-bezier(.2,.7,.3,1); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--accent-deep); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px var(--accent-deep); }
.btn-ghost { color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gut);
  transition: padding .4s ease, background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 14px var(--gut);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--serif); font-weight: 600; font-size: 22px;
  letter-spacing: 0.01em; text-decoration: none; color: var(--ink);
  display: flex; align-items: baseline; gap: 9px;
}
.brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.navlinks { display: flex; align-items: center; gap: 34px; }
.navlinks a {
  text-decoration: none; font-size: 14px; font-weight: 500;
  letter-spacing: 0.02em; color: var(--ink-soft); position: relative; padding: 4px 0;
  transition: color .3s ease;
}
.navlinks a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--accent); transition: width .35s cubic-bezier(.2,.7,.3,1);
}
.navlinks a:hover { color: var(--ink); }
.navlinks a:hover::after, .navlinks a.active::after { width: 100%; }
.navlinks a.active { color: var(--ink); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--ink); transition: transform .35s ease, opacity .3s ease; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 190;
  background: var(--bg); display: flex; flex-direction: column;
  justify-content: center; padding: 0 var(--gut); gap: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .4s ease, transform .4s ease, visibility .4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a {
  font-family: var(--serif); font-size: 40px; font-weight: 500;
  text-decoration: none; color: var(--ink); padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ---------- image placeholders / slots ---------- */
image-slot {
  --is-bg: color-mix(in oklab, var(--ink) 9%, var(--bg));
  --is-fg: var(--ink-soft);
  background: var(--is-bg);
}
.ph {
  position: relative; overflow: hidden; background: color-mix(in oklab, var(--ink) 9%, var(--bg));
  background-image: repeating-linear-gradient(135deg, color-mix(in oklab, var(--ink) 7%, transparent) 0 1px, transparent 1px 10px);
}
.ph-tag {
  position: absolute; bottom: 14px; left: 14px;
  font-family: ui-monospace, 'SF Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.06em; padding: 5px 9px; border-radius: 2px;
  background: color-mix(in oklab, var(--ink) 78%, transparent); color: var(--bg);
}

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1); transition-delay: var(--d, 0ms); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal-fade { opacity: 0; transition: opacity 1.1s ease var(--d, 0ms); }
.reveal-fade.in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-fade { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
  .veil { display: none; }
}

/* ---------- footer ---------- */
.foot { padding: 90px 0 46px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; align-items: start; }
.foot .brand { font-size: 30px; }
.foot-blurb { color: var(--ink-soft); margin: 18px 0 0; max-width: 34ch; }
.foot-col h4 { font-family: var(--sans); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 18px; font-weight: 600; }
.foot-col a { display: block; text-decoration: none; color: var(--ink); margin-bottom: 12px; font-size: 15px; transition: color .3s; }
.foot-col a:hover { color: var(--accent); }
.foot-base { margin-top: 64px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-soft); }
.socials { display: flex; gap: 14px; }
.socials a { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: border-color .3s, color .3s, transform .3s; }
.socials a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  :root { --gut: 30px; }
  .navlinks { display: none; }
  .burger { display: flex; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-base { flex-direction: column; gap: 18px; align-items: flex-start; }
}
