/* ================================
   Scroll Progress Bar
   ================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-accent) 100%);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ================================
   Floating Header (Desktop)
   ================================ */
.floating-header {
    position: fixed;
    top: -80px;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    z-index: 1000;
    transition: top 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--color-gold);
}

.floating-header.visible {
    top: 0;
}

.floating-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.floating-header-brand {
    color: var(--color-gold);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.floating-header .btn {
    padding: 10px 24px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .floating-header {
        display: none !important;
    }
}

/* ================================
   Exit Intent Popup
   ================================ */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.exit-popup-overlay.visible {
    display: flex;
}

.exit-popup {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #0a0a0a 100%);
    border: 2px solid var(--color-gold);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: 40px;
    position: relative;
    animation: popupSlideIn 0.4s ease-out;
}

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

.exit-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--color-gray);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.exit-popup-close:hover {
    color: var(--color-white);
}

.exit-popup-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 20px;
}

.exit-popup h3 {
    color: var(--color-gold);
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 16px;
}

.exit-popup p {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.6;
}

.exit-popup .btn {
    width: 100%;
    margin-bottom: 12px;
}

.exit-popup-dismiss {
    display: block;
    text-align: center;
    color: var(--color-gray);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.exit-popup-dismiss:hover {
    color: var(--color-white);
}

/* ================================
   Countdown Timer
   ================================ */
.countdown-banner {
    background: linear-gradient(135deg, var(--color-accent) 0%, #7F1D1D 100%);
    padding: 12px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.countdown-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.03) 10px,
        rgba(255,255,255,0.03) 20px
    );
}

.countdown-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.countdown-text {
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.95rem;
}

.countdown-text .highlight {
    color: var(--color-gold);
    font-weight: 700;
}

.countdown-timer {
    display: flex;
    gap: 8px;
}

.countdown-unit {
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 6px;
    min-width: 45px;
    text-align: center;
}

.countdown-number {
    color: var(--color-gold);
    font-size: 1.25rem;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.countdown-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .countdown-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .countdown-text {
        font-size: 0.85rem;
    }
}

/* ================================
   Variables & Reset
   ================================ */
:root {
    --color-primary: #0B4F3F;
    --color-secondary: #1a1a1a;
    --color-accent: #B91C1C;
    --color-gold: #D4AF37;
    --color-white: #ffffff;
    --color-cream: #F5F5F0;
    --color-gray: #6B7280;
    --color-light-gray: #E5E7EB;

    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;

    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-secondary);
    line-height: 1.6;
    background-color: var(--color-cream);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================
   Typography
   ================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

.section-subtitle {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-gray);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* ================================
   Buttons
   ================================ */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: #991B1B;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
}

.btn-outline:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

/* ================================
   Hero Section
   ================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, #063829 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.03) 35px, rgba(255,255,255,.03) 70px);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
    padding-left: 20px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.title-top {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--color-white);
    font-weight: 400;
}

.title-bottom {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--color-gold);
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--color-cream);
    margin-bottom: 24px;
    font-family: var(--font-display);
    font-style: italic;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Trust Badges (per topfunnel.md) */
.trust-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.trust-badge {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sticky Mobile CTA (per topfunnel.md) */
.sticky-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--color-secondary) 0%, rgba(26, 26, 26, 0.95) 100%);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    display: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.sticky-mobile-cta.visible {
    display: block;
}

.btn-sticky {
    display: block;
    width: 100%;
    text-align: center;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Hide sticky CTA on desktop */
@media (min-width: 769px) {
    .sticky-mobile-cta {
        display: none !important;
    }
}

.hero-book {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-cover {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    animation: float 6s ease-in-out infinite;
}

.book-cover:hover {
    transform: scale(1.05) rotate(-2deg);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ================================
   Problem Section
   ================================ */
.problem-section {
    padding: 100px 0;
    background-color: var(--color-white);
}

.problem-content {
    max-width: 1100px;
    margin: 0 auto;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.problem-card {
    padding: 32px;
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-white) 100%);
    border-radius: 12px;
    border: 2px solid var(--color-light-gray);
    transition: var(--transition);
}

.problem-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.problem-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.problem-icon.suit-red {
    color: var(--color-accent);
}

.problem-icon.suit-black {
    color: var(--color-secondary);
}

.problem-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--color-secondary);
}

.problem-card p {
    color: var(--color-gray);
    line-height: 1.7;
}

.problem-conclusion {
    text-align: center;
    padding: 48px 32px;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.conclusion-text {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--color-white);
    line-height: 1.6;
}

.conclusion-text strong {
    color: var(--color-gold);
    font-weight: 700;
}

/* ================================
   Quotes Section
   ================================ */
.quotes-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    position: relative;
    overflow: hidden;
}

.quotes-section::before {
    content: '"';
    position: absolute;
    top: -50px;
    right: 10%;
    font-size: 400px;
    color: rgba(212, 175, 55, 0.05);
    font-family: var(--font-display);
    pointer-events: none;
}

.quotes-section .section-title {
    color: var(--color-white);
    margin-bottom: 60px;
}

.quotes-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    min-height: 300px;
}

.quote-container {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.quote-container.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

.quote {
    text-align: center;
    padding: 48px 32px;
}

.quote p {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-family: var(--font-display);
    font-style: italic;
    color: var(--color-white);
    line-height: 1.5;
    margin-bottom: 24px;
}

.quote footer {
    font-size: 1rem;
    color: var(--color-gold);
    font-family: var(--font-body);
    font-style: normal;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--color-gold);
    width: 32px;
    border-radius: 6px;
}

/* ================================
   Learn Section
   ================================ */
.learn-section {
    padding: 100px 0;
    background-color: var(--color-cream);
}

.learn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.learn-card {
    padding: 40px 32px;
    background-color: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.learn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-gold) 100%);
    transition: height 0.3s ease;
}

.learn-card:hover::before {
    height: 100%;
}

.learn-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.learn-number {
    font-size: 3rem;
    font-family: var(--font-display);
    color: var(--color-gold);
    opacity: 0.2;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 16px;
}

.learn-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--color-secondary);
}

.learn-card p {
    color: var(--color-gray);
    line-height: 1.7;
}

/* ================================
   Tools Section
   ================================ */
.tools-section {
    padding: 100px 0;
    background-color: var(--color-white);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.tool-card {
    padding: 48px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, var(--color-cream) 100%);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.tool-card.coming-soon {
    opacity: 0.7;
}

.tool-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    line-height: 1;
}

.tool-card h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--color-secondary);
    font-weight: 700;
}

.tool-card p {
    color: var(--color-gray);
    line-height: 1.7;
    margin-bottom: 24px;
    flex-grow: 1;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.feature-tag {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coming-soon-badge {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--color-gold) 0%, #B8860B 100%);
    color: var(--color-white);
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    margin-top: auto;
}

.tool-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* ================================
   Preview Section
   ================================ */
.preview-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.preview-section .section-title {
    color: var(--color-white);
}

.preview-section .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.chapter-item {
    padding: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.chapter-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-gold);
    transform: translateY(-4px);
}

.chapter-num {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--color-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.chapter-item h4 {
    font-size: 1.5rem;
    color: var(--color-white);
    margin-bottom: 12px;
}

.chapter-item p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.preview-cta {
    text-align: center;
}

.preview-cta .btn-outline {
    color: var(--color-white);
    border-color: var(--color-white);
}

.preview-cta .btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* ================================
   Proof Section
   ================================ */
.proof-section {
    padding: 100px 0;
    background-color: var(--color-white);
}

.proof-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 48px;
}

.proof-stat {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.stat-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--color-secondary);
}

.stat-content p {
    color: var(--color-gray);
    line-height: 1.7;
}

/* ================================
   Notify Section
   ================================ */
.notify-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--color-accent) 0%, #7F1D1D 100%);
    position: relative;
    overflow: hidden;
}

.notify-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.notify-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.notify-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--color-white);
    margin-bottom: 16px;
}

.notify-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.notify-form {
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.form-group input {
    flex: 1;
    min-width: 280px;
    padding: 16px 24px;
    font-size: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font-family: var(--font-body);
    background-color: var(--color-white);
    color: var(--color-secondary);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-group input::placeholder {
    color: var(--color-gray);
    opacity: 0.7;
}

.form-group button {
    white-space: nowrap;
}

.form-privacy {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.form-message {
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-weight: 500;
}

.form-message.success {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--color-white);
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.form-message.error {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--color-white);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

/* ================================
   Footer
   ================================ */
.footer {
    padding: 60px 0 32px;
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    font-size: 1.75rem;
    color: var(--color-gold);
    margin-bottom: 8px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.footer-quote p {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.footer-quote cite {
    font-size: 0.875rem;
    color: var(--color-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.footer-social h4 {
    font-size: 1.125rem;
    color: var(--color-gold);
    margin-bottom: 16px;
    font-weight: 600;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-white);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-gold);
    transform: translateX(4px);
}

.social-link svg {
    flex-shrink: 0;
}

.social-link span {
    font-weight: 500;
}

/* ================================
   Mobile-First Optimizations
   Per topfunnel.md guidelines
   ================================ */

/* Safe area padding for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer-bottom {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
    
    .notify-section {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }
}

/* Ensure minimum 44px touch targets */
.btn {
    min-height: 44px;
    min-width: 44px;
}

/* Better form input styling for mobile */
input, select, textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Mobile: Product/Book image FIRST (per topfunnel.md) */
    .hero-book {
        order: -1;
    }

    .book-cover {
        max-width: 280px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 16px 24px; /* Larger touch target */
    }

    .problem-grid {
        grid-template-columns: 1fr;
    }

    .learn-grid,
    .chapters-grid {
        grid-template-columns: 1fr;
    }

    .proof-content {
        grid-template-columns: 1fr;
    }

    .form-group {
        flex-direction: column;
    }

    .form-group input {
        width: 100%;
        padding: 18px 20px; /* Larger touch target */
    }

    .section-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    .hero-title .title-top {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }

    .hero-title .title-bottom {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-content {
        padding: 40px 0;
    }

    .book-cover {
        max-width: 240px;
    }

    .problem-card,
    .learn-card {
        padding: 24px 20px;
    }

    .tool-card {
        padding: 32px 24px;
    }
}

/* ================================
   Animations & Transitions
   ================================ */
@media (prefers-reduced-motion: no-preference) {
    .problem-card,
    .learn-card,
    .chapter-item {
        animation: fadeInUp 0.6s ease forwards;
        opacity: 0;
    }

    .problem-card:nth-child(1) { animation-delay: 0.1s; }
    .problem-card:nth-child(2) { animation-delay: 0.2s; }
    .problem-card:nth-child(3) { animation-delay: 0.3s; }
    .problem-card:nth-child(4) { animation-delay: 0.4s; }
}

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

/* ================================
   Coming Next Section
   ================================ */
.coming-next-section {
    background: linear-gradient(135deg, #0B4F3F 0%, #1a1a1a 100%);
    padding: 4rem 2rem;
    color: #F5F5F0;
}

.coming-next-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #D4AF37;
    margin-bottom: 3rem;
    font-family: 'Playfair Display', serif;
}

.coming-next-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.coming-next-image {
    flex: 0 0 auto;
}

.next-book-cover {
    width: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.next-book-cover:hover {
    transform: scale(1.05);
}

.coming-next-text {
    flex: 1;
    color: #F5F5F0;
}

.next-book-title {
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    color: #F5F5F0;
    margin-bottom: 1rem;
    font-weight: 700;
}

.edition-badge {
    color: #D4AF37;
    font-weight: 600;
    font-size: 0.9em;
}

.next-book-subtitle {
    font-size: 1.2rem;
    color: #E0E0D8;
    margin-bottom: 1rem;
    font-style: italic;
    line-height: 1.6;
}

.next-book-description {
    font-size: 1rem;
    color: #D4AF37;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .coming-next-content {
        flex-direction: column;
        text-align: center;
    }

    .next-book-cover {
        width: 200px;
    }

    .coming-next-section .section-title {
        font-size: 2rem;
    }

    .next-book-title {
        font-size: 1.5rem;
    }

    .next-book-subtitle {
        font-size: 1rem;
    }
}
