/* ==========================================================================
   Actuate — CRO Audit
   Design system taken from Figma: "Actuate Creative 2026"
   · Step 1  Enter URL      4081:16853 / 4081:16864
   · Step 2  Analysing      4081:26860 / 4081:26893
   · Step 3  Results        4081:27130 / 4081:27186  (gated)
                            4111:17092 / 4111:17201  (unlocked)
   Mobile-first (390w); the desktop values (1920w) kick in at 1200px.
   ========================================================================== */

:root {
    /* --- Colour ------------------------------------------------------- */
    --accent: #D90B28;                    /* overridden per-page by BRAND_ACCENT */
    --red: var(--accent, #D90B28);        /* Brand - Red / CTA - Primary */
    --red-deep: #b00920;                  /* hover only */
    --green: #008674;                     /* feature cards / positives */
    --green-deep: #00705f;
    --black: #000000;                     /* Body - Dark */
    --white: #FFFFFF;                     /* Body - Light */
    --ink-soft: #444444;
    --muted: #999999;                     /* Grey #999999 */
    --line: #DDDDDD;                      /* Grey #DDDDDD */
    --page: #EFEFEF;                      /* Background Grey #EFEFEF */
    --amber: #F18F01;                     /* Messaging - Warning */
    --success: #428959;                   /* Messaging - Success */

    /* --- Type --------------------------------------------------------- */
    --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --h1-size: 30px;   --h1-line: 34px;   /* 3XL Bold  → 7XL on desktop */
    --h2-size: 22px;   --h2-line: 28px;
    --h3-size: 20px;   --h3-line: 24px;   /* XL Semi   → 2XL on desktop */
    --lead-size: 22px; --lead-line: 32px; /* Large Body (Light) */
    --body-size: 16px; --body-line: 22px; /* Body Copy Regular */
    --sm-size: 14px;   --sm-line: 16px;   /* SM Regular */

    /* --- Metrics ------------------------------------------------------ */
    --shell: 22.5px;                      /* page gutter */
    --shell-max: 1480px;                  /* content column */
    --radius: 10px;
    --pill: 100px;
    --field-h: 80px;
    --gap-card: 20px;
    --nav-y: 20px;
    --hero-top: 50px;                     /* nav → hero */
    --hero-gap: 30px;                     /* between hero elements */
    --band-gap: 40px;                     /* hero → feature cards */
    --page-bottom: 60px;                  /* last band → footer */
}

@media (min-width: 768px) {
    :root {
        --shell: 40px;
        --h1-size: 48px;  --h1-line: 54px;
        --h2-size: 28px;  --h2-line: 34px;
        --h3-size: 24px;  --h3-line: 32px;
        --nav-y: 25px;
        --hero-top: 70px;
        --hero-gap: 40px;
        --band-gap: 70px;
        --page-bottom: 80px;
    }
}

@media (min-width: 1200px) {
    :root {
        --h1-size: 72px;  --h1-line: 76px;
        --h2-size: 34px;  --h2-line: 40px;
        --hero-top: 84px;
        --hero-gap: 50px;
        --band-gap: 100px;
        --page-bottom: 100px;
    }
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--page);
    color: var(--black);
    font-family: var(--font);
    font-weight: 400;
    font-size: var(--body-size);
    line-height: var(--body-line);
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { max-width: 100%; }

:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
    border-radius: 4px;
}

.shell {
    width: 100%;
    max-width: calc(var(--shell-max) + (var(--shell) * 2));
    margin-inline: auto;
    padding-inline: var(--shell);
}

.site-main {
    flex: 1 0 auto;
    padding-top: var(--hero-top);
    padding-bottom: var(--page-bottom);
}

.accent { color: var(--red); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* Line break that only exists on the wide layout. */
.br-lg { display: none; }
@media (min-width: 1200px) { .br-lg { display: inline; } }

/* ==========================================================================
   Header / footer
   ========================================================================== */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-block: var(--nav-y);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    text-decoration: none;
    color: var(--black);
}
.brand__logo { display: block; width: 120px; height: auto; color: var(--black); }
.brand__tag {
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .brand__logo { width: 185px; }
    .brand__tag { font-size: 18px; line-height: 26px; }
}

.site-footer {
    background: var(--white);
    border-top: 1px solid var(--line);
    flex: 0 0 auto;
    text-align: center;
    font-size: var(--sm-size);
    line-height: var(--sm-line);
}
.site-footer__inner { padding-block: 25px; }
.site-footer a { color: var(--red); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px 20px;
    border-radius: var(--pill);
    background: var(--red);
    color: var(--white);
    font-family: var(--font);
    font-size: 14px;
    line-height: 16px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--red-deep); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }

.btn__icon { flex: 0 0 auto; width: 20px; height: 20px; display: block; }

.btn--nav { padding: 17px 20px; }
@media (min-width: 768px) { .btn--nav { min-width: 160px; padding: 17px 24px; } }

.btn--ghost {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--line);
}
.btn--ghost:hover { background: #f6f6f6; }

/* Pill eyebrow above the headline. */
.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: var(--pill);
    background: var(--white);
    box-shadow: 0 0 20px rgba(0, 0, 0, .1);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0;
}
@media (min-width: 768px) { .eyebrow { font-size: 14px; } }

/* ==========================================================================
   Hero (step 1 — enter URL)
   ========================================================================== */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hero-gap);
    text-align: center;
}

.hero__title {
    font-size: var(--h1-size);
    line-height: var(--h1-line);
    font-weight: 700;
    color: var(--black);
}
.hero__title span { display: block; }
.hero__title .accent { color: var(--red); }

.hero__lead {
    font-size: var(--lead-size);
    line-height: var(--lead-line);
    font-weight: 300;
    color: var(--black);
    max-width: 760px;
}

.hero__meta {
    font-size: var(--sm-size);
    line-height: 20px;
    font-weight: 600;
    color: var(--black);
}
.hero__meta .sep { color: var(--red); margin-inline: 8px; }
@media (min-width: 768px) { .hero__meta { font-size: 16px; } }

/* --- URL field ---------------------------------------------------------- */

.audit-form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 670px;
    min-height: var(--field-h);
    padding: 15px 15px 15px 30px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 50px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.audit-form:focus-within {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(217, 11, 40, .12);
}
.audit-form input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: none;
    font-family: var(--font);
    font-size: var(--sm-size);
    line-height: var(--sm-line);
    color: var(--black);
}
.audit-form input::placeholder { color: var(--muted); }
.audit-form input:focus { outline: none; }

@media (min-width: 768px) { .audit-form { padding: 15px 20px 15px 40px; } }

.audit-form__long { display: none; }
@media (min-width: 400px) { .audit-form__long { display: inline; } }

/* ==========================================================================
   Feature cards
   ========================================================================== */

.band { margin-top: var(--band-gap); }

.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-card);
}
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px 20px;
    border-radius: var(--radius);
    background: var(--green);
    color: var(--white);
}
.card__title {
    font-size: var(--h3-size);
    line-height: var(--h3-line);
    font-weight: 600;
}
.card p { font-size: var(--body-size); line-height: var(--body-line); }

@media (min-width: 768px) { .card { padding: 40px; } }

/* ==========================================================================
   Panels (shared surface for the analyse + report screens)
   ========================================================================== */

.panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 0 20px rgba(0, 0, 0, .1);
    padding: 30px 20px;
}
@media (min-width: 768px) { .panel { padding: 40px 50px; } }

.section-title {
    font-size: var(--h2-size);
    line-height: var(--h2-line);
    font-weight: 700;
    color: var(--black);
}

.lead {
    font-size: var(--body-size);
    line-height: var(--body-line);
    color: var(--ink-soft);
}

.form-error {
    color: var(--red);
    font-size: var(--sm-size);
    line-height: 20px;
    font-weight: 600;
}
/* Keeps the layout rhythm intact until there is actually something to say. */
.form-error:empty { display: none; }

/* ==========================================================================
   Step 2 — analysing
   ========================================================================== */

.analyse { display: flex; flex-direction: column; gap: 15px; }

/* Every block on this screen is a floating white card. */
.analyse-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 0 20px rgba(0, 0, 0, .1);
}

.analyse-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 50px 20px;
    text-align: center;
}

.ring { display: block; width: 140px; height: 140px; flex: 0 0 auto; }
.ring__track { stroke: #D9D9D9; }
.ring__value {
    stroke: var(--red);
    transition: stroke-dashoffset .6s ease-out;
}

.analyse-hero__body {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}
.analyse-hero__title {
    font-size: var(--h1-size);
    line-height: var(--h1-line);
    font-weight: 700;
}
.analyse-hero__title span { display: block; }
.analyse-hero__url {
    font-size: 20px;
    line-height: 32px;
    font-weight: 500;
    word-break: break-all;
}
.analyse-hero__meta { font-size: 16px; line-height: 20px; font-weight: 600; }
.analyse-hero__meta .pct { color: var(--red); }

@media (min-width: 1200px) {
    .analyse-hero__title { font-size: 48px; line-height: 52px; }
    .analyse-hero__url { font-size: 22px; }
}

/* --- Task rows ---------------------------------------------------------- */

.task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
}
.task__main { display: flex; align-items: center; gap: 15px; min-width: 0; }
.task__icon { flex: 0 0 auto; width: 24px; height: 24px; color: var(--red); }
.task__icon svg { display: block; width: 24px; height: 24px; }
.task__label { font-size: 12px; line-height: 14px; font-weight: 600; }
.task__status { flex: 0 0 auto; font-size: 12px; line-height: 14px; font-weight: 600; color: var(--red); }

.task .icon-check { display: none; }
.task.is-done .icon-check { display: block; }
.task.is-done .icon-ellipsis { display: none; }
.task.is-done .task__icon { color: var(--green); }
.task.is-done .task__status { color: var(--green); }

/* The step currently being worked breathes, so the wait reads as progress. */
.task.is-active .task__icon { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

@media (min-width: 1200px) {
    .task { padding: 30px 50px; }
    .task__main { gap: 20px; }
    .task__label, .task__status { font-size: 18px; line-height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .task.is-active .task__icon { animation: none; }
    .ring__value { transition: none; }
}

/* ==========================================================================
   Step 3 — results
   ========================================================================== */

.report {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* The results screen starts closer to the nav than the other steps do. */
.site-main--tight { padding-top: 20px; }
@media (min-width: 768px) { .site-main--tight { padding-top: var(--hero-top); } }

/* --- Scorecard ---------------------------------------------------------- */

.scorecard {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 0 20px rgba(0, 0, 0, .1);
}
@media (min-width: 1200px) {
    .scorecard {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 100px;
        padding: 50px 100px;
    }
}

.ring-score { position: relative; flex: 0 0 auto; width: 210px; height: 210px; }
.ring-score__svg { display: block; width: 100%; height: 100%; }
.ring-score__track { stroke: var(--line); }
.ring-score__value { stroke: var(--green); transition: stroke-dashoffset .8s ease-out; }
.ring-score--warn .ring-score__value,
.ring-score--warn .ring-score__band { color: var(--amber); stroke: var(--amber); }
.ring-score--bad .ring-score__value,
.ring-score--bad .ring-score__band { color: var(--red); stroke: var(--red); }

.ring-score__label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
/* Tight leading so the score and "out of 100" read as one block — the number
   is digits only, so there is no descender to clip. */
.ring-score__num { font-size: 48px; line-height: .85; font-weight: 700; }
.ring-score__of { font-size: 18px; line-height: 1.05; font-weight: 500; }
/* The 10px sits between the number block and the band, not between the
   number and "out of 100" — those two are a single stacked unit. */
.ring-score__band { font-size: 24px; line-height: 32px; font-weight: 700; color: var(--green); margin-top: 10px; }

@media (min-width: 1200px) {
    .ring-score { width: 300px; height: 300px; }
    /* Font sizes only — the unitless leading above carries over. */
    .ring-score__num { font-size: 96px; }
    .ring-score__of { font-size: 22px; }
    .ring-score__band { font-size: 30px; }
}

.scorecard__body { display: flex; flex-direction: column; gap: 30px; flex: 1 1 auto; min-width: 0; }
@media (min-width: 1200px) { .scorecard__body { gap: 50px; } }

.scorecard__head { display: flex; flex-direction: column; gap: 5px; }
@media (min-width: 1200px) { .scorecard__head { gap: 10px; } }

.scorecard__title { font-size: 30px; line-height: 34px; font-weight: 700; }
.scorecard__url {
    font-size: 16px;
    line-height: 32px;
    font-weight: 500;
    color: var(--red);
    text-decoration: none;
    word-break: break-all;
}
.scorecard__url:hover { text-decoration: underline; }
.scorecard__date { font-size: 16px; line-height: 20px; font-weight: 600; text-transform: uppercase; }

@media (min-width: 1200px) {
    .scorecard__title { font-size: 48px; line-height: 52px; }
    .scorecard__url { font-size: 22px; }
}

/* --- Speed bars --------------------------------------------------------- */

.bars { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1200px) { .bars { gap: 30px; } }

.bar { display: flex; flex-direction: column; gap: 15px; }
.bar__head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
}
.bar__track { height: 10px; border-radius: var(--pill); background: #D9D9D9; overflow: hidden; }
.bar__fill {
    display: block;
    height: 100%;
    border-radius: var(--pill);
    background: var(--success);
    transition: width .8s ease-out;
}
.bar__fill--warn { background: var(--amber); }
.bar__fill--bad { background: var(--red); }

/* --- Prose sections ----------------------------------------------------- */

.prose { display: flex; flex-direction: column; gap: 20px; }
.prose h2, .prose-h { font-size: 24px; line-height: 32px; font-weight: 700; }
.prose p { font-size: 18px; line-height: 30px; }
.prose__label { font-size: 18px; line-height: 26px; font-weight: 600; }

.wins { display: flex; flex-direction: column; gap: 20px; }
.wins li {
    position: relative;
    padding-left: 30px;
    font-size: 18px;
    line-height: 30px;
}
.wins li svg {
    position: absolute;
    left: 0;
    top: 5px;
    width: 20px;
    height: 20px;
    color: var(--green);
}

/* --- Impact tallies ----------------------------------------------------- */

.stats { display: flex; flex-direction: column; gap: 10px; }
.stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 20px;
    background: var(--black);
    border-radius: var(--radius);
    color: var(--white);
}
.stat__num { font-size: 48px; line-height: 52px; font-weight: 700; color: var(--red); }
.stat--medium .stat__num { color: var(--amber); }
.stat--low .stat__num { color: var(--muted); }
.stat__label { font-size: 16px; line-height: 20px; font-weight: 600; }

@media (min-width: 900px) {
    .stats { flex-direction: row; gap: var(--gap-card); }
    .stat {
        flex: 1 1 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 20px;
        padding: 40px;
    }
}

/* --- Issue cards -------------------------------------------------------- */

.issues { display: flex; flex-direction: column; gap: 15px; }

.issue {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 0 20px rgba(0, 0, 0, .1);
}

.issue__head { display: flex; align-items: center; gap: 20px; }
.issue__section { font-size: 18px; line-height: 26px; font-weight: 600; }

.impact {
    flex: 0 0 auto;
    padding: 10px 20px;
    border-radius: var(--pill);
    background: var(--red);
    color: var(--white);
    font-size: 14px;
    line-height: 16px;
    font-weight: 600;
}
.impact--medium { background: var(--amber); }
.impact--low { background: var(--muted); }

.issue__body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.issue__problem { font-size: 16px; line-height: 24px; }

.fix {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #F8F8F8;
    border-radius: var(--radius);
}
.fix__label { font-size: 18px; line-height: 26px; font-weight: 600; color: var(--green); }
.fix p { font-size: 16px; line-height: 24px; }

/* Teaser rows: legible as shapes, unreadable as text. */
.issue--locked {
    filter: blur(7.5px);
    user-select: none;
    pointer-events: none;
}

@media (min-width: 1200px) {
    .issue {
        flex-direction: row;
        align-items: center;
        gap: 50px;
        padding: 30px 50px;
    }
    /* Fixed label column so a long section name wraps instead of squeezing the body. */
    .issue__head { flex: 0 0 330px; align-items: flex-start; }
    .issue__body { flex: 1 1 auto; }
    .issue__problem { font-size: 18px; line-height: 30px; }
    .fix { padding: 20px 30px; }
    .fix p { font-size: 18px; line-height: 30px; }
}

/* --- Full-width black promo (unlock gate / closing CTA) ------------------ */

.promo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 40px 20px;
    border-radius: 20px;
    background: var(--black);
    color: var(--white);
    text-align: center;
}
@media (min-width: 768px) { .promo { gap: 40px; padding: 60px 80px; } }
@media (min-width: 1200px) { .promo { padding: 60px 220px; } }

.promo__title { font-size: 30px; line-height: 34px; font-weight: 700; }
@media (min-width: 1200px) { .promo__title { font-size: 48px; line-height: 52px; } }

.promo__intro { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.promo p { font-size: 16px; line-height: 22px; }
.promo__pdf { font-size: 16px; line-height: 22px; color: var(--white); }

/* Name + email stacked, each field keeping the pill from step 1. */
.gate-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 670px;
}
.gate-form .audit-form { max-width: none; }
.promo .form-error { color: var(--white); }

/* The reveal button collapses to a circular icon on narrow screens. */
@media (max-width: 639px) {
    .btn--reveal { width: 50px; height: 50px; padding: 0; gap: 0; }
    .btn--reveal .btn__label { display: none; }
}
