/* lupin.day — Cinematic Pastel Experience */
/* Palette: #F2C4CE, #D4C5E2, #B8D4E3, #B8E0D2, #F5E6A3, #F5D5C8, #2D2D2D, #1A1A1A, #6B6B6B, #AAAAAA */
/* Fonts: Abril Fatface (display), Barlow (body), Barlow Condensed (labels) */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Barlow', sans-serif;
    background-color: #1A1A1A;
    color: #2D2D2D;
    overflow-x: hidden;
}

/* ============================================
   TITLE CARD
   ============================================ */
.title-card {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 56.25vw;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #1A1A1A;
    overflow: hidden;
}

.letterbox-bar {
    position: absolute;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #1A1A1A;
    z-index: 10;
    transition: height 0.4s ease-out;
}

.letterbox-top {
    top: 0;
}

.letterbox-bottom {
    bottom: 0;
}

.letterbox-bar.visible {
    height: 24px;
}

.title-frame {
    position: relative;
    z-index: 5;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    background-color: #F2C4CE;
}

.title-frame.visible {
    opacity: 1;
}

.site-title {
    font-family: 'Abril Fatface', serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #2D2D2D;
    letter-spacing: -0.02em;
    line-height: 1;
}

.site-title .letter {
    display: inline-block;
    opacity: 0;
    transform: scale(1.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.site-title .letter.visible {
    opacity: 1;
    transform: scale(1);
}

.title-rule {
    width: 0;
    height: 1px;
    background-color: #AAAAAA;
    margin: 20px auto;
    transition: width 0.4s ease-out;
}

.title-rule.visible {
    width: 200px;
}

.title-subtitle {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6B6B6B;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.title-subtitle.visible {
    opacity: 1;
}

/* ============================================
   SCENE GRID
   ============================================ */
.scene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background-color: #1A1A1A;
}

/* ============================================
   SCENE CARDS
   ============================================ */
.scene-card {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(45, 45, 45, 0.08);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease;
    cursor: default;
}

.scene-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.scene-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(45, 45, 45, 0.15);
}

/* Pastel backgrounds */
.scene-card[data-pastel="pink"] { background-color: #F2C4CE; }
.scene-card[data-pastel="lavender"] { background-color: #D4C5E2; }
.scene-card[data-pastel="sky"] { background-color: #B8D4E3; }
.scene-card[data-pastel="mint"] { background-color: #B8E0D2; }
.scene-card[data-pastel="lemon"] { background-color: #F5E6A3; }
.scene-card[data-pastel="peach"] { background-color: #F5D5C8; }

/* ============================================
   SCENE LABELS
   ============================================ */
.scene-label {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(45, 45, 45, 0.5);
    z-index: 5;
    transition: color 0.2s ease;
}

.scene-card:hover .scene-label {
    color: #2D2D2D;
}

/* ============================================
   CROSSHAIR OVERLAY
   ============================================ */
.crosshair-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    opacity: 0.03;
    transition: opacity 0.2s ease;
    background-image:
        linear-gradient(#2D2D2D 1px, transparent 1px),
        linear-gradient(90deg, #2D2D2D 1px, transparent 1px);
    background-size: 100% 100%;
    background-position: center center;
}

.scene-card:hover .crosshair-overlay {
    opacity: 0.08;
}

/* ============================================
   CARD CONTENT
   ============================================ */
.card-content {
    position: relative;
    z-index: 4;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.card-heading {
    font-family: 'Abril Fatface', serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    color: #2D2D2D;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1.1;
}

.card-body {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.05vw, 1.1rem);
    line-height: 1.7;
    color: #2D2D2D;
}

/* ============================================
   CLAPPERBOARD CARD
   ============================================ */
.clapperboard-card {
    position: relative;
}

.clapper-stripes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: repeating-linear-gradient(
        45deg,
        #1A1A1A,
        #1A1A1A 12px,
        #FFFFFF 12px,
        #FFFFFF 24px
    );
    z-index: 6;
}

.clapperboard-card .card-content {
    padding-top: 60px;
}

/* ============================================
   ESTABLISHING SHOTS
   ============================================ */
.establishing-shot {
    grid-column: 1 / -1;
    aspect-ratio: 21 / 9;
    clip-path: inset(0 10% 0 10%);
    transition: opacity 0.5s ease, transform 0.5s ease, clip-path 0.6s ease-out, box-shadow 0.2s ease;
}

.establishing-shot.visible {
    clip-path: inset(0 0 0 0);
}

.letterbox-top-card {
    top: 0;
    height: 24px;
    background-color: #1A1A1A;
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 6;
}

.letterbox-bottom-card {
    bottom: 0;
    height: 24px;
    background-color: #1A1A1A;
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 6;
}

.establishing-content {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.establishing-quote {
    font-family: 'Abril Fatface', serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    color: #2D2D2D;
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.4s ease 0.3s;
}

.establishing-shot.visible .establishing-quote {
    opacity: 1;
}

/* Establishing shot click animation */
.establishing-shot.focus-pull .letterbox-top-card {
    height: 28px;
    transition: height 0.2s ease;
}
.establishing-shot.focus-pull .letterbox-bottom-card {
    height: 28px;
    transition: height 0.2s ease;
}

/* ============================================
   END CREDITS
   ============================================ */
.end-credits {
    background-color: #D4C5E2;
    padding: 80px 40px;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.credits-content {
    max-width: 400px;
}

.credit-rule {
    width: 60px;
    height: 1px;
    background-color: #AAAAAA;
    margin: 20px auto;
}

.credit-title {
    font-family: 'Abril Fatface', serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #2D2D2D;
    letter-spacing: -0.02em;
}

.credit-line {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6B6B6B;
    margin-top: 8px;
}

.credit-name {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #2D2D2D;
    margin-top: 4px;
}

.credit-small {
    margin-top: 24px;
    font-size: 0.6rem;
    color: #6B6B6B;
}

/* ============================================
   FADE-TO-PASTEL TRANSITIONS (gradient bands before establishing shots)
   ============================================ */
.establishing-shot::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, transparent, currentColor);
    opacity: 0;
    z-index: -1;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .scene-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .establishing-shot {
        aspect-ratio: 16 / 9;
    }

    .title-card {
        max-height: none;
        height: 80vh;
    }

    .card-content {
        padding: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .scene-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
