/* ============================================================
   Slate demo shared stylesheet
   The Slate "frame" (top bar, brief, final CTA, footer) is fixed
   in Slate brand colours. Each demo overrides the palette + fonts
   via :root and adds its own section styles inline.
   ============================================================ */

:root {
  /* Slate brand frame — constant across demos */
  --slate-ink: #1c1814;
  --slate-bone: #f3ece1;
  --slate-rust: #b8542a;

  /* Per-demo palette — overridden in each page */
  --paper: #f7f8f6;
  --ink: #1b2420;
  --muted: #6b7470;
  --accent: #2f5d57;
  --accent-deep: #1e3f3a;
  --soft: #ece2cf;
  --line: rgba(27, 36, 32, 0.12);

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 64px); }
.sec { padding: clamp(80px, 12vw, 160px) 0; }
.sec-tight { padding: clamp(56px, 8vw, 110px) 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}
.serif { font-family: var(--serif); font-weight: 400; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; }
.lede { max-width: 60ch; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.7; }

/* buttons */
.btn-accent, .btn-line {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn-accent { background: var(--accent); color: var(--paper); }
.btn-accent:hover { transform: translateY(-2px); background: var(--accent-deep); }
.btn-line { border: 1px solid var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Slate frame: top bar ===== */
.demo-bar {
  background: var(--slate-ink);
  color: var(--slate-bone);
  padding: 12px 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(243, 236, 225, 0.1);
  position: sticky; top: 0; z-index: 200;
}
.demo-bar .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.demo-bar .left { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.demo-bar .brand-slate { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--slate-bone); }
.demo-bar .brand-slate .dot { color: var(--slate-rust); font-style: normal; }
.demo-bar .pill { background: rgba(184, 84, 42, 0.18); border: 1px solid var(--slate-rust); color: var(--slate-rust); padding: 4px 12px; border-radius: 999px; letter-spacing: 0.14em; font-size: 10px; }
.demo-bar .gray { color: rgba(243, 236, 225, 0.55); }
.demo-bar .back { color: rgba(243, 236, 225, 0.7); letter-spacing: 0.06em; }
.demo-bar .back:hover { color: var(--slate-rust); }
@media (max-width: 560px) { .demo-bar .gray { display: none; } .demo-bar { font-size: 10.5px; } }

/* ===== Slate frame: brief ===== */
.brief { background: var(--slate-ink); color: var(--slate-bone); padding: clamp(72px, 11vw, 120px) 0 clamp(56px, 9vw, 96px); }
.brief .eyebrow { color: var(--slate-rust); margin-bottom: 28px; }
.brief h1 { font-size: clamp(34px, 5.4vw, 62px); line-height: 1.05; max-width: 940px; margin-bottom: 8px; color: var(--slate-bone); }
.brief h1 em { font-style: italic; color: var(--slate-rust); }
.brief .meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); padding-top: 36px; border-top: 1px solid rgba(243, 236, 225, 0.12); margin-top: clamp(40px, 6vw, 64px); }
.brief .meta dt { font-family: var(--mono); font-size: 10.5px; color: rgba(243, 236, 225, 0.5); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 8px; }
.brief .meta dd { font-family: var(--serif); font-size: 18px; color: var(--slate-bone); }
@media (max-width: 720px) { .brief .meta { grid-template-columns: repeat(2, 1fr); } }

/* ===== looping video hero (dual-element crossfade) ===== */
.lv { position: relative; overflow: hidden; }
.lv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.7s ease; }
.lv video.a { opacity: 1; }
.lv video.b { opacity: 0; }
.lv .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }

/* ===== Slate frame: final CTA ===== */
.slate-cta { background: var(--slate-ink); color: var(--slate-bone); padding: clamp(80px, 12vw, 150px) 0; text-align: center; }
.slate-cta .eyebrow { color: var(--slate-rust); }
.slate-cta h2 { font-size: clamp(30px, 4.6vw, 52px); max-width: 820px; margin: 0 auto 22px; color: var(--slate-bone); }
.slate-cta h2 em { font-style: italic; color: var(--slate-rust); }
.slate-cta p { max-width: 56ch; margin: 0 auto 36px; color: rgba(243, 236, 225, 0.75); }
.slate-cta .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.slate-cta .primary { background: var(--slate-rust); color: var(--slate-bone); }
.slate-cta .primary, .slate-cta .ghost { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; padding: 15px 28px; border-radius: 999px; transition: transform 0.25s ease; }
.slate-cta .primary:hover { transform: translateY(-2px); }
.slate-cta .ghost { border: 1px solid rgba(243, 236, 225, 0.3); color: var(--slate-bone); }
.slate-cta .ghost:hover { border-color: var(--slate-rust); color: var(--slate-rust); }

/* ===== footer (credit right-aligned) ===== */
footer { background: var(--slate-ink); color: rgba(243, 236, 225, 0.7); padding: 30px 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
footer .credit { text-align: right; }
footer .credit a { color: var(--slate-bone); }
footer .credit a:hover { color: var(--slate-rust); }

/* ===== cinematic scroll primitives (initial states gated on html.cine) ===== */
html.cine .cine-rise { opacity: 0; transform: translateY(34px); }
html.cine .cine-stagger > * { opacity: 0; transform: translateY(34px); }
html.cine .cine-clip { clip-path: inset(0 0 100% 0); }

/* fallback reveal path (IntersectionObserver toggles .in) */
.cine-rise, .cine-stagger > * { transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1); }
.cine-rise.in, .cine-stagger > *.in { opacity: 1; transform: none; }
.cine-clip { transition: clip-path 1.1s cubic-bezier(.2,.7,.2,1); }
.cine-clip.in { clip-path: inset(0 0 0 0); }

/* clip wrapper holds an image that scales under it */
.cine-clip { overflow: hidden; }
.cine-clip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.legacy-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.legacy-reveal.in { opacity: 1; transform: none; }

/* full-bleed parallax statement band */
.statement { position: relative; min-height: 78vh; display: flex; align-items: center; overflow: hidden; color: #fff; }
.statement .bg { position: absolute; inset: -14% 0; z-index: 0; }
.statement .bg img { width: 100%; height: 128%; object-fit: cover; }
.statement::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,8,8,0.42), rgba(8,8,8,0.55)); }
.statement .wrap { position: relative; z-index: 2; }
.statement .eyebrow { color: rgba(255,255,255,0.8); }
.statement h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5vw, 66px); line-height: 1.08; letter-spacing: -0.02em; max-width: 18ch; color: #fff; }
.statement p { color: rgba(255,255,255,0.85); max-width: 52ch; margin-top: 18px; font-size: clamp(16px, 1.5vw, 20px); }

/* clip-reveal gallery */
.gal { display: grid; gap: clamp(14px, 2vw, 26px); }
.gal-2 { grid-template-columns: 1fr 1fr; }
.gal-asym { grid-template-columns: 1.25fr 1fr; }
.gal .cine-clip { border-radius: 16px; aspect-ratio: 3/2; }
.gal .cine-clip.tall { aspect-ratio: 3/4; grid-row: span 2; }
@media (max-width: 760px) { .gal-2, .gal-asym { grid-template-columns: 1fr; } .gal .cine-clip.tall { grid-row: auto; aspect-ratio: 3/2; } }

/* kinetic marquee band */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(20px, 3vw, 34px) 0; background: var(--soft); }
.marquee .track { display: flex; gap: 40px; white-space: nowrap; width: max-content; animation: slate-marq 30s linear infinite; }
.marquee span { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3.4vw, 44px); color: var(--ink); opacity: 0.88; }
.marquee .sep { color: var(--accent); font-style: normal; }
@keyframes slate-marq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }
