html {
    color-scheme: light;
}

.no-auto-dark {
    color-scheme: light;
}

/* ----------------------------------------------------
   ROOT VARIABLES
---------------------------------------------------- */
:root {
    --bg: #fafafa;
    --text: #222;
    --text-light: #555;
    --accent: #0F3D63;
    --tile-bg: #ffffff;
    --tile-border: #e0e0e0;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Dark mode */
/*
body.dark-mode {
    --bg: #111;
    --text: #eee;
    --text-light: #bbb;
    --tile-bg: #1a1a1a;
    --tile-border: #333;
    --shadow: 0 4px 12px rgba(0,0,0,0.4);
}
*/
/* ----------------------------------------------------
   GLOBAL
---------------------------------------------------- */
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius);
}

/* ----------------------------------------------------
   NAVIGATION
---------------------------------------------------- */
nav {
    background: var(--tile-bg);
    border-bottom: 1px solid var(--tile-border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    max-width: 1100px;
    margin: auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

@media (max-width: 700px) {
    nav ul {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--tile-bg);
        flex-direction: column;
        width: 200px;
        padding: 1rem;
        border-left: 1px solid var(--tile-border);
        border-bottom: 1px solid var(--tile-border);
        display: none;
    }

    nav ul.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* ----------------------------------------------------
   ABOUT SECTION (Homepage + About)
---------------------------------------------------- */
.about-photo-left {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    max-width: 900px;
    margin: 3rem auto;
}

.about-photo-left img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.about-photo-left .about-text {
    flex: 1;
}

@media (max-width: 700px) {
    .about-photo-left {
        flex-direction: column;
        text-align: center;
    }

    .about-photo-left img {
        margin: 0 auto;
    }
}

@media (max-width: 700px) {
    .about-photo-left .index-text {
        display: none;
    }
}

/* ----------------------------------------------------
   TILE GRID (Homepage)
---------------------------------------------------- */
.tile-grid {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 1rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Film full-width, two half-width tiles */
.tile-full {
    grid-column: 1 / -1;
}

.tile-half {
    grid-column: span 2;
}

@media (max-width: 800px) {
    .tile-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .tile-half,
    .tile-full {
        grid-column: 1 / -1;
    }
}

.tile {
    background: var(--tile-bg);
    border: 1px solid var(--tile-border);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    opacity: 0;
    transform: translateY(20px);
}

.tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Animation reveal */
.tile-reveal {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ----------------------------------------------------
   FILM TILE — film strip styling
---------------------------------------------------- */
/* Film-strip styling with rectangular sprocket holes */
.tile-film {
    position: relative;
    overflow: hidden;
    border: 4px solid #000;
    background: var(--tile-bg);
    background-size: cover;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover animation */
.tile-film:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

/* Rectangular sprocket holes + inner rail */
.tile-film::before,
.tile-film::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 18px; /* taller for rectangular look */
    pointer-events: none;
}

.tile-film::before {
    background:
        linear-gradient(#000, #000) 0% 15px / 100% 4px no-repeat,
        repeating-linear-gradient(
            to right,
            transparent 0 20px,
            #000 20px 32px
        );
}

.tile-film::after {
    background:
        linear-gradient(#000, #000) 0% calc(100% - 14px) / 100% 4px no-repeat,
        repeating-linear-gradient(
            to right,
            transparent 0 20px,
            #000 20px 32px
        );
}

/* Top strip */
.tile-film::before {
    top: 0;
}

/* Bottom strip */
.tile-film::after {
    bottom: 0;
}

/* ----------------------------------------------------
   FILM PAGE (film.html)
---------------------------------------------------- */
.film-profile {
    max-width: 900px;
    margin: 2.5rem auto 1.5rem; /* reduced spacing */
    padding: 1rem;
    text-align: center;
}

.genre-menu {
    text-align: center;
    margin-bottom: 1.5rem;      /* reduced spacing under header */
}

.genre-menu button {
    background: #eee;
    border: none;
    padding: 0.6rem 1rem;
    margin: 0.25rem;
    border-radius: var(--radius);
    cursor: pointer;
}

.genre-menu button.active {
    background: var(--accent);
    color: #fff;
}

.projects-grid {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.project-tile {
    background: var(--tile-bg);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: block;
}

/* Typography */
.project-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.project-format {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.project-logline {
    font-style: italic;
    margin-bottom: 1rem;
}

.project-synopsis {
    margin-bottom: 1rem;
    line-height: 1.55;
}

.project-status {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.project-format {
    color: color-mix(in srgb, var(--accent) 70%, white 30%);
}

/* Request Script button */
.request-script-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.request-script-btn:hover {
    background: #5C2450;
    transform: translateY(-2px);
}

/* Mobile tweaks */
@media (max-width: 700px) {
    .project-tile {
        padding: 1.25rem;
        margin: 1rem;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .request-script-btn {
        font-size: 1.05rem;
        padding: 1rem;
    }
}

/* ----------------------------------------------------
   OVERLAY (Film + Shorts)
---------------------------------------------------- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 2000;
}

.overlay.open {
    display: flex;
}

.overlay-content {
    background: var(--tile-bg);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 900px;
    width: 100%;
    display: flex;
    gap: 2rem;
    box-shadow: var(--shadow);
}

.overlay-content img {
    width: 300px;
    border-radius: var(--radius);
}

.overlay-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.overlay-actions button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
}

.overlay-actions button.secondary {
    background: #eee;
    color: var(--text);
}

@media (max-width: 800px) {
    .overlay-content {
        flex-direction: column;
        text-align: center;
    }

    .overlay-content img {
        width: 100%;
    }
}

/* ----------------------------------------------------
   SHORTS PAGE (shorts.html)
---------------------------------------------------- */
.shorts-grid {
    max-width: 1100px;
    margin: 2rem auto 3rem;
    padding: 1rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.shorts-tile {
    background: var(--tile-bg);
    border: 1px solid var(--tile-border);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shorts-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.shorts-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.shorts-genre {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.shorts-logline {
    font-style: italic;
    margin-bottom: 0.75rem;
}

@media (max-width: 700px) {
    .overlay-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    #overlayImg {
        display: none;
    }
}


/* ----------------------------------------------------
   AWARDS GALLERY (awards.html)
---------------------------------------------------- */
.gallery {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 1rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gallery img {
    object-fit: cover;
    width: 100%;
    height: 260px;
    border-radius: var(--radius);
    user-select: none;
    pointer-events: none;
}

/* ----------------------------------------------------
   MISC PAGE
---------------------------------------------------- */
.misc-wrapper {
    max-width: 900px;
    margin: 3rem auto;
    padding: 1rem;
    text-align: center;
}

.misc-wrapper img {
    width: 100%;
    max-width: 600px;
    margin: auto;
    border-radius: var(--radius);
}

/* ----------------------------------------------------
   CONTACT FORM
---------------------------------------------------- */
.contact-form input,
.contact-form textarea {
    font-size: 1rem;
}

.contact-full {
    width: 100%;
    background: linear-gradient(
        135deg,
        rgba(135, 206, 250, 0.12),
        rgba(135, 206, 250, 0.04)
    );
    padding: 3rem 0;
    margin-top: 3rem;
}

/* ----------------------------------------------------
   CLICK ANIMATION (Homepage)
---------------------------------------------------- */
.tile-clicked {
    transform: scale(0.97);
    transition: transform 0.2s ease;
}