/* ============== theshape — site base
 * Shared styles for all secondary pages (research, about, volumes/*, privacy, terms).
 * Main marketing page (index.html) keeps its own inline CSS — this file is the
 * stripped-down version for content pages. Keep in sync with index.html for any
 * shared element (nav, footer, buttons, etc.).
 * ============== */

:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --bg: #ffffff;
  --bg-soft: #fbfbfd;
  --line: rgba(0,0,0,0.08);
  --void: #000000;
  --bone: #f5f5f7;
  --accent: #0066cc;
  --rad: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-gutter: stable; }

/* Atmospheric film grain — fixed overlay, overlay blend mode does double duty
   (noir grain on dark sections + paper texture on light sections in one layer) */
.atmosphere {
  position: fixed; inset: -2%;
  z-index: 50;
  pointer-events: none;
  opacity: 0.6;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0.28 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) {
  .atmosphere { opacity: 0.35; }
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
img { display: block; max-width: 100%; user-select: none; }

/* ============== Nav ============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  transition: background 320ms ease, border-color 320ms ease, color 320ms ease;
}
.nav.on-dark {
  background: rgba(0,0,0,0.7);
  border-bottom-color: rgba(255,255,255,0.08);
  color: var(--bone);
}
.nav .wrap {
  width: 100%; max-width: 1024px; padding: 0 22px;
  display: flex; align-items: center; gap: 24px;
  font-size: 13px;
}
.nav .brand {
  font-weight: 500; letter-spacing: -0.01em; font-size: 17px;
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav .brand .mark {
  width: 22px; height: 22px;
  background: url('../images/logo-dark.png') center / contain no-repeat;
  transition: background-image 320ms ease;
}
.nav.on-dark .brand .mark { background-image: url('../images/logo-white.png'); }
.nav .links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a {
  color: inherit; text-decoration: none; opacity: 0.78;
  transition: opacity 150ms ease;
}
.nav a:hover, .nav a.active { opacity: 1; }
.nav .cta {
  background: var(--ink); color: var(--bg);
  padding: 7px 14px; border-radius: 100px;
  font-size: 12px; font-weight: 500;
  opacity: 1;
}
.nav.on-dark .cta { background: var(--bone); color: var(--void); }

/* ============== Buttons ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 28px;
  border-radius: 980px;
  font-family: inherit; font-size: 15px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 140ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0058b3; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* ============== Typography ============== */
h1, h2, h3 { letter-spacing: -0.025em; font-weight: 600; }
h1 {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: clamp(40px, 6vw, 80px); line-height: 1.04;
  letter-spacing: -0.03em;
}
h2 {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: clamp(32px, 4vw, 52px); line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
h3 { font-size: 22px; font-weight: 600; }
.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 700px; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 18px;
}

/* ============== Page-level structure ============== */
.page-shell {
  padding: 140px 22px 100px;
  flex: 1;
}
.page-shell .container {
  max-width: 760px; margin: 0 auto;
}
.page-shell .container.wide {
  max-width: 1100px;
}
.page-shell h2 + .lede, .page-shell h1 + .lede {
  margin-top: 8px;
}
.page-shell .section-block {
  margin-top: 64px;
}
.page-shell .section-block h3 {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: 28px;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.page-shell p { line-height: 1.6; color: var(--ink-2); margin-bottom: 14px; }
.page-shell .meta-row {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3);
  display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-shell .meta-row span + span::before {
  content: "·"; margin-right: 18px;
}

/* ============== Footer ============== */
footer { background: #1d1d1f; color: var(--ink-3); padding: 60px 22px 30px; }
footer .container { max-width: 980px; margin: 0 auto; }
footer .mark-wrap {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 36px; margin-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
footer .mark-wrap .mark {
  width: 36px; height: 36px;
  background: url('../images/logo-white.png') center / contain no-repeat;
  opacity: 0.85;
}
footer .mark-wrap .wm {
  font-family: 'Fraunces', serif; font-weight: 300; font-size: 22px;
  color: var(--bone); letter-spacing: -0.01em;
}
footer .row { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
footer h4 {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone);
  margin-bottom: 14px;
}
footer ul { list-style: none; padding: 0; }
footer li { padding: 4px 0; font-size: 13px; }
footer a { color: var(--ink-3); text-decoration: none; }
footer a:hover { color: var(--bone); }
footer .legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 40px; padding-top: 20px; font-size: 12px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ============== Reveal (simple fade-in) ============== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.shown { opacity: 1; transform: translateY(0); }
.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }

/* ============== Reduced motion ============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============== Responsive ============== */
@media (max-width: 820px) {
  .nav .links { display: none; }
  .nav .links.cta-only { display: flex; }
  .page-shell { padding: 110px 22px 80px; }
}
