/**
 * spiral.css
 * Styles for The Spiral page
 * Migrated from inline styles
 */

/* ===== SCROLL PROGRESS ===== */

/* ===== VIDEO HERO ===== */
.video-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.video-hero video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
}

.video-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, var(--black) 0%, transparent 100%);
    pointer-events: none;
}

.video-hero__content {
    position: relative;
    z-index: 2;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg) var(--left-offset);
    max-width: var(--max-width-narrow);
}

.video-hero__title {
    font-size: var(--text-h1);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
}

.video-hero__subtitle {
    font-size: var(--text-body-lg);
    color: var(--cream);
    opacity: 0.9;
}

/* ===== E=MC² SECTION ===== */
.equation {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-xl) var(--left-offset);
    background: linear-gradient(180deg, var(--black) 0%, #0d0d0d 50%, var(--black) 100%);
    position: relative;
    overflow: hidden;
}

/* Ambient glow */
.equation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 245, 160, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

/* CRT Scanlines */
.equation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px
        );
    pointer-events: none;
    z-index: 2;
}

.equation__inner {
    position: relative;
    z-index: 3;
    max-width: var(--max-width-narrow);
}

.equation__formula {
    font-size: var(--text-display);
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: var(--spacing-lg);
    text-shadow:
        0 0 2px var(--white),
        0 0 4px var(--white),
        0 0 20px #00FF9F,
        0 0 40px #00FF9F,
        0 0 80px #00FF9F,
        0 0 120px rgba(0, 255, 159, 0.6);
    animation: crtFlicker 4s ease-in-out infinite;
}

@keyframes crtFlicker {
    0%, 100% { opacity: 1; filter: brightness(1); }
    5% { opacity: 0.95; filter: brightness(0.98); }
    6% { opacity: 1; filter: brightness(1.02); }
    50% { opacity: 0.98; filter: brightness(1); }
    51% { opacity: 0.92; filter: brightness(0.95); }
    52% { opacity: 1; filter: brightness(1); }
}

.equation__formula sup {
    font-size: 0.4em;
    vertical-align: super;
}

.equation__tagline {
    font-size: var(--text-h2);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--green);
    margin-bottom: var(--spacing-xl);
    text-shadow: 0 0 40px rgba(0, 245, 160, 0.4);
}

.equation__prose {
    max-width: 560px;
}

.equation__statement {
    font-size: var(--text-h3);
    color: var(--cream);
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
}

.equation__statement span {
    color: var(--grey);
}

.equation__statement strong {
    color: var(--green);
    font-weight: 600;
}

.equation__insight {
    font-size: var(--text-body);
    color: var(--cream);
    opacity: 0.8;
    line-height: 1.8;
    border-left: 2px solid var(--green);
    padding-left: var(--spacing-md);
}

/* ===== SECTION BASE ===== */
.section {
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-xl) var(--left-offset);
}

.section--charcoal {
    background: var(--charcoal);
}

.section--dark {
    background: var(--black);
}

.section__label {
    display: inline-block;
    font-size: var(--text-micro);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: var(--spacing-sm);
}

.section__label--green {
    color: var(--green);
}

.section__title {
    font-size: var(--text-h2);
    font-weight: 600;
    color: var(--cream);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    max-width: 700px;
}

.section__title--green {
    color: var(--green);
    text-shadow: 0 0 60px rgba(0, 245, 160, 0.2);
}

.section__title--gold {
    color: var(--gold);
    text-shadow: 0 0 60px rgba(184, 149, 110, 0.2);
}

.section__intro {
    font-size: var(--text-body-lg);
    color: var(--cream);
    opacity: 0.9;
    line-height: 1.8;
    max-width: 700px;
    margin-bottom: var(--spacing-sm);
}

.section__body {
    font-size: var(--text-body);
    color: var(--cream);
    opacity: 0.85;
    line-height: 1.8;
    max-width: 700px;
}

.section__body + .section__body {
    margin-top: var(--spacing-md);
}

/* ===== HIGHLIGHT TEXT ===== */
.hl-green { color: var(--green); font-weight: 500; }
.hl-gold { color: var(--gold); }

/* ===== THREE SOURCES GRID ===== */
.sources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    max-width: var(--max-width);
    margin-top: var(--spacing-lg);
}

.source-card {
    background: var(--black);
    border: 1px solid var(--grey-dark);
    padding: var(--spacing-lg) var(--spacing-md);
    transition: border-color 0.3s, transform 0.3s;
}

.source-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.source-card__icon {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: var(--spacing-sm);
}

.source-card__title {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cream);
    margin-bottom: var(--spacing-xs);
}

.source-card__desc {
    font-size: var(--text-sm);
    color: var(--grey);
    line-height: 1.6;
}

/* ===== SPIRAL STEPS ===== */
.spiral-steps {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-lg);
    max-width: var(--max-width);
}

.spiral-step {
    flex: 1;
    background: var(--charcoal);
    border: 1px solid var(--grey-dark);
    padding: var(--spacing-md);
    text-align: center;
    transition: border-color 0.3s;
}

.spiral-step:hover {
    border-color: var(--green);
}

.spiral-step__icon {
    font-size: 1.75rem;
    color: var(--green);
    margin-bottom: var(--spacing-xs);
}

.spiral-step__name {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--cream);
}

/* ===== CALLOUT ===== */
.callout {
    background: rgba(0, 245, 160, 0.04);
    border-left: 3px solid var(--green);
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    max-width: var(--max-width-narrow);
}

.callout--gold {
    background: rgba(184, 149, 110, 0.04);
    border-left-color: var(--gold);
}

.callout p {
    font-size: var(--text-body-lg);
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}

/* ===== BANNER ===== */
.banner {
    background: var(--green);
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-xl) var(--left-offset);
}

.banner--gold {
    background: var(--gold);
}

.banner__text {
    font-size: var(--text-h2);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--black);
    max-width: var(--max-width-narrow);
    line-height: 1.3;
}

/* ===== OPERATOR SECTION ===== */
.operator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
    background: var(--black);
}

.operator-image {
    position: relative;
    overflow: hidden;
}

.operator-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.operator-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);
}

.operator-name {
    font-size: var(--text-h2);
    font-weight: 700;
    color: var(--cream);
    margin-bottom: var(--spacing-xs);
}

.operator-role {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--green);
    margin-bottom: var(--spacing-md);
}

.operator-bio {
    font-size: var(--text-body);
    color: var(--cream);
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    max-width: 480px;
}

.operator-qualities {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.operator-quality {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--grey);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--grey-dark);
}

/* ===== FINAL CTA ===== */
.final-cta {
    text-align: center;
    padding: 80px var(--spacing-md);
    background: linear-gradient(180deg, var(--charcoal) 0%, var(--black) 100%);
}

.final-cta__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--cream);
    line-height: 1.3;
    margin-bottom: 24px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta__subtitle {
    font-size: 1.125rem;
    color: var(--grey);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta__button {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 16px 48px;
    background: var(--green);
    color: var(--black);
    transition: background 0.3s;
}

.final-cta__button:hover {
    background: var(--cream);
}

/* ===== FOOTER ===== */
.spiral-footer {
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-lg) var(--left-offset);
    border-top: 1px solid var(--grey-dark);
}

.footer-logo {
    height: 24px;
    opacity: 0.8;
    margin-bottom: var(--spacing-sm);
}

.footer-tagline {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--green);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .sources-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
    }

    .spiral-steps {
        flex-direction: column;
    }

    .operator-wrapper {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .operator-image {
        width: 100%;
    }

    .operator-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .operator-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

@media (max-width: 768px) {
    :root {
        --left-offset: var(--spacing-md);
    }

    body {
        padding-top: var(--header-height);
    }

    .video-hero {
        height: 50vh;
        min-height: 300px;
    }

    .equation {
        min-height: auto;
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .equation__formula {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .equation__tagline {
        font-size: var(--text-h3);
        letter-spacing: 0.08em;
    }

    .section {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .callout {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .banner {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .banner__text {
        font-size: var(--text-h3);
    }
}

::selection { background: var(--green); color: var(--black); }

/* the flythrough is a desktop experience — on phones it never appears
   (the lazy iframe never loads when the banner is hidden) */
@media (max-width: 760px){
  .fly-banner{display:none}
}
