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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

/* === Layout Structure === */
.project-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 310px 0 0;
}

.project-content>*:not(.project-video):not(.project-media):not(.project-gallery-grid) {
    padding-left: var(--margin-side);
    padding-right: var(--margin-side);
}

.site-wrapper {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--margin-side);
}

/* === Navigation === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem var(--margin-side);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: padding 0.3s ease;
}

.site-header.scrolled {
    padding: 1rem var(--margin-side);
    /* subtle red background on scroll */
}

.logo img {
    width: 250px;
    height: auto;
    transition: width 0.3s ease;
    display: block;
    /* Ensure no extra space below image */
}

.site-header.scrolled .logo img {
    width: 125px;
    /* 50% of 250px */
}

.menu-trigger {
    display: none;
}

/* === Hero Section === */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    /* 100svh = stable small viewport height — fixes iOS Safari bug where 100vh
       includes the URL bar, pushing the absolute indicator off-screen */
    min-height: 100svh;
    background-color: var(--color-hero-bg);
    background-image: url('../assets/bkgrays.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 50% auto;
    color: var(--color-hero-text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* padding-top: clears the fixed logo (logo ~108px tall + 32px header padding).
       padding-bottom: keeps flex content away from the absolute indicator zone
       (indicator at bottom:60px, ~80px tall = indicator top at vh-140px) */
    padding: 140px 15px 200px;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hero-main-text {
    font-family: var(--font-heading-hero);
    font-size: var(--fs-hero);
    line-height: 0.85;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

/* -------------------------------------------------------
   Redesigned Hero — Shipping / Quality / Design block
------------------------------------------------------- */
.hero.redesigned .hero-main-text.multi-layer {
    font-family: 'UnifrakturCook', cursive;
    /* Primary driver: vw formula keeps 'Shipping' at 15px side margins.
       Secondary cap: 30vh ensures three lines + spacing always fit within
       the viewport height on any device (incl. short mobile phones). */
    font-size: clamp(3rem, min(calc((100vw - 30px) / 3.22), 30vh), 196px);
    line-height: 0.83;
    letter-spacing: -0.03em;
    text-transform: none;
    color: #1d1d1d;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2rem;
    flex-shrink: 0;
    width: 100%;
}

.hero.redesigned .hero-main-text.multi-layer span {
    position: relative;
    display: block;
    /* Use inline width so the span only occupies its text width,
       but never exceeds the container (prevents right-edge bleed) */
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
}

.hero.redesigned .hero-main-text.multi-layer span::before {
    content: attr(data-text);
    position: absolute;
    top: 5px;
    left: -5px;
    z-index: -1;
    color: #ff4800;
    transform: none;
    -webkit-text-stroke: 2px #1d1d1d;
    display: block;
    width: 100%;
    white-space: nowrap;
}

/* Year text — Michroma, same as before */
.hero.redesigned .hero-year-text {
    font-family: var(--font-heading-hero);
    font-size: var(--fs-h1);
    /* 20-30px gap above the sub-text */
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: -0.04em;
}

/* Sub-text — Playfair Display 20px medium, 100% line-height, 4% letter-spacing */
.hero-sub-text {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: -0.04em;
    max-width: 600px;
    opacity: 0.9;
}

/* Indicator — always anchored 60px from the bottom of the hero */
.scroll-indicator-img {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    z-index: 3;
}

.redesigned-indicator {
    width: 30px;
    opacity: 0.8;
}


/* === Featured Row === */
.featured-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-grid);
    padding: var(--margin-top) var(--margin-side);
    max-width: 1440px;
    margin: 0 auto;
}

.featured-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--color-text);
}

.featured-image-wrap {
    width: 100%;
    border-radius: var(--radius-card);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.featured-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-image-wrap img {
    transform: scale(1.03);
}

.featured-info {
    padding: 0.5rem 0;
}

.featured-title {
    font-family: var(--font-heading);
    font-size: var(--fs-h2);
    text-transform: none;
    margin-bottom: 0.5rem;
}

.featured-desc {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--color-text-light);
    font-style: italic;
}


/* === Section Label === */
.section-label {
    padding: var(--margin-top) var(--margin-side) 2rem;
    max-width: 1440px;
    margin: 0 auto;
}

.section-label h2 {
    font-family: var(--font-heading-hero);
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--color-text);
    position: relative;
    display: inline-block;
    padding-bottom: 1.5rem;
}

.section-label .stroke {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
}


/* === Card Grid === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-grid);
    padding: 0 var(--margin-side) var(--margin-top);
    max-width: 1440px;
    margin: 0 auto;
}

.grid-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center thumbnails per req */
    text-align: center;
    /* Center text per req */
    text-decoration: none;
    color: var(--color-text);
}

.card-visual {
    width: 220px;
    height: 220px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-card);
    overflow: hidden;
    margin-bottom: 1rem;
    background: #222;
}

.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-text {
    padding: 0.5rem 0;
    max-width: 220px;
    /* Constrain text width per req */
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    /* Playfair Display Medium (Playwright typo) */
    color: #fff;
}


/* === Feature Highlight === */
.feature-highlight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gap-grid) * 2);
    padding: var(--margin-top) var(--margin-side);
    max-width: 1440px;
    margin: 0 auto;
    align-items: center;
}

.feature-highlight .feature-image-wrap {
    border-radius: var(--radius-card);
    overflow: hidden;
}

.feature-highlight .feature-image-wrap img {
    width: 100%;
    height: auto;
}

.feature-highlight .feature-text {
    padding: 2rem;
}

.feature-highlight h3 {
    font-family: var(--font-heading-hero);
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.feature-highlight p {
    font-family: var(--font-heading);
    font-size: var(--fs-body);
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.feature-cta-img {
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: block;
    width: fit-content;
}

.feature-cta-img:hover {
    opacity: 0.8;
}


/* === Footer (Now includes About) === */
.site-footer {
    background-color: var(--color-hero-bg);
    color: #ffffff;
    padding: var(--margin-top) var(--margin-side);
    width: 100%;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
}

.about-section {
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.about-heading {
    font-family: var(--font-heading-hero);
    font-size: 1.5rem;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
}

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

.about-body p {
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.6;
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-link {
    font-family: var(--font-heading-hero);
    font-size: 1rem;
    text-transform: uppercase;
    color: #fff;
    margin-left: 2rem;
}

.footer-link:first-child {
    margin-left: 0;
}

/* === Project Detail Overrides === */
.project-detail-header {
    text-align: center;
    padding: calc(var(--margin-top) * 2.5) var(--margin-side) 0;
    /* Clear fixed header */
}

.project-detail h1 {
    font-family: var(--font-heading-hero);
    font-size: clamp(2.5rem, 8vw, 4rem);
    /* Responsive H1 */
    text-transform: uppercase;
    margin-bottom: 4rem;
    width: 100%;
    /* Ensure it wraps naturally */
}

.project-detail h2 {
    font-family: var(--font-heading-hero);
    /* Michroma 24px per req */
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-detail h3 {
    font-family: var(--font-heading);
    font-style: italic;
    /* Playfair Italic 24px per req */
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-detail h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    /* Playfair ExtraBold 20px per req */
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.project-detail p {
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Video full width */
.project-video {
    width: 100%;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
}

.project-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-card);
}

.project-media,
.project-gallery-grid {
    width: 100%;
    margin-bottom: 2rem;
}

.project-media img,
.project-gallery-grid .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-card);
}

.index-link-wrap {
    text-align: center;
    margin: 60px 0;
    /* 60px off content and 60px above footer */
}

.index-link {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 4rem;
    /* 64px */
    display: inline-block;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .featured-row {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
    }

    .feature-highlight {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 600px) {
    .site-header {
        padding: 1.5rem var(--margin-side);
    }

    .logo img {
        width: 200px;
    }

    /* Scale up background rays on narrow viewports */
    .hero.redesigned {
        background-size: 100% auto;
        /* On mobile the vh cap on font-size shrinks the text block;
           reduce bottom padding to keep indicator comfortably visible */
        padding-bottom: 160px;
    }

    .redesigned-indicator {
        width: 20px;
    }

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

    .grid-card {
        width: 100%;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .footer-link {
        margin-left: 0;
    }

    .project-detail h1 {
        font-size: 10vw;
        word-break: break-word;
    }

    .project-content {
        padding: 260px 0 0;
    }
}


/* =========================================================
   Shallow / short viewport scaling
   Activates below 1080px height. Logo and big text scale
   with vh so all elements keep their required spacing.
   The indicator always stays at bottom: 60px (absolute).
   ========================================================= */
/* Hide indicator on very short viewports where it causes layout issues */
@media (max-height: 860px) {
    .scroll-indicator-img {
        display: none;
    }
}

@media (max-height: 1080px) and (min-width: 601px) {

    /* Logo: 250px at 1080px viewport, shrinks proportionally */
    .logo img {
        width: clamp(80px, 23.15vh, 250px);
    }

    /* Scrolled logo also scales (always half of unscrolled) */
    .site-header.scrolled .logo img {
        width: clamp(40px, 11.57vh, 125px);
    }

    /* Hero padding:
       - Top: logo height = logo_width / 2.3 aspect ratio = 23.15vh / 2.3 ≈ 10vh.
         Add header padding (32px) + 20px gap = calc(10vh + 52px).
         Clamped so it never goes above desktop default (140px).
       - Bottom: keeps flex content at least 20px above the indicator top.
         Indicator = bottom:60px + ~80px tall = indicator top at vh−140px.
         So content bottom needs to stay at least 160px from viewport bottom. */
    .hero.redesigned {
        padding-top: clamp(100px, calc(10vh + 52px), 140px);
        padding-bottom: clamp(160px, 20vh, 200px);
    }

    /* Main text: driven by whichever is smaller — the vw formula (15px margins)
       or the vh cap (18vh keeps it from overflowing a short viewport).
       It scales slightly more aggressively than the logo as requested. */
    .hero.redesigned .hero-main-text.multi-layer {
        font-size: clamp(2rem, min(calc((100vw - 30px) / 3.22), 18vh), 196px);
        /* Maintain at least 20px gap below the text block before year text */
        margin-bottom: clamp(20px, 2vh, 32px);
    }

    /* Year text: at least 20px below the main text, at least 20px above subtext */
    .hero.redesigned .hero-year-text {
        margin-bottom: clamp(20px, 2vh, 25px);
    }

    /* Subtext: shrink font slightly on very short viewports */
    .hero-sub-text {
        font-size: clamp(14px, 1.85vh, 20px);
    }
}