/* =============================================================================
   Anonymous Home Page v2 - Minimalist ESPN meets Stripe
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Layout Container
   ----------------------------------------------------------------------------- */
.anon-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px); /* Account for header */
    min-height: calc(100dvh - 80px); /* Dynamic viewport for mobile */
    background-color: var(--theme-bg-primary, #ffffff);
    overflow: hidden;
}

/* -----------------------------------------------------------------------------
   Parallax Background Layer
   ----------------------------------------------------------------------------- */
.anon-hero__parallax-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: var(--parallax-bg-image, url('/images/backgrounds/flipt/vapor-grid.png'));
    background-size: 500px 500px;
    background-repeat: repeat;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
    animation: parallaxFloat 60s ease-in-out infinite;
}

@keyframes parallaxFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-2%, -1%) rotate(0.5deg);
    }
    50% {
        transform: translate(-1%, -2%) rotate(0deg);
    }
    75% {
        transform: translate(1%, -1%) rotate(-0.5deg);
    }
}

/* Ensure content is above parallax */
.anon-hero__logo,
.anon-hero__sections,
.anon-hero__footer {
    position: relative;
    z-index: 1;
}

/* -----------------------------------------------------------------------------
   Logo Section
   ----------------------------------------------------------------------------- */
.anon-hero__logo {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(2rem, 8vh, 4rem) 1rem;
}

.anon-hero__logo-img {
    width: clamp(180px, 25vw, 320px);
    height: auto;
    object-fit: contain;
}

/* -----------------------------------------------------------------------------
   Primary Hero CTA - The Main Attraction
   ----------------------------------------------------------------------------- */
.anon-hero__primary {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 2vh, 1.5rem);
    padding: 0 clamp(1rem, 5vw, 4rem);
    margin-bottom: clamp(2rem, 4vh, 3rem);
    opacity: 0;
    animation: anonHeroFadeIn 0.6s ease forwards;
}

.anon-hero__primary-image {
    width: clamp(320px, 85vw, 520px);
    height: auto;
    border-radius: 16px;
    object-fit: cover;
    box-shadow:
        0 8px 32px rgba(0, 166, 156, 0.25),
        0 0 0 2px rgba(0, 166, 156, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.anon-hero__primary:hover .anon-hero__primary-image {
    transform: scale(1.02) translateY(-4px);
    box-shadow:
        0 16px 48px rgba(0, 166, 156, 0.35),
        0 0 0 3px rgba(0, 166, 156, 0.2);
}

.anon-hero__primary-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.anon-hero__primary-title {
    font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--theme-text-primary, #2d3748);
    margin: 0;
    line-height: 1.1;
}

.anon-hero__primary-desc {
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 400;
    color: var(--theme-text-secondary, #4a5568);
    margin: 0;
    line-height: 1.5;
    max-width: 320px;
}

.anon-hero__primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    padding: clamp(0.875rem, 2vh, 1rem) clamp(2rem, 4vw, 3rem);
    font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    font-weight: 700;
    color: var(--flipt-white, #ffffff);
    background: linear-gradient(135deg, var(--flipt-primary, #00A69C) 0%, var(--flipt-secondary, #0068BA) 100%);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow:
        0 4px 16px rgba(0, 166, 156, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.anon-hero__primary-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(0, 166, 156, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: var(--flipt-white, #ffffff);
    text-decoration: none;
}

.anon-hero__primary-cta:active {
    transform: translateY(-1px);
}

.anon-hero__primary-cta:focus {
    outline: 3px solid var(--flipt-primary, #00A69C);
    outline-offset: 3px;
}

/* -----------------------------------------------------------------------------
   Secondary Grid Container
   ----------------------------------------------------------------------------- */
.anon-hero__secondary-grid {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: clamp(1.5rem, 3vw, 2rem);
    padding: 0 clamp(1rem, 5vw, 4rem);
    padding-bottom: clamp(2rem, 6vh, 4rem);
    max-width: 1100px;
    margin: 0 auto;
}

/* -----------------------------------------------------------------------------
   Action Sections Container (Legacy - kept for backwards compatibility)
   ----------------------------------------------------------------------------- */
.anon-hero__sections {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2rem, 4vh, 3rem);
    padding: 0 clamp(1rem, 5vw, 4rem);
    padding-bottom: clamp(2rem, 6vh, 4rem);
}

/* -----------------------------------------------------------------------------
   Individual Section
   ----------------------------------------------------------------------------- */
.anon-hero__section {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(0.75rem, 2vh, 1.25rem);

    /* Fade-in animation */
    opacity: 0;
    animation: anonHeroFadeIn 0.5s ease forwards;
}

/* Staggered animation delays */
.anon-hero__section:nth-child(1) { animation-delay: 0.1s; }
.anon-hero__section:nth-child(2) { animation-delay: 0.2s; }
.anon-hero__section:nth-child(3) { animation-delay: 0.3s; }
.anon-hero__section:nth-child(4) { animation-delay: 0.4s; }

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

/* -----------------------------------------------------------------------------
   Section Image (OG Images)
   ----------------------------------------------------------------------------- */
.anon-hero__image {
    width: clamp(280px, 80vw, 380px);
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.anon-hero__section:hover .anon-hero__image {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* -----------------------------------------------------------------------------
   Title
   ----------------------------------------------------------------------------- */
.anon-hero__title {
    font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--theme-text-primary, #2d3748);
    margin: 0;
    line-height: 1.2;
}

/* -----------------------------------------------------------------------------
   Description
   ----------------------------------------------------------------------------- */
.anon-hero__desc {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    font-weight: 400;
    color: var(--theme-text-secondary, #4a5568);
    margin: 0;
    line-height: 1.5;
    max-width: 220px;
}

/* -----------------------------------------------------------------------------
   CTA Button
   ----------------------------------------------------------------------------- */
.anon-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding: clamp(0.625rem, 1.5vh, 0.75rem) clamp(1.25rem, 3vw, 1.75rem);
    font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(0.875rem, 1.25vw, 1rem);
    font-weight: 600;
    color: var(--flipt-white, #ffffff);
    background: linear-gradient(135deg, var(--flipt-primary, #00A69C) 0%, var(--flipt-secondary, #0068BA) 100%);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 166, 156, 0.2);
    white-space: nowrap;
}

.anon-hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 166, 156, 0.3);
    color: var(--flipt-white, #ffffff);
    text-decoration: none;
}

.anon-hero__cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 166, 156, 0.2);
}

.anon-hero__cta:focus {
    outline: 3px solid var(--flipt-primary, #00A69C);
    outline-offset: 2px;
}

/* Outline Button Variant for Secondary CTAs */
.anon-hero__cta--outline {
    background: transparent;
    color: var(--flipt-primary, #00A69C);
    border: 2px solid var(--flipt-primary, #00A69C);
    box-shadow: none;
}

.anon-hero__cta--outline:hover {
    background: var(--flipt-primary, #00A69C);
    color: var(--flipt-white, #ffffff);
    border-color: var(--flipt-primary, #00A69C);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 166, 156, 0.25);
}

.anon-hero__cta--outline:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 166, 156, 0.2);
}

/* Secondary Section Modifier */
.anon-hero__section--secondary {
    flex: 0 1 280px;
    max-width: 300px;
}

.anon-hero__section--secondary .anon-hero__image {
    width: 100%;
    max-width: 280px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.anon-hero__section--secondary:hover .anon-hero__image {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.anon-hero__section--secondary .anon-hero__title {
    font-size: clamp(1rem, 2vw, 1.125rem);
}

.anon-hero__section--secondary .anon-hero__desc {
    font-size: clamp(0.8125rem, 1.25vw, 0.875rem);
    max-width: 200px;
}

/* -----------------------------------------------------------------------------
   Footer Section (FAQ)
   ----------------------------------------------------------------------------- */
.anon-hero__footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    padding: clamp(1rem, 3vh, 2rem) clamp(1rem, 5vw, 4rem);
    padding-bottom: clamp(2rem, 4vh, 3rem);
}

.anon-hero__faq-link {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    color: var(--theme-text-secondary, #4a5568);
    margin: 0;
    opacity: 0;
    animation: anonHeroFadeIn 0.5s ease forwards;
    animation-delay: 0.5s;
}

.anon-hero__faq-link a {
    color: var(--flipt-primary, #00A69C);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.anon-hero__faq-link a:hover {
    color: var(--flipt-primary-hover, #00857A);
    text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   Mobile Responsive
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .anon-hero {
        min-height: auto;
        padding-bottom: 2rem;
    }

    .anon-hero__logo {
        padding: clamp(1.5rem, 6vh, 3rem) 1rem;
    }

    .anon-hero__logo-img {
        width: clamp(160px, 50vw, 240px);
    }

    /* Primary hero mobile */
    .anon-hero__primary {
        padding: 0 1.5rem;
        margin-bottom: clamp(1.5rem, 3vh, 2rem);
    }

    .anon-hero__primary-image {
        width: clamp(280px, 90vw, 360px);
        border-radius: 12px;
    }

    .anon-hero__primary-cta {
        width: 100%;
        max-width: 300px;
    }

    /* Secondary grid mobile - stack vertically */
    .anon-hero__secondary-grid {
        flex-direction: column;
        align-items: center;
        gap: clamp(1.5rem, 3vh, 2rem);
        padding: 0 1.5rem;
        padding-bottom: 1.5rem;
    }

    .anon-hero__section--secondary {
        flex: none;
        width: 100%;
        max-width: 280px;
    }

    .anon-hero__section--secondary .anon-hero__image {
        max-width: 260px;
    }

    .anon-hero__sections {
        flex-direction: column;
        align-items: center;
        gap: clamp(2rem, 5vh, 3rem);
        padding: 0 1.5rem;
        padding-bottom: 2rem;
    }

    .anon-hero__section {
        max-width: 100%;
        width: 100%;
        max-width: 320px;
    }

    .anon-hero__image {
        width: clamp(240px, 70vw, 320px);
    }

    .anon-hero__cta {
        width: 100%;
        max-width: 280px;
    }
}

/* Tablet breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
    .anon-hero__sections {
        gap: clamp(1rem, 3vw, 2rem);
        max-width: 700px;
    }

    .anon-hero__section {
        flex: 0 1 calc(50% - 1rem);
        max-width: 300px;
        min-width: 240px;
    }

    .anon-hero__desc {
        max-width: 200px;
    }
}

/* -----------------------------------------------------------------------------
   Dark Mode Support
   ----------------------------------------------------------------------------- */
[data-bs-theme="dark"] .anon-hero {
    background-color: var(--theme-bg-primary, #0f172a);
}

/* Dark mode image styles */
[data-bs-theme="dark"] .anon-hero__image {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .anon-hero__section:hover .anon-hero__image {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .anon-hero__title {
    color: var(--theme-text-primary, #e2e8f0);
}

[data-bs-theme="dark"] .anon-hero__desc {
    color: var(--theme-text-secondary, #cbd5e1);
}

[data-bs-theme="dark"] .anon-hero__cta {
    background: linear-gradient(135deg, var(--flipt-primary, #00B8A9) 0%, var(--flipt-secondary, #1E7BC9) 100%);
    box-shadow: 0 2px 8px rgba(0, 184, 169, 0.25);
}

[data-bs-theme="dark"] .anon-hero__cta:hover {
    box-shadow: 0 4px 16px rgba(0, 184, 169, 0.35);
}

/* Dark mode outline button */
[data-bs-theme="dark"] .anon-hero__cta--outline {
    background: transparent;
    color: var(--flipt-primary, #00B8A9);
    border-color: var(--flipt-primary, #00B8A9);
}

[data-bs-theme="dark"] .anon-hero__cta--outline:hover {
    background: var(--flipt-primary, #00B8A9);
    color: var(--theme-bg-primary, #0f172a);
    border-color: var(--flipt-primary, #00B8A9);
}

/* Dark mode primary hero */
[data-bs-theme="dark"] .anon-hero__primary-title {
    color: var(--theme-text-primary, #e2e8f0);
}

[data-bs-theme="dark"] .anon-hero__primary-desc {
    color: var(--theme-text-secondary, #cbd5e1);
}

[data-bs-theme="dark"] .anon-hero__primary-image {
    box-shadow:
        0 8px 32px rgba(0, 184, 169, 0.3),
        0 0 0 2px rgba(0, 184, 169, 0.15);
}

[data-bs-theme="dark"] .anon-hero__primary:hover .anon-hero__primary-image {
    box-shadow:
        0 16px 48px rgba(0, 184, 169, 0.4),
        0 0 0 3px rgba(0, 184, 169, 0.25);
}

[data-bs-theme="dark"] .anon-hero__primary-cta {
    background: linear-gradient(135deg, var(--flipt-primary, #00B8A9) 0%, var(--flipt-secondary, #1E7BC9) 100%);
    box-shadow:
        0 4px 16px rgba(0, 184, 169, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .anon-hero__primary-cta:hover {
    box-shadow:
        0 8px 24px rgba(0, 184, 169, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Dark mode secondary cards */
[data-bs-theme="dark"] .anon-hero__section--secondary .anon-hero__image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

[data-bs-theme="dark"] .anon-hero__section--secondary:hover .anon-hero__image {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .anon-hero__faq-link {
    color: var(--theme-text-secondary, #cbd5e1);
}

[data-bs-theme="dark"] .anon-hero__faq-link a {
    color: var(--flipt-primary, #00B8A9);
}

[data-bs-theme="dark"] .anon-hero__faq-link a:hover {
    color: #00D4C4;
}

/* -----------------------------------------------------------------------------
   Reduced Motion Support
   ----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .anon-hero__section,
    .anon-hero__faq-link {
        opacity: 1;
        animation: none;
    }

    .anon-hero__image,
    .anon-hero__cta,
    .anon-hero__faq-link a {
        transition: none;
    }
}

/* -----------------------------------------------------------------------------
   Print Styles
   ----------------------------------------------------------------------------- */
@media print {
    .anon-hero {
        min-height: auto;
        background: white !important;
    }

    .anon-hero__section {
        opacity: 1;
        animation: none;
    }

    .anon-hero__cta {
        background: #333 !important;
        box-shadow: none !important;
    }
}
