/* ── BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --white:        #ffffff;
    --off:          #f8f9f8;
    --ink:          #181e19;
    --ink-mid:      #68726a;
    --ink-faint:    #dde3de;
    --forest:       #2c5240;
    --forest-deep:  #1e3d2f;
    --forest-light: #e4ede8;
    --slate:        #3e5a72;
    --slate-light:  #e4ecf3;
    --serif:        'Cormorant Garamond', Georgia, serif;
    --sans:         'Jost', system-ui, sans-serif;
    --nav-h:        64px;
    --gutter:       56px;
}

html  { scroll-behavior: smooth; }

body {
    background: var(--white);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ── NAV ──────────────────────────────────────────────────────────── */
nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--gutter);
    background: var(--white);
    border-bottom: 1px solid var(--ink-faint);
    z-index: 50;
}

.nav-name {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-decoration: none;
}

.nav-name em { font-style: italic; color: var(--forest); }

.nav-links { display: flex; gap: 32px; list-style: none; }

.nav-links a {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-mid);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--forest); }

/* ── INTRO ────────────────────────────────────────────────────────── */
.intro {
    margin-top: var(--nav-h);
    padding: 100px var(--gutter) 72px;
    max-width: 680px;
}

.intro-eyebrow {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--forest);
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 0.5s ease 0.1s forwards;
}

.intro-heading {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(42px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.5s ease 0.2s forwards;
}

.intro-heading em { font-style: italic; color: var(--forest); }

.intro-body {
    font-size: 15px;
    line-height: 1.85;
    color: var(--ink-mid);
    max-width: 52ch;
    opacity: 0;
    animation: fadeUp 0.5s ease 0.3s forwards;
}

/* ── FILTER BAR ───────────────────────────────────────────────────── */
.filter-bar {
    padding: 0 var(--gutter) 48px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    animation: fadeUp 0.5s ease 0.4s forwards;
}

.filter-btn {
    background: none;
    border: 1px solid var(--ink-faint);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mid);
    padding: 7px 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover { border-color: var(--forest); color: var(--forest); }

.filter-btn.active {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--white);
}

/* ── GALLERY ──────────────────────────────────────────────────────── */
.gallery-section { padding: 0 var(--gutter) 120px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    background: var(--off);
}

.gallery-item.visible { opacity: 1; transform: translateY(0); }

.gallery-item.hidden-by-filter { display: none; }

.gallery-item .thumb {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item .thumb-placeholder {
    width: 100%;
    height: 100%;
    background: var(--ink-faint);
}

.gallery-item:hover .thumb { transform: scale(1.04); }

.gallery-item .caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 32px 18px 16px;
    background: linear-gradient(transparent, rgba(18,24,19,0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gallery-item:hover .caption { opacity: 1; }

.caption-title {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 300;
    color: #fff;
    line-height: 1.2;
}

.caption-sub {
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

.no-photos {
    grid-column: 1 / -1;
    padding: 48px 0;
    font-size: 14px;
    color: var(--ink-mid);
    text-align: center;
}

.no-photos a { color: var(--forest); }


/* ── ABOUT ────────────────────────────────────────────────────────── */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 var(--gutter);
    padding: 100px 0 100px;
    border-top: 1px solid var(--ink-faint);
}

.about-text { padding-right: 80px; border-right: 1px solid var(--ink-faint); }

.about-eyebrow {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--forest);
    margin-bottom: 20px;
}

.about-heading { font-family: var(--serif); font-size: 36px; font-weight: 300; line-height: 1.2; margin-bottom: 24px; }
.about-heading em { font-style: italic; color: var(--forest); }

.about-body { font-size: 15px; line-height: 1.85; color: var(--ink-mid); max-width: 48ch; }
.about-body p + p { margin-top: 1.1em; }

.about-photo-col { padding-left: 80px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }

.about-portrait { width: 100%; max-width: 260px; aspect-ratio: 3 / 4; overflow: hidden; }
.about-portrait img, .about-portrait .pp { width: 100%; height: 100%; display: block; object-fit: cover; }
.about-portrait .pp { background: #c2cfc5; }

.about-tags { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

.about-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.07em;
    padding: 6px 13px;
}

.about-tag.green { background: var(--forest-light); color: var(--forest-deep); }
.about-tag.blue  { background: var(--slate-light);  color: var(--slate); }

/* ── FOOTER ───────────────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--ink-faint);
    padding: 32px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-name { font-family: var(--serif); font-size: 15px; font-weight: 300; color: var(--ink-mid); }
.footer-name em { font-style: italic; color: var(--forest); }
.footer-copy { font-size: 12px; color: var(--ink-faint); }
.footer-social { list-style: none; }
.footer-social a { font-size: 12px; letter-spacing: 0.06em; color: var(--ink-mid); text-decoration: none; transition: color 0.2s; }
.footer-social a:hover { color: var(--forest); }

/* ── LIGHTBOX ─────────────────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(248,249,248,0.97);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 24px;
}

.lightbox.open { opacity: 1; pointer-events: all; }

.lb-close {
    position: absolute;
    top: 22px;
    right: 28px;
    background: none;
    border: none;
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mid);
    cursor: pointer;
    padding: 8px 0;
    z-index: 1;
}

.lb-close:hover { color: var(--forest); }

.lb-inner {
    display: grid;
    grid-template-columns: 1fr 280px;
    width: min(960px, 100%);
    height: min(580px, 80vh);
    border: 1px solid var(--ink-faint);
    background: var(--white);
    overflow: hidden;
}

.lb-photo {
    width: 100%;
    height: 100%;
    display: block;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.lb-panel { display: flex; flex-direction: column; border-left: 1px solid var(--ink-faint); overflow: hidden; }

.lb-panel-top { padding: 28px 24px 20px; border-bottom: 1px solid var(--ink-faint); }

.lb-cat { font-size: 10px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--forest); margin-bottom: 8px; }

.lb-title { font-family: var(--serif); font-size: 22px; font-weight: 300; line-height: 1.2; color: var(--ink); }

.lb-location { padding: 20px 24px; border-bottom: 1px solid var(--ink-faint); display: flex; flex-direction: column; gap: 4px; min-height: 80px; }

.lb-loc-label { font-size: 10px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mid); }

.lb-loc-value   { font-family: var(--serif); font-size: 17px; font-weight: 300; color: var(--ink); line-height: 1.3; }
.lb-loc-coords  { font-size: 11px; color: var(--ink-mid); letter-spacing: 0.02em; margin-top: 2px; }
.lb-loc-loading { font-size: 13px; color: var(--ink-mid); font-style: italic; }
.lb-loc-none    { font-size: 13px; color: var(--ink-faint); }

.lb-map-wrap { flex: 1; position: relative; overflow: hidden; background: var(--off); }
.lb-map-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

.lb-map-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; }
.lb-map-placeholder span { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.06em; }
.map-pin-icon { width: 24px; height: 24px; opacity: 0.25; }

.lb-maps-link { display: block; padding: 14px 24px; font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--forest); text-decoration: none; border-top: 1px solid var(--ink-faint); transition: background 0.2s; }
.lb-maps-link:hover { background: var(--forest-light); }
.lb-maps-link.hidden { display: none; }

/* ── ANIMATIONS ───────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .lb-inner { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; max-height: 90vh; overflow-y: auto; }
    .lb-photo { aspect-ratio: 4/3; height: auto; }
    .lb-panel { border-left: none; border-top: 1px solid var(--ink-faint); }
    .lb-map-wrap { height: 180px; flex: none; }
}

@media (max-width: 800px) {
    :root { --gutter: 24px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .about-section { grid-template-columns: 1fr; margin: 0 var(--gutter); padding: 60px 0 80px; }
    .about-text { padding-right: 0; border-right: none; border-bottom: 1px solid var(--ink-faint); padding-bottom: 48px; margin-bottom: 48px; }
    .about-photo-col { padding-left: 0; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
    footer { flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 520px) {
    .gallery-grid { grid-template-columns: 1fr; gap: 10px; }
    .nav-links { gap: 20px; }
}

/* ════════════════════════════════════════════════════════════════════
   LAYOUT: SIDEBAR
   A fixed left rail holds the intro + about; photos scroll on the right.
   Clean — no internal grid lines, generous breathing room.
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 901px) {
    body.layout-sidebar {
        display: grid;
        grid-template-columns: 380px 1fr;
        align-items: start;
    }
    body.layout-sidebar nav { grid-column: 1 / -1; }

    body.layout-sidebar .sidebar-col {
        position: sticky;
        top: var(--nav-h);
        height: calc(100vh - var(--nav-h));
        padding: 72px 56px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow-y: auto;
    }

    body.layout-sidebar .sidebar-col .intro {
        margin: 0;
        padding: 0;
        max-width: none;
    }
    body.layout-sidebar .sidebar-col .intro-heading {
        font-size: clamp(34px, 3vw, 46px);
    }

    /* About lives at the bottom of the rail, quiet and compact */
    body.layout-sidebar .about-rail {
        margin-top: 48px;
    }
    body.layout-sidebar .about-rail .about-eyebrow {
        font-size: 11px;
        font-weight: 400;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--forest);
        margin-bottom: 14px;
    }
    body.layout-sidebar .about-rail .about-body {
        font-size: 13.5px;
        line-height: 1.8;
        color: var(--ink-mid);
    }
    body.layout-sidebar .about-rail .about-body p + p { margin-top: 0.9em; }
    body.layout-sidebar .about-rail .about-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 20px;
    }

    /* Right column — just photos, edge to edge, no filter chrome clutter */
    body.layout-sidebar .main-col {
        padding: 72px 56px 72px 0;
    }
    body.layout-sidebar .main-col .filter-bar {
        padding: 0 0 36px;
    }
    body.layout-sidebar .main-col .gallery-section { padding: 0; }
    body.layout-sidebar .main-col .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Footer spans full width, clean */
    body.layout-sidebar footer { grid-column: 1 / -1; }
}

/* On mobile, sidebar layout just stacks like classic */
@media (max-width: 900px) {
    body.layout-sidebar .sidebar-col { padding: 0; }
    body.layout-sidebar .about-rail { display: none; }
    body.layout-sidebar .main-col { padding: 0; }
}

/* ════════════════════════════════════════════════════════════════════
   LAYOUT: MAGAZINE
   A tall full-bleed hero with the title overlaid, then an asymmetric
   masonry-style grid. Distinctly different from Classic.
   ════════════════════════════════════════════════════════════════════ */
body.layout-magazine .intro {
    text-align: center;
    max-width: 760px;
    margin: var(--nav-h) auto 0;
    padding: 96px var(--gutter) 56px;
}
body.layout-magazine .intro-body { margin: 0 auto; }
body.layout-magazine .filter-bar { justify-content: center; }

body.layout-magazine .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;
}

/* Hero spans full width, tall */
body.layout-magazine .gallery-item--hero {
    grid-column: 1 / -1;
    grid-row: span 2;
}

/* Alternating rhythm — some photos span 2 cols, some 3, creating an editorial flow */
body.layout-magazine .gallery-grid .gallery-item { grid-column: span 2; }
body.layout-magazine .gallery-grid .gallery-item:nth-child(6n+2) { grid-column: span 4; }
body.layout-magazine .gallery-grid .gallery-item:nth-child(6n+3) { grid-column: span 2; }
body.layout-magazine .gallery-grid .gallery-item:nth-child(6n+4) { grid-column: span 3; }
body.layout-magazine .gallery-grid .gallery-item:nth-child(6n+5) { grid-column: span 3; }
body.layout-magazine .gallery-grid .gallery-item:nth-child(6n+6) { grid-column: span 2; }
body.layout-magazine .gallery-grid .gallery-item:nth-child(6n+7) { grid-column: span 4; }

body.layout-magazine .gallery-item { aspect-ratio: auto; }

@media (max-width: 900px) {
    body.layout-magazine .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
    body.layout-magazine .gallery-grid .gallery-item,
    body.layout-magazine .gallery-grid .gallery-item:nth-child(n) { grid-column: span 1; }
    body.layout-magazine .gallery-item--hero { grid-column: 1 / -1; grid-row: span 1; }
}

/* Magazine: ensure images fill their spanned grid cells */
body.layout-magazine .gallery-item .thumb,
body.layout-magazine .gallery-item .thumb-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
