/* ===========================================
   CONVERSION-FOCUSED COMPONENTS
   High-impact elements designed to drive action
   Based on frontend-design skill principles
   =========================================== */

/* ===================
   STICKY CTA BAR
   Appears on scroll, stays thumb-reachable
   =================== */

.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    right: 0;
    background: rgba(250, 248, 245, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: var(--border-thin) solid var(--border-light);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: var(--space-md) var(--space-lg);
    padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
    z-index: 1000;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    pointer-events: none;
    will-change: transform;
}

.sticky-cta-bar.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.sticky-cta-bar__inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: var(--space-md);
    align-items: center;
    justify-content: center;
}

.sticky-cta-bar__text {
    font-size: var(--text-sm);
    color: var(--ink-soft);
    display: none;
}

@media (min-width: 640px) {
    .sticky-cta-bar__text {
        display: block;
    }
}

.sticky-cta-bar .btn {
    flex-shrink: 0;
    min-width: 200px;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    box-shadow: 0 4px 20px rgba(196, 164, 132, 0.4);
}

/* ===================
   HERO CTA - HIGH IMPACT
   The primary conversion button
   =================== */

.btn--hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-3xl);
    font-size: var(--text-lg);
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-clay) 0%, var(--accent-clay-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow:
        0 4px 20px rgba(196, 164, 132, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-xl);
}

.btn--hero:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(196, 164, 132, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, var(--accent-clay-dark) 0%, var(--accent-clay) 100%);
}

.btn--hero:active {
    transform: translateY(0);
}

.btn--hero svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn--hero:hover svg {
    transform: translateX(4px);
}

/* ===================
   URGENCY BANNER
   Founder pricing, limited batch messaging
   =================== */

.urgency-banner {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bone-surface);
    border: var(--border-thin) solid var(--accent-clay);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--ink);
    margin-bottom: var(--space-lg);
}

.urgency-banner__icon {
    width: 18px;
    height: 18px;
    color: var(--accent-clay);
}

.urgency-banner__text {
    font-weight: 500;
}

.urgency-banner__highlight {
    color: var(--accent-clay);
    font-weight: 600;
}

/* ===================
   TRUST STRIP
   Horizontal trust indicators
   =================== */

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg) var(--space-2xl);
    /* tighter vertical, wider horizontal */
    padding: var(--space-xl) var(--space-md);
    margin: var(--space-3xl) auto var(--space-2xl);
    /* Auto margins for centering */
    border-top: var(--border-thin) solid var(--border-light);
    border-bottom: var(--border-thin) solid var(--border-light);
    max-width: 1000px;
}

.trust-strip--minimal {
    border: none;
    padding: 0;
    margin: 0;
}

.trust-strip__item {
    display: grid;
    grid-template-columns: min-content 1fr;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--ink-soft);
    text-align: left;
    /* Ensure text creates a rigid column */
}

.trust-strip__icon {
    width: 20px;
    height: 20px;
    color: var(--accent-sage);
    /* No flex-shrink needed in grid */
}

/* ===================
   GUARANTEE BADGE
   Prominent refund guarantee
   =================== */

.guarantee-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(156, 175, 148, 0.1);
    border: var(--border-thin) solid var(--accent-sage);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--accent-sage-dark);
}

.guarantee-badge__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.guarantee-badge--large {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    font-weight: 500;
}

/* ===================
   STATS HIGHLIGHT
   Impact numbers that sell
   =================== */

.stats-highlight {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
}

@media (max-width: 640px) {
    .stats-highlight {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

.stats-highlight__item {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bone-surface);
    border-radius: var(--radius-md);
    border: var(--border-subtle);
    /* Phase 8: CLS Eradication - Enforce Min Height */
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stats-highlight__number {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--accent-clay);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stats-highlight__label {
    display: block;
    font-size: var(--text-sm);
    color: var(--ink-soft);
    margin-top: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-highlight__source {
    display: block;
    font-size: var(--text-xs);
    color: var(--ink-muted);
    margin-top: var(--space-xs);
}

/* ===================
   BUNDLE HIGHLIGHT
   Make the bundle the obvious choice
   =================== */

.bundle-card {
    position: relative;
    border: var(--border-medium) solid var(--accent-clay);
    background: var(--bone-base);
    overflow: visible;
    margin-top: var(--space-xl);
    /* Extra room for badge above */
}

/* MOST POPULAR badge - pill-shaped, positioned at top center */
.bundle-card::before,
.product-card.bundle-card::before,
article.bundle-card::before {
    /* Reset any inherited values */
    all: unset;

    /* Content */
    content: 'MOST POPULAR';

    /* Positioning */
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);

    /* Size constraints - NOT a blob */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: unset;
    max-width: 200px;

    /* Pill badge styling */
    padding: 10px 24px;
    background-color: var(--accent-sage);
    color: white;

    /* Typography */
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    white-space: nowrap;
    line-height: 1;

    /* Shape - pill, not blob */
    border-radius: 100px;

    /* Remove any weird inherited stuff */
    clip-path: none;
    -webkit-mask: none;
    mask: none;

    /* Layer */
    z-index: 10;
    pointer-events: none;
}

.bundle-savings {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--accent-sage);
    color: white;
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-xs);
    margin-left: var(--space-sm);
}

/* ===================
   PRICE TYPOGRAPHY
   Confident pricing display
   =================== */

.price-display {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.price-display__amount {
    font-family: var(--font-serif);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.price-display__period {
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.price-display--large .price-display__amount {
    font-size: var(--text-4xl);
}

/* ===================
   COMPARISON TABLE
   Visual impact for Formula Facts comparison
   =================== */

.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .comparison-container {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        overflow-x: hidden;
        /* Prevent horizontal blowout */
        max-width: 100%;
    }
}

.comparison-panel {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    position: relative;
}

.comparison-panel--bad {
    background: repeating-linear-gradient(45deg,
            var(--bone-surface),
            var(--bone-surface) 10px,
            rgba(184, 92, 92, 0.03) 10px,
            rgba(184, 92, 92, 0.03) 20px);
    border: var(--border-thin) dashed var(--error);
}

.comparison-panel--good {
    background: var(--bone-base);
    border: var(--border-medium) solid var(--accent-sage);
    box-shadow: 0 4px 20px rgba(156, 175, 148, 0.15);
}

.comparison-panel--good::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 4px;
    background: var(--accent-sage);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.comparison-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.comparison-panel--bad .comparison-label {
    color: var(--error);
}

.comparison-panel--good .comparison-label {
    color: var(--accent-sage-dark);
}

/* ===================
   SOCIAL PROOF
   Testimonial/founder quote styling
   =================== */

.founder-quote {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
    padding: var(--space-xl);
    background: var(--bone-surface);
    border-radius: var(--radius-lg);
    border-left: var(--border-thick) solid var(--accent-clay);
}

@media (max-width: 640px) {
    .founder-quote {
        flex-direction: column;
        gap: var(--space-lg);
    }
}

.founder-quote__image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.founder-quote__content {
    flex: 1;
}

.founder-quote__text {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--ink);
    margin-bottom: var(--space-md);
    line-height: 1.6;
    max-width: none;
}

.founder-quote__name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-soft);
}

.founder-quote__title {
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

/* ===================
   PRODUCT CARD ENHANCEMENTS
   Conversion-focused product cards
   =================== */

.product-card--conversion {
    display: flex;
    flex-direction: column;
}

.product-card--conversion .product-card__header {
    position: relative;
}

.product-card--conversion .product-card__claim {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--accent-clay);
    margin-bottom: var(--space-xs);
}

.product-card--conversion .card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.product-card--conversion .btn {
    flex: 1;
}

/* ===================
   CHECKOUT PROGRESS
   Clear step indicator
   =================== */

.checkout-progress {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-xl);
}

.checkout-progress__step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.checkout-progress__number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    background: var(--bone-surface);
    border: var(--border-subtle);
    color: var(--ink-muted);
}

.checkout-progress__step--active .checkout-progress__number {
    background: var(--accent-clay);
    border-color: var(--accent-clay);
    color: white;
}

.checkout-progress__step--completed .checkout-progress__number {
    background: var(--accent-sage);
    border-color: var(--accent-sage);
    color: white;
}

.checkout-progress__label {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    display: none;
}

@media (min-width: 640px) {
    .checkout-progress__label {
        display: block;
    }

    .checkout-progress__step--active .checkout-progress__label {
        color: var(--ink);
        font-weight: 500;
    }
}

.checkout-progress__divider {
    width: 40px;
    height: 1px;
    background: var(--travertine);
}

@media (min-width: 640px) {
    .checkout-progress__divider {
        width: 60px;
    }
}

/* ===================
   FORM ENHANCEMENTS
   Conversion-optimized forms
   =================== */

.form-section--highlight {
    background: var(--bone-surface);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
}

.input-row--compact {
    display: grid;
    gap: var(--space-md);
}

.input-row--compact.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.input-row--compact.cols-3 {
    grid-template-columns: 2fr 1fr 1fr;
}

@media (max-width: 640px) {

    .input-row--compact.cols-2,
    .input-row--compact.cols-3 {
        grid-template-columns: 1fr;
    }
}

/* ===================
   MOBILE THUMB-ZONE OPTIMIZATION
   CTAs in thumb reach
   =================== */

@media (max-width: 768px) {
    .mobile-cta-zone {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: var(--space-md) var(--space-lg);
        background: var(--bone-base);
        border-top: var(--border-thin) solid var(--border-light);
        z-index: 100;
    }

    .mobile-cta-zone .btn {
        width: 100%;
        padding: var(--space-lg);
        font-size: var(--text-base);
    }

    /* Add padding to body to prevent content from being hidden */
    body.has-mobile-cta {
        padding-bottom: 80px;
    }
}

/* ===================
   ANIMATED HIGHLIGHTS
   Attention-grabbing elements
   =================== */

/* Process Callout - Loophole Section */
.process-callout {
    background: var(--bone-surface);
    border: var(--border-thin) solid var(--travertine);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    max-width: 600px;
    margin: var(--space-2xl) auto;
    box-shadow: var(--shadow-sm);
}

.process-callout__headline {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    color: var(--ink);
    margin-bottom: var(--space-md);
}

.process-callout__text {
    font-size: var(--text-base);
    color: var(--ink-soft);
    line-height: 1.6;
}

/* Standard List - Final CTA Checklist */
.standard-list {
    list-style: none;
    padding: 0;
    margin: var(--space-xl) auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 400px;
}

.standard-list li {
    display: flex;
    align-items: flex-start;
    /* Safer for multi-line text */
    gap: var(--space-md);
    font-size: var(--text-lg);
    color: var(--ink);
    text-align: left;
    /* Align text left, but container is centered */
    padding: var(--space-sm) var(--space-md);
    background: var(--bone-base);
    border-radius: var(--radius-md);
    border: var(--border-subtle);
}

/* Add checkmark via pseudo-element */
.standard-list li::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CAF94' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.shimmer-text {
    background: linear-gradient(90deg,
            var(--ink) 0%,
            var(--accent-clay) 50%,
            var(--ink) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

/* ===================
   EMAIL CAPTURE
   Conversion-focused signup
   =================== */

.email-capture {
    background: var(--bone-surface);
    padding: var(--space-2xl) var(--space-xl);
    border-radius: var(--radius-lg);
    border: var(--border-thin) solid var(--border-light);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.email-capture__title {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
}

.email-capture__subtitle {
    color: var(--ink-muted);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.email-capture__form {
    display: flex;
    gap: var(--space-sm);
}

@media (max-width: 480px) {
    .email-capture__form {
        flex-direction: column;
    }
}

.email-capture__input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    border: var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bone-base);
}

.email-capture__input:focus {
    outline: none;
    border-color: var(--accent-clay);
}

.email-capture__btn {
    flex-shrink: 0;
    padding: var(--space-md) var(--space-xl);
    background: var(--ink);
    color: var(--bone-base);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.email-capture__btn:hover {
    background: var(--onyx-polished);
}

.email-capture__note {
    font-size: var(--text-xs);
    color: var(--ink-muted);
    margin-top: var(--space-md);
}

/* ===================
   HEADER ENHANCEMENTS
   Visible CTA in header
   =================== */

.header--conversion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--bone-base);
    border-bottom: var(--border-thin) solid var(--border-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.header--conversion.visible {
    transform: translateY(0);
}

.header--conversion .btn--small {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
}

/* ===================
   SECTION DIVIDERS
   Visual breathing room
   =================== */

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) 0;
}

.section-divider__line {
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: var(--travertine);
}

.section-divider__icon {
    padding: 0 var(--space-lg);
    color: var(--accent-clay);
}

/* ===================
   MINIMAL HEADER (for checkout)
   =================== */

.header--minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--bone-base);
    border-bottom: var(--border-thin) solid var(--border-light);
}

.header--minimal__logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 300;
    font-style: italic;
    color: var(--ink);
}

.header--minimal__secure {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.header--minimal__secure svg {
    width: 16px;
    height: 16px;
    color: var(--accent-sage);
}

/* ===========================================
   SOCIAL PROOF NOTIFICATIONS
   (Merged from conversion-weapons.css)
   =========================================== */

.social-proof-notification {
    position: fixed;
    bottom: var(--space-lg);
    left: var(--space-lg);
    background: white;
    border: 1px solid var(--travertine);
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 4px 12px rgba(26, 26, 24, 0.1);
    z-index: 1000;
    transform: translateX(-120%);
    transition: transform 0.3s ease;
    max-width: 320px;
}

.social-proof-notification.show {
    transform: translateX(0);
}

.social-proof-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.social-proof-icon {
    font-size: var(--text-lg);
}

.social-proof-text {
    font-size: var(--text-sm);
    color: var(--ink-soft);
}

/* ===========================================
   SCARCITY TIMER
   (Merged from conversion-weapons.css)
   =========================================== */

.scarcity-timer {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #B85C5C, #C4A484);
    color: white;
    padding: var(--space-sm) var(--space-md);
    text-align: center;
    z-index: 100;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.9;
    }
}

.scarcity-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.scarcity-text {
    font-size: var(--text-sm);
    margin-right: var(--space-sm);
}

.scarcity-countdown {
    font-family: 'SF Mono', monospace;
    font-size: var(--text-base);
    font-weight: 700;
    letter-spacing: 1px;
}

/* Mobile responsive for social proof + scarcity */
@media (max-width: 768px) {
    .social-proof-notification {
        bottom: var(--space-sm);
        left: var(--space-sm);
        right: var(--space-sm);
        max-width: none;
    }

    .scarcity-timer {
        padding: var(--space-xs) var(--space-sm);
    }

    .scarcity-text {
        font-size: var(--text-xs);
    }

    .scarcity-countdown {
        font-size: var(--text-sm);
    }
}

@media (prefers-reduced-motion: reduce) {
    .social-proof-notification {
        transition: none;
    }

    .scarcity-timer {
        animation: none;
    }
}