/* =========================================================
   M. Alan Studios — landing page
   ========================================================= */

:root {
    --navy: #2a4c72;
    /*--navy: #273d52;*/
    --navy-deep: #082342;
    /*--navy-deep: #162433;*/
    --navy-darker: #082342;
    --tan: #70533e;
    --tan-soft: #b68e5d;
    --paper: #f4ede3;
    --drift: #e0d6cf;
    --ink: #0e1822;
    --white: #ffffff;
    --muted: rgba(255, 255, 255, 0.85);
    --hairline: rgba(255, 255, 255, 0.12);

    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-script: var(--font-sans);
    --font-serif: var(--font-sans);
    --font-sans-serif: var(--font-sans);

    --header-height: 256px;
    --header-height-min: 64px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}


/* =========================================================
   HEADER — full height at top, shrinks on scroll
   ========================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--navy-deep);
    border-bottom: 1px solid var(--hairline);
    transition: background 0.35s var(--ease);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    height: var(--header-height);
    padding: 1rem 2.5rem 1.75rem;
    transition: height 0.4s var(--ease), padding 0.4s var(--ease);
}

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    transition: transform 0.4s var(--ease), margin 0.4s var(--ease);
}

.logo-script {
    font-family: var(--font-script);
    font-size: 3.4rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.02em;
    transition: font-size 0.4s var(--ease);
}

.logo-img {
    display: block;
    height: 175px;
    width: auto;
    transition: height 0.4s var(--ease);
}

.logo-tagline {
    font-family: var(--font-sans);
    font-size: 0.55rem;
    font-weight: 400;
    letter-spacing: 0.45em;
    color: var(--muted);
    margin-top: 0.4rem;
    text-transform: uppercase;
    transition: opacity 0.3s var(--ease), font-size 0.4s var(--ease);
}

/* Primary nav (desktop) */
.primary-nav {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
    transition: opacity 0.3s var(--ease), margin 0.4s var(--ease);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list a {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--white);
    padding: 0.4rem 0;
    position: relative;
    transition: color 0.2s var(--ease);
}

.nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--tan);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s var(--ease);
}

.nav-list a:hover {
    color: var(--tan);
}

.nav-list a:hover::after {
    transform: scaleX(1);
}

/* Active page indicator (desktop nav) */
.nav-list a[aria-current="page"] {
    color: var(--tan);
}

.nav-list a[aria-current="page"]::after {
    transform: scaleX(1);
    background: var(--tan);
}

/* Outline CTA button */
.btn-outline {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 0.85rem 1.6rem;
    border-radius: 4px;
    transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn-outline:hover {
    background: var(--tan);
    border-color: var(--tan);
    color: var(--navy);
}

/* Scrolled / minimised header */
.site-header.is-scrolled .header-inner {
    height: var(--header-height-min);
    flex-direction: row;
    justify-content: space-between;
    padding: 0 2.5rem;
}

.site-header.is-scrolled .logo-script {
    font-size: 1.85rem;
}

.site-header.is-scrolled .logo-img {
    height: 42px;
}

.site-header.is-scrolled .logo-tagline {
    font-size: 0;
    opacity: 0;
    margin-top: 0;
}

.site-header.is-scrolled .primary-nav {
    margin-top: 0;
}

/* Hamburger (mobile only) */
.hamburger {
    display: none;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 26px;
    padding: 4px;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--white);
    margin: 5px 0;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile nav drawer */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--hairline);
    transform: translateY(-100%);
    transition: transform 0.45s var(--ease);
    z-index: 99;
    padding-top: var(--header-height-min);
}

.mobile-nav.is-open {
    transform: translateY(0);
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 1.5rem 2rem 2.5rem;
}

.mobile-nav li {
    border-bottom: 1px solid var(--hairline);
}

.mobile-nav li:last-child {
    border-bottom: none;
    padding-top: 1.5rem;
}

.mobile-nav a:not(.btn-outline) {
    display: block;
    padding: 1.1rem 0;
    font-size: 0.95rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.mobile-nav a[aria-current="page"]:not(.btn-outline) {
    color: var(--tan);
}

.mobile-cta {
    display: inline-block;
}


/* =========================================================
   HERO — video backdrop with persistent tagline
   ========================================================= */

.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    width: 100%;
    overflow: hidden;
}

.hero-media {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-video,
.hero-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
}

.hero-video {
    z-index: 2;
}

.hero-fallback {
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    /*background: linear-gradient(
        180deg,
        rgba(28, 44, 62, 0.55) 0%,
        rgba(28, 44, 62, 0.65) 50%,
        rgba(28, 44, 62, 0.85) 100%
    );*/
}

.hero-content {
    position: relative;
    z-index: 4;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 2rem 12.5vh;
}

.hero-tagline {
    font-family: var(--font-sans-serif);
    font-weight: 300;
    font-size: clamp(1.8rem, 4.8vw, 4rem);
    line-height: 1.18;
    text-align: center;
    color: var(--white);
    margin: 0;
    max-width: 25ch;
    letter-spacing: 0.005em;
}


/* =========================================================
   TESTIMONIALS — tan block, auto-cycling
   ========================================================= */

.testimonials {
    background: var(--tan-soft);
    color: var(--navy);
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.testimonial-track {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    min-height: 200px;
}

.testimonial {
    margin: 0;
    text-align: center;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    pointer-events: none;
}

.testimonial.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
}

.testimonial blockquote {
    font-family: var(--font-sans-serif);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    line-height: 1.55;
    margin: 0 0 1.5rem 0;
    color: var(--navy);
}

.testimonial figcaption {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(28, 44, 62, 0.75);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    background: rgba(28, 44, 62, 0.25);
    transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.dot.is-active {
    background: var(--navy);
    transform: scale(1.25);
}


/* =========================================================
   ABOUT — navy block, video + copy
   ========================================================= */

.about {
    background: var(--navy);
    padding: 4rem 2rem;
    position: relative;
    z-index: 2;
}

.about-bio {
    background: var(--navy-deep);
    border-top: 1px solid var(--hairline);
}

.our-story {
    background: var(--drift);
    padding: 0rem 0;
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--hairline);
}

.our-story .about-inner {
    max-width: none;
    padding: 0;
    margin: 0;
}

.our-story .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
}

.our-story .about-video {
    width: 100%;
    margin: 0;
}

.our-story .video-frame {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: none;
    border-radius: 0;
}

.our-story .video-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 4rem);
}

.our-story .video-overlay-card {
    background: rgba(14, 24, 34, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: clamp(1.5rem, 3vw, 3rem) clamp(1.5rem, 4vw, 3.5rem);
    max-width: 880px;
    border-radius: 4px;
    color: var(--white);
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.55);
}

.our-story .video-overlay-card p {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    line-height: 1.65;
    margin: 0 0 1.25rem;
    color: rgba(255, 255, 255, 0.96);
}

.our-story .video-overlay-card p:last-child {
    margin-bottom: 0;
}

.our-story .about-video figcaption {
    text-align: center;
    padding: 0 2rem;
}

.our-story .about-copy {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.our-story .about-copy p {
    margin-left: auto;
    margin-right: auto;
}

.about-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.about-header {
    text-align: center;
    margin-bottom: 4rem;
}

.eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--tan);
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-sans-serif);
    font-weight: 300;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    margin: 0 0 1.5rem 0;
    letter-spacing: 0.01em;
}

.about-header-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    text-align: left;
}

.about-header-split .lede {
    margin: 0;
    max-width: 52ch;
}

.about-mark {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-mark img {
    width: 100%;
    max-width: 410px;
    height: auto;
    display: block;
}

.lede {
    font-family: var(--font-sans-serif);
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.65;
    color: var(--muted);
    max-width: 56ch;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-grid-reverse {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "copy photo";
}

.about-grid-reverse > .about-copy {
    grid-area: copy;
}

.about-grid-reverse > .about-photo {
    grid-area: photo;
}

.about-photo {
    margin: 0;
}

.photo-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 2px;
    background: var(--navy-darker);
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.6);
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

.about-bio .about-copy p {
    max-width: 58ch;
}

.about-bio .pull-line {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    color: var(--tan-soft);
    margin: 2rem 0;
    letter-spacing: 0.01em;
}

.about-bio .signoff {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.92);
    margin-top: 2rem;
}

.about-video {
    margin: 0;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 2px;
    background: var(--navy-darker);
}

.video-frame video,
.video-frame .video-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-frame video {
    z-index: 2;
}

.video-frame .video-fallback {
    z-index: 1;
}

.about-video figcaption {
    margin-top: 1.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}

.about-copy h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.6rem, 2.5vw, 2.1rem);
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

.about-copy p {
    font-size: 1rem;
    line-height: 1.75;
    margin: 0 0 1.25rem 0;
    color: rgba(255, 255, 255, 0.82);
    max-width: 52ch;
}

.link-arrow {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--tan);
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--tan);
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease), letter-spacing 0.25s var(--ease);
}

.link-arrow:hover {
    color: var(--white);
    border-color: var(--white);
    letter-spacing: 0.3em;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    background: var(--ink);
    color: var(--muted);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--hairline);
    position: relative;
    z-index: 2;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--hairline);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-brand .logo-script {
    font-size: 2.6rem;
}

.footer-brand .logo-img {
    height: 70px;
}

.footer-brand .logo-tagline {
    margin-top: 0.3rem;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--white);
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.footer-col p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--tan);
}

.footer-meta {
    max-width: 1180px;
    margin: 2rem auto 0;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}


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

@media (max-width: 900px) {
    :root {
        --header-height: 130px;
        --header-height-min: 60px;
    }

    .primary-nav {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .header-inner {
        justify-content: center;
        flex-direction: row;
    }

    .site-header.is-scrolled .header-inner {
        height: var(--header-height-min);
    }

    .logo-script {
        font-size: 2.6rem;
    }

    .logo-img {
        height: 68px;
    }

    .site-header.is-scrolled .logo-script {
        font-size: 1.7rem;
    }

    .site-header.is-scrolled .logo-img {
        height: 38px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-grid-reverse {
        grid-template-columns: 1fr;
        grid-template-areas: "photo" "copy";
    }

    .about-header-split {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .about-header-split .lede {
        margin: 0 auto;
    }

    .about-mark img {
        max-width: 280px;
    }

    .video-frame {
        aspect-ratio: 4 / 3;
    }

    .photo-frame {
        aspect-ratio: 4 / 5;
        max-width: 420px;
        margin: 0 auto;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-cols {
        gap: 1.5rem;
    }
}

@media (max-width: 560px) {
    .testimonials {
        padding: 4.5rem 1.5rem;
    }

    .about {
        padding: 5rem 1.5rem;
    }

    .footer-cols {
        grid-template-columns: 1fr 1fr;
    }

    .hero-tagline {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   UTILITIES — text alignment
   ========================================================= */

.text-left   { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }


/* =========================================================
   WORK PAGE
   ========================================================= */

.page-work {
    background: var(--navy);
}

.work-hero {
    background: var(--navy);
    padding: calc(var(--header-height) + 4rem) 2rem 4rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.work-hero-inner {
    max-width: 760px;
    margin: 0 auto;
}

.page-title {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    letter-spacing: 0.01em;
    margin: 0 0 1.25rem;
    color: var(--white);
}

.page-lede {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.65;
    color: var(--muted);
    margin: 0 auto;
    max-width: 56ch;
}

.work-grid-section {
    background: var(--navy-deep);
    padding: 5rem 2rem 7rem;
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--hairline);
}

.work-grid-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.work-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.work-filter {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.work-filter:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.work-filter.is-active {
    color: var(--navy);
    background: var(--tan-soft);
    border-color: var(--tan-soft);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2.5rem;
}

.work-grid > .project-card:first-child {
    grid-column: 1 / -1;
}

.work-grid > .project-card:first-child .project-card-link {
    display: grid;
    /*grid-template-columns: 1.8fr 0.8fr;*/
    align-items: stretch;
}

.work-grid > .project-card:first-child .project-card-media {
    aspect-ratio: 16 / 6;
    height: 100%;
    border-radius: 12px;
}

.work-grid > .project-card:first-child .project-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-card {
    /*background: rgba(255, 255, 255, 0.03);*/
    /*border: 1px solid var(--hairline);*/
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.35s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
}

.project-card-link {
    display: block;
    color: inherit;
    height: 100%;
}

.project-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--navy-darker);
    border-radius: 12px;
}

.project-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease), opacity 0.3s var(--ease);
}

.project-card:hover .project-card-media img {
    transform: scale(1.04);
}

.project-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    z-index: 0;
}

.project-card-body {
    padding: 0.75rem 1.75rem 1rem;
}

.project-card-category {
    font-size: 0.68rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--tan-soft);
    margin: 0 0 0.4rem;
    font-weight: 500;
}

.project-card-title {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 0 0 0.3rem;
    color: var(--white);
}

.project-card-excerpt {
    font-size: 0.92rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0rem;
}

.project-card-cta {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--tan-soft);
    transition: color 0.2s var(--ease), letter-spacing 0.2s var(--ease);
}

.project-card:hover .project-card-cta {
    color: var(--white);
    letter-spacing: 0.28em;
}

.work-cta {
    background: var(--ink);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--hairline);
}

.work-cta-inner {
    max-width: 640px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    margin: 0 0 1rem;
    color: var(--white);
}

.cta-lede {
    color: var(--muted);
    margin: 0 0 2rem;
    line-height: 1.65;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1024px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .work-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .work-grid > .project-card:first-child .project-card-link {
        display: block;
        grid-template-columns: none;
    }

    .work-grid > .project-card:first-child .project-card-media {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    .work-hero {
        padding: calc(var(--header-height) + 2.5rem) 1.5rem 3rem;
    }

    .work-grid-section {
        padding: 3.5rem 1.5rem 5rem;
    }

    .work-cta {
        padding: 4.5rem 1.5rem;
    }

    .work-filters {
        margin-bottom: 2.5rem;
    }
}


/* =========================================================
   PROJECT DETAIL PAGE
   ========================================================= */

.page-project {
    background: var(--navy-deep);
}

.project-root[hidden] {
    display: none;
}

.project-hero {
    position: relative;
    height: 75vh;
    min-height: 520px;
    margin-top: var(--header-height);
    overflow: hidden;
}

.project-hero-media {
    position: absolute;
    inset: 0;
    background: var(--navy-darker);
}

.project-hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 12, 20, 0.25) 0%,
        rgba(8, 12, 20, 0.45) 55%,
        rgba(8, 12, 20, 0.75) 100%
    );
}

.project-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    padding: 0 2rem 5rem;
}

.project-hero-content .eyebrow {
    color: var(--tan-soft);
    margin-bottom: 0.85rem;
}

.project-page-title {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(2.4rem, 6vw, 5rem);
    color: var(--white);
    margin: 0;
    letter-spacing: 0.005em;
    line-height: 1.1;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.project-description {
    background: var(--navy);
    padding: 5rem 2rem;
    position: relative;
    z-index: 2;
}

.project-description-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.project-description-inner p {
    font-size: clamp(1rem, 1.3vw, 1.18rem);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 2.5rem;
}

.back-to-work {
    display: inline-block;
}

.project-gallery-section {
    background: var(--navy-deep);
    padding: 4rem 1.5rem 7rem;
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--hairline);
}

.project-gallery {
    max-width: 1400px;
    margin: 0 auto;
    column-count: 3;
    column-gap: 10px;
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}

.project-gallery.is-laid-out {
    opacity: 1;
}

.project-gallery-item {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 2px;
    background: var(--navy-darker);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
    cursor: zoom-in;
    /* height is set by project.js (random per tile) */
}

.project-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.55);
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.35s var(--ease);
}

.project-gallery-item:hover img {
    opacity: 0.92;
}

/* Missing project state */
.project-missing {
    min-height: 70vh;
    padding: calc(var(--header-height) + 5rem) 2rem 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--navy-deep);
}

.project-missing[hidden] {
    display: none;
}

.project-missing-inner {
    max-width: 540px;
}

.project-missing h1 {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0.75rem 0 1rem;
    color: var(--white);
}

.project-missing p {
    color: var(--muted);
    margin: 0 0 2rem;
    line-height: 1.65;
}

@media (max-width: 1024px) {
    .project-gallery {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .project-hero {
        height: 60vh;
        min-height: 380px;
    }

    .project-hero-content {
        padding-bottom: 3rem;
    }

    .project-description {
        padding: 3.5rem 1.5rem;
    }

    .project-gallery-section {
        padding: 3rem 1rem 5rem;
    }

    .project-gallery {
        column-count: 1;
        column-gap: 8px;
    }

    .project-gallery-item {
        margin-bottom: 8px;
    }
}


/* =========================================================
   LIGHTBOX (project gallery)
   ========================================================= */

body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(6, 10, 18, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 5rem;
    animation: lightbox-fade 0.22s var(--ease);
}

.lightbox[hidden] {
    display: none;
}

@keyframes lightbox-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.13s var(--ease);
}

.lightbox-img.is-loading {
    opacity: 0;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    pointer-events: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    z-index: 2;
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2.25rem;
    line-height: 1;
    padding: 0;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
    outline: 2px solid var(--tan-soft);
    outline-offset: 3px;
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.75rem;
}

.lightbox-prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(2px); }

@media (max-width: 700px) {
    .lightbox {
        padding: 4rem 1rem 5rem;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.75rem;
    }

    .lightbox-close { top: 0.75rem; right: 0.75rem; font-size: 1.5rem; }
    .lightbox-prev { left: 0.75rem; }
    .lightbox-next { right: 0.75rem; }
}


/* =========================================================
   PROCESS PAGE
   ========================================================= */

.page-process {
    background: var(--tan);
    color: var(--white);
}

.process-section {
    background: var(--tan);
    color: var(--white);
    padding: 0 0 7rem;
    min-height: 100vh;
}

.process-header {
    background: var(--navy);
    text-align: center;
    padding: calc(var(--header-height) + 4rem) 2rem 4rem;
    margin: 0 0 5rem;
}

.process-header-inner {
    max-width: 780px;
    margin: 0 auto;
}

.process-header .page-title {
    color: var(--white);
    margin: 0 0 1.5rem;
}

.process-inner {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 2rem;
}

.process-intro {
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 auto;
    max-width: 56ch;
}

.process-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: process-step;
}

.process-step {
    position: relative;
    text-align: center;
    padding: 5rem 0 1rem;
}

.process-step:first-child {
    padding-top: 0;
}

.process-step:last-child {
    padding-bottom: 0;
}

/* Hand-drawn arrow between steps (working_files/arrow_3.png).
   The image is the right-side variant; the left-side is the same image flipped. */
.process-step:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    width: 40px;
    height: 130px;
    background-image: url("working_files/arrow_3.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Left of center — image flipped horizontally */
.process-step:nth-child(even)::before {
    left: 26%;
    transform: translateX(-50%) scaleX(-1);
}

/* Right of center — image as-is */
.process-step:nth-child(odd):not(:first-child)::before {
    left: 74%;
    transform: translateX(-50%);
}

.process-step-number {
    font-size: 0.72rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 1rem;
    font-weight: 500;
}

.process-step-title {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(1.85rem, 3.6vw, 2.6rem);
    margin: 0 0 1.25rem;
    color: var(--white);
    letter-spacing: 0.005em;
    line-height: 1.2;
}

.process-step-body {
    font-size: clamp(0.98rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    max-width: 58ch;
    margin: 0 auto;
}

.process-cta {
    margin-top: 5rem;
    text-align: center;
}

@media (max-width: 640px) {
    .process-section {
        padding: 0 0 5rem;
    }

    .process-header {
        padding: calc(var(--header-height) + 2rem) 1.5rem 2.75rem;
        margin-bottom: 3rem;
    }

    .process-inner {
        padding: 0 1.5rem;
    }

    .process-step {
        padding: 2.25rem 0;
    }

    .process-cta {
        margin-top: 3.5rem;
    }
}
