/* ========================================
   Reset & Base Styles
   Updated 2026.02.11 1242
   ======================================== */

.interactive-slides-container *,
.interactive-slides-container *::before,
.interactive-slides-container *::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #0a0e27;
    --secondary-color: #1a237e;
    --accent-color: #D4A574;
    --accent-gold: #FFB300;
    --text-color: #e8e8e8;
    --text-dark: #333;
    --bg-dark: #000;
    --bg-light: #fff;
    --space-gradient: linear-gradient(135deg, #0a0e27 0%, #1a237e 50%, #4a148c 100%);
}

/* Note: scroll-behavior moved to container to avoid WordPress conflicts */

body {
    margin: 0;
}

/* Override WordPress theme's overflow:hidden on .site which breaks sticky */
.site:has(.interactive-slides-container) {
    overflow: visible;
}

.interactive-slides-container {
    font-family: Georgia, 'Times New Roman', Times, serif;
    line-height: 1.75;
    color: var(--text-color);
    background-color: var(--bg-dark);
    font-size: 18px;
    scroll-behavior: smooth;
    /* Note: Do NOT add overflow-x: hidden here — it breaks position: sticky */
}

.interactive-slides-container .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--space-gradient);
    z-index: 1;
}

.hero-background picture,
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 90%, white, transparent);
    background-size: 200% 200%;
    animation: stars 60s linear infinite;
    opacity: 0.8;
}

@keyframes stars {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
}

.hero-title {
    font-family: 'Arial Black', 'Impact', 'Haettenschweiler', 'Franklin Gothic Bold', sans-serif;
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 900;
    color: var(--bg-light);
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(212, 165, 116, 0.4);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-stretch: expanded;
}

.hero-subtitle {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 400;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-byline {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-color);
    margin-bottom: 60px;
    font-style: italic;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    transform: rotate(-45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ========================================
   Introduction Section
   ======================================== */

.intro-section {
    padding: 100px 20px;
    background: linear-gradient(to bottom, var(--bg-dark) 0%, var(--primary-color) 100%);
}

.intro-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-color);
    opacity: 0; /* Hidden until .fade-in is added by IntersectionObserver */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Story Sections
   ======================================== */

.story-section {
    position: relative;
    padding: 120px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    background-color: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* REMOVED overflow-x: hidden - it breaks position: sticky on child elements */
}

.story-section:nth-child(even) {
    background-color: #0d1129;
}

.sticky-container {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: start;
}

/* Blue Ghost (Story 10): Wrapper for sticky behavior */
.blue-ghost-sticky-wrapper {
    display: flex;
    flex-direction: row;
    grid-column: 1 / -1; /* Span both columns */
    gap: 60px;
}

.blue-ghost-sticky-wrapper > * {
    flex: 1; /* Equal width columns */
}

.story-image-container {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: block;
}

.story-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.story-image.zoom {
    transform: scale(1.5);
}

.story-content {
    padding: 40px 0;
    /* REMOVED min-height: 100vh - it was causing nested scrollbars in WordPress */
}

.story-number {
    font-family: 'Arial Black', 'Impact', sans-serif;
    font-size: clamp(8rem, 20vw, 16rem);
    color: var(--accent-color);
    font-weight: 900;
    margin-bottom: -80px;
    letter-spacing: 0;
    line-height: 1;
    opacity: 0.15;
    position: relative;
    z-index: 0;
    text-shadow: 0 0 40px rgba(212, 165, 116, 0.3);
}

.story-title {
    font-family: 'Arial Black', 'Franklin Gothic Medium', 'Impact', sans-serif;
    font-size: clamp(2rem, 4.5vw, 4rem);
    color: var(--bg-light);
    margin-bottom: 40px;
    line-height: 1.1;
    font-weight: 900;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.scroll-step {
    padding: 20px 0;
    opacity: 1;
}

.scroll-step p {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.05rem, 2.2vw, 1.15rem);
    line-height: 1.8;
    color: var(--text-color);
    max-width: 70ch;
    margin-bottom: 1.2rem;
}

.scroll-step p:last-child {
    margin-bottom: 0;
}

/* Image Credits */
.image-credit {
    margin-top: 15px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    padding: 0 20px;
    font-family: Georgia, serif;
    line-height: 1.4;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    padding-top: 10px;
}

/* ========================================
   Video Interstitial (Blue Ghost Landing)
   ======================================== */

.video-interstitial {
    grid-column: 1 / -1; /* Span all columns (both on desktop) */
    width: calc(100% + 40px); /* Extend beyond 20px padding on each side */
    margin-left: -20px;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.landing-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content after video - position in right column on desktop only */
.video-interstitial + .story-content {
    grid-column: 2; /* Place in right column on desktop */
}

@media (max-width: 1024px) {
    .video-interstitial + .story-content {
        grid-column: 1; /* Full width on tablet/mobile */
    }

    .video-interstitial {
        grid-column: 1; /* Full width on tablet/mobile */
    }
}

/* Video credit styling */
.video-credit {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-family: Georgia, serif;
    line-height: 1.4;
    z-index: 5;
}

/* Mobile: Slightly reduced height for better context */
@media (max-width: 768px) {
    .video-interstitial {
        height: 80vh;
    }

    .video-credit {
        font-size: 0.7rem;
        bottom: 15px;
        left: 15px;
        right: 15px;
    }
}

/* ========================================
   Story 7: Biosignatures Second Image
   ======================================== */

/* Desktop: Show second image in sticky container with spacing */
.biosig-second-image {
    margin-top: 30px;
}

/* Desktop: Hide the mobile version */
.biosig-second-image-mobile {
    display: none;
}

/* Tablet/Mobile: Hide sticky container version, show end-of-story version */
@media (max-width: 1024px) {
    .biosig-second-image {
        display: none; /* Hide sticky container version */
    }

    .biosig-second-image-mobile {
        display: block; /* Show at end of story */
        margin-top: 30px;
    }
}

/* ========================================
   Story 7: Asteroid Comparison
   ======================================== */

.story-comparison-container {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comparison-wrapper {
    display: flex;
    gap: 20px;
    align-items: center;
}

.comparison-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-label {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(212, 165, 116, 0.9);
    color: var(--bg-dark);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 900;
    font-size: 1.3rem;
    font-family: 'Arial Black', 'Impact', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Story 8: Galaxy Zoom Effect
   ======================================== */

.zoom-container {
    position: relative;
}

.zoom-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.zoom-container.zooming .zoom-indicator {
    opacity: 1;
}

.zoom-image {
    transition: transform 1.5s ease-out;
}

.zoom-container.zooming .zoom-image {
    transform: scale(2.5);
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-color);
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    max-width: 600px;
    margin: 20px auto 0;
}

/* ========================================
   Responsive Design - Tablet
   ======================================== */

@media (max-width: 1024px) {
    .story-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sticky-container {
        position: relative;
        top: 0;
        margin-top: 60px;
        margin-bottom: 0;
    }

    .story-number {
        margin-top: -20px;
    }

    .story-split-container,
    .story-comparison-container {
        position: relative;
        top: 0;
        margin-bottom: 0;
    }

    .scroll-step {
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .scroll-step p {
        margin-bottom: 0;
    }

    /* Blue Ghost wrapper becomes single column on tablet */
    .blue-ghost-sticky-wrapper {
        flex-direction: column;
        gap: 40px;
    }
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .intro-section {
        padding: 60px 20px;
    }

    .intro-text {
        font-size: 1.1rem;
    }

    .story-section {
        padding: 40px 15px;
        gap: 30px;
    }

    .story-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .scroll-step {
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .scroll-step p {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .story-split-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 15px;
    }

    .split-image {
        min-height: 250px;
    }

    .story-comparison-container {
        flex-direction: column;
        height: auto;
    }

    .comparison-image {
        width: 100%;
        min-height: 250px;
    }

    .image-label {
        font-size: 1rem;
        padding: 8px 15px;
    }

    /* Blue Ghost wrapper on mobile */
    .blue-ghost-sticky-wrapper {
        gap: 30px;
    }
}

/* ========================================
   Animation & Transition Classes
   ======================================== */

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

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

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   Sidebar Sections
   ======================================== */

.sidebar-section {
    padding: 120px 0;
    background-color: #0D1129;
    background: linear-gradient(135deg, #0D1129 0%, #1a1f3a 100%);
    border-top: 2px solid rgba(212, 165, 116, 0.2);
    border-bottom: 2px solid rgba(212, 165, 116, 0.2);
}

.sidebar-section .container {
    max-width: 900px;
    padding: 0 40px;
}

.sidebar-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-intro {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-style: italic;
}

.sidebar-content {
    display: grid;
    gap: 2.5rem;
}

.sidebar-content h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.sidebar-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
    color: var(--text-color);
}

.sidebar-content strong {
    color: var(--accent-color);
    font-weight: normal;
}

/* Stories to Watch for in 2026 */
.watch-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.watch-number {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
}

.watch-item p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
    padding-top: 0.25rem;
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-section {
        padding: 60px 0;
    }

    .sidebar-title {
        font-size: 2rem;
    }

    .sidebar-intro {
        font-size: 1.1rem;
    }

    .sidebar-content h3 {
        font-size: 1.3rem;
    }

    .sidebar-content p {
        font-size: 1rem;
    }

    .watch-item {
        grid-template-columns: 50px 1fr;
        gap: 1rem;
    }

    .watch-number {
        font-size: 2.5rem;
    }

    .watch-item p {
        font-size: 1rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .hero-section,
    .scroll-indicator {
        display: none;
    }

    .story-section {
        page-break-inside: avoid;
        grid-template-columns: 1fr;
    }

    .scroll-step {
        opacity: 1 !important;
        min-height: auto;
    }
}

/* ========================================
   Accessibility
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
