/* =========================
   RESET
========================= */

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

img,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

/* =========================
   ROOT
========================= */

:root {

    --bg: #0d1510;

    --text: #ffffff;

    --muted: rgba(255, 255, 255, 0.7);

    --accent: #7fa189;

}

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

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background-color: #0d0d0d;
    /* Use this absolute path to avoid "relative path" guessing */
    background-image: url("/assets/images/bg/pattern/p-007.png");
    background-repeat: repeat;
    background-size: 1000px;
}

/* =========================
   GRAIN OVERLAY
========================= */

.grain {

    position: fixed;

    inset: 0;

    pointer-events: none;

    opacity: 0.05;

    background-image:
        radial-gradient(#ffffff 0.5px, transparent 0.5px);

    background-size: 4px 4px;
}

/* =========================
   CONTAINER
========================= */

.container {

    width: min(1800px, 96%);

    margin-inline: auto;
}

/* =========================
   NAVBAR
========================= */

.navbar {

    position: absolute;


    width: 100%;

    z-index: 1000;

    padding: 2rem 4rem;

    pointer-events: none;
}

.logo {

    position: absolute;

    top: 2rem;

    left: 4rem;

    pointer-events: auto;
}

.nav-links {

    display: flex;

    justify-content: center;

    gap: 3rem;

    margin-top: 18rem;

    transition: all 0.6s ease;

    pointer-events: auto;
}

.nav-links a {

    color: rgba(255, 255, 255, 0.7);

    color: #9cd1d6;

    transition: 0.3s;
    font-weight: 1000;
}

.nav-links a:hover {

    color: white;
}

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

.hero {

    min-height: 100vh;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding-top: 8vh;

    padding-bottom: 10vh;
}

.eyebrow {

    color: var(--accent);

    text-transform: uppercase;

    letter-spacing: 0.3rem;

    font-size: 1rem;

    margin-bottom: 3rem;

    text-align: center;
        
    margin-left: auto;
        
    margin-right: auto;
}

.hero h1 {

    font-size: clamp(1.75rem, 2.8vw, 2.9rem);

    line-height: 1.1;

    letter-spacing: 0.01em;

    max-width: 1500px;

    font-weight: 700;

    text-align: center;
    
    margin-left: auto;
    
    margin-right: auto;
}

.hero-text {

    margin-top: 4rem;

    max-width: 800px;

    font-size: 1.35rem;

    line-height: 1.8;

    color: var(--muted);

    font-family: sans-serif;

    text-align: center;
        
    margin-left: auto;
        
    margin-right: auto;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .navbar {

        flex-direction: column;

        align-items: flex-start;

        gap: 1.5rem;
    }



    .hero-text {

        font-size: 1.05rem;
    }

}
.showreel {
    padding-top: 100px;       /* was 100px */
    padding-bottom: 80px;
}

@media (max-width: 768px) {
    .showreel {
        padding-top: 10px;
        padding-bottom: 60px;
    }
}
.showreel video {

    width: 100%;

    max-width: 1200px;

    border-radius: 12px;

    object-fit: cover;

    transform: translateY(-140px);
}
.nav-links {

    display: flex;

    justify-content: center;

    gap: 3rem;

    margin-top: 4rem;

    position: relative;

    z-index: 10;
}
.nav-links {

    will-change: transform;
}
.projects-page {
    background: #0f140f;
    color: #d8e2d0;
    min-height: 100vh;
    padding: 6rem 4rem;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding-top: 10px;
}

.project-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-media {
    width: 100%;
    width: 20vw;
    overflow: hidden;
    border-radius: 20px;
    background: #111;
}

.project-media video {
    width: 100%;
    display: block;
    object-fit: cover;
    opacity: 0.7;
    transform: scale(1);
    transition:
        transform 0.6s ease,
        opacity 0.6s ease;
}

.project-card:hover video {
    opacity: 1;
    transform: scale(1.03);
}

.project-info {
    margin-top: 1rem;
}

.project-info h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: #8d9686;
    font-size: 1rem;
}
.background-video {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.background-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;

    opacity: 0.15;
    filter:
        grayscale(0%)
        contrast(120%)
        brightness(0.85);
}
/* PROJECT THUMBNAIL HOVER VIDEO */

.project-media {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 16 / 9;
}

.project-media img,
.project-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.35s ease;
}

.project-media img {
    opacity: 1;
    z-index: 1;
}

.project-media video {
    opacity: 0;
    z-index: 2;
}

/* On hover */

.project-card:hover .project-media img {
    opacity: 0;
}

.project-card:hover .project-media video {
    opacity: 1;
}
.showreel {
    padding: 120px 8%;
}

.showreel-layout {
    display: flex;
    align-items: center;
    gap: 60px;
}

.showreel-text {
    flex: 1;
}

.showreel-video {
    flex: 1;
}

.showreel-video video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.showreel-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.showreel-text p {
    opacity: 0.8;
    line-height: 1.6;
}


.main-nav {
    position: fixed;
    top: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 40px;
    z-index: 1000;
}

/* Desktop: hero must sit below fixed nav */
@media (min-width: 769px) {
    .hero {
        padding-top: 110px;   /* was 160px */
        padding-bottom: 60px; /* slightly tighter */
    }
}
.nav-item {
    text-decoration: none;
    color: #9a9a9a;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: 0.25s;
}

.nav-item:hover {
    color: white;
}

.nav-item.active {
    color: white;
}



/* HERO FADE ANIMATION */

.hero .eyebrow,
.hero h1,
.hero .hero-text {
    opacity: 0;
    animation: heroFade 2s ease forwards;
}

.hero h1 {
    animation-delay: 0.4s;
}

.hero .hero-text {
    animation-delay: 0.9s;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    transition: opacity 0.2s linear;
    will-change: transform, opacity;
}

/* Tablet and smaller screens */
@media (max-width: 768px) {
    /* Stack navigation */
    .main-nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 10px;
    }

    /* Make text readable on mobile */
    body {
        font-size: 16px; /* Ensure no zooming on inputs */
        padding: 0 15px; /* Add breathing room on sides */
    }

    /* Force items to stack */
    .contact-container, .contact-form-section {
        display: block !important;
        width: 100% !important;
    }

    /* Make buttons and inputs easy to tap */
    input, textarea, button {
        width: 100%;
        padding: 15px;
        font-size: 16px; /* Prevents auto-zoom on iOS */
    }
}

/* ---- Mobile: make menu scroll with page ---- */
@media (max-width: 768px) {
    .main-nav {
        position: static;       /* or position: relative; */
        transform: none;        /* remove any centering transform */
        left: auto;
        right: auto;
        margin-bottom: 20px;    /* small spacing below the menu */
    }

    /* Because the nav is no longer fixed, remove forced page padding */
    body,
    .projects-page main,
    .about-page main,
    .contact-page main {
        padding-top: 0 !important;
    }
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;   /* <— this is what was missing */
    text-align: center;
    padding: 8vh 20px 10vh;
}

@media (max-width: 768px) {
    .showreel-layout {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .showreel-text,
    .showreel-video {
        width: 100%;
    }

    .showreel-video video {
        width: 100%;
        border-radius: 12px;
        transform: none !important;
    }
}

/* Mobile: hero naturally follows because nav is not fixed */
@media (max-width: 768px) {
    .hero {
        padding-top: 20px;    /* was 40px */
        padding-bottom: 50px;
    }
}