/* =========================================
   1. GLOBAL RESET & TYPOGRAPHY
   ========================================= */
* {
    font-family: sans-serif;
    font-weight: 300; /* Changed from 200 for better readability on Windows/Monitors */
    box-sizing: border-box;
}

html {
    overflow-y: scroll; /* CRITICAL FIX: Forces scrollbar to always show, preventing layout jumps */
}

body {
    margin: 0;
}

:root {
  --topbar-height: 56px;
  --gutter: clamp(16px, 4vw, 24px);
}

h1, h2, h3, .topbar-brand, strong {
    font-weight: 400; /* Slightly bolder for headers */
}

/* =========================================
   2. MOBILE TOP BAR
   ========================================= */
.topbar {
    display: none;
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--topbar-height);
    padding-left: calc(env(safe-area-inset-left) + var(--gutter));
    padding-right: calc(env(safe-area-inset-right) + var(--gutter));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1001;
    align-items: center;
    justify-content: space-between;
}

.topbar-brand {
    text-decoration: none;
    color: black;
    font-size: 0.9rem;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
}

.burger {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.burger span {
    width: 22px;
    height: 2px;
    background: black;
    display: block;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
}

body.nav-open,
body.lightbox-open {
    overflow: hidden;
}

/* =========================================
   3. SIDEBAR NAVIGATION
   ========================================= */
.sidenav {
    width: 18.75rem;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 6.25rem 4.4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: white;
    z-index: 1002;
    border-right: 1px solid transparent; /* Keeps sizing consistent */
}

.nav-close {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: white;
    border-radius: 999px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

#company-name {
    margin-bottom: 2.5rem;
}

#company-name h1 {
    margin: 0;
}

#company-name h1 a {
    color: black;
    font-size: 2.5rem;
    line-height: 1;
    text-decoration: none;
}

.tagline {
    font-size: .7rem;
    letter-spacing: .17rem;
    margin-top: .625rem;
}

#navigation {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

#navigation a {
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: .18rem;
    color: black;
    transition: color 0.3s ease;
}

#navigation a:hover,
#navigation a[aria-current="page"] {
    color: #DB802E;
}

.nav-footer {
    display: flex;
    flex-direction: column;
    gap: .625rem;
    margin-top: auto;
}

#ui-elements a {
    font-size: 1.5rem;
    color: black;
    text-decoration: none;
    line-height: 1;
}

.contact-info {
    line-height: 1.5;
    margin: 0;
}

.contact-info p {
    margin: 0;
    font-size: 1rem;
}

.contact-info a {
    color: black;
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.25);
}

.contact-info a:hover {
    border-bottom-color: rgba(0,0,0,0.8);
}

/* =========================================
   4. MAIN CONTENT AREA
   ========================================= */
#body-content {
    margin-left: 18.75rem;
    min-height: 100vh;
    padding: 6.25rem 3.75rem 3.75rem 3.75rem;
}

/* =========================================
   5. HOME (WORK) PAGE
   ========================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem; /* MATCHES GALLERY GAP NOW */
    max-width: 125rem;
    width: 100%;
    margin: 0 auto;
}

.category-card {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    text-decoration: none;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.category-card:hover img {
    filter: brightness(0.55);
}

.category-label {
    position: absolute;
    left: 8%;
    bottom: 12%;
    color: #ffffff;
    font-size: 2rem;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}

.category-card:hover .category-label {
    opacity: 1;
}

/* =========================================
   6. GALLERY PAGES (Architecture, Street, etc)
   ========================================= */
.category-header {
    max-width: 94rem;
    margin: 0 auto 2.5rem auto;
}

.category-header h1 {
    font-size: 2.5rem;
    margin: 0;
}

.gallery {
    max-width: 125rem;
    margin: 0 auto 3.75rem auto;
    column-count: 2;
    column-gap: 1.5rem;
}

.item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: inline-block; /* Fixes masonry slicing glitch */
    width: 100%;
}

.item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

/* =========================================
   7. SHOP & ABOUT
   ========================================= */
.shop-content, .about-wrap {
    max-width: 75rem;
    margin: 0 auto 3.75rem;
}

.shop-head h1, .about-header h1 {
    font-size: 2.5rem;
    margin: 0 0 1.25rem 0;
}

.shop-head p, .about-header p {
    font-size: .95rem;
    line-height: 1.5rem;
    max-width: 37.5rem;
    margin: 0 0 1.25rem 0;
}

.button {
    display: inline-block;
    padding: .625rem 1.5rem;
    border: 1px solid black;
    text-decoration: none;
    font-size: .95rem;
    letter-spacing: .15rem;
    color: black;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.button:hover {
    background-color: black;
    color: white;
}

.shop-grid {
    margin-top: 3.125rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.shop-item img {
    width: 100%;
    height: auto;
    display: block;
}

.shop-notes {
    margin-top: 2.5rem;
    font-size: .9rem;
    line-height: 1.5rem;
    max-width: 37.5rem;
}

/* About Grid specific */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 2rem;
    align-items: start;
}

.about-photo {
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.08);
    aspect-ratio: 4/5;
    overflow: hidden;
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-section h2 {
    font-size: 1rem;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
    margin: 0 0 0.75rem 0;
    font-weight: 500;
}

.about-section p, .about-section li {
    line-height: 1.6rem;
}

.about-list {
    padding-left: 1.1rem;
    margin: 0 0 1.5rem 0;
}

/* =========================================
   8. LIGHTBOX
   ========================================= */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.lightbox-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 96vw;
    max-height: 88vh;
    object-fit: contain;
    cursor: zoom-out;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.25);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
}

.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* =========================================
   9. RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .topbar { display: flex; }

    #body-content {
        margin-left: 0;
        padding-top: calc(var(--topbar-height) + 2rem);
        padding-right: calc(env(safe-area-inset-right) + var(--gutter));
        padding-bottom: 2.75rem;
        padding-left: calc(env(safe-area-inset-left) + var(--gutter));
    }

    .sidenav {
        width: min(20rem, 86vw);
        padding: 4.25rem 2rem 2rem 2rem;
        transform: translateX(-110%);
        transition: transform 0.25s ease;
        box-shadow: 0 16px 50px rgba(0,0,0,0.25);
    }

    body.nav-open .sidenav {
        transform: translateX(0);
    }

    .nav-close { display: inline-flex; }
    .category-grid, .gallery, .shop-grid, .about-grid { grid-template-columns: 1fr; }
    .gallery { column-count: 1; }
}

@media (hover: none) and (pointer: coarse) {
    .category-label { opacity: 1; }
    .category-card img { filter: brightness(0.55); }
}