/* ReelPull web — shared site foundation
   Neutral building blocks shared by every page: reset, type, layout, header, footer, button and the
   motion helpers from references/motion.md. Page-specific styles live in each page. Built on the
   tasteskill base.css skeleton; the look comes from tokens.css. */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 6rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: inherit; text-wrap: balance; hyphens: none; }
.display { font-family: var(--font-display); font-weight: 800; font-size: var(--step-display); line-height: 0.95; letter-spacing: -0.035em; }
.head { font-family: var(--font-display); font-weight: 800; font-size: var(--step-head); line-height: 1.02; letter-spacing: -0.025em; }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 40ch; }
.small { font-size: var(--step-small); line-height: 1.45; }
.muted { color: var(--muted); }
p { max-width: 62ch; text-wrap: pretty; }
p + p { margin-top: 0.9em; }
.nums { font-variant-numeric: tabular-nums; }
.only-wide { display: none; }
@media (min-width: 48em) { .only-wide { display: inline; } }

/* ---------- layout ---------- */
.wrap { padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.section { padding-block: calc(var(--section) / 2); }
.bleed { margin-inline: calc(var(--margin) * -1); }
.cover { width: 100%; height: 100%; object-fit: cover; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  padding-block: clamp(1rem, 2vw, 1.5rem);
  padding-inline: var(--margin);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: inherit;
}
.wordmark img { width: 1.55em; height: 1.55em; border-radius: 50%; }
.header-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.header-nav a:not(.button) { text-decoration: none; color: inherit; font-size: 0.95rem; font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .header-nav a:not(.button):hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.06em; } }

/* ---------- button ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3.25rem;
  padding: 0 1.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .button:hover { background: var(--accent-hover); } }
.button--onink { background: var(--on-ink); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .button--onink:hover { background: #FFFFFF; } }
.button--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
@media (hover: hover) and (pointer: fine) { .button--ghost:hover { background: transparent; color: var(--terracotta); } }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }
.link-plain { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }

/* ---------- footer: a single quiet line ---------- */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--gutter);
  padding: var(--margin);
  padding-block: 1.5rem;
  font-size: var(--step-small);
  color: var(--muted);
}
.site-footer a { color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .site-footer a:hover { text-decoration: underline; text-underline-offset: 0.18em; } }
.site-footer .footer-links { display: flex; gap: 1.5rem; justify-self: center; }
.site-footer .footer-end { justify-self: end; text-align: right; }
@media (max-width: 640px) {
  .site-footer { grid-template-columns: 1fr; gap: 0.6rem; text-align: left; }
  .site-footer .footer-links, .site-footer .footer-end { justify-self: start; text-align: left; }
}

/* ---------- motion helpers (content stays visible without JavaScript) ---------- */
.lines .line { display: block; overflow: hidden; padding-bottom: 0.09em; margin-bottom: -0.09em; }
.lines [data-line] { display: block; }
.shutter { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rp-rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
  .js .lines [data-line] { transform: translateY(105%); animation: rp-line 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shutter[data-reveal] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter[data-reveal] img { transform: scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js .shutter[data-reveal].is-in { clip-path: inset(0); }
  .js .shutter[data-reveal].is-in img { transform: none; }
}
@keyframes rp-rise { to { opacity: 1; transform: none; } }
@keyframes rp-line { to { transform: none; } }
