/* ============================================================
   surfaces/funnel_video.css
   Funnel video sales page (templates/funnel/video_page.html)
   Phase 4 — extracted from inline <style> (Session 9, 2026-05-05).

   All rules scoped under body.funnel-video per G37.
   No local :root palette — direct hex → token mapping (no compat-shim).
   Sweeps applied: G27 (gold text → --accent-on-light),
                   G28 (theme-blind rgba → tokens where possible),
                   G29 (status colors stay vivid),
                   G30 (inline body-markup style="" lifted below).
   ============================================================ */

/* ---- Universal reset.
       Bare `*` — this CSS file is per-surface (loaded only on funnel video),
       so leakage is impossible. Body-class scoping (`body.funnel-video *`)
       would have specificity (0,1,1) and override single-class rules in
       included partials like footer.html (`.site-footer` is (0,1,0)),
       breaking their layout. Bare `*` keeps specificity at the floor (0,0,0)
       so single-class rules in partials still win. ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- Body — was dark-baked gradient; now tone-step token gradient (G15) ---- */
body.funnel-video {
    font-family: var(--font-sans);
    background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-panel) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    scroll-behavior: smooth;
}

/* ---- Subtle film grain texture ---- */
body.funnel-video::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ---- Theme toggle — fixed top-right corner.
       z-index above film grain (1000) per G35. ---- */
body.funnel-video .cc-toggle-fixed-corner {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10001;
}

body.funnel-video .cc-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px 20px;
    position: relative;
}

/* ---- Header section ---- */
body.funnel-video .cc-header {
    text-align: center;
    margin-bottom: 15px;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.funnel-video .cc-title-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin: 10px auto 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ---- Title — three-color text gradient now theme-aware ---- */
body.funnel-video .cc-title {
    font-family: var(--font-sans);
    font-size: clamp(28px, 4.5vw, 48px);
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-muted) 60%, var(--accent-on-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
    text-shadow: 0 0 60px rgba(210, 153, 34, 0.3);
}

/* ---- Strings tag — gold + blue tints kept raw (decorative, intentional G28 exception) ---- */
body.funnel-video .cc-strings-tag {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.15), rgba(31, 111, 235, 0.15));
    border: 2px solid rgba(210, 153, 34, 0.4);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-on-light);
    backdrop-filter: blur(10px);
}

body.funnel-video .cc-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

/* ---- Video section ---- */
body.funnel-video .cc-video-section {
    margin-bottom: 15px;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body.funnel-video .cc-video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: var(--bg-base);
    /* overflow: hidden removed - breaks Loom iframe for logged-in users */
    /* border-radius removed - causes clipping issues with iframe */
}

body.funnel-video .cc-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

body.funnel-video .cc-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ---- Dynamic offer info section ---- */
body.funnel-video .cc-offer-section {
    max-width: 800px;
    margin: 20px auto 15px;
    padding: 0;
    animation: slideInUp 0.8s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.funnel-video .cc-offer-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Countdown timers ---- */
body.funnel-video .cc-countdowns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin: 0 auto;
}

body.funnel-video .cc-countdown-card {
    display: grid;
    grid-template-columns: auto auto;
    gap: 20px;
    align-items: center;
    padding: 6px 0;
}

body.funnel-video .cc-countdown-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    white-space: nowrap;
    text-align: right;
}

body.funnel-video .cc-countdown-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.funnel-video .cc-timer-unit {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

body.funnel-video .cc-timer-value {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 600;
    color: var(--accent-on-light);
    line-height: 1;
    min-width: 38px;
    text-align: center;
    text-shadow: 0 0 20px rgba(210, 153, 34, 0.3);
}

body.funnel-video .cc-timer-label {
    font-size: 12px;
    text-transform: lowercase;
    color: var(--text-faint);
    font-weight: 500;
}

/* Dual countdown — secondary timer becomes inline contextual note */
body.funnel-video .cc-countdowns.dual-countdown {
    gap: 16px;
}

body.funnel-video .cc-countdown-card-secondary {
    display: block;
    background: none;
    border: none;
    padding: 0;
    text-align: center;
}

body.funnel-video .cc-countdown-card-secondary .cc-countdown-label {
    display: inline;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--text-faint);
    text-transform: none;
    margin-right: 6px;
}

body.funnel-video .cc-countdown-card-secondary .cc-countdown-label::before {
    content: '◆';
    font-size: 8px;
    margin-right: 8px;
    opacity: 0.5;
    vertical-align: middle;
    color: var(--text-muted);
}

body.funnel-video .cc-countdown-card-secondary .cc-countdown-container {
    display: inline;
    gap: 0;
}

body.funnel-video .cc-countdown-card-secondary .cc-timer-unit {
    display: inline;
    gap: 0;
}

body.funnel-video .cc-countdown-card-secondary .cc-timer-unit::after {
    content: ' ';
}

body.funnel-video .cc-countdown-card-secondary .cc-timer-value {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--accent-on-light);
    min-width: auto;
    display: inline;
}

body.funnel-video .cc-countdown-card-secondary .cc-timer-label {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-faint);
    text-transform: lowercase;
    display: inline;
}

body.funnel-video .cc-countdown-card-secondary .cc-timer-label::after {
    content: ',';
    margin-right: 4px;
}

body.funnel-video .cc-countdown-card-secondary .cc-timer-unit:last-child .cc-timer-label::after {
    content: '';
}

/* ---- Bonuses section ---- */
body.funnel-video .cc-bonuses {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(210, 153, 34, 0.2);
}

body.funnel-video .cc-bonuses-title {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

body.funnel-video .cc-bonus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 750px;
    margin: 0 auto;
    padding: 10px 0; /* Add padding to prevent image cutoff */
}

/* ---- Bonus card — was rgba dark-baked; now token (G28). ---- */
body.funnel-video .cc-bonus-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(210, 153, 34, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 94px;
    max-height: 94px;
    overflow: visible; /* Allow image to break out */
    position: relative;
}

body.funnel-video .cc-bonus-card:hover {
    background: var(--bg-elevated);
    border-color: rgba(210, 153, 34, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(210, 153, 34, 0.2);
}

body.funnel-video .cc-bonus-card:hover .cc-bonus-name {
    color: var(--accent-on-light);
}

body.funnel-video .cc-bonus-card:hover .cc-bonus-image {
    transform: rotate(-11deg) scale(1.05);
    box-shadow: 0 12px 30px rgba(210, 153, 34, 0.3);
}

body.funnel-video .cc-bonus-image {
    width: 143px;
    height: auto;
    max-height: 143px;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
    border: none;
    flex-shrink: 0;
    transform: rotate(-11deg);
    position: relative;
    z-index: 2;
    margin-left: -15px; /* Push image left to create overflow effect */
    margin-top: -4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

body.funnel-video .cc-bonus-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.funnel-video .cc-bonus-name {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    transition: color 0.2s ease;
}

body.funnel-video .cc-bonus-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.funnel-video .cc-bonus-scarcity {
    font-size: 13px;
    color: var(--accent-on-light);
    font-weight: 600;
}

body.funnel-video .cc-bonus-value {
    font-size: 13px;
    color: var(--text-faint);
    text-decoration: line-through;
    font-weight: 500;
}

/* ---- Extension mode subtitle ---- */
body.funnel-video .cc-extension-subtitle {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-on-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 16px;
    padding: 8px 16px;
    border: 1px solid rgba(210, 153, 34, 0.3);
    border-radius: 6px;
    background: rgba(210, 153, 34, 0.08);
}

/* ---- Extension notice ---- */
body.funnel-video .cc-extension-notice {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    margin: 12px 0 18px;
    opacity: 0.85;
}

/* ---- Pricing info link ---- */
body.funnel-video .cc-pricing-info {
    text-align: center;
    font-size: 15px;
    color: var(--text-faint);
    margin: 12px 0;
    font-weight: 500;
}

body.funnel-video .cc-pricing-info a {
    color: var(--accent-on-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

body.funnel-video .cc-pricing-info a:hover {
    color: var(--accent-bright);
    text-decoration: underline;
}

body.funnel-video .cc-pricing-info .mobile-only {
    display: none;
}

/* ---- CTA button ---- */
body.funnel-video .cc-button-container {
    width: 100%;
    max-width: 800px;
    margin: 12px auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s ease;
    transform: translateY(20px);
}

body.funnel-video .cc-button-container.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---- Gradient button — gold gradient kept theme-blind (saturated CTA stays bold in both themes per G29).
       Text color uses --text-on-accent (luxury black on gold). ---- */
body.funnel-video .cc-gradient-button {
    display: block;
    width: 100%;
    padding: 16px 40px;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    color: var(--text-on-accent);
    background: linear-gradient(135deg, #d29922 0%, #9e6a03 50%, #d29922 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 60px;
    box-shadow:
        0 10px 30px rgba(210, 153, 34, 0.35),
        0 0 60px rgba(210, 153, 34, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    animation: pulse-shadow 2s infinite;
}

@keyframes pulse-shadow {
    0%, 100% {
        box-shadow:
            0 10px 30px rgba(210, 153, 34, 0.35),
            0 0 60px rgba(210, 153, 34, 0.2);
    }
    50% {
        box-shadow:
            0 15px 40px rgba(210, 153, 34, 0.5),
            0 0 80px rgba(210, 153, 34, 0.35);
    }
}

body.funnel-video .cc-gradient-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

body.funnel-video .cc-gradient-button:hover {
    background-position: 100% 100%;
    transform: translateY(-3px);
    box-shadow:
        0 20px 40px rgba(210, 153, 34, 0.5),
        0 0 100px rgba(210, 153, 34, 0.4);
}

body.funnel-video .cc-gradient-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ---- Mobile responsiveness ---- */
@media (max-width: 768px) {
    body.funnel-video .cc-container {
        padding: 12px;
    }

    body.funnel-video .cc-title {
        font-size: 28px;
    }

    body.funnel-video .cc-subtitle {
        font-size: 14px;
        letter-spacing: 1.5px;
    }

    body.funnel-video .cc-countdown-card {
        grid-template-columns: 1fr;
        gap: 4px;
        justify-items: center;
    }

    body.funnel-video .cc-countdown-label {
        font-size: 12px;
        text-align: center;
    }

    body.funnel-video .cc-countdown-container {
        gap: 6px;
    }

    body.funnel-video .cc-timer-value {
        font-size: 24px;
        min-width: 32px;
    }

    body.funnel-video .cc-timer-label {
        font-size: 11px;
    }

    body.funnel-video .cc-countdown-card-secondary .cc-countdown-label,
    body.funnel-video .cc-countdown-card-secondary .cc-timer-value,
    body.funnel-video .cc-countdown-card-secondary .cc-timer-label {
        font-size: 10px;
    }

    body.funnel-video .cc-bonus-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    body.funnel-video .cc-bonus-card {
        padding: 10px;
    }

    body.funnel-video .cc-bonus-image {
        width: 123px;
        height: auto;
        max-height: 123px;
        margin-left: -10px;
        margin-top: -2px;
    }

    body.funnel-video .cc-bonus-name {
        font-size: 15px;
    }

    body.funnel-video .cc-bonus-value,
    body.funnel-video .cc-bonus-scarcity {
        font-size: 12px;
    }

    body.funnel-video .cc-gradient-button {
        font-size: 18px;
        padding: 14px 30px;
    }

    body.funnel-video .cc-pricing-info {
        font-size: 11px;
    }

    body.funnel-video .cc-pricing-info .mobile-only {
        display: block;
    }
}

@media (max-width: 480px) {
    body.funnel-video .cc-title {
        font-size: 24px;
        letter-spacing: 1px;
    }

    body.funnel-video .cc-strings-tag {
        font-size: 11px;
        padding: 5px 12px;
    }

    body.funnel-video .cc-timer-value {
        font-size: 20px;
        min-width: 28px;
    }

    body.funnel-video .cc-timer-label {
        font-size: 10px;
    }

    body.funnel-video .cc-bonus-image {
        width: 108px;
        height: auto;
        max-height: 108px;
        margin-left: -8px;
        margin-top: 0px;
    }

    body.funnel-video .cc-bonus-name {
        font-size: 14px;
    }
}

/* ---- Book Preview — inline PDF viewer between bonuses and pricing info.
       Iframe content stays per Adobe's PDF viewer config per G8 (we don't
       re-theme the embed). ---- */
body.funnel-video .cc-book-preview {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(210, 153, 34, 0.2);
}

body.funnel-video .cc-book-preview-title {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

body.funnel-video .cc-book-preview-frame {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    aspect-ratio: 4 / 3;
    background: var(--bg-base);
    border: 1px solid rgba(210, 153, 34, 0.15);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.funnel-video .cc-book-preview-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    body.funnel-video .cc-book-preview-frame {
        aspect-ratio: 3 / 4;
    }
}

/* ---- Loading spinner ---- */
body.funnel-video .loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(210, 153, 34, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Lifted from inline style="..." attributes (G30) — flash sale.
   Only hex-bearing inline styles lifted; layout-only inline
   styles (no hex) stay inline per G30 scope (Phase 7 cleanup).
   ============================================================ */

body.funnel-video .flash-sale-units-label {
    color: var(--accent-on-light);
    align-self: center;
    margin-top: 5px;
}

body.funnel-video .flash-sale-units-display {
    color: var(--accent-on-light);
    font-weight: 600;
    font-size: 20px;
    align-items: center;
}

body.funnel-video .flash-sale-sold-out-title {
    color: var(--danger);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 10px;
}

body.funnel-video .flash-sale-sold-out-subtitle {
    color: var(--text-muted);
    margin-bottom: 15px;
}

body.funnel-video .waitlist-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-radius: 6px;
}

body.funnel-video .waitlist-button {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

body.funnel-video .waitlist-success {
    display: none;
    color: var(--success);
    margin-top: 15px;
}
