/* ── Fonts ────────────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'Fraunces';
    src: url('../fonts/fraunces-var.woff2') format('woff2-variations');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
    --gap: 20px;
    --header-height: 60px;
    --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
    --color-bg: #faf8f5;
    --color-text: #1c1a18;
    --color-subtle: #57524c;
    --color-muted: #8a847c;
    --color-border: #e7e2da;
    --color-bg-alt: #f3f0ea;
}

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

html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 28px;
}

.site-header__brand a,
.site-header__name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text);
    text-decoration: none;
}

.site-header__brand img {
    height: 36px;
    width: auto;
}

.site-header__nav {
    display: flex;
    gap: 28px;
}

.site-header__nav a {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-subtle);
    transition: color 0.2s;
}

.site-header__nav a:hover { color: var(--color-text); }

/* Hamburger (hidden on desktop) */
.site-header__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.site-header__hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text);
    transition: transform 0.2s, opacity 0.2s;
}

/* Mobile nav overlay */
.site-header__nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 99;
}

.site-header__nav.is-open a {
    font-size: 18px;
    letter-spacing: 0.18em;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { position: relative; height: 100svh; overflow: hidden; }

.hero__image { width: 100%; height: 100%; object-fit: cover; }

.hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
    background:
        linear-gradient(to bottom, rgba(14, 13, 12, 0.35), rgba(14, 13, 12, 0) 140px),
        linear-gradient(to top, rgba(14, 13, 12, 0.55), rgba(14, 13, 12, 0) 40%);
}

.hero__heading {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 84px);
    font-weight: 500;
    line-height: 1.05;
    color: #faf8f5;
}

.hero__subheading {
    margin-top: 12px;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(250, 248, 245, 0.85);
}

.hero__cue {
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 1px;
    height: 36px;
    background: rgba(250, 248, 245, 0.6);
    animation: cue 2s ease-in-out infinite;
}

@keyframes cue {
    0%, 100% { transform: translateY(0); opacity: 0.9; }
    50%      { transform: translateY(10px); opacity: 0.4; }
}

/* Header over hero: transparent, light text, then paper on scroll */
.site-header--overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header--overlay .site-header__name,
.site-header--overlay .site-header__nav a { color: #faf8f5; }
.site-header--overlay .site-header__hamburger span { background: #faf8f5; }

.site-header--overlay.is-scrolled {
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom-color: var(--color-border);
}

.site-header--overlay.is-scrolled .site-header__name { color: var(--color-text); }
.site-header--overlay.is-scrolled .site-header__nav a { color: var(--color-subtle); }
.site-header--overlay.is-scrolled .site-header__hamburger span { background: var(--color-text); }

/* Open mobile nav sits on paper — links must be dark even in overlay mode */
.site-header--overlay .site-header__nav.is-open a { color: var(--color-text); }

/* ── Paths ────────────────────────────────────────────────────────────────── */
.paths {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    padding: var(--gap);
}

.path-card {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.path-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.path-card:hover .path-card__image { transform: scale(1.03); }

.path-card__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(14, 13, 12, 0.55), transparent);
}

.path-card__label {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 500;
    color: #faf8f5;
}

.path-card__text {
    margin-top: 4px;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(250, 248, 245, 0.8);
}

@media (prefers-reduced-motion: reduce) {
    .hero__cue { animation: none; }
    .gallery-item img, .path-card__image { transition: none; }
    .gallery-item::after { transition: none; }
    html { scroll-behavior: auto; }
}

/* ── Gallery ──────────────────────────────────────────────────────────────── */
.gallery-grid {
    columns: 3;
    column-gap: var(--gap);
    padding: var(--gap);
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: var(--gap);
    display: block;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.03); }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 200;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#lightbox.is-open {
    display: flex;
    opacity: 1;
}

.lb-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 90vh;
}

.lb-content img {
    max-height: 80vh;
    max-width: 85vw;
    object-fit: contain;
}

.lb-caption { color: rgba(255, 255, 255, 0.7); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.lb-counter { color: rgba(255, 255, 255, 0.35); font-size: 11px; }

#lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    transition: color 0.2s;
}
#lb-close:hover { color: #fff; }

#lb-prev, #lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 16px;
    transition: color 0.2s;
    line-height: 1;
    user-select: none;
}
#lb-prev { left: 8px; }
#lb-next { right: 8px; }
#lb-prev:hover, #lb-next:hover { color: #fff; }

/* ── Archive intro ────────────────────────────────────────────────────────── */
.archive-intro { padding: 48px 48px 24px; }

.archive-intro__title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 500;
}

.archive-intro__description {
    margin-top: 12px;
    max-width: 480px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-subtle);
}

/* Hover caption on gallery items */
.gallery-item::after {
    content: attr(data-caption);
    position: absolute;
    inset: auto 0 0 0;
    padding: 24px 14px 12px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(250, 248, 245, 0.9);
    background: linear-gradient(to top, rgba(14, 13, 12, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.gallery-empty { padding: 64px; text-align: center; color: var(--color-subtle); }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section { padding: 72px 48px; }
.section + .section { border-top: 1px solid var(--color-border); }
.section--alt { background: var(--color-bg-alt); }

.section__label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 10px;
}

.section__title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 28px;
}

/* ── About ────────────────────────────────────────────────────────────────── */
.about-inner {
    display: flex;
    gap: 48px;
    align-items: center;
}

.about-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-bio {
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-subtle);
    max-width: 420px;
}

.about-bio p + p { margin-top: 12px; }

.about-more {
    display: inline-block;
    margin-top: 16px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 1px;
}

/* ── Contact ──────────────────────────────────────────────────────────────── */
.contact-inner {
    display: flex;
    gap: 64px;
    align-items: flex-start;
}

.contact-form { flex: 1; }

/* WPForms overrides */
.wpforms-form .wpforms-field { margin-bottom: 12px; }

.wpforms-form input[type="text"],
.wpforms-form input[type="email"],
.wpforms-form textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    background: transparent;
    border-radius: 2px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}

.wpforms-form input:focus,
.wpforms-form textarea:focus { border-color: var(--color-subtle); }
.wpforms-form textarea { height: 100px; resize: none; }

.wpforms-form .wpforms-submit {
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    padding: 12px 28px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    font-family: var(--font);
}

.contact-social {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 4px;
}

.contact-social a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--color-subtle);
    transition: color 0.2s;
}

.contact-social a:hover { color: var(--color-text); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 20px 48px;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer__copy { font-size: 11px; color: var(--color-muted); letter-spacing: 0.08em; }

.site-footer__social {
    display: flex;
    gap: 16px;
}

.site-footer__social a {
    color: var(--color-muted);
    transition: color 0.2s;
}
.site-footer__social a:hover { color: var(--color-text); }

/* ── Single Photo Page ────────────────────────────────────────────────────── */
.single-photo { max-width: 900px; margin: 48px auto; padding: 0 24px; }
.single-photo__image img { width: 100%; height: auto; }
.single-photo__meta { margin-top: 24px; }
.single-photo__title { font-size: 20px; font-weight: 600; }
.single-photo__excerpt { margin-top: 10px; font-size: 14px; line-height: 1.8; color: var(--color-subtle); }
.single-photo__back { display: inline-block; margin-top: 32px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .gallery-grid { columns: 2; }
}

@media (max-width: 768px) {
    :root { --gap: 12px; }

    .gallery-grid { columns: 1; }

    .paths { grid-template-columns: 1fr; }

    .site-header__nav { display: none; }
    .site-header__hamburger { display: flex; }

    .section { padding: 48px 24px; }
    .about-inner { flex-direction: column; text-align: center; }
    .contact-inner { flex-direction: column; gap: 32px; }
    .site-footer { padding: 16px 24px; }
}
