/* =====================================================================
   Hay Fever SOS — Funnel Design System (Coastal Clinical Wellness)
   Theme: Coastal Oceanic Teal (#1b4d5a)
   Typeface: Manrope (sans-serif)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
    --oceanic-50:   #f2fbff;
    --oceanic-100:  #e4f7ff;
    --oceanic-200:  #c7dee7;
    --oceanic-300:  #8fb8c6;
    --oceanic-500:  #3b8a7a;
    --oceanic-700:  #1b4d5a;
    --oceanic-800:  #143b45;
    --oceanic-900:  #0d262d;

    --surface:               #f2fbff;
    --surface-dim:           #c7dee7;
    --surface-container:     #ffffff;
    --surface-container-low: #e4f7ff;

    --alert-emergency: #d32f2f;
    --alert-warning:   #e65100;

    /* Theme Aliases */
    --dust:      var(--surface);
    --dust-dark: var(--surface-container-low);
    --mist:      var(--surface-dim);
    --sage:      var(--oceanic-700);
    --sage-dark: var(--oceanic-800);
    --sage-tint: var(--oceanic-100);
    --amber:     var(--alert-warning);
    --amber-tint:#fff4e5;
    --ink:       var(--oceanic-900);
    --ink-soft:  var(--oceanic-800);
    --ink-muted: #5c737a;
    --white:     #ffffff;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--dust);
    color: var(--ink);
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Progress bar (quiz) ────────────────────────────────── */
.progress-container {
    width: 100%;
    height: 3px;
    background-color: var(--mist);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
}

.progress-bar {
    height: 100%;
    background-color: var(--sage);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Page wrapper ───────────────────────────────────────── */
.funnel-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5rem 1.5rem 3rem;
}

/* ── Card ───────────────────────────────────────────────── */
.quiz-card {
    background: var(--white);
    border: 1px solid var(--mist);
    border-radius: 1rem;
    padding: 2.75rem 2.5rem;
    width: 100%;
    max-width: 580px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    box-shadow: 0 4px 20px rgba(27, 77, 90, 0.05);
}

.quiz-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Quiz Hero Banner ───────────────────────────────────── */
.quiz-hero-banner {
    margin: -2.75rem -2.5rem 1.75rem -2.5rem;
    position: relative;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    overflow: hidden;
    background-color: var(--dust);
}

.quiz-hero-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.quiz-hero-caption {
    padding: 0.85rem 1.25rem;
    background: var(--sage-tint);
    border-bottom: 1px solid var(--mist);
    font-size: 0.825rem;
    color: var(--ink-soft);
    line-height: 1.45;
}

.quiz-hero-caption strong {
    display: block;
    color: var(--ink);
    font-size: 0.875rem;
    margin-bottom: 0.15rem;
}

@media (max-width: 600px) {
    .quiz-hero-banner {
        margin: -1.75rem -1.25rem 1.25rem -1.25rem;
    }
    .quiz-hero-img {
        height: 160px;
    }
}

/* Main quiz container */
.quiz-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 3rem 1.5rem 3rem;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ── Typography ─────────────────────────────────────────── */
.display-headline {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1rem;
}

.question-title {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.question-subtitle {
    font-size: 1rem;
    color: var(--ink-muted);
    margin-bottom: 2rem;
    line-height: 1.55;
    max-width: 48ch;
}

.lead-text {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink-soft);
    margin-bottom: 2rem;
    max-width: 52ch;
}

/* ── Quiz options ───────────────────────────────────────── */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.option-btn {
    background-color: var(--dust);
    border: 1.5px solid var(--mist);
    border-radius: 4px;
    padding: 0.9375rem 1.125rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.option-btn:hover {
    background-color: var(--sage-tint);
    border-color: var(--sage);
}

.option-btn:active {
    background-color: var(--sage-tint);
}

.option-btn.selected {
    background-color: var(--sage-tint);
    border-color: var(--sage);
    font-weight: 500;
}

.option-emoji {
    font-size: 1.125rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

/* ── Navigation ─────────────────────────────────────────── */
.nav-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    background: none;
    border: none;
    color: var(--ink-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.back-btn:hover {
    color: var(--ink);
}

.next-btn {
    background-color: var(--sage);
    color: var(--white);
    border: none;
    border-radius: 3px;
    padding: 0.75rem 1.75rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
    letter-spacing: 0.01em;
}

.next-btn:hover {
    background-color: var(--sage-dark);
}

.next-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Primary CTA (full-width version) */
.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--sage);
    color: var(--white);
    border: none;
    border-radius: 3px;
    padding: 1rem 2rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
    letter-spacing: 0.01em;
    gap: 0.5rem;
}

.cta-button:hover {
    background-color: var(--sage-dark);
}

/* ── Risk / severity accent ─────────────────────────────── */
.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--amber-tint);
    color: var(--amber);
    border: 1px solid rgba(200, 130, 10, 0.25);
    border-radius: 2px;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.3rem 0.625rem;
    letter-spacing: 0.02em;
}

/* ── Privacy consent ────────────────────────────────────── */
.privacy-consent {
    margin-top: 1.5rem;
    padding: 1rem 1.125rem;
    background: var(--dust);
    border-left: 2px solid var(--sage);
    font-size: 0.875rem;
    color: var(--ink-soft);
    line-height: 1.55;
}

.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.privacy-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 1rem;
    height: 1rem;
    accent-color: var(--sage);
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Trust signals ──────────────────────────────────────── */
.trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--ink-muted);
}

.star-row {
    color: var(--amber);
    letter-spacing: 2px;
    font-size: 0.9375rem;
}

/* ── Divider ────────────────────────────────────────────── */
.divider {
    border: none;
    border-top: 1px solid var(--mist);
    margin: 1.5rem 0;
}

/* ── Form elements ──────────────────────────────────────── */
.form-group {
    margin-bottom: 1.125rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.form-control {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 1.5px solid var(--mist);
    border-radius: 3px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: var(--ink);
    background: var(--white);
    transition: border-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--sage);
}

.form-control::placeholder {
    color: var(--ink-muted);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .quiz-card {
        padding: 2rem 1.5rem;
        border-radius: 4px;
    }
    
    .funnel-page,
    .quiz-container {
        padding: 4rem 1rem 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .quiz-card {
        transition: none;
    }
    .progress-bar {
        transition: none;
    }
}

/* ── Email capture inputs (consent step) ────────────────── */
.email-capture-fields {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.quiz-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--mist);
    border-radius: 6px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.quiz-input:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(27, 77, 90, 0.10);
}

.quiz-input::placeholder {
    color: var(--ink-muted);
}

/* ── Option button label ─────────────────────────────────── */
.option-label {
    font-size: 0.9375rem;
    font-weight: 500;
    flex: 1;
}

/* ── Compliance billing notice ──────────────────────────── */
.compliance-billing-notice {
    background: #f0f8ff;
    border: 1px solid #c7dee7;
    border-left: 4px solid var(--sage);
    border-radius: 6px;
    padding: 0.875rem 1.125rem;
    font-size: 0.825rem;
    color: #2d4a52;
    line-height: 1.55;
    margin: 1.25rem 0;
}

.compliance-billing-notice strong {
    display: block;
    font-size: 0.875rem;
    color: var(--ink);
    margin-bottom: 0.2rem;
}

/* ── Plan toggle (monthly / annual) ────────────────────── */
.plan-toggle {
    display: flex;
    background: var(--dust);
    border: 1.5px solid var(--mist);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 1.5rem;
}

.toggle-option {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-family: 'Manrope', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.toggle-option.active {
    background: var(--white);
    color: var(--ink);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.toggle-savings-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.3rem;
    letter-spacing: 0.02em;
}

/* ── Price display block ────────────────────────────────── */
.price-display-block {
    text-align: center;
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: var(--sage-tint);
    border: 1px solid var(--mist);
    border-radius: 8px;
}

.price-display-block .price-main {
    font-family: 'Manrope', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
}

.price-display-block .price-period {
    font-size: 0.875rem;
    color: var(--ink-muted);
    margin-top: 0.25rem;
}

.price-display-block .price-savings {
    font-size: 0.825rem;
    font-weight: 700;
    color: #2e7d32;
    margin-top: 0.35rem;
}
