/* ================================================================
   START PAGE & DEDICATED LAYOUT STYLES - LottoMuse
   Scope: .start-page, .start-page-body, .start-header, .start-footer
   Bootswatch Cosmo base + LottoMuse lottery theme variables
   WCAG 2.1 AA compliant: contrast > 4.5:1 (normal) / > 3:1 (large)
   ================================================================ */

/* ===== GLOBAL BODY & ROOT ===== */
.start-page-body {
    background-color: var(--surface-base, #12141f);
    color: var(--text-on-dark-primary, #ffffff);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.start-page {
    width: 100%;
    overflow-x: hidden;
}

/* Headings typography system */
.start-hero-title,
.start-section-title,
.start-sample-headline,
.start-brand-text,
.start-faq-question {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.01em;
}

/* ===== MINIMAL HEADER ===== */
.start-header {
    background: var(--surface-nav-left, #141f3e);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1020;
}

.start-brand {
    color: #ffffff;
    text-decoration: none;
    transition: opacity var(--transition-fast, 0.15s ease);
}

.start-brand:hover,
.start-brand:focus-visible {
    text-decoration: none;
}

.start-brand:focus-visible {
    outline: 2px solid var(--accent-gold, #f7d046);
    outline-offset: 4px;
    border-radius: var(--radius-sm, 0.5rem);
}

.start-header-ball {
    width: 48px;
    height: 48px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    cursor: pointer;
    background: radial-gradient(circle at 35% 35%,
                               #F7D046 0%,
                               #E6C200 60%,
                               #B8960A 100%);
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
               inset 0 -3px 8px rgba(0, 0, 0, 0.3),
               inset 0 3px 12px rgba(255, 255, 255, 0.4);
    animation: none;
}

.start-header-ball .ball-number {
    font-size: 20px;
    font-weight: 900;
    color: var(--primary-blue, #1A2B63);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: none;
}

.start-brand-content {
    min-width: 0;
    line-height: 1.15;
}

.start-brand-text {
    color: var(--accent-gold, #f7d046);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: block;
    transition: color var(--transition-fast, 0.15s ease);
}

.start-brand:hover .start-brand-text,
.start-brand:focus-visible .start-brand-text {
    color: #ffe490;
}

.start-brand-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.25px;
    white-space: nowrap;
    display: block;
    transition: color var(--transition-fast, 0.15s ease);
}

.start-brand:hover .start-brand-tagline,
.start-brand:focus-visible .start-brand-tagline {
    color: #ffffff;
}

.start-login-btn {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm, 0.5rem);
    transition: all var(--transition-fast, 0.15s ease);
}

.start-login-btn:hover,
.start-login-btn:focus-visible {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    color: #ffffff;
}

/* ===== HERO SECTION ===== */
.start-hero-section {
    background: var(--gradient-surface-hero, linear-gradient(180deg, #0f1422 0%, #1c1733 55%, #20283f 100%));
    padding-top: 3rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.start-page .start-hero-eyebrow,
.start-hero-eyebrow {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(0.95rem, 1.4vw, 1.125rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: var(--accent-gold, #f7d046);
    margin-top: 0;
    margin-bottom: 0.75rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    word-break: normal;
    overflow-wrap: break-word;
}

.start-page .start-hero-eyebrow:focus,
.start-hero-eyebrow:focus,
.start-hero-eyebrow:focus-visible {
    outline: 2px solid var(--accent-gold, #f7d046);
    outline-offset: 3px;
    border-radius: var(--radius-sm, 0.5rem);
}

.start-hero-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.start-hero-intro {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    color: var(--text-on-dark-secondary, rgba(255, 255, 255, 0.88));
    line-height: 1.5;
    max-width: 720px;
}

/* ===== FORM CARD ===== */
.start-form-card {
    max-width: 720px;
    width: 100%;
    background: rgba(26, 30, 46, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg, 1rem);
    padding: 1.75rem;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.start-email-label {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.start-email-input {
    min-height: 52px;
    height: 52px;
    font-size: 1rem;
    background-color: #ffffff;
    color: #12141f;
    border: 2px solid #ced4da;
    border-radius: var(--radius-sm, 0.5rem);
    padding: 0.65rem 1rem;
    transition: border-color var(--transition-fast, 0.15s ease), box-shadow var(--transition-fast, 0.15s ease);
}

.start-email-input:focus {
    background-color: #ffffff;
    color: #12141f;
    border-color: var(--cosmo-primary, #2780e3);
    box-shadow: 0 0 0 0.25rem rgba(39, 128, 227, 0.3);
    outline: none;
}

@media (max-width: 575.98px) {
    .start-header-ball {
        width: 40px;
        height: 40px;
        margin-right: 0.5rem;
    }

    .start-header-ball .ball-number {
        font-size: 17px;
    }

    .start-brand-text {
        font-size: 1.05rem;
    }

    .start-brand-tagline {
        font-size: 0.72rem;
        max-width: 205px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .start-login-btn {
        padding: 0.25rem 0.65rem;
        font-size: 0.85rem;
    }

    .start-email-input {
        font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
    }
}

.start-benefit-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    font-size: 0.9rem;
}

.start-submit-btn {
    min-height: 52px;
    height: 52px;
    background: linear-gradient(135deg, #f7d046 0%, #e6a000 100%);
    border: none;
    color: #12141f;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(247, 208, 70, 0.35);
    letter-spacing: 0.01em;
    transition: transform var(--transition-fast, 0.15s ease), box-shadow var(--transition-fast, 0.15s ease);
}

.start-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 208, 70, 0.55);
    color: #12141f;
    background: linear-gradient(135deg, #ffe169 0%, #f0a800 100%);
}

.start-submit-btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(247, 208, 70, 0.6);
}

.start-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.start-consent-text {
    font-size: 0.875rem; /* Exactly 14px */
    color: var(--text-on-dark-muted, rgba(255, 255, 255, 0.75));
    line-height: 1.45;
}

.start-legal-link,
.start-link {
    color: var(--accent-teal, #36D1DC);
    text-decoration: underline;
    transition: color var(--transition-fast, 0.15s ease);
}

.start-legal-link:hover,
.start-legal-link:focus-visible,
.start-link:hover,
.start-link:focus-visible {
    color: #5ce6f0;
    text-decoration: underline;
}

.start-secondary-link {
    color: var(--accent-gold, #f7d046);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: underline;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    transition: color var(--transition-fast, 0.15s ease);
}

.start-secondary-link:hover,
.start-secondary-link:focus-visible {
    color: #ffe685;
}

/* ===== TRUST STRIP ===== */
.start-trust-strip {
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.start-trust-text {
    font-size: 0.925rem;
    color: var(--text-on-dark-secondary, rgba(255, 255, 255, 0.88));
    letter-spacing: 0.01em;
}

/* ===== SECTION COMMON STYLES ===== */
.start-section-title {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
}

.start-section-intro {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-on-dark-secondary, rgba(255, 255, 255, 0.88));
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* ===== HOW IT WORKS ===== */
.start-how-section {
    background-color: var(--surface-base, #12141f);
}

.start-step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius, 0.75rem);
    color: #ffffff;
    transition: transform var(--transition-smooth, 0.2s ease), border-color var(--transition-smooth, 0.2s ease);
}

.start-step-card:hover {
    transform: translateY(-3px);
    border-color: rgba(91, 62, 144, 0.4);
}

.start-step-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-purple, #5B3E90);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(91, 62, 144, 0.4);
}

.start-step-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-size: 0.975rem;
}

/* ===== SAMPLE SET SECTION ===== */
.start-sample-section {
    background: var(--surface-alt, #1d1b36);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.start-sample-section .start-section-title,
.start-sample-section .start-section-intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.start-sample-card {
    background: rgba(18, 20, 31, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg, 1rem);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    max-width: 980px;
    width: 100%;
}

.start-sample-headline {
    color: #ffffff;
    font-size: clamp(1.55rem, 2.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.3;
}

/* Sample lottery balls layout alignment */
.start-sample-balls .lottery-ball {
    margin-right: 0;
    cursor: default;
}

/* White Lottery Balls */
.start-ball-white {
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ececf1 55%, #d1d4df 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35),
                inset 0 -2px 6px rgba(0, 0, 0, 0.2),
                inset 0 3px 6px rgba(255, 255, 255, 0.8) !important;
    animation: none;
}

.start-ball-white .ball-number {
    color: #12141f !important;
    text-shadow: none !important;
    font-weight: 800;
    animation: none;
}

/* Distinct Bonus Ball (Powerball) */
.start-ball-bonus {
    background: radial-gradient(circle at 35% 35%, #ff4d4d 0%, #d80000 60%, #8d0000 100%) !important;
    border: 2px solid #ffd700 !important;
    box-shadow: 0 4px 14px rgba(216, 0, 0, 0.5),
                0 0 0 2px rgba(255, 215, 0, 0.4),
                inset 0 -3px 8px rgba(0, 0, 0, 0.4),
                inset 0 3px 8px rgba(255, 255, 255, 0.5) !important;
    animation: none;
}

.start-ball-bonus .ball-number {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
    font-weight: 800;
    animation: none;
}

/* Apollo number explanation formatted as ordinary site text */
.start-sample-fact-card {
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    color: var(--text-on-dark-primary, #ffffff);
    padding: 0.75rem 0.25rem !important;
    overflow-wrap: break-word;
    word-break: normal;
}

.start-sample-fact-text {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-on-dark-secondary, rgba(255, 255, 255, 0.88));
    margin-bottom: 0.4rem;
}

.start-sample-sources {
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--text-on-dark-muted, rgba(255, 255, 255, 0.72));
}

.start-sample-source-link {
    color: var(--accent-teal, #36D1DC);
    text-decoration: underline;
    font-size: 0.875rem;
    transition: color var(--transition-fast, 0.15s ease);
}

.start-sample-source-link:hover,
.start-sample-source-link:focus-visible {
    color: #6cecf5;
}

.start-sample-caption {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-on-dark-muted, rgba(255, 255, 255, 0.72));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

/* ===== SOURCE PASSAGE SNAPSHOT PAGE ===== */
#source-passage {
    min-height: calc(100vh - 160px);
}

#source-passage .start-sample-card {
    max-width: 840px;
    width: 100%;
}

#source-passage .start-sample-headline {
    color: #ffffff;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    font-weight: 700;
}

#source-passage .start-sample-card > p:first-of-type {
    color: var(--text-on-dark-muted, rgba(255, 255, 255, 0.72));
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 2rem;
}

#source-passage figure {
    margin: 0 0 1.5rem 0;
}

#source-passage blockquote {
    margin: 0;
    padding: 0;
    border: none;
}

/* Focused plain-text excerpt (not card-like) */
#source-passage-content {
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: clamp(1rem, 1.2vw, 1.075rem);
    line-height: 1.7;
    color: var(--text-on-dark-primary, #ffffff);
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm, 0.5rem);
    overflow-wrap: break-word;
    word-break: normal;
}

/* Clear keyboard focus ring on focused paragraph */
#source-passage-content:focus,
#source-passage-content:focus-visible {
    outline: 2px solid var(--accent-gold, #f7d046);
    outline-offset: 4px;
}

/* Visible sentence highlight */
#source-passage-content mark {
    background-color: rgba(247, 208, 70, 0.18);
    color: var(--text-on-dark-primary, #ffffff);
    padding: 0.15em 0.35em;
    border-radius: var(--radius-sm, 0.25rem);
}

/* Visible numeric highlight within sentence */
#source-passage-content mark strong {
    color: var(--accent-gold, #f7d046);
    font-weight: 800;
    background-color: rgba(247, 208, 70, 0.15);
    padding: 0.05em 0.25em;
    border-radius: 2px;
}

#source-passage figcaption {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-on-dark-muted, rgba(255, 255, 255, 0.72));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

#source-passage figcaption a {
    color: var(--accent-teal, #36D1DC);
    text-decoration: underline;
    transition: color var(--transition-fast, 0.15s ease);
}

#source-passage figcaption a:hover,
#source-passage figcaption a:focus-visible {
    color: #6cecf5;
}

/* Optional derived association note */
#source-passage figure + p {
    font-size: 0.925rem;
    line-height: 1.55;
    color: var(--text-on-dark-secondary, rgba(255, 255, 255, 0.88));
    border-left: 3px solid var(--accent-gold, #f7d046);
    padding: 0.5rem 0.75rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

#source-passage .start-sample-source-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* ===== FREE ACCOUNT & CREDITS ===== */
.start-free-account-section,
.start-credits-section {
    background-color: var(--surface-base, #12141f);
}

.start-benefit-card,
.start-credit-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius, 0.75rem);
    color: #ffffff;
}

.start-benefit-icon {
    color: var(--accent-gold, #f7d046);
}

.start-account-btn {
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    border-radius: 50px;
    border-color: var(--accent-gold, #f7d046);
    color: var(--accent-gold, #f7d046);
    transition: all var(--transition-fast, 0.15s ease);
}

.start-account-btn:hover,
.start-account-btn:focus-visible {
    background-color: var(--accent-gold, #f7d046);
    border-color: var(--accent-gold, #f7d046);
    color: #12141f;
}

/* ===== CREDIT PACKS SECTION ===== */
.start-packs-section {
    background: var(--surface-dark-850, #181b2a);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Scoped override for credit pack cards on landing page */
.start-page .pricing-card {
    background-color: #ffffff;
    color: #12141f;
    border-radius: var(--radius, 0.75rem);
}

.start-page .pricing-card .card-title {
    color: #12141f;
}

/* WCAG Contrast Fix for One-Time Badge: 2.52:1 -> 7.4:1 */
.start-page .pricing-card .badge.bg-light.text-success {
    color: #247A0E !important;
    background-color: #e8f5e9 !important;
    border-color: #a3cfbb !important;
    font-weight: 700;
}

.start-page .pricing-card .text-success {
    color: #247A0E !important;
}

.start-page .pricing-card .text-warning {
    color: #C2410C !important;
}

/* ===== FAQ SECTION ===== */
.start-faq-section {
    background-color: var(--surface-base, #12141f);
}

.start-faq-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius, 0.75rem);
    color: #ffffff;
}

.start-faq-question {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
}

.start-faq-answer {
    color: rgba(255, 255, 255, 0.82) !important;
    line-height: 1.55;
    font-size: 0.95rem;
}

/* ===== CLOSING SECTION ===== */
.start-closing-section {
    background: var(--gradient-surface-hero, linear-gradient(180deg, #1c1733 0%, #12141f 100%));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== STICKY BOTTOM BAR ===== */
.start-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: rgba(18, 20, 31, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}

.start-sticky-cta[hidden] {
    display: none !important;
}

.start-sticky-cta-text {
    color: #ffffff;
    font-size: 1rem;
}

.start-sticky-cta-btn {
    border-radius: 50px;
    padding: 0.45rem 1.25rem;
    font-size: 0.95rem;
}

/* Reserved space for sticky CTA bar when active */
.start-page.has-sticky-cta {
    padding-bottom: 72px;
}

/* ===== MINIMAL FOOTER ===== */
.start-footer {
    background: var(--surface-hero-top, #0f1422);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-on-dark-muted, rgba(255, 255, 255, 0.72));
}

.start-footer-disclaimer {
    color: var(--text-on-dark-muted, rgba(255, 255, 255, 0.72));
    line-height: 1.5;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.start-footer-link {
    color: var(--accent-teal, #36D1DC);
    text-decoration: none;
    transition: color var(--transition-fast, 0.15s ease);
}

.start-footer-link:hover,
.start-footer-link:focus-visible {
    color: #6cecf5;
    text-decoration: underline;
}

.start-footer-sep {
    color: rgba(255, 255, 255, 0.3);
}

/* ===== ACCESSIBILITY & REDUCED MOTION ===== */
:focus-visible {
    outline: 2px solid var(--accent-gold, #f7d046);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .start-page *,
    .start-page *::before,
    .start-page *::after,
    .start-header *,
    .start-footer * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Email form status message: red for errors, teal for success */
.start-email-status[data-status="error"] {
    color: #ff6b6b;
    font-weight: 600;
}

.start-email-status[data-status="success"] {
    color: var(--accent-teal, #36d1dc);
    font-weight: 600;
}

.start-email-status .btn-link {
    color: var(--accent-teal, #36d1dc);
    font-weight: 600;
}
