/* Clay & Ramen — paper-diorama exploration: shared tokens and page frame.
   Brand tokens carried from the live site (site/public/index.html). */
:root {
  --canvas: #f3efe6;
  --field: #fbf9f4;
  --ink: #181a1f;
  --body: #3a3c3f;
  --muted: #63665f;
  --hairline: #ddd7ca;
  --accent: #cc785c;       /* clay: decorative marks, the connecting thread */
  --accent-fill: #b8654a;  /* filled controls */
  --accent-text: #9e5138;  /* text-size clay, focus rings */
  --on-accent: #f7f3ea;
  --shadow-ink: 44, 34, 24;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: max(clamp(16px, 4.4vw, 60px), env(safe-area-inset-left));
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- stage: a sticky viewport the text scrolls over ---------- */
.track { position: relative; }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  contain: layout paint;
}
.beats { position: relative; margin-top: -100vh; margin-top: -100svh; z-index: 5; pointer-events: none; }
.beat { min-height: 115vh; min-height: 115svh; }
.beat[data-first] { min-height: 100vh; min-height: 100svh; }
.beat-in {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  opacity: var(--o, 1);
  transform: translate3d(0, var(--ty, 0), 0);
  will-change: opacity, transform;
}
.beat.is-off .beat-in { visibility: hidden; }
.beat a, .beat button { pointer-events: auto; }

/* ---------- sheets ---------- */
.sheet { position: absolute; left: 0; top: 0; will-change: transform; pointer-events: none; transform-origin: 50% 50%; }
.sheet > svg { position: absolute; display: block; overflow: hidden; } /* paper.js bounds the viewBox to the ink and its padding */
.sheet > .shade { position: absolute; display: block; pointer-events: none; }  /* pre-blurred image; shares the sheet's layer */
.sheet > .paper { filter: drop-shadow(0 -0.6px 0 rgba(255, 253, 246, 0.55)); }
.grain { fill: url(#grain); pointer-events: none; }

/* ---------- page chrome ---------- */
.chrome {
  position: fixed; z-index: 20; left: 0; right: 0; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 0;
  pointer-events: none;
}
.chrome > * { pointer-events: auto; }
.wordmark {
  font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -0.005em;
  color: var(--ink); text-decoration: none;
}
.wordmark em { font-style: italic; color: var(--accent-text); }
.status { margin: 0; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- type ---------- */
.display {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 5.4vw, 80px);
  line-height: 0.98; letter-spacing: -0.018em;
  margin: 0; color: var(--ink);
  text-wrap: balance;
}
.lede { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--body); margin: 0; max-width: 36ch; text-wrap: pretty; }
.say {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 3.3vw, 48px); line-height: 1.08; letter-spacing: -0.012em;
  margin: 0; color: var(--ink); text-wrap: balance;
}
.small { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0; }

/* ---------- the one real action ---------- */
.cta {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--on-accent);
  font: 500 15px/1 var(--sans); text-decoration: none;
  border-radius: 999px; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 8px 18px -8px rgba(var(--shadow-ink), .55);
  transition: transform 160ms var(--ease-out), background-color 160ms;
}
.cta:hover { background: #2a2c31; transform: translateY(-1px); }
.cta .addr { color: #cfc6b6; font-weight: 400; }
.foot { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* a subtle cue that the page continues */
.cue { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.cue i { display: block; width: 1px; height: 28px; background: linear-gradient(var(--muted), transparent); }

@media (prefers-reduced-motion: reduce) {
  .beat-in { transform: none !important; }
  .cta { transition: none; }
}
