/* ==========================================================================
   OnlyHighYield — landing page layout and motion
   Loaded after styles.css, nightmode.css and chat-panel.css on landingpage.html only.
   Split hero with a live flashcard, a scroll story that walks through a real
   answer, the Anki band, closing call to action and footer.
   Everything is readable without JavaScript; landing.js only adds motion.
   ========================================================================== */

:root {
    --band-top: #0d6d71;          /* teal bands: hero, Anki, closing CTA */
    --band: #0a5c5f;
    --band-deep: #073e40;
    --band-ink: #ffffff;
    --band-soft: rgba(255, 255, 255, 0.82);
    --band-faint: rgba(255, 255, 255, 0.6);
    --band-line: rgba(255, 255, 255, 0.16);
    --fc-stage: linear-gradient(160deg, #0b6467 0%, #073e40 100%);
    --rate-hard: #e5484d;
    --rate-ok: #e8920c;
    --rate-good: #1f9d55;
}

html.dark-mode {
    --band-top: #0c4f52;
    --band: #0a4446;
    --band-deep: #062b2c;
    --fc-stage: linear-gradient(160deg, #0b4a4c 0%, #062b2c 100%);
}

/* Night mode: text on yellow buttons is always deep teal */
.nav-links a.btn-primary,
.dark-mode .nav-links a.btn-primary,
.dark-mode .nav-links a.btn-primary:hover { color: #073e40; }

/* ------------------------------------------------------------- hero --- */

.hero.hero-split {
    min-height: 0;
    display: block;
    text-align: left;
    padding: 8.5rem 0 7.5rem;
    background: radial-gradient(ellipse 80% 90% at 85% 0%, var(--band-top) 0%, var(--band) 45%, var(--band-deep) 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-split .hero-content {
    max-width: 600px;
    margin: 0;
    padding: 0;
}

.hero-split .eyebrow { justify-content: flex-start; }

.hero-split h1 {
    font-size: clamp(2.3rem, 1.3rem + 3vw, 3.5rem);
    line-height: 1.12;
    text-wrap: balance;
    margin-bottom: 1.4rem;
}

.hero-split p {
    margin: 0 0 2.25rem;
    max-width: 540px;
}

.hero-split .hero-cta { justify-content: flex-start; }

.btn-ghost-light {
    color: var(--band-ink);
    border: 1.5px solid var(--band-line);
    background: rgba(255, 255, 255, 0.04);
}

.btn-ghost-light:hover {
    border-color: var(--highlighter);
    color: var(--highlighter);
    transform: translateY(-2px);
}

.hero-split .hero-note { margin-top: 1.1rem; }

.hero-proof {
    display: flex;
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--band-line);
}

.hero-proof .stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 1.4rem + 1.5vw, 2.6rem);
    font-weight: 700;
    line-height: 1;
    color: var(--highlighter);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.4rem;
}

.hero-proof .proof-label {
    font-size: 0.86rem;
    color: var(--band-soft);
}

/* Hero flashcard: the real flashcard layout, tilted on a stack */
.hero-visual {
    position: relative;
    max-width: 470px;
    width: 100%;
    justify-self: end;
    perspective: 1400px;
}

.hc-stack {
    position: absolute;
    inset: 18px -14px -14px 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--band-line);
    transform: rotate(4deg);
}

.hc {
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    transform: rotate(-2deg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.hc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--line);
    font: 600 0.72rem/1.2 var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.hc-tag {
    color: var(--primary);
    background: var(--highlighter-soft);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.hc-face {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.75rem 1.75rem 1.25rem;
    text-align: center;
}

.hc-q {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.28rem;
    line-height: 1.45;
    color: var(--ink);
    text-wrap: balance;
}

.hc-a {
    font-size: 1.12rem;
    line-height: 1.55;
    color: var(--ink);
}

.hc-back { display: none; }
.hc[data-side="back"] .hc-front { display: none; }
.hc[data-side="back"] .hc-back { display: flex; }

.hc-pearl {
    border-top: 1px solid var(--line);
    background: var(--paper-alt);
    padding: 1rem 1.25rem 1.1rem;
    text-align: center;
}

.fc-pearl-label {
    font: 600 0.7rem/1.2 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.fc-pearl-text {
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--ink-soft);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    text-align: left;
}

.hc-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.9rem 1rem 1.1rem;
    border-top: 1px solid var(--line);
    background: var(--paper-alt);
}

.hc[data-side="back"] .hc-actions { border-top: 0; padding-top: 0; }

.fc-btn {
    font: 600 0.8rem/1 var(--font-body);
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    cursor: pointer;
    color: #ffffff;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.fc-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.fc-flip { background: var(--highlighter); color: #073e40; box-shadow: 0 2px 0 var(--highlighter-dark); }
.fc-hard { background: var(--rate-hard); }
.fc-ok { background: var(--rate-ok); }
.fc-good { background: var(--rate-good); }
.fc-rates { display: none; gap: 0.5rem; }
.hc[data-side="back"] .fc-rates,
.fc-card[data-side="back"] .fc-rates { display: flex; }

/* -------------------------------------------------------- the story --- */

.story {
    background: var(--paper);
    padding: 6rem 0 5rem;
}

.story .section-head { margin-bottom: 2.5rem; }

.story-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.story-stage {
    position: sticky;
    top: calc(84px + env(safe-area-inset-top, 0px));
    height: calc(100vh - 120px);
    max-height: 700px;
    display: flex;
    align-items: center;
}

.device {
    width: 100%;
    height: min(620px, 100%);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.device-bar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 1rem;
    background: var(--paper-alt);
    border-bottom: 1px solid var(--line);
}

.device-dots { display: flex; gap: 6px; }
.device-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.device-dots i:nth-child(1) { background: #ec6a5e; }
.device-dots i:nth-child(2) { background: #f4bf4f; }
.device-dots i:nth-child(3) { background: #61c554; }

.device-url {
    flex: 1;
    min-width: 0;
    font: 500 0.75rem/1 var(--font-mono);
    color: var(--ink-soft);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-screen {
    position: relative;
    flex: 1;
    min-height: 0;
}

.dv-view {
    position: absolute;
    inset: 0;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

/* chat view */
.dv-chat {
    padding: 1.4rem 1.6rem;
    overflow: hidden;
    background: var(--paper);
}

.dv-user {
    margin-left: auto;
    width: fit-content;
    max-width: 85%;
    background: var(--paper-alt);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 0.6rem 0.95rem;
    border-radius: 14px 14px 4px 14px;
    font-size: 0.9rem;
    margin-bottom: 1.1rem;
}

.dv-think {
    display: none;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.86rem;
    color: var(--ink-soft);
}

.dv-think i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--highlighter-dark);
    animation: dv-pulse 1s ease-in-out infinite;
}

.dv-think i:nth-child(2) { animation-delay: 0.15s; }
.dv-think i:nth-child(3) { animation-delay: 0.3s; }

@keyframes dv-pulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }

.dv-chat .ohy-panel { font-size: 13.5px; line-height: 1.6; }
.dv-chat .ohy-panel .ohy-body h3 { margin-top: 0; }
.dv-chat .ohy-panel .ohy-body li { margin: 6px 0; }
.dv-chat .ohy-panel .ohy-refs { margin-top: 12px; }
.dv-chat .ohy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.dv-chat .ohy-ref { padding: 7px 10px; }
.dv-chat .ohy-cite { cursor: default; }
.dv-chat .ohy-tog { cursor: pointer; }

/* references off unless the story is on step 3 (the app keeps this on <body>) */
.device:not([data-state="refs"]) .ohy-cites { display: none; }
.device:not([data-state="refs"]) .ohy-sw { background: var(--ohy-track-off); border-color: var(--ohy-track-off); }
.device:not([data-state="refs"]) .ohy-sw .ohy-knob { transform: translateX(0); background: var(--ohy-knob-off); }
.device .ohy-refs-fold { transition: grid-template-rows 0.35s ease, opacity 0.25s ease; }
.device:not([data-state="refs"]) .ohy-refs-fold { grid-template-rows: 0fr; opacity: 0; visibility: hidden; }

/* step 1: question + thinking only */
.device[data-state="ask"] .dv-think { display: flex; }
.device[data-state="ask"] .dv-chat .ohy-panel { display: none; }

/* flashcard view */
.dv-cards {
    background: var(--fc-stage);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

.device[data-state="card"] .dv-chat { opacity: 0; transform: translateY(-16px); pointer-events: none; }
.device[data-state="card"] .dv-cards { opacity: 1; transform: none; pointer-events: auto; }

.fc-progress {
    align-self: flex-start;
    font: 600 0.72rem/1 var(--font-mono);
    color: #073e40;
    background: #fbe8a6;
    border: 1px solid var(--highlighter-dark);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
}

.fc-card {
    flex: 1;
    min-height: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fc-face {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.fc-card .fc-back,
.fc-card .fc-pearl { display: none; }
.fc-card[data-side="back"] .fc-front { display: none; }
.fc-card[data-side="back"] .fc-back { display: flex; }
.fc-card[data-side="back"] .fc-pearl { display: block; }

.fc-front p {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.12rem;
    line-height: 1.45;
    color: var(--ink);
    text-wrap: balance;
}

.fc-back p { font-size: 1.02rem; color: var(--ink); }

.fc-pearl {
    border-top: 1px solid var(--line);
    background: var(--paper-alt);
    padding: 0.85rem 1.1rem 1rem;
    text-align: center;
}

.fc-controls { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }

/* steps */
.story-steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.story-step {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
    opacity: 0.35;
    transition: opacity 0.4s ease;
}

.story-step:first-child { min-height: 52vh; }
.story-step.is-active { opacity: 1; }
.no-story-js .story-step { opacity: 1; }

.step-n {
    font: 600 0.75rem/1 var(--font-mono);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.step-n b {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--highlighter);
    color: #073e40;
    font: 700 0.8rem/1 var(--font-body);
}

.story-step h3 {
    font-size: clamp(1.45rem, 1.1rem + 1vw, 1.9rem);
    margin-bottom: 0.8rem;
    text-wrap: balance;
}

.story-step p {
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 440px;
}

.story-cta { margin-top: 1.5rem; }

/* ------------------------------------------------------------ anki --- */

.anki {
    background: radial-gradient(ellipse 70% 90% at 0% 100%, var(--band-top) 0%, var(--band) 50%, var(--band-deep) 100%);
    padding: 6rem 0;
    color: var(--band-ink);
}

.anki-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.anki .eyebrow { color: var(--highlighter); }
.anki .eyebrow::before { background: var(--highlighter); }
.anki h2 { color: var(--band-ink); font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: 1rem; text-wrap: balance; }
.anki p { color: var(--band-soft); font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.75rem; max-width: 480px; }
.anki-note { margin-top: 1rem; font: 500 0.78rem/1.5 var(--font-mono); color: var(--band-faint); }

.anki-shot {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    transform: rotate(1.5deg);
}

.anki-shot img { display: block; width: 100%; height: auto; }
.anki-shot .shot-dark { display: none; }
html.dark-mode .anki-shot .shot-light { display: none; }
html.dark-mode .anki-shot .shot-dark { display: block; }

/* --------------------------------------------------------- promise --- */

.features { background: var(--paper); }
.features .feature-icon { color: var(--primary); }

/* ---------------------------------------------------- testimonials --- */

.testimonials { background: var(--paper); border-top: 1px solid var(--line); }
.testimonial-track { align-items: flex-start; }
.testimonial-card { background: var(--white); }

.testimonial-author {
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink-soft);
}

/* ----------------------------------------------------- closing CTA --- */

.closing {
    background: radial-gradient(ellipse 80% 100% at 50% 0%, var(--band-top) 0%, var(--band) 50%, var(--band-deep) 100%);
    padding: 6rem 0;
    text-align: center;
    color: var(--band-ink);
}

.closing .eyebrow { color: var(--highlighter); justify-content: center; }
.closing .eyebrow::before { background: var(--highlighter); }
.closing h2 { color: var(--band-ink); font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); margin-bottom: 1rem; text-wrap: balance; }
.closing h2 .hl { color: #073e40; }
.closing p { color: var(--band-soft); font-size: 1.08rem; max-width: 560px; margin: 0 auto 2rem; }

.closing-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.75rem;
    margin: 2.25rem auto 0;
    padding: 0;
    max-width: 760px;
}

.closing-list li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    color: var(--band-soft);
}

.closing-list svg { color: var(--highlighter); flex-shrink: 0; }

/* ---------------------------------------------------------- footer --- */

.footer.footer-full {
    text-align: left;
    background: var(--band-deep);
    border-top: 1px solid var(--band-line);
    padding: 3.5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-brand .logo { color: #ffffff; }
.footer-brand .logo span { color: #073e40; }
.footer-brand p { color: var(--band-faint); font-size: 0.9rem; margin-top: 0.9rem; max-width: 320px; }

.footer-col h4 {
    font: 600 0.72rem/1 var(--font-mono);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--highlighter);
    margin-bottom: 1rem;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer-col a { color: var(--band-soft); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: #ffffff; }
.footer-full .copyright { border-top: 1px solid var(--band-line); padding-top: 1.5rem; }

/* ------------------------------------------------------- responsive --- */

@media (max-width: 960px) {
    .hero-grid,
    .anki-grid { grid-template-columns: 1fr; }
    .hero-visual { justify-self: center; max-width: 440px; }
    .story-grid { grid-template-columns: 1fr; gap: 0; }

    /* On phones the window stays visible at the top while the steps scroll below it */
    .story-stage {
        top: calc(70px + env(safe-area-inset-top, 0px));
        height: auto;
        max-height: none;
        z-index: 2;
        padding-bottom: 0.75rem;
        background: linear-gradient(var(--paper) 88%, transparent);
    }
    .device { height: 46vh; min-height: 330px; }
    .story-step { min-height: 46vh; padding: 1.5rem 0; }
    .story-step:first-child { min-height: 30vh; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .hero.hero-split { padding: 6.5rem 0 5.5rem; min-height: 0; }
    .hero-split .hero-cta { flex-direction: row; justify-content: flex-start; }
    .hero-split .btn-large { width: auto; padding: 0.95rem 1.6rem; }
    .hero-proof { margin-top: 2rem; }
    .hc { min-height: 340px; transform: rotate(-1deg); }
    .hc-q { font-size: 1.1rem; }
    .story { padding: 4rem 0 3rem; }
    .dv-chat { padding: 1rem; }
    .dv-chat .ohy-panel { font-size: 12.5px; }
    .dv-chat .ohy-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .anki, .closing { padding: 4.5rem 0; }
    .anki-shot { transform: none; }
}

@media (max-width: 480px) {
    .hero-split .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-split .btn-large { width: 100%; max-width: none; text-align: center; }
    .hero-proof { flex-direction: column; gap: 1.1rem; }
    .fc-btn { padding: 0.55rem 0.75rem; font-size: 0.75rem; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------- motion --- */

.ohy-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--highlighter);
    transform-origin: 0 50%;
    transform: scaleX(0);
    z-index: 1001;
    pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
    /* hero entrance */
    .motion-ready .hero-content > * { animation: ohy-rise 0.7s cubic-bezier(.2, .7, .2, 1) both; }
    .motion-ready .hero-content > :nth-child(1) { animation-delay: .05s; }
    .motion-ready .hero-content > :nth-child(2) { animation-delay: .15s; }
    .motion-ready .hero-content > :nth-child(3) { animation-delay: .35s; }
    .motion-ready .hero-content > :nth-child(4) { animation-delay: .5s; }
    .motion-ready .hero-content > :nth-child(5) { animation-delay: .6s; }
    .motion-ready .hero-content > :nth-child(6) { animation-delay: .7s; }
    .motion-ready .hero-visual { animation: ohy-card-in 0.9s cubic-bezier(.2, .7, .2, 1) .35s both; }

    /* highlighter swipe: hero word on load, one word per heading on scroll */
    .motion-ready .hl {
        background-repeat: no-repeat;
        background-size: 0% 100%;
        transition: background-size 0.75s cubic-bezier(.65, 0, .25, 1);
    }
    .motion-ready .hero .hl { animation: ohy-swipe .8s cubic-bezier(.65, 0, .25, 1) .8s forwards; }
    .motion-ready .hl.is-in { background-size: 100% 100%; }

    /* scroll reveals */
    .motion-ready [data-reveal] {
        opacity: 0;
        transform: translateY(26px);
        transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
        transition-delay: calc(var(--i, 0) * 90ms);
    }
    .motion-ready [data-reveal="scale"] { transform: scale(.95); }
    .motion-ready [data-reveal="right"] { transform: translateX(36px) rotate(1.5deg); }
    .motion-ready [data-reveal].is-in { opacity: 1; transform: none; }
    .motion-ready .anki-shot[data-reveal].is-in { transform: rotate(1.5deg); }

    /* story: the answer streams in, then its key facts get highlighted */
    .device .ohy-body > *,
    .device .ohy-body li {
        transition: opacity .45s ease, transform .45s ease;
        transition-delay: calc(var(--i, 0) * 140ms);
    }
    .device[data-state="ask"] .ohy-body li { opacity: 0; transform: translateY(6px); }
    .device .ohy-body strong {
        background: linear-gradient(transparent 58%, var(--ohy-hl-soft) 58%) no-repeat;
        background-size: 0% 100%;
        transition: background-size .6s cubic-bezier(.65, 0, .25, 1) .9s;
    }
    .device:is([data-state="answer"], [data-state="refs"], [data-state="card"]) .ohy-body strong { background-size: 100% 100%; }
    .story-stage.is-in .device { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ohy-progress { display: none; }
    .dv-think i { animation: none; opacity: 1; }
    .dv-view { transition: none; }
}

@keyframes ohy-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes ohy-card-in { from { opacity: 0; transform: translateY(40px) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes ohy-swipe { to { background-size: 100% 100%; } }

.hc { transition: opacity 0.22s ease, transform 0.22s ease; }
.hc.is-leaving { opacity: 0; transform: rotate(-2deg) translateX(-24px); }

section[id] { scroll-margin-top: 80px; }

/* styles.css sets overflow-x: hidden on html and body, which stops position: sticky from working.
   clip keeps the same "no sideways scroll" without creating a scroll container. */
html, body { overflow-x: clip; }

.hc[data-side="back"] .hc-pearl { display: block; }
.section-head h2 { text-wrap: balance; }
.story-step:last-child { min-height: 60vh; }
.dv-cards:has(.fc-card[data-side="back"]) .fc-rates { display: flex; }
.story-step:last-child { min-height: 75vh; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------- stats report --- */
.report-band { background: var(--paper-alt); border-top: 1px solid var(--line); padding: 4.5rem 0; }
.report-grid { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 3rem; align-items: center; max-width: 920px; margin: 0 auto; }
.report-cover { display: block; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 16px 36px -18px rgba(7, 62, 64, 0.45); transform: rotate(-2deg); transition: transform 0.2s ease; }
.report-cover:hover { transform: rotate(0deg) translateY(-3px); }
.report-cover img { display: block; width: 100%; height: auto; }
.report-copy h2 { font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.2rem); margin-bottom: 0.9rem; text-wrap: balance; }
.report-copy p { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.5rem; max-width: 560px; }
.report-note { margin-top: 0.9rem; font: 500 0.78rem/1.5 var(--font-mono); color: var(--ink-soft); }
@media (max-width: 720px) {
    .report-band { padding: 3.25rem 0; }
    .report-grid { grid-template-columns: 1fr; gap: 2rem; }
    .report-cover { max-width: 200px; }
}

/* promise cards: four of them, so lay out 2 x 2 instead of 3 + 1 */
.features .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 980px; margin-left: auto; margin-right: auto; }
@media (max-width: 720px) { .features .features-grid { grid-template-columns: 1fr; } }
