@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: #fff;
    color: #111;
    line-height: 1.5;
    transition: opacity .5s;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header, header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: hsl(0, 0%, 43%);
    display: flex;
    align-items: center;
    justify-content: center;   /* centre links across full width */
    gap: 16px;
    padding: 10px 40px;
    width: 100%;
    font-size: 11px;
    letter-spacing: 1.5px;
    flex-wrap: nowrap;
}

.header nav.menu,
nav.menu {
    display: flex;
    gap: 70px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.header nav.menu a,
nav.menu a {
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
    transition: color 0.3s;
}

.header nav.menu a:hover,
nav.menu a:hover {
    color: #454545;
}

/* lang-switch button inherits nav colours */
.header .lang-switch,
nav.menu .lang-switch {
    color: #fff;
    border-color: #fff;
    background: transparent;
    font-weight: 600;
}

/* ============================================================
   LOGO IFRAME
   ============================================================ */
#logo-container {
    min-height: 150px;
}

.logo-iframe {
    width: 100%;
    border: none;
    display: block;
    /* height is set inline or via JS — this prevents collapse */
    height: clamp(100px, 100vw, 140px);

    margin-top: 20px;
    min-height: 100px;
    max-height:20vh;
}

/* ============================================================
   PROJECT GRID (index page)
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 14px 40px 40px;
}

.contact {
    margin-top: 50px;
    margin-left: 200px;
    margin-right: 200px;
}


.img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.img-wrap:hover img {
    transform: scale(1.04);
}

.overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 8px;
    font-size: 11px;
    opacity: 0;
    transition: opacity .3s;
}

.img-wrap:hover .overlay {
    opacity: 1;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: rgba(0, 0, 0, .95);
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
}

/* ============================================================
   PROJECT INTRO
   ============================================================ */
.project-intro {
    padding: 60px 40px;
    max-width: 800px;
}

.title {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.desc {
    font-size: 13px;
    color: #666;
}

/* ============================================================
   PROJECT DETAIL (index_PAGE_TYPE page)
   ============================================================ */
.project-detail {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: flex-start;
}

/* LEFT: gallery */
.project-images {
    flex: 0 0 60%;
    padding: 20px;
}

#gallery {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#gallery img {
    width: 100%;
    height: auto;
    display: block;
}

/* RIGHT: sticky info panel */
.project-info {
    flex: 0 0 40%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    box-sizing: border-box;
    background-color: #fff;
}

.project-info h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.project-info p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333;
}

.credits {
    font-size: 1rem;
    margin-top: 30px;
}

/* ============================================================
   VIDEO
   ============================================================ */
.video-block video {
    width: 100%;
    display: block;
}

/* ============================================================
   LOGO ANIMATION
   ============================================================ */
.logo span {
    display: inline-block;
    animation: logoAnim 2s linear infinite;
}

.logo span:nth-child(n) {
    animation-delay: calc(var(--i) * 0.05s);
}

@keyframes logoAnim {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

/* ============================================================
   LANGUAGE BUTTON
   ============================================================ */
.lang-switch {
    border: 1px solid #ccc;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    background: transparent;
}

/* ============================================================
   HAMBURGER & MOBILE DRAWER
   ============================================================ */
.hamburger {
    display: none;
    width: 28px;
    height: 18px;
    position: relative;
    cursor: pointer;
    z-index: 1100;
    flex-shrink: 0;
}

.hamburger span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #111;
    transition: 0.3s;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-drawer {
    display: none;
    flex-direction: column;
    gap: 33px;
    padding: 80px 40px;
    background: #fff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1050;
    text-align: center;
}

.nav-drawer a {
    text-decoration: none;
    color: #111;
    font-size: 18px;
    font-weight: 500;
}

.nav-drawer.open {
    display: flex;
}

/* ============================================================
   IMAGE PERFORMANCE
   ============================================================ */
img {
    content-visibility: auto;
    max-width: 100%;
}

/* ============================================================
   IMAGE FADE-IN ON LOAD
   ============================================================ */

/* Grid cards: cover image starts invisible */
.img-wrap img {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.5s ease;
}

.img-wrap img.loaded {
    opacity: 1;
}

/* Project detail gallery: each image starts invisible */
#gallery img {
    opacity: 0;
    transition: opacity 0.8s ease;
}

#gallery img.loaded {
    opacity: 1;
}

/* ============================================================
   PAGE WRAPPER (generic)
   ============================================================ */
.page {
    max-width: 900px;
    margin: auto;
    white-space: pre-line;
    padding: 20px 30px;
    
}

.page p {
    margin-top: 2px;
    margin-bottom: 2px;
}

.page h2 {
    margin-top: 2px;
    margin-bottom: 2px;
    font-weight: normal;
} 

/* ============================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .project-detail {
        flex-direction: column;
    }

    .project-info,
    .project-images {
        flex: none;
        width: 100%;
        height: auto;
        position: static;
        padding: 20px;
    }

    .project-info h1 {
        font-size: 2rem;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
    .header nav.menu,
    nav.menu {
        display: none;
    }

    .hamburger {
        display: block;
        margin-left: auto; /* push to right */
    }

    .header, header {
        padding: 12px 20px;
        background: #fff;           /* white on mobile */
        justify-content: flex-end;  /* align content to right */
    }

    .hamburger span {
        background: #111; /* dark lines on white bg */
    }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .project-intro {
        padding: 30px 16px;
    }

    .project-info h1 {
        font-size: 1.6rem;
    }

    .project-info p {
        font-size: 1rem;
    }
}
