/* ─────────────────────────────────────────────
   DAI — Dental Avoidance Intelligence
   Shared styles
   ───────────────────────────────────────────── */

:root {
  --ink:       #14171C;
  --ink-soft:  #2A2F38;
  --paper:     #FAF7F0;
  --paper-2:   #F3EEE3;
  --rule:      #C9BFA9;
  --rule-soft: #E2D9C5;
  --slate:     #5D6471;
  --rust:      #A04323;
  --serif:     "Fraunces", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --mono:      "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter:    clamp(24px, 5vw, 72px);
  --max:       1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* warm paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.05 0 0 0 0 0.04 0 0 0 0.16 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ───── Header / Nav ───── */
header.site {
  padding: 28px var(--gutter) 24px;
  border-bottom: 1px solid var(--rule-soft);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  font-variation-settings: "opsz" 14, "SOFT" 30;
}
.wordmark .em {
  font-style: italic;
  color: var(--rust);
}
nav.primary {
  display: flex;
  gap: 28px;
  align-items: baseline;
  flex-wrap: wrap;
}
nav.primary a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}
nav.primary a:hover,
nav.primary a[aria-current="page"] {
  border-bottom-color: var(--rust);
  color: var(--ink);
}

/* ───── Main / pages ───── */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  padding: clamp(56px, 10vh, 100px) var(--gutter) clamp(48px, 8vh, 80px);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
  display: block;
  margin-bottom: 28px;
}

h1.page-title {
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  max-width: 18ch;
}
h1.page-title em {
  font-style: italic;
  color: var(--rust);
  font-variation-settings: "opsz" 96, "SOFT" 60;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 58ch;
  font-weight: 350;
  margin-bottom: 64px;
  font-variation-settings: "opsz" 20, "SOFT" 20;
}

h2.section {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 14px;
  font-variation-settings: "opsz" 30, "SOFT" 30;
}

p.body {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 64ch;
  margin-bottom: 1.2em;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 48px;
  padding: 28px 0;
  border-top: 1px solid var(--rule-soft);
}
@media (min-width: 760px) {
  .row { grid-template-columns: 220px 1fr; gap: 24px 56px; padding: 32px 0; }
}
.row:last-of-type { border-bottom: 1px solid var(--rule-soft); }
.row .row-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  padding-top: 4px;
}
.row .row-body p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
}
.row .row-body p + p { margin-top: 0.8em; }
.row .row-body ul { margin-top: 6px; padding-left: 0; list-style: none; }
.row .row-body ul li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
  margin-bottom: 4px;
}
.row .row-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--rust);
}

a.inline {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rust);
  padding-bottom: 1px;
  font-style: italic;
  transition: color 0.3s ease;
}
a.inline:hover { color: var(--rust); }

/* ───── Footer ───── */
footer.site {
  padding: 32px var(--gutter) 28px;
  border-top: 1px solid var(--rule-soft);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: baseline;
}
footer.site .name {
  font-family: var(--serif);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  color: var(--ink);
  font-variation-settings: "opsz" 14, "SOFT" 50;
}
footer.site .right {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
footer.site a {
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
footer.site a:hover {
  color: var(--ink);
  border-bottom-color: var(--rust);
}

::selection { background: var(--rust); color: var(--paper); }

/* ───── HOME-specific ───── */
.home main { padding-top: clamp(80px, 14vh, 140px); }
.home h1.page-title { max-width: 22ch; font-size: clamp(46px, 7vw, 92px); }
.home .lede { font-size: clamp(19px, 1.5vw, 24px); }

/* Reveal animation (page load) */
.reveal { opacity: 0; transform: translateY(10px); animation: rise 0.9s cubic-bezier(.2,.8,.2,1) forwards; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.22s; }
.reveal.d3 { animation-delay: 0.38s; }
.reveal.d4 { animation-delay: 0.54s; }
.reveal.d5 { animation-delay: 0.70s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 540px) {
  nav.primary { gap: 16px; font-size: 11px; }
  footer.site .right { gap: 16px; }
}
