/* paper-anim.css — shared styles for the "paper, animated" scrollytelling pages.
   Self-contained (does not depend on styles.css) so these pages keep their own
   focused reading experience. Used by email-reply-gap.html and siblings. */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f4f5fa;
    --bg-card: #ffffff;
    --text-primary: #0c0c12;
    --text-secondary: #24243a;
    --text-muted: #4c4c63;
    --accent: #143a63;
    --accent-hover: #0d2b4c;
    --accent-light: #2f6ba6;
    --accent-subtle: rgba(20, 58, 99, 0.10);
    --warm: #d97706;
    --warm-deep: #92400e;
    --border: #bcbdd0;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    --font-sans: 'Barlow', system-ui, sans-serif;
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-sans); color: var(--text-primary);
    background-color: var(--bg-primary); -webkit-font-smoothing: antialiased; line-height: 1.7;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 3.5rem 2rem 5rem; }
.eyebrow {
    font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent-hover); }
.eyebrow .sep { color: var(--text-muted); margin: 0 0.5em; }
h1 {
    font-family: var(--font-serif); font-weight: 600;
    font-size: clamp(2.5rem, 5vw, 3.7rem); letter-spacing: -0.015em; line-height: 1.03;
    margin-bottom: 1.125rem; text-wrap: balance;
}
.lead {
    font-family: var(--font-serif); font-style: italic; font-weight: 500;
    font-size: clamp(1.15rem, 1.8vw, 1.4375rem); line-height: 1.5;
    color: var(--text-secondary); max-width: 54ch; margin-bottom: 1rem; text-wrap: pretty;
}
.byline {
    font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em;
    color: var(--text-muted); margin-bottom: 4.5rem; font-variant-numeric: tabular-nums;
}
.byline b { color: var(--accent); font-weight: 500; }
.scene { margin-bottom: 5.5rem; }
.scene .kicker {
    display: flex; align-items: center; gap: 0.875rem;
    font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--warm-deep); margin-bottom: 0.625rem;
}
.scene .kicker::after { content: ''; flex: 0 0 56px; height: 1px; background: var(--border); }
.scene h2 {
    font-family: var(--font-serif); font-weight: 600;
    font-size: clamp(1.625rem, 2.8vw, 2.125rem); letter-spacing: -0.01em; line-height: 1.12;
    margin-bottom: 0.875rem; text-wrap: balance;
}
.scene .blurb {
    color: var(--text-secondary); font-size: 1.03125rem; line-height: 1.72;
    max-width: 60ch; margin-bottom: 1.75rem; text-wrap: pretty;
}
.blurb .num {
    font-family: var(--font-mono); font-size: 0.875em; color: var(--accent-hover);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stagebox { background: var(--bg-secondary); border: 1px solid var(--border); padding: 1.6rem; overflow: hidden; }

/* reusable: staggered reveal cards/chips */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease var(--d, 0s), transform 0.5s ease var(--d, 0s); }
.scene.play .reveal { opacity: 1; transform: translateY(0); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.acard { border: 1px solid var(--border); background: var(--bg-card); padding: 1rem 1.1rem; }
.acard .ah { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.35rem; }
.acard .ai { font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; color: var(--accent-hover); margin-bottom: 0.2rem; }
.acard .ad { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.55; }
.acard .ad .up { color: var(--accent-hover); font-weight: 600; }
.acard .ad .down { color: var(--warm-deep); font-weight: 600; }

/* reusable: comparison bars */
.bar-track { height: 14px; background: var(--accent-subtle); position: relative; overflow: hidden; }
.bar-fill { position: absolute; inset: 0 100% 0 0; background: var(--accent); transition: right 1.4s cubic-bezier(.3,.7,.2,1); }
.bar-fill.warm { background: var(--warm); }

/* citation + fineprint */
.cite { border-top: 1px solid var(--border); padding-top: 2rem; display: flex; gap: 1.5rem; align-items: baseline; flex-wrap: wrap; }
.cite .ref { font-family: var(--font-serif); font-size: 1.0625rem; line-height: 1.5; color: var(--text-secondary); max-width: 60ch; }
.cite .ref i { font-style: italic; }
.cite a.btn {
    font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.05em;
    color: var(--accent); border: 1px solid var(--border); background: var(--bg-card);
    padding: 0.4rem 1rem; text-decoration: none; white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.cite a.btn:hover { border-color: var(--accent); background: var(--accent-subtle); }
.fineprint { margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.05em; color: var(--text-muted); line-height: 1.8; }

@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
    .bar-fill { transition: none !important; }
}
