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

body {
    background-color: #0a0a0a;
    color: #e5e5e5;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    cursor: auto;
}

:root {
    /* EthanCMS theme variables (Phase 1) */
    --cms-rust: #83B1F3;
    --cms-amber: #9bc2f5;
    --cms-steel: #2a2a2a;
    --cms-gunmetal: #1a1a1a;
    --cms-void: #0a0a0a;
    --cms-charcoal: #141414;
}

/* Override Tailwind theme tokens to allow runtime theme edits */
.text-rust { color: var(--cms-rust) !important; }
.bg-rust { background-color: var(--cms-rust) !important; }
.border-rust { border-color: var(--cms-rust) !important; }
.hover\:text-rust:hover { color: var(--cms-rust) !important; }
.hover\:bg-rust:hover { background-color: var(--cms-rust) !important; }
.hover\:border-rust:hover { border-color: var(--cms-rust) !important; }

.text-amber { color: var(--cms-amber) !important; }
.bg-amber { background-color: var(--cms-amber) !important; }
.border-amber { border-color: var(--cms-amber) !important; }
.hover\:text-amber:hover { color: var(--cms-amber) !important; }
.hover\:bg-amber:hover { background-color: var(--cms-amber) !important; }
.hover\:border-amber:hover { border-color: var(--cms-amber) !important; }

.bg-void { background-color: var(--cms-void) !important; }
.bg-steel { background-color: var(--cms-steel) !important; }
.bg-gunmetal { background-color: var(--cms-gunmetal) !important; }
.bg-charcoal { background-color: var(--cms-charcoal) !important; }

.border-steel { border-color: var(--cms-steel) !important; }

/* Mobile menu: solid void (no translucent / blur so content doesn’t show through) */
#mobile-nav-panel {
    background-color: var(--cms-void) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

@media (max-width: 767px) {
    nav:has(#mobile-nav-panel:not(.hidden)) {
        background-color: var(--cms-void) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        mix-blend-mode: normal !important;
    }
}

/* Noise Texture */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Typography */
.display-text {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.9;
    font-weight: 700;
}

.mono-text {
    font-family: 'Space Grotesk', monospace;
    letter-spacing: 0.1em;
}

/* Thin subheader and supporting text (simple, light weight) */
.subheader-thin {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

/* WebGL Container */
#webgl-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
}

/* Hero Layout */
.hero-wrapper {
    position: relative;
    min-height: 110vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 2rem 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    opacity: 0.85;
}

.hero-bg-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.55) 0%,
        rgba(10, 10, 10, 0.78) 35%,
        #0a0a0a 75%
    );
    pointer-events: none;
}

/* Fixed diagonal for Ethan Cope branding (no scroll animation) */
.brand-diagonal {
    transform: skewY(-3deg);
    display: inline-block;
}

.hero-content {
    position: relative;
    z-index: 20;
    padding-top: 10vh;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Center Start Training at bottom of viewport - use top margin to sit at bottom */
.hero-cta-wrapper {
    margin-top: 4rem;
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 2rem;
}
@media (min-width: 768px) {
    .hero-cta-wrapper {
        margin-top: 72vh;
        width: 100%;
        display: flex;
        justify-content: center;
        padding-bottom: 2.5rem;
    }
}

/* Programs section: normal document flow (no sticky / spacer scroll trap) */
.programs-scroll-section {
    position: relative;
    z-index: 10;
    /* Breathing room above Programs (was -8rem overlap) */
    margin-top: clamp(1.5rem, 4vw, 3.5rem);
    background-color: #0a0a0a;
    /* Keep programs visually continuous into results - no empty gutter */
    margin-bottom: 0;
}

/* Less gap between About and Programs; sit above Programs overlap so button stays clickable */
#about {
    position: relative;
    z-index: 10001;
    min-height: auto;
    padding-top: 3rem;
    /* Breathing room under CTA + paint void so no sliver of charcoal/WebGL shows through */
    padding-bottom: clamp(3rem, 7vw, 5.5rem);
    background-color: var(--cms-void);
}

.programs-scroll-spacer {
    display: none;
    min-height: 0 !important;
    height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
}

.programs-scroll-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    top: auto;
    /* Room under fixed nav; hero + headline clear the card grid below */
    padding: clamp(5.5rem, 11vh, 7.5rem) 1.5rem 2.5rem;
    /* Don’t clip the pricing grid - overflow hidden caused void “bars” / black flashes */
    overflow-x: hidden;
    overflow-y: visible;
    box-sizing: border-box;
    background-color: #0a0a0a;
}

.programs-hero {
    text-align: center;
    margin-bottom: clamp(1.75rem, 5vw, 3.5rem);
    padding-bottom: clamp(0.5rem, 2vw, 1.25rem);
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 0;
    opacity: 1;
    transform: none;
}

.programs-intro {
    opacity: 1;
    will-change: opacity;
    /* Keep “01 - PROGRAMS” clear of the oversized headline below */
    margin-bottom: clamp(0.65rem, 2vw, 1.1rem);
}

.programs-title {
    font-size: clamp(3.5rem, 16vw, 12rem);
    line-height: 0.9;
    margin: 0;
    /* Space between glyph box and pricing cards (tight line-height still bleeds visually) */
    margin-bottom: clamp(0.35rem, 1.5vw, 0.85rem);
    padding-bottom: clamp(0.15rem, 0.8vw, 0.45rem);
    color: #e5e5e5;
    opacity: 1;
    will-change: transform;
    transform-origin: center top;
}

@media (prefers-reduced-motion: reduce) {
    .programs-hero {
        opacity: 1;
        transform: none;
    }

    .programs-intro,
    .programs-title {
        transform: none;
    }
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 4vw, 2.5rem);
    max-width: 1400px;
    width: 100%;
    /* Clear separation from hero - large “PROGRAMS” must not sit on the cards */
    margin: clamp(2rem, 5vh, 3.5rem) auto 0;
    padding: 0 1rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

/* Results: seamless handoff after programs (same base tone, slight overlap) */
#results {
    margin-top: max(-12vh, -8rem);
    padding-top: max(12vh, 8rem);
    background-color: #0a0a0a;
}

#results .screen-section {
    margin-top: 0;
}

@media (max-width: 900px) {
    /* Stack pricing cards; desktop keeps 3-column grid */
    .programs-grid {
        grid-template-columns: 1fr;
        max-width: 28rem;
        gap: 1.25rem;
        padding: 0 0.5rem;
    }

    .programs-scroll-content {
        padding: clamp(4.75rem, 12vw, 6rem) 0.5rem 2rem;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .programs-hero {
        margin-bottom: clamp(1.25rem, 4vw, 2rem);
        padding-bottom: 0.5rem;
    }

    .programs-title {
        font-size: clamp(2.25rem, 14vw, 4.25rem);
        line-height: 0.92;
        margin-bottom: 0.25rem;
        padding-bottom: 0.2rem;
    }

    .programs-grid {
        margin-top: clamp(1.25rem, 3.5vh, 2rem);
    }

    .programs-section .program-reveal-card.program-card:hover {
        transform: none;
    }
}

.program-reveal-card {
    opacity: 0;
    transform: translateY(2.75rem) scale(0.92);
    transform-origin: center 85%;
    will-change: opacity, transform;
}

/* Bottom CTA bar - shows on scroll */
.bottom-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid #2a2a2a;
    padding: 1rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.35s ease;
}
.bottom-cta-bar.is-visible {
    transform: translateY(0);
}
.bottom-cta-inner {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}
.bottom-cta-secondary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border: 1px solid #2a2a2a;
    color: #e5e5e5;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: border-color 0.3s, color 0.3s;
}
.bottom-cta-secondary:hover {
    border-color: #83B1F3;
    color: #83B1F3;
}

/* Programs section: above fixed noise/WebGL so cards stay visible; below #about so CTA button isn’t covered */
.programs-section {
    z-index: 9999;
}

/* Nutrition calculator: full-screen, lighter background on scroll */
.nutrition-calc-section {
    background-color: #1e1e1e;
    min-height: 100vh;
    z-index: 10;
}

/* Screen Fill Sections */
.screen-section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Text Reveal Animation */
.reveal-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.reveal-text span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

/* Magnetic Button */
.magnetic-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2.5rem;
    background: transparent;
    border: 1px solid #e5e5e5;
    color: #e5e5e5;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #83B1F3;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}

.magnetic-btn:hover::before {
    transform: translateY(0);
}

.magnetic-btn span {
    position: relative;
    z-index: 1;
}

.magnetic-btn:hover {
    border-color: #83B1F3;
    color: #0a0a0a;
}

/* Section Headers */
.section-marker {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #83B1F3;
    margin-bottom: 2rem;
}

/* Parallax Images */
.parallax-wrapper {
    position: relative;
    overflow: hidden;
    height: 100vh;
    width: 100%;
}

.parallax-img {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
}

/* Stats */
.stat-number {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 1;
    color: #83B1F3;
    font-weight: 700;
}

/* Program Cards */
.program-card {
    position: relative;
    padding: 3rem;
    background: #141414;
    border: 1px solid #2a2a2a;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(131, 177, 243, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.6s;
    /* Must not capture clicks — otherwise buttons/links inside the card are dead (e.g. client portal program CTAs). */
    pointer-events: none;
}

.program-card:hover::before {
    opacity: 1;
}

.program-card:hover {
    border-color: #83B1F3;
    transform: translateY(-10px);
}

/* Home pricing / programs grid: stronger hover (works alongside scroll reveal) */
.programs-section .program-reveal-card.program-card {
    transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease,
        background-color 0.4s ease,
        filter 0.4s ease;
}
.programs-section .program-reveal-card.program-card:hover {
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.55),
        0 0 48px rgba(131, 177, 243, 0.14);
    border-color: rgba(131, 177, 243, 0.55);
    filter: brightness(1.06);
}

/* Elite tier: larger footprint + glow */
.program-card-elite {
    position: relative;
    padding: 3.5rem 3rem !important;
    border-width: 2px;
    box-shadow: 0 0 0 1px rgba(131, 177, 243, 0.25),
        0 24px 64px rgba(131, 177, 243, 0.12);
    z-index: 2;
}
@media (min-width: 901px) {
    .program-card-elite {
        transform-origin: center center;
    }
}
.program-card-popular {
    box-shadow: 0 0 24px rgba(131, 177, 243, 0.45);
}

/* Pre-built programs (programs.html): exercise tables */
.prebuilt-table tbody tr:last-child {
    border-bottom: none;
}

/* Contact: top cards + quiz */
.contact-top-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    text-decoration: none;
    color: inherit;
    border-radius: 0.5rem;
    transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease,
        background-color 0.35s ease;
}
.contact-top-card:hover {
    border-color: rgba(131, 177, 243, 0.55) !important;
    box-shadow: 0 0 40px rgba(131, 177, 243, 0.12), 0 16px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(-4px);
    background-color: rgba(26, 26, 26, 0.85) !important;
}

.contact-reveal-field {
    font-family: 'Space Grotesk', monospace;
    letter-spacing: 0.06em;
    font-size: 0.8125rem;
    color: #9ca3af;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 0.875rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.contact-reveal-field:hover {
    border-color: rgba(131, 177, 243, 0.45);
    color: #e5e5e5;
}
.contact-reveal-field.contact-reveal-field--revealed {
    color: #fff;
    border-color: rgba(131, 177, 243, 0.35);
}
.contact-reveal-hint {
    color: #83b1f3;
}

.quiz-progress-track {
    height: 3px;
    background: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.quiz-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #83b1f3, #9bc2f5);
    transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.quiz-step-panel {
    display: none;
    animation: quizFadeIn 0.4s ease forwards;
}
.quiz-step-panel.is-active {
    display: block;
}
@keyframes quizFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin: status pills + calendar */
.admin-status {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    font-family: 'Space Grotesk', monospace;
    border-radius: 2px;
}
.admin-status-approved {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}
.admin-status-denied {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.45);
}
.admin-status-pending {
    background: rgba(234, 179, 8, 0.12);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.45);
}

.cal-day-cell {
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.cal-day-cell:hover {
    border-color: rgba(131, 177, 243, 0.6) !important;
    background-color: rgba(131, 177, 243, 0.08) !important;
    box-shadow: 0 0 20px rgba(131, 177, 243, 0.1);
}
.cal-day-cell.is-selected {
    border-color: #83b1f3 !important;
    box-shadow: 0 0 0 1px rgba(131, 177, 243, 0.5);
}

.cal-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.cal-dot-approved {
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}
.cal-dot-pending {
    background: #facc15;
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.5);
}
.cal-dot-denied {
    background: #f87171;
}

/* Testimonial cards (results page) */
.testimonial-card {
    border: 1px solid #2a2a2a;
    background: #141414;
    padding: 1.75rem;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.testimonial-card:hover {
    border-color: rgba(131, 177, 243, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.testimonial-card-result {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.1;
    color: #83b1f3;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.before-after-tile {
    aspect-ratio: 3 / 4;
    background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
    border: 1px dashed #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

/* Form Styles */
.dark-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #3a3a3a;
    padding: 1rem 0;
    color: #e5e5e5;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.dark-input:focus {
    outline: none;
    border-color: #83B1F3;
}

.dark-input::placeholder {
    color: #555;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #83B1F3;
}

/* Selection */
::selection {
    background: #83B1F3;
    color: #0a0a0a;
}

/* Line animation */
.line-draw {
    width: 0;
    height: 1px;
    background: #83B1F3;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.line-draw.active {
    width: 100%;
}

/* Page header (for inner pages) */
.page-header {
    padding-top: 8rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid #2a2a2a;
}

/* Space below header band before filters or first content (programs, results) */
main > header.page-header + section,
main > header.page-header + div {
    padding-top: 3rem;
}

@media (min-width: 768px) {
    main > header.page-header + section,
    main > header.page-header + div {
        padding-top: 3.5rem;
    }
}

/* Card / table on dark */
.table-dark th {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #888;
    border-bottom: 1px solid #2a2a2a;
    padding: 1rem 1.25rem;
}

.table-dark td {
    border-bottom: 1px solid #1a1a1a;
    padding: 1rem 1.25rem;
}

.table-dark tr:hover td {
    background: rgba(131, 177, 243, 0.05);
}

/* Badge */
.badge {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    padding: 0.25rem 0.5rem;
    border: 1px solid #2a2a2a;
}

.badge-rust {
    border-color: #83B1F3;
    color: #83B1F3;
}

/* Admin tab active state */
.admin-tab.active,
.admin-tab.border-rust {
    border-bottom-color: #83B1F3 !important;
}

/* Client portal tabs */
.client-tab.active,
.client-tab.border-rust {
    border-bottom-color: #83B1F3 !important;
}

/* Footer glassmorphism: full bleed, glass behind text */
.footer-glass {
    position: relative;
    z-index: 9999;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 3rem 0;
    border-top: 1px solid #2a2a2a;
    overflow: hidden;
}

.footer-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.footer-glass .footer-inner {
    position: relative;
    z-index: 1;
}

@media (pointer: coarse) {
    .magnetic-btn { cursor: pointer; }
}

/* Testimonials: slide in from left on scroll */
.testimonial-reveal {
    opacity: 0;
    transform: translateX(-48px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.testimonial-reveal.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Results page: video-backed testimonial rotator */
.video-testimonial-stage {
    position: relative;
    border: 1px solid #2a2a2a;
    min-height: min(70vh, 720px);
    overflow: hidden;
    background: #0a0a0a;
}

.video-testimonial-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-testimonial-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
}

.video-testimonial-card-wrap {
    position: relative;
    z-index: 2;
    min-height: min(70vh, 720px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.video-testimonial-card {
    position: absolute;
    width: min(760px, 100% - 2rem);
    border: 1px solid rgba(131, 177, 243, 0.35);
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

.video-testimonial-card.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.video-testimonial-result {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    line-height: 1;
    margin-bottom: 0.9rem;
    color: #83B1F3;
}

.video-testimonial-controls {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: center;
}

.video-testimonial-btn {
    border: 1px solid #83B1F3;
    background: rgba(10, 10, 10, 0.75);
    color: #e5e5e5;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.65rem 1rem;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.video-testimonial-btn:hover {
    background: #83B1F3;
    color: #0a0a0a;
}

/* Results page: long-form client stories (below video reel) */
.client-stories-section {
    position: relative;
    background:
        radial-gradient(ellipse 90% 50% at 50% 0%, rgba(131, 177, 243, 0.08), transparent 55%),
        linear-gradient(180deg, #080808 0%, #0a0a0a 40%, #0b0b0b 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.client-stories-section .client-stories-intro {
    padding-top: clamp(3rem, 8vw, 5rem);
    padding-bottom: clamp(3rem, 7vw, 4.5rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.client-stories-section .client-stories-rule {
    width: 3px;
    min-height: 6rem;
    background: linear-gradient(180deg, var(--cms-rust), transparent);
    border-radius: 2px;
    display: none;
}

@media (min-width: 768px) {
    .client-stories-section .client-stories-rule {
        display: block;
    }
}

.client-stories-section .story-panel {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.85s ease, transform 0.85s ease;
    will-change: opacity, transform;
}

.client-stories-section .story-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.client-stories-section .story-card {
    position: relative;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.018) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--cms-rust);
    border-radius: 4px;
    box-shadow:
        0 28px 72px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.25) inset;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.client-stories-section .story-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: min(40%, 220px);
    height: 100%;
    background: radial-gradient(ellipse at 100% 0%, rgba(131, 177, 243, 0.06), transparent 70%);
    pointer-events: none;
    border-radius: 0 4px 4px 0;
}

.client-stories-section .story-kicker {
    letter-spacing: 0.26em;
}

.client-stories-section .story-meta {
    letter-spacing: 0.18em;
}

.client-stories-section .story-headline {
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
}

.client-stories-section .story-quote {
    position: relative;
    z-index: 1;
    color: rgba(245, 245, 245, 0.94);
}

.client-stories-section .story-tags {
    position: relative;
    z-index: 1;
}

.client-stories-section .story-tags span {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.035);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-family: 'Space Grotesk', monospace;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.72);
    transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.client-stories-section .story-tags span:hover {
    border-color: rgba(131, 177, 243, 0.45);
    color: rgba(255, 255, 255, 0.95);
    background: rgba(131, 177, 243, 0.06);
}

.client-stories-section .final-cta-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
}

.client-stories-section .cta-button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 1.5rem;
    border: 1px solid rgba(131, 177, 243, 0.75);
    color: #e8f0ff;
    background: rgba(131, 177, 243, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.76rem;
    font-family: 'Space Grotesk', monospace;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.client-stories-section .cta-button-primary:hover {
    background: rgba(131, 177, 243, 0.2);
    border-color: var(--cms-rust);
    transform: translateY(-2px);
    color: #fff;
}

.client-stories-section .cta-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.88);
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.76rem;
    font-family: 'Space Grotesk', monospace;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.client-stories-section .cta-button-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: #fff;
}

@media (max-width: 767px) {
    .client-stories-section .story-panel {
        transform: translateY(28px);
    }
}

/* -- Mobile site-wide (≤900px): no effect on viewports ≥901px -- */
@media (max-width: 900px) {
    .results-float-badge {
        position: static;
        margin-top: 1.25rem;
        margin-left: auto;
        max-width: none;
        width: fit-content;
        padding: 1rem 1.25rem;
    }

    .video-testimonial-stage,
    .video-testimonial-card-wrap {
        min-height: min(58vh, 520px);
    }

    .video-testimonial-card-wrap {
        padding: 1rem 1rem 4.5rem;
    }

    .video-testimonial-card {
        width: calc(100% - 1rem);
        padding: 1rem;
    }

    #admin-dashboard .bg-charcoal.border.border-steel.overflow-hidden,
    #client-dashboard .bg-charcoal.border.border-steel.overflow-hidden {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .program-card:hover {
        transform: none;
    }

    .bottom-cta-inner {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .magnetic-btn {
        padding: 1rem 1.35rem;
        font-size: 0.7rem;
        max-width: 100%;
        justify-content: center;
        text-align: center;
    }

    .footer-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    input.dark-input,
    textarea.dark-input,
    select.dark-input {
        font-size: 16px; /* avoids iOS zoom on focus */
    }
}
