/**
 * Cinema - Cinematic Homepage Styles
 * 
 * BEM naming convention: .block__element--modifier
 * Designed for immersive visual storytelling
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
    --c-gold: #c9a227;
    --c-gold-soft: rgba(201, 162, 39, 0.8);
    --c-dark: #0a0a0a;
    --c-darker: #050505;
    --c-overlay: rgba(0, 0, 0, 0.5);
    --c-overlay-heavy: rgba(0, 0, 0, 0.7);
    --c-text: #e8e6e1;
    --c-text-muted: rgba(232, 230, 225, 0.7);
    
    --c-transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --c-transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   CINEMA BODY
   ========================================================================== */

body.cinema {
    background: var(--c-darker);
}

body.cinema main {
    padding-top: 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.c-btn {
    display: inline-block;
    padding: 16px 48px;
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--c-dark);
    background: var(--c-gold);
    border: 1px solid var(--c-gold);
    transition: var(--c-transition);
}

.c-btn:hover {
    background: transparent;
    color: var(--c-gold);
}

.c-btn--outline {
    background: transparent;
    color: var(--c-gold);
}

.c-btn--outline:hover {
    background: var(--c-gold);
    color: var(--c-dark);
}

/* ==========================================================================
   HERO
   ========================================================================== */

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

.c-hero__image {
    position: fixed;
    inset: 0;
    z-index: 1;
}

.c-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.c-hero__video {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    opacity: 0;
    transition: opacity 1.5s ease;
}

/* Desktop video - hide on mobile */
.c-hero__video--desktop {
    display: block;
}

/* Mobile video - hide on desktop */
.c-hero__video--mobile {
    display: none;
}

@media (max-width: 768px) {
    .c-hero__video--desktop {
        display: none;
    }
    .c-hero__video--mobile {
        display: block;
    }
}

.c-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.c-hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 24px;
    max-width: 800px;
}

.c-hero__intro {
    font-size: 1rem;
    font-style: italic;
    color: var(--c-text-muted);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
}

.c-hero__title {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    color: var(--c-text);
    margin: 0 0 24px;
    letter-spacing: 0.05em;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 8px 32px rgba(0, 0, 0, 0.7);
}

.c-hero__tagline {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    margin-bottom: 40px;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
}

.c-hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--c-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: c-float 2s ease-in-out infinite;
}

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

/* ==========================================================================
   CHAPTERS
   ========================================================================== */

.c-chapter {
    position: relative;
    z-index: 10;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.c-chapter__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.c-chapter__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 8s ease-out;
}

.c-chapter:hover .c-chapter__bg img {
    transform: scale(1.03);
}

.c-chapter__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
}

.c-chapter__content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 60px 24px;
    max-width: 700px;
}

.c-chapter__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--c-gold);
    margin-bottom: 16px;
}

.c-chapter__title {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 400;
    color: var(--c-text);
    margin: 0 0 20px;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 8px 32px rgba(0, 0, 0, 0.7);
}

.c-chapter__desc {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    margin-bottom: 32px;
    line-height: 1.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* Alternate chapter - content alignment variations possible */
.c-chapter--alt {
    /* Future: offset content left or right */
}

/* ==========================================================================
   VISUAL BREAK
   ========================================================================== */

.c-visual {
    position: relative;
    z-index: 10;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.c-visual__image {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.c-visual__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.c-visual__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.35);
}

.c-visual__content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 24px;
}

.c-visual__quote {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: clamp(1.25rem, 4vw, 2rem);
    font-style: italic;
    font-weight: 400;
    color: var(--c-text);
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 8px 32px rgba(0, 0, 0, 0.7);
}

.c-visual__quote cite {
    display: block;
    margin-top: 16px;
    font-size: 0.85rem;
    font-style: normal;
    color: var(--c-text-muted);
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   TIMELINE TEASER
   ========================================================================== */

.c-timeline {
    position: relative;
    z-index: 10;
    background: var(--c-darker);
    padding: 100px 24px;
    text-align: center;
}

.c-timeline__header {
    margin-bottom: 60px;
}

.c-timeline__title {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    color: var(--c-text);
    margin: 0;
    letter-spacing: 0.05em;
}

.c-timeline__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 48px;
}

.c-timeline__card {
    background: var(--c-dark);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-top: 3px solid var(--c-gold);
    padding: 32px 24px;
    text-align: left;
}

.c-timeline__year {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 1.5rem;
    color: var(--c-gold);
    display: block;
    margin-bottom: 16px;
}

.c-timeline__text {
    font-size: 0.95rem;
    color: var(--c-text-muted);
    line-height: 1.7;
    margin: 0;
}

/* ==========================================================================
   EXPLORE GRID
   ========================================================================== */

.c-explore {
    position: relative;
    z-index: 10;
    background: var(--c-dark);
    padding: 0;
}

.c-explore__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.c-explore__card {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    text-decoration: none;
}

.c-explore__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--c-transition-slow);
}

.c-explore__card:hover img {
    transform: scale(1.08);
}

.c-explore__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
    transition: var(--c-transition);
}

.c-explore__card:hover .c-explore__overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.c-explore__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    color: var(--c-text);
}

.c-explore__content h3 {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 8px;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 6px 24px rgba(0, 0, 0, 0.7);
}

.c-explore__content p {
    font-size: 0.9rem;
    color: var(--c-text-muted);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   CLOSING
   ========================================================================== */

.c-closing {
    position: relative;
    z-index: 10;
    background: var(--c-darker);
    padding: 60px 24px 30px;
    text-align: center;
}

.c-closing__latin {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--c-gold-soft);
    margin: 0;
    letter-spacing: 0.1em;
}

.c-closing__translation {
    font-size: 0.85rem;
    color: var(--c-text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
}

/* ==========================================================================
   RESPONSIVE - TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    .c-explore__content {
        padding: 24px;
    }
    
    .c-explore__content h3 {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .c-hero {
        min-height: 100vh;
        min-height: 100svh; /* Safari viewport fix */
    }
    
    .c-hero__scroll {
        bottom: 24px;
    }
    
    .c-chapter {
        min-height: 70vh;
    }
    
    .c-visual {
        height: 50vh;
        min-height: 300px;
    }
    
    .c-timeline {
        padding: 80px 24px;
    }
    
    .c-timeline__cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .c-timeline__year {
        font-size: 1.25rem;
    }
    
    .c-explore__grid {
        grid-template-columns: 1fr;
    }
    
    .c-explore__card {
        aspect-ratio: 16/9;
    }
    
    .c-closing {
        padding: 80px 24px;
    }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .c-hero__scroll {
        animation: none;
    }
    
    .c-chapter__bg img,
    .c-explore__card img {
        transition: none;
    }
    
    .c-chapter:hover .c-chapter__bg img,
    .c-explore__card:hover img {
        transform: none;
    }
}