/* EPK Styles - That Friend Electronic Press Kit */
/* Inspired by The Mason Ring EPK - dark cinematic teal layout */

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

:root {
    --teal-dark: #1a3a4a;
    --teal-mid: #1f4a5a;
    --teal-light: #2a5a6a;
    --cream: #f0e6d3;
    --gold: #c9a96e;
    --white: #ffffff;
    --orange: #FF8C42;
    --green: #68B684;
    --text-light: #d4cfc5;
    --text-dim: #8a9aa5;
    --border-teal: rgba(74, 160, 180, 0.25);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--teal-dark);
    color: var(--cream);
    line-height: 1.7;
}

/* Navigation - screen only */
.epk-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 58, 74, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 2px solid var(--gold);
}

.epk-nav-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0.7rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--cream);
}

.epk-nav-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--cream);
}

.btn-download {
    background: var(--orange);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.btn-download:hover {
    background: #e67a30;
    transform: translateY(-1px);
}

.btn-download-print {
    background: var(--teal-light);
}

.btn-download-print:hover {
    background: var(--teal-mid);
}

.epk-actions {
    display: flex;
    gap: 0.5rem;
}

/* Main Content */
.epk-main {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 60px;
}

/* ============================================
   SECTION 1: COVER / POSTER
   ============================================ */
.epk-cover {
    text-align: center;
    padding: 2rem 2rem 1rem;
    background: var(--teal-dark);
}

.epk-laurels {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.epk-laurel-img {
    max-width: 250px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.epk-cover-poster {
    max-width: 600px;
    margin: 0 auto;
}

.epk-cover-poster img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ============================================
   SECTION 2: LOGLINE + SYNOPSIS + TRAILER
   ============================================ */
.epk-section {
    padding: 3rem 3rem;
    background: var(--teal-mid);
    border-bottom: 1px solid var(--border-teal);
}

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

.epk-section h2 {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.5rem;
    letter-spacing: 5px;
    color: var(--cream);
    text-align: center;
    margin-bottom: 1.5rem;
}

.epk-section h3 {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.8rem;
    letter-spacing: 3px;
    color: var(--gold);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* Logline */
.epk-logline-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--cream);
    text-align: justify;
    max-width: 750px;
    margin: 0 auto;
}

/* Synopsis */
.epk-synopsis-text {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-light);
    text-align: justify;
    max-width: 750px;
    margin: 0 auto;
}

.epk-synopsis-text p {
    margin-bottom: 1rem;
}

/* Quick facts bar */
.epk-facts-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
    margin: 1.5rem 0;
    border-top: 1px solid var(--border-teal);
    border-bottom: 1px solid var(--border-teal);
}

.epk-fact {
    text-align: center;
}

.epk-fact-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.epk-fact-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cream);
}

.epk-fact-value a {
    color: var(--cream);
    text-decoration: underline;
}

/* Trailer placeholder */
.epk-trailer-section {
    text-align: center;
    margin-top: 2rem;
}

.epk-trailer-thumb {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--border-teal);
}

.epk-trailer-thumb img {
    width: 100%;
    display: block;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.epk-trailer-thumb:hover img {
    opacity: 0.9;
}

.trailer-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ============================================
   SECTION 3: DIRECTOR'S STATEMENT
   ============================================ */
.epk-statement-text {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-light);
    text-align: justify;
    max-width: 750px;
    margin: 0 auto;
}

.epk-statement-text p {
    margin-bottom: 1rem;
}

/* ============================================
   SECTION 4: PRODUCTION STILLS
   ============================================ */
.epk-stills {
    padding: 0;
    background: var(--teal-mid);
}

.epk-stills-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.epk-stills-grid img {
    width: 100%;
    display: block;
}

.still-placeholder {
    background: var(--teal-light);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-style: italic;
    border: 1px dashed var(--border-teal);
}

/* ============================================
   SECTION 5+: FILMMAKER BIOS
   ============================================ */
.bio-entry {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}

.bio-entry.bio-right {
    grid-template-columns: 1fr 200px;
}

.bio-photo {
    width: 200px;
    height: 250px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--teal-light);
    border: 1px dashed var(--border-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-style: italic;
}

.bio-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bio-text h3 {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    letter-spacing: 3px;
    color: var(--cream);
    margin-bottom: 0;
    margin-top: 0;
}

.bio-text .bio-role {
    font-family: 'Bebas Neue', cursive;
    font-size: 1rem;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.bio-text p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-light);
    text-align: justify;
}

/* ============================================
   SECTION: CAST BIOS
   ============================================ */
.cast-bio-entry {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    align-items: start;
}

.cast-bio-entry.cast-right {
    grid-template-columns: 1fr 180px;
}

.cast-bio-photo {
    width: 180px;
    height: 220px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--teal-light);
    border: 1px dashed var(--border-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-style: italic;
}

.cast-bio-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cast-bio-text h3 {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: var(--cream);
    margin-bottom: 0;
    margin-top: 0;
}

.cast-bio-text .cast-character {
    font-family: 'Bebas Neue', cursive;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}

.cast-bio-text p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-light);
    text-align: justify;
}

/* ============================================
   SECTION: FULL CREDITS (two-column table)
   ============================================ */
.credits-block {
    max-width: 700px;
    margin: 0 auto 2rem;
}

.credits-block h3 {
    text-align: center;
}

.credit-line {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.25rem 0;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.credit-role {
    text-align: right;
    flex: 1;
    color: var(--gold);
    font-weight: 700;
}

.credit-name {
    text-align: left;
    flex: 1;
    color: var(--cream);
    font-weight: 600;
}

/* ============================================
   SECTION: PRESS
   ============================================ */
.press-entry {
    margin-bottom: 0.8rem;
}

.press-entry a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.press-entry a:hover {
    color: var(--cream);
}

.press-entry .press-url {
    display: block;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 0.1rem;
    word-break: break-all;
}

/* ============================================
   SECTION: TECH SPECS
   ============================================ */
.tech-specs-list {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.tech-spec {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.tech-spec-label {
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
}

.tech-spec-value {
    color: var(--cream);
}

/* ============================================
   SECTION: SONGS
   ============================================ */
.songs-list {
    max-width: 750px;
    margin: 0 auto;
}

.song-entry {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(74, 160, 180, 0.1);
}

.song-entry:last-child {
    border-bottom: none;
}

.song-title {
    font-weight: 700;
    color: var(--cream);
    font-size: 0.9rem;
}

.song-detail {
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ============================================
   SECTION: LOCATIONS
   ============================================ */
.locations-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.location {
    background: rgba(74, 160, 180, 0.15);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--cream);
    border-left: 3px solid var(--gold);
    letter-spacing: 0.5px;
}

.equipment-text {
    color: var(--cream);
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.8;
}

/* ============================================
   SECTION: CONTACT / CLOSING
   ============================================ */
.epk-closing {
    text-align: center;
    padding: 4rem 3rem;
    background: var(--teal-dark);
}

.epk-closing-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 4rem;
    letter-spacing: 6px;
    color: var(--cream);
    margin-bottom: 2rem;
}

.epk-contact-info {
    margin-top: 1.5rem;
}

.epk-contact-info h3 {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.epk-contact-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.epk-contact-info a {
    color: var(--gold);
    text-decoration: none;
}

/* Footer */
.epk-footer {
    padding: 1.5rem 3rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border-teal);
    background: var(--teal-dark);
}

.epk-footer a {
    color: var(--gold);
    text-decoration: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .epk-section {
        padding: 2rem 1.5rem;
    }

    .epk-section h2 {
        font-size: 2rem;
    }

    .bio-entry,
    .bio-entry.bio-right {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .bio-photo {
        margin: 0 auto 1rem;
    }

    .bio-text p,
    .bio-text .bio-role {
        text-align: center;
    }

    .cast-bio-entry,
    .cast-bio-entry.cast-right {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cast-bio-photo {
        margin: 0 auto 1rem;
    }

    .cast-bio-text p,
    .cast-bio-text .cast-character {
        text-align: center;
    }

    .credit-line {
        flex-direction: column;
        gap: 0;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .credit-role,
    .credit-name {
        text-align: center;
    }

    .epk-facts-bar {
        gap: 1rem;
    }

    .epk-nav-inner {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    .epk-nav-title {
        display: none;
    }

    .epk-closing-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .epk-section h2 {
        font-size: 1.8rem;
    }

    .epk-logline-text {
        font-size: 1rem;
        text-align: left;
    }

    .epk-synopsis-text,
    .epk-statement-text {
        text-align: left;
    }
}

/* ============================================
   PRINT / PDF STYLES
   ============================================ */
@media print {
    /* Force color printing */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Hide nav and download button */
    .epk-nav {
        display: none !important;
    }

    .epk-main {
        padding-top: 0;
        max-width: 100%;
    }

    /* Keep all original colors */
    body {
        font-size: 10pt;
        line-height: 1.5;
    }

    /* ---- PAGE BREAK RULES ---- */
    /* Force page break before marked sections */
    .print-break {
        page-break-before: always !important;
        break-before: page !important;
    }

    /* Cover = page 1 */
    .epk-cover {
        page-break-after: always;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Each major section starts on a new page */
    .epk-section,
    .epk-section-dark {
        page-break-before: auto;
        page-break-inside: avoid;
    }

    /* Force new pages for key sections */
    .epk-section:has(> h2:first-child) {
        page-break-before: auto;
    }

    /* Prevent orphaned headings */
    h2, h3 {
        page-break-after: avoid;
    }

    /* Keep bio entries together */
    .bio-entry,
    .cast-bio-entry {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Keep credit blocks together */
    .credits-block h3 {
        page-break-after: avoid;
    }

    /* Production stills - fit nicely on pages */
    .epk-stills {
        page-break-before: always;
        page-break-inside: avoid;
    }

    .epk-stills-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    .epk-stills-grid img {
        max-height: 250px;
        object-fit: cover;
        border-radius: 4px;
    }

    /* Song credits - keep together and compact */
    .songs-list {
        columns: 2;
        column-gap: 2rem;
    }

    .song-entry {
        break-inside: avoid;
        page-break-inside: avoid;
        padding: 0.2rem 0;
        font-size: 8pt;
    }

    /* Credits section - two columns */
    .credits-block {
        columns: 2;
        column-gap: 2rem;
    }

    .credit-line {
        break-inside: avoid;
    }

    .credits-block h3 {
        column-span: all;
        break-after: avoid;
    }

    /* Tech specs, locations, press - keep compact */
    .tech-specs-list,
    .locations-list {
        page-break-inside: avoid;
    }

    /* Closing page */
    .epk-closing {
        page-break-before: always;
        min-height: 50vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* Poster sizing for print */
    .epk-cover-poster img {
        max-width: 350px;
        max-height: 500px;
    }

    /* Bio photos for print */
    .bio-photo img,
    .cast-bio-photo img {
        max-height: 200px;
    }

    /* Remove hover effects */
    a {
        text-decoration: none !important;
    }

    /* Footer */
    .epk-footer {
        page-break-before: avoid;
        font-size: 8pt;
    }

    /* Page margins */
    @page {
        margin: 0.5in;
        size: letter;
    }

    /* First page no top margin for cover */
    @page :first {
        margin-top: 0;
    }
}
