/* call.html — speed-to-lead opt-in funnel.
 *
 * Tokens come from base/variables.css. Do NOT invent names here: an undefined
 * token makes the whole declaration invalid at computed-value time and it
 * silently falls back to transparent in BOTH themes (see quality-checks.md §5
 * and the --surface / --border footgun in gotchas-frontend.md).
 * Real names: --bg-card, --bg-elevated, --border-subtle, --text-primary,
 * --text-secondary, --accent (#2563eb, 5.17:1 on white), --text-on-accent.
 */

.cf {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    color: var(--text-primary);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.cf-hero { text-align: center; margin-bottom: 1.75rem; }

.cf-eyebrow {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    margin: 0 0 0.5rem;
}

.cf-title {
    font-size: clamp(1.6rem, 6vw, 2.3rem);
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 0.65rem;
}

.cf-accent { color: var(--accent-success); }

/* De-emphasis via a token, never opacity: opacity composites the foreground
   against the surface before WCAG measures it, so a "dimmed" line can fail
   1.4.3 even when it looks legible. */
.cf-sub {
    color: var(--text-secondary);
    font-size: 1.02rem;
    margin: 0;
}

/* ── Progress ────────────────────────────────────────────────────────────── */

.cf-progress {
    height: 4px;
    border-radius: 999px;
    background: var(--border-subtle);
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.cf-progress__bar {
    display: block;
    height: 100%;
    width: 25%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    .cf-progress__bar { transition: none; }
}

/* ── Steps ───────────────────────────────────────────────────────────────── */

/* [hidden] must win over any later display rule. Same (0,1,0) specificity tie
   as the UA sheet, and source order would otherwise let .cf-step's own display
   render every step at once (gotchas-frontend.md, the standalone-stylesheet
   [hidden] guard). */
.cf-step[hidden] { display: none !important; }

.cf-q {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1.1rem;
    text-align: center;
}

/* A programmatic .focus() on the heading must not paint a stray ring — the
   heading is a scroll target, not an interactive control. */
.cf-q:focus { outline: none; }
.cf-q:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.cf-choices {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.cf-choice {
    width: 100%;
    min-height: 56px;            /* >= 44px touch target (WCAG 2.5.8) */
    padding: 1rem 1.15rem;
    text-align: left;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

@media (prefers-reduced-motion: reduce) {
    .cf-choice { transition: none; }
}

@media (hover: hover) {
    .cf-choice:hover { border-color: var(--accent); }
}

/* Selection is conveyed by border + inset ring. The focus ring is suppressed on
   POINTER focus and kept for keyboard, because reset.css draws a global
   `button:focus` outline that is otherwise indistinguishable from .is-selected
   — a deselected option would keep looking selected. (gotchas-frontend.md) */
.cf-choice:focus { outline: none; }
.cf-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.cf-choice.is-selected {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1.5px var(--accent);
    background: var(--bg-elevated);
}

/* ── Contact fields ──────────────────────────────────────────────────────── */

.cf-field { margin-bottom: 1rem; }

.cf-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.cf-field input {
    width: 100%;
    min-height: 52px;
    padding: 0.85rem 1rem;
    font-size: 16px;             /* < 16px makes iOS Safari zoom on focus */
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
}

.cf-field input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
}

/* ── Consent ─────────────────────────────────────────────────────────────── */

.cf-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 1.1rem 0 1.35rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text-secondary);
    cursor: pointer;
}

.cf-consent input {
    width: 22px;
    height: 22px;
    margin-top: 1px;
    flex: 0 0 auto;              /* main-axis basis — this row is a flex row */
    accent-color: var(--accent);
}

/* ── Honeypot ────────────────────────────────────────────────────────────── */

/* Off-screen rather than display:none — some bots skip hidden fields but fill
   positioned ones. */
.cf-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Submit + status ─────────────────────────────────────────────────────── */

.cf-submit {
    width: 100%;
    min-height: 56px;
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--text-on-accent);
    background: var(--accent);
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.cf-submit:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }
.cf-submit:disabled { cursor: default; }

.cf-status {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.cf-status.is-error { color: var(--accent-danger); font-weight: 600; }

.cf-reassure {
    margin: 0.8rem 0 0;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* ── Success ─────────────────────────────────────────────────────────────── */

.cf-done { text-align: center; }
.cf-done[hidden] { display: none !important; }

.cf-done__check {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: var(--text-on-accent);
    background: var(--accent-success);
    border-radius: 50%;
}

.cf-done__heading {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.cf-done__heading:focus { outline: none; }
.cf-done__heading:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.cf-done__sub {
    color: var(--text-secondary);
    margin: 0 0 1.4rem;
}

/* The VSL is PORTRAIT (vsl.css pins it at aspect-ratio 9/16). A 16:9 box here
   pillarboxed it into a letterbox with dead space either side.
   `aspect-ratio` is safe on this element specifically: the Safari 18.x collapse
   bug only hits FLEX ITEMS, and .cf-done is a plain block. A padding-ratio
   would be wrong here anyway — padding percentages resolve against the PARENT's
   width, so they cannot be combined with the max-width that stops a portrait
   video from dominating a desktop screen. */
.cf-video {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    aspect-ratio: 9 / 16;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-elevated);
}

/* The box's content height is 0, so children must be absolutely positioned. */
.cf-video__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cf-done__alt {
    margin: 1.3rem 0 0;
    font-size: 0.94rem;
    color: var(--text-secondary);
}

.cf-done__alt a { color: var(--accent); font-weight: 600; }
