/* =====================================================================
   Photography portfolio — public stylesheet
   1.  Tokens
   2.  Reset & base
   3.  Layout primitives
   4.  Typography
   5.  Buttons & links
   6.  Media (lazy images)
   7.  Header & navigation
   8.  Hero
   9.  Sections: about, galleries, featured, contact
   10. Page heads, masonry, gallery nav
   11. Forms & alerts
   12. Footer
   13. Lightbox
   14. Error pages
   15. Motion & responsive
   ===================================================================== */

/* ------------------------------ 1. Tokens ------------------------------ */
:root {
    --bg:            #0a0a0b;
    --bg-alt:        #0e0e10;
    --surface:       #141417;
    --surface-2:     #1b1b1f;
    --surface-3:     #232328;

    --line:          rgba(255, 255, 255, .075);
    --line-strong:   rgba(255, 255, 255, .16);

    --text:          #f3f3f4;
    --text-muted:    #9a9aa2;
    --text-dim:      #6a6a72;

    --accent:        #c9a86a;
    --accent-bright: #e0c489;
    --accent-soft:   rgba(201, 168, 106, .12);

    --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --gutter:  clamp(1.25rem, 4vw, 3.5rem);
    --maxw:    1360px;
    /* Photo grids breathe wider than editorial copy on large displays. */
    --maxw-wide: 1680px;
    --gap:     clamp(.75rem, 1.4vw, 1.25rem);
    --section: clamp(5rem, 11vw, 9.5rem);

    --radius:    2px;
    --radius-lg: 3px;

    --ease:      cubic-bezier(.22, 1, .36, 1);
    --ease-out:  cubic-bezier(.16, 1, .3, 1);
    --dur:       .55s;

    --header-h: 86px;
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .75);
}

/* ---------------------------- 2. Reset & base --------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.65;
    letter-spacing: .003em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }

::selection { background: var(--accent); color: #0a0a0b; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius);
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; top: -60px; left: 1rem; z-index: 200;
    padding: .7rem 1.2rem; background: var(--accent); color: #0a0a0b;
    font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3a42; }

/* -------------------------- 3. Layout primitives ------------------------ */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--wide { max-width: var(--maxw-wide); }

.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem) var(--section); }
.section--about { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); }
.section--featured { background: var(--bg-alt); }
.section--contact { background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 60%); }

.section__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: clamp(1.5rem, 4vw, 4rem);
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--line);
}
.section__lead {
    max-width: 46ch; margin: 0;
    color: var(--text-muted); font-size: .95rem;
}
.section__foot { margin-top: clamp(2.5rem, 5vw, 4rem); text-align: center; }

/* ---------------------------- 4. Typography ---------------------------- */
.eyebrow {
    margin: 0 0 1rem;
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--accent);
}
.eyebrow::before {
    content: ""; display: inline-block;
    width: 26px; height: 1px; margin-right: .9rem;
    background: currentColor; vertical-align: middle; opacity: .6;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4.6vw, 3.6rem);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -.015em;
}

.rich-text { color: var(--text-muted); font-size: 1rem; line-height: 1.85; max-width: 58ch; }
.rich-text--lg { font-size: 1.06rem; }
.rich-text p + p { margin-top: 0; }

.empty-state {
    padding: clamp(3rem, 8vw, 6rem) 1rem;
    text-align: center;
    color: var(--text-dim);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-style: italic;
}

/* -------------------------- 5. Buttons & links ------------------------- */
.btn {
    --btn-bg: transparent;
    --btn-fg: var(--text);
    --btn-bd: var(--line-strong);
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .95rem 1.7rem;
    background: var(--btn-bg); color: var(--btn-fg);
    border: 1px solid var(--btn-bd); border-radius: var(--radius);
    font-size: .78rem; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(201,168,106,0);
    transition: background .35s var(--ease), color .35s var(--ease),
                border-color .35s var(--ease), transform .35s var(--ease),
                box-shadow .35s var(--ease);
}
.btn .icon { transition: transform .35s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .12s; }

.btn--primary { --btn-bg: var(--accent); --btn-fg: #0a0a0b; --btn-bd: var(--accent); }
.btn--primary:hover {
    --btn-bg: var(--accent-bright); --btn-bd: var(--accent-bright);
    box-shadow: 0 14px 30px -12px rgba(201,168,106,.55);
}

.btn--ghost:hover { --btn-bg: rgba(255,255,255,.05); --btn-bd: var(--line-strong); }
.btn--sm { padding: .65rem 1.15rem; font-size: .7rem; }

.link-arrow {
    display: inline-flex; align-items: center; gap: .5rem;
    margin-top: 1.75rem;
    font-size: .78rem; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: border-color .3s var(--ease), gap .3s var(--ease);
}
.link-arrow:hover { border-color: currentColor; gap: .85rem; }

.icon-link {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    color: var(--text-muted);
    border-radius: 50%;
    transition: color .3s var(--ease), background .3s var(--ease);
}
.icon-link:hover { color: var(--text); background: rgba(255,255,255,.06); }

.social-row { display: flex; gap: .35rem; margin-top: 1.75rem; }
.social-row a {
    display: grid; place-items: center;
    width: 42px; height: 42px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.social-row a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* --------------------------- 6. Media / images ------------------------- */
.media {
    position: relative;
    display: block;
    overflow: hidden;
    background-color: var(--surface);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
}
.media::before {
    content: "";
    display: block;
    padding-top: calc(100% / var(--ratio, 1.5));
}
/* Blur the inline LQIP so it reads as a soft placeholder, not a mosaic. */
.media::after {
    content: "";
    position: absolute; inset: -6%;
    background-image: inherit;
    background-size: cover; background-position: center;
    filter: blur(16px);
    transform: scale(1.06);
    transition: opacity .6s var(--ease);
}
.media--empty::after { display: none; }

.media__img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .9s var(--ease), transform 1.2s var(--ease);
    z-index: 1;
}
.media__img.is-loaded { opacity: 1; transform: none; }

.media--empty {
    background: linear-gradient(135deg, #17171a 0%, #101012 60%, #1c1c21 100%);
    display: grid; place-items: center;
}
.media__empty-mark {
    position: absolute; top: 50%; left: 50%;
    width: 46px; height: 46px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
}
.media__empty-mark::after {
    content: ""; position: absolute; inset: 34%;
    border: 1px solid var(--line-strong); border-radius: 50%;
}

/* -------------------------- 7. Header & nav ---------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 90;
    background: rgba(10, 10, 11, .82);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -30px rgba(0,0,0,0);
    transition: background .4s var(--ease), border-color .4s var(--ease),
                transform .45s var(--ease), box-shadow .4s var(--ease);
}
.site-header--overlay {
    position: fixed; inset: 0 0 auto;
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.site-header.is-stuck {
    background: rgba(10, 10, 11, .9);
    border-color: var(--line);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    box-shadow: 0 20px 40px -30px rgba(0,0,0,.85);
}
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 2rem;
    min-height: var(--header-h);
}

.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand__mark {
    font-family: var(--font-display);
    font-size: 1.5rem; font-weight: 400;
    letter-spacing: .06em;
}
.brand__sub {
    font-size: .58rem; letter-spacing: .35em;
    text-transform: uppercase; color: var(--text-dim);
    margin-top: .3rem;
}

.nav__list { display: flex; align-items: center; gap: .35rem; }
.nav__link {
    position: relative;
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .6rem .95rem;
    font-size: .76rem; font-weight: 400;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--text-muted);
    transition: color .3s var(--ease);
}
.nav__link::after {
    content: ""; position: absolute;
    left: .95rem; right: .95rem; bottom: .35rem; height: 1px;
    background: var(--accent);
    transform: scaleX(0); transform-origin: left;
    transition: transform .4s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__caret { opacity: .6; }

.nav__item--has-menu { position: relative; }
.nav__menu {
    position: absolute; top: 100%; left: 0;
    min-width: 240px; padding: .55rem;
    background: rgba(18, 18, 21, .97);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.nav__item--has-menu:hover .nav__menu,
.nav__item--has-menu:focus-within .nav__menu {
    opacity: 1; visibility: visible; transform: none;
}
.nav__menu a {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; padding: .6rem .8rem;
    font-size: .84rem; color: var(--text-muted);
    border-radius: var(--radius);
    transition: background .25s var(--ease), color .25s var(--ease);
}
.nav__menu a:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav__menu em { font-style: normal; font-size: .7rem; color: var(--text-dim); }

.site-header__actions { display: flex; align-items: center; gap: .35rem; }

.burger {
    display: none;
    width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer;
    align-items: center; justify-content: center;
}
.burger__box { position: relative; width: 22px; height: 12px; display: block; }
.burger__line, .burger__box::before, .burger__box::after {
    content: ""; position: absolute; left: 0;
    width: 100%; height: 1px; background: var(--text);
    transition: transform .35s var(--ease), opacity .25s var(--ease), width .35s var(--ease);
}
.burger__box::before { top: 0; }
.burger__line { top: 50%; opacity: 0; }
.burger__box::after { bottom: 0; width: 70%; }
.burger[aria-expanded="true"] .burger__box::before { top: 50%; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__box::after { bottom: 50%; width: 100%; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
    position: fixed; inset: 0; z-index: 95;
    background: rgba(10, 10, 11, .98);
    backdrop-filter: blur(18px);
    display: grid; place-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu[hidden] { display: grid; }
.mobile-menu__inner {
    width: 100%; max-width: 420px;
    padding: 6rem var(--gutter) 3rem;
    text-align: center;
}
.mobile-menu__list li { overflow: hidden; }
.mobile-menu__list a {
    display: block; padding: .55rem 0;
    font-family: var(--font-display);
    font-size: 2rem; font-weight: 300;
    color: var(--text);
    transform: translateY(110%);
    transition: transform .6s var(--ease), color .3s var(--ease);
}
.mobile-menu.is-open .mobile-menu__list a { transform: none; }
.mobile-menu__list li:nth-child(n) a { transition-delay: calc(var(--i, 0) * 45ms); }
.mobile-menu__sub a { font-size: 1.05rem; color: var(--text-muted); font-family: var(--font-sans); }
.mobile-menu__list a:hover { color: var(--accent); }
.mobile-menu__footer {
    margin-top: 3rem; padding-top: 2rem;
    border-top: 1px solid var(--line);
    color: var(--text-muted); font-size: .9rem;
}
.mobile-menu__footer .social-row { justify-content: center; }

/* ------------------------------ 8. Hero -------------------------------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex; align-items: flex-end;
    padding-bottom: clamp(4rem, 10vh, 8rem);
    overflow: hidden;
}
.hero__media {
    position: absolute; inset: 0; z-index: 0;
    will-change: transform;
}
.hero__img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    animation: heroDrift 26s ease-in-out infinite alternate;
}
.hero__img--empty {
    background:
        radial-gradient(120% 90% at 25% 15%, #2a2a31 0%, transparent 55%),
        radial-gradient(90% 80% at 80% 80%, #1d1d23 0%, transparent 60%),
        linear-gradient(160deg, #131317 0%, #0a0a0b 70%);
}
@keyframes heroDrift {
    from { transform: scale(1.06) translate3d(0, 0, 0); }
    to   { transform: scale(1.13) translate3d(-1.2%, -1.6%, 0); }
}
.hero__scrim {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(10,10,11,.72) 0%, rgba(10,10,11,.18) 30%, rgba(10,10,11,.62) 72%, var(--bg) 100%),
        linear-gradient(95deg, rgba(10,10,11,.68) 0%, transparent 62%);
}
.hero__grain {
    position: absolute; inset: 0;
    opacity: .16; mix-blend-mode: overlay; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.hero__content { position: relative; z-index: 2; max-width: 900px; will-change: transform, opacity; }
.hero__eyebrow {
    color: var(--accent);
    opacity: 0;
    animation: heroReveal .9s var(--ease-out) .25s both;
}
.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 8.5vw, 6.6rem);
    font-weight: 300;
    line-height: 1.02;
    letter-spacing: -.02em;
    text-wrap: balance;
    opacity: 0;
    animation: heroReveal 1s var(--ease-out) .4s both;
}
.hero__subtitle {
    max-width: 46ch;
    margin: 1.6rem 0 0;
    color: rgba(243,243,244,.78);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 300;
    opacity: 0;
    animation: heroReveal .9s var(--ease-out) .58s both;
}
.hero__actions {
    display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.6rem;
    opacity: 0;
    animation: heroReveal .9s var(--ease-out) .74s both;
}
@keyframes heroReveal {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero__bar {
    position: absolute;
    left: var(--gutter); right: var(--gutter);
    bottom: clamp(2rem, 6vh, 3.5rem);
    z-index: 2;
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1.5rem;
    opacity: 0;
    animation: heroReveal 1s var(--ease-out) .95s both;
    pointer-events: none;
}
.hero__bar > * { pointer-events: auto; }

.hero__caption {
    display: flex; align-items: center; gap: .55rem;
    margin: 0;
    font-size: .68rem; font-weight: 500;
    letter-spacing: .16em; text-transform: uppercase;
    color: rgba(243,243,244,.72);
}
.hero__caption .icon { color: var(--accent); flex: none; }

.hero__scroll {
    z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: .9rem;
    font-size: .6rem; letter-spacing: .3em; text-transform: uppercase;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    transition: color .3s var(--ease);
}
.hero__scroll:hover { color: var(--text); }
.hero__scroll-line { width: 1px; height: 58px; background: linear-gradient(var(--accent), transparent); overflow: hidden; }
.hero__scroll-line::after {
    content: ""; display: block; width: 100%; height: 40%;
    background: var(--text);
    animation: scrollPulse 2.4s var(--ease) infinite;
}
@keyframes scrollPulse {
    0%   { transform: translateY(-100%); }
    60%, 100% { transform: translateY(250%); }
}

/* -------------------------- 9. About section --------------------------- */
.about {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6rem);
}
.about__media { position: relative; }
.about__figure { border-radius: var(--radius-lg); }
.about__frame {
    position: absolute; inset: 22px -22px -22px 22px;
    border: 1px solid var(--accent);
    opacity: .35;
    z-index: -1;
    border-radius: var(--radius-lg);
}
.about__signature {
    margin-top: 1.8rem;
    font-family: var(--font-display);
    font-size: 1.9rem; font-style: italic;
    color: var(--accent);
}

.stats {
    display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem);
    margin-top: 2.5rem; padding-top: 2rem;
    border-top: 1px solid var(--line);
}
.stats__value {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    line-height: 1;
    color: var(--text);
}
.stats__label {
    margin-top: .5rem;
    font-size: .68rem; letter-spacing: .2em;
    text-transform: uppercase; color: var(--text-dim);
}

/* ------------------------- Galleries grid ------------------------------ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: var(--gap);
}

.gallery-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    isolation: isolate;
    transition: box-shadow .5s var(--ease);
}
.gallery-card:hover { box-shadow: var(--shadow-lg); }
.gallery-card__media { transition: transform 1.1s var(--ease); }
.gallery-card:hover .gallery-card__media { transform: scale(1.05); }
.gallery-card__overlay {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(180deg, rgba(10,10,11,.05) 30%, rgba(10,10,11,.82) 100%);
    transition: background .5s var(--ease);
}
.gallery-card:hover .gallery-card__overlay {
    background: linear-gradient(180deg, rgba(10,10,11,.25) 0%, rgba(10,10,11,.9) 100%);
}
.gallery-card__body {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
    display: flex; flex-direction: column;
    padding: clamp(1.4rem, 2.4vw, 2rem);
}
.gallery-card__meta {
    font-size: .62rem; letter-spacing: .26em; text-transform: uppercase;
    color: var(--accent);
}
.gallery-card__title {
    margin-top: .5rem;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    line-height: 1.1;
}
.gallery-card__text {
    margin-top: .5rem;
    font-size: .88rem; color: var(--text-muted);
    max-width: 34ch;
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .5s var(--ease), opacity .4s var(--ease), margin .4s var(--ease);
}
.gallery-card:hover .gallery-card__text { max-height: 5rem; opacity: 1; }
.gallery-card__cta {
    display: inline-flex; align-items: center; gap: .5rem;
    margin-top: 1rem;
    font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
    color: var(--text);
    opacity: 0; transform: translateY(8px);
    transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.gallery-card:hover .gallery-card__cta { opacity: 1; transform: none; }

/* --------------------------- Featured grid ----------------------------- */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: clamp(150px, 17vw, 250px);
    grid-auto-flow: dense;
    gap: var(--gap);
    padding-inline: var(--gutter);
    max-width: var(--maxw-wide);
    margin-inline: auto;
}
.featured-grid__item { position: relative; min-height: 0; }
.featured-grid__item--1, .featured-grid__item--4 { grid-row: span 2; }
.featured-grid .photo-tile { height: 100%; }
.featured-grid .media { height: 100%; }
.featured-grid .media::before { display: none; }

/* ---------------------------- Photo tile ------------------------------- */
.photo-tile {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    background: none;
    border: 0;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: var(--radius);
    isolation: isolate;
}
.photo-tile__media { transition: transform 1.1s var(--ease), filter .6s var(--ease); }
.photo-tile:hover .photo-tile__media { transform: scale(1.045); }
.photo-tile__hover {
    position: absolute; inset: 0; z-index: 2;
    display: grid; place-items: center;
    background: rgba(10, 10, 11, .38);
    color: #fff;
    opacity: 0;
    transition: opacity .4s var(--ease);
}
.photo-tile__hover .icon {
    transform: scale(.85);
    transition: transform .45s var(--ease);
    padding: .75rem;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 50%;
    box-sizing: content-box;
}
.photo-tile:hover .photo-tile__hover { opacity: 1; }
.photo-tile:hover .photo-tile__hover .icon { transform: none; }

/* ----------------------- 10. Page head & masonry ----------------------- */
.page-head {
    padding-top: clamp(4rem, 9vw, 7rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
    border-bottom: 1px solid var(--line);
}
.page-head__title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 300; line-height: 1.05;
    letter-spacing: -.02em;
}
.page-head__lead {
    max-width: 60ch; margin-top: 1.2rem;
    color: var(--text-muted); font-size: 1.02rem;
}
.page-head__meta {
    margin: 1.2rem 0 0;
    font-size: .68rem; letter-spacing: .24em;
    text-transform: uppercase; color: var(--text-dim);
}

.breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
    margin-bottom: 1.5rem;
    font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--text-dim);
}
.breadcrumb a { transition: color .3s var(--ease); }
.breadcrumb a:hover { color: var(--accent); }

.masonry { columns: 3; column-gap: var(--gap); }
.masonry__item { break-inside: avoid; margin-bottom: var(--gap); }

.gallery-nav { border-top: 1px solid var(--line); }
.gallery-nav__inner {
    display: flex; justify-content: space-between; gap: 1rem;
    padding-block: clamp(2rem, 4vw, 3rem);
}
.gallery-nav__link {
    display: flex; align-items: center; gap: 1rem;
    color: var(--text-muted);
    transition: color .3s var(--ease);
}
.gallery-nav__link:hover { color: var(--text); }
.gallery-nav__link em {
    display: block; font-style: normal;
    font-size: .62rem; letter-spacing: .24em; text-transform: uppercase;
    color: var(--text-dim);
}
.gallery-nav__link strong {
    display: block; margin-top: .3rem;
    font-family: var(--font-display); font-size: 1.35rem; font-weight: 400;
}
.gallery-nav__link--next { text-align: right; }

.cta-band {
    padding-block: clamp(4rem, 8vw, 7rem);
    background:
        radial-gradient(80% 120% at 50% 0%, rgba(201,168,106,.09) 0%, transparent 60%),
        var(--bg-alt);
    border-top: 1px solid var(--line);
}
.cta-band__inner { text-align: center; }
.cta-band h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 300;
}
.cta-band p { max-width: 50ch; margin: 1rem auto 2rem; color: var(--text-muted); }

/* -------------------------- Services list ------------------------------ */
.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.service-list__item { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.service-list__index {
    font-size: .68rem; letter-spacing: .2em; color: var(--accent);
}
.service-list__item h3 {
    margin: .8rem 0 .6rem;
    font-family: var(--font-display); font-size: 1.5rem;
}
.service-list__item p { color: var(--text-muted); font-size: .92rem; }

/* -------------------------- 11. Contact & forms ------------------------ */
.contact {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
}
.contact__details { margin-top: 2rem; display: grid; gap: 1rem; }
.contact__details li {
    display: flex; align-items: flex-start; gap: .9rem;
    color: var(--text-muted); font-size: .95rem;
}
.contact__details .icon { color: var(--accent); flex: none; margin-top: .2rem; }
.contact__details a { transition: color .3s var(--ease); }
.contact__details a:hover { color: var(--accent); }
.contact__note { margin-top: 2rem; color: var(--text-dim); font-size: .85rem; }

.contact__form-wrap {
    padding: clamp(1.5rem, 3vw, 2.6rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.field { display: flex; flex-direction: column; margin-bottom: 1.2rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field label {
    margin-bottom: .55rem;
    font-size: .68rem; font-weight: 500;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--text-dim);
}
.field label span { color: var(--accent); }

.field input, .field textarea, .field select {
    width: 100%;
    padding: .85rem 1rem;
    background: var(--bg-alt);
    color: var(--text);
    font-family: inherit; font-size: .95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 0 0 0 var(--accent-soft);
    transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--accent);
    background: #0b0b0d;
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field select { appearance: none; cursor: pointer; }

.select-wrap { position: relative; }
.select-wrap__caret {
    position: absolute; right: 1rem; top: 50%;
    transform: translateY(-50%);
    pointer-events: none; color: var(--text-dim);
}

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.contact-form__actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem;
    margin-top: 1.6rem;
}
.contact-form__note { margin: 0; font-size: .8rem; color: var(--text-dim); }

.alert {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .9rem 1.1rem;
    margin-bottom: 1.4rem;
    border-radius: var(--radius);
    font-size: .9rem;
    border: 1px solid;
}
.alert .icon { flex: none; margin-top: .15rem; }
.alert p { margin: 0; }
.alert--success { background: rgba(74,163,110,.1); border-color: rgba(74,163,110,.35); color: #9fdcb8; }
.alert--error   { background: rgba(200,80,80,.1);  border-color: rgba(200,80,80,.35);  color: #f0a9a9; }

/* ----------------------------- 12. Footer ------------------------------ */
.site-footer {
    padding-top: clamp(3.5rem, 7vw, 5.5rem);
    background: var(--bg);
    border-top: 1px solid var(--line);
}
.site-footer__top {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: clamp(2rem, 4vw, 3.5rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.brand--footer .brand__mark { font-size: 1.7rem; }
.site-footer__text {
    max-width: 34ch; margin-top: 1rem;
    color: var(--text-muted); font-size: .9rem;
}
.site-footer__heading {
    margin-bottom: 1.2rem;
    font-size: .66rem; font-weight: 500;
    letter-spacing: .26em; text-transform: uppercase;
    color: var(--text-dim);
}
.site-footer__col li { margin-bottom: .7rem; font-size: .92rem; color: var(--text-muted); }
.site-footer__col a { transition: color .3s var(--ease); }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__col .is-muted { color: var(--text-dim); font-size: .85rem; }
.social-row--footer { margin-top: 1.6rem; }

.site-footer__bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem;
    padding-block: 1.6rem;
    border-top: 1px solid var(--line);
    font-size: .8rem; color: var(--text-dim);
}
.site-footer__bottom p { margin: 0; }
.site-footer__top-link {
    display: inline-flex; align-items: center; gap: .5rem;
    letter-spacing: .14em; text-transform: uppercase; font-size: .7rem;
    transition: color .3s var(--ease);
}
.site-footer__top-link:hover { color: var(--accent); }
.rotate-up { transform: rotate(-90deg); }

/* ---------------------------- 13. Lightbox ----------------------------- */
.lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s;
    --lb-ui: 1;
}
.lightbox[hidden] { display: flex; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__backdrop {
    position: absolute; inset: 0;
    background: rgba(6, 6, 7, .97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox__stage {
    position: relative;
    width: 100%; height: 100%;
    display: grid; place-items: center;
    overflow: hidden;
    cursor: zoom-in;
    touch-action: none;
}
.lightbox__stage.is-zoomed { cursor: grab; }
.lightbox__stage.is-panning { cursor: grabbing; }

.lightbox__image {
    max-width: min(92vw, 1800px);
    max-height: 84vh;
    object-fit: contain;
    opacity: 0;
    transform: scale(.97);
    transition: opacity .45s var(--ease), transform .45s var(--ease);
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox__image.is-ready { opacity: 1; transform: none; }
.lightbox__image.is-transforming { transition: transform .3s var(--ease); }
.lightbox.is-fullsize .lightbox__image { max-width: 100vw; max-height: 100vh; }

.lightbox__spinner {
    position: absolute;
    width: 34px; height: 34px;
    border: 1px solid rgba(255,255,255,.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: spin .9s linear infinite;
    transition: opacity .3s;
}
.lightbox.is-loading .lightbox__spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.lightbox__bar {
    position: absolute; left: 0; right: 0; z-index: 3;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem clamp(1rem, 3vw, 2rem);
    opacity: var(--lb-ui);
    transition: opacity .35s var(--ease);
    pointer-events: none;
}
.lightbox__bar > * { pointer-events: auto; }
.lightbox__bar--top {
    top: 0;
    background: linear-gradient(180deg, rgba(6,6,7,.85), transparent);
}
.lightbox__bar--bottom {
    bottom: 0; align-items: flex-end;
    background: linear-gradient(0deg, rgba(6,6,7,.9), transparent);
}
.lightbox.is-ui-hidden { --lb-ui: 0; }
.lightbox.is-ui-hidden .lightbox__nav { opacity: 0; }

.lightbox__counter {
    font-size: .72rem; letter-spacing: .22em;
    color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.lightbox__tools { display: flex; align-items: center; gap: .25rem; }
.lightbox__btn {
    display: grid; place-items: center;
    width: 42px; height: 42px;
    background: none; border: 1px solid transparent; border-radius: 50%;
    color: var(--text-muted); cursor: pointer;
    transition: color .25s var(--ease), background .25s var(--ease), border-color .25s;
}
.lightbox__btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.lightbox__btn:disabled { opacity: .3; cursor: default; }
.lightbox__btn--close:hover { background: rgba(255,255,255,.12); }
.lightbox__zoom-level {
    min-width: 3.4rem; text-align: center;
    font-size: .7rem; color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.lightbox__nav {
    position: absolute; top: 50%; z-index: 3;
    transform: translateY(-50%);
    display: grid; place-items: center;
    width: 56px; height: 56px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #fff; cursor: pointer;
    transition: background .3s var(--ease), opacity .3s var(--ease), transform .3s var(--ease);
}
.lightbox__nav:hover { background: rgba(255,255,255,.13); }
.lightbox__nav--prev { left: clamp(.75rem, 2.5vw, 2rem); }
.lightbox__nav--next { right: clamp(.75rem, 2.5vw, 2rem); }
.lightbox__nav:disabled { opacity: 0; pointer-events: none; }

.lightbox__caption { max-width: 60ch; }
.lightbox__title {
    font-family: var(--font-display);
    font-size: 1.35rem; font-weight: 400;
}
.lightbox__text { margin: .4rem 0 0; color: var(--text-muted); font-size: .9rem; }
.lightbox__meta {
    margin: 0; text-align: right;
    font-size: .72rem; letter-spacing: .1em;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}
.lightbox__hint {
    position: absolute; bottom: 1rem; left: 50%; z-index: 4;
    transform: translateX(-50%);
    margin: 0;
    font-size: .7rem; color: var(--text-dim);
    opacity: 0;
    transition: opacity .5s var(--ease);
    pointer-events: none;
}
.lightbox.is-open .lightbox__hint { opacity: 1; }
.lightbox.is-hint-dismissed .lightbox__hint { opacity: 0; }
.lightbox__hint kbd {
    display: inline-block; padding: .1rem .38rem; margin: 0 .1rem;
    background: rgba(255,255,255,.07);
    border: 1px solid var(--line);
    border-radius: 3px;
    font-family: var(--font-sans); font-size: .68rem;
}

/* --------------------------- 14. Error pages --------------------------- */
.error-page {
    min-height: 100svh;
    display: grid; place-items: center;
    padding: 2rem;
    background:
        radial-gradient(70% 90% at 50% 0%, rgba(201,168,106,.07) 0%, transparent 60%),
        var(--bg);
    text-align: center;
}
.error-page__code {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 16vw, 9rem);
    line-height: 1; margin: 0;
    color: var(--accent); opacity: .35;
}
.error-page__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-top: -.5rem;
}
.error-page__text { margin-top: 1rem; color: var(--text-muted); }
.error-page__actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 2.2rem; }

/* -------------------- 15. Motion & responsive -------------------------- */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
    transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
    .site-footer__top { grid-template-columns: 1fr 1fr; }
    .featured-grid { grid-auto-rows: clamp(140px, 22vw, 220px); }
}

@media (max-width: 960px) {
    :root { --header-h: 72px; }

    .nav { display: none; }
    .site-header__cta { display: none; }
    .burger { display: flex; }

    .about, .contact { grid-template-columns: 1fr; }
    .about__media { max-width: 560px; }
    .about__frame { inset: 16px -16px -16px 16px; }

    .masonry { columns: 2; }
    .section__head { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 720px) {
    .field-row { grid-template-columns: 1fr; gap: 0; }

    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-grid__item--1, .featured-grid__item--4 { grid-row: span 1; }

    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-card__text { max-height: 5rem; opacity: 1; }
    .gallery-card__cta { opacity: 1; transform: none; }

    .hero { min-height: 92svh; }
    .hero__scroll { display: none; }

    .site-footer__top { grid-template-columns: 1fr; }

    .lightbox__bar--bottom { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .lightbox__meta { text-align: left; }
    .lightbox__nav { width: 46px; height: 46px; }
    .lightbox__hint { display: none; }
    .lightbox__image { max-height: 72vh; }
}

@media (max-width: 520px) {
    .masonry { columns: 1; }
    .featured-grid { grid-template-columns: 1fr; grid-auto-rows: 62vw; }
    .btn { width: 100%; justify-content: center; }
    .hero__actions .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .js .reveal { opacity: 1; transform: none; }
    .hero__img { animation: none; }
    .hero__eyebrow, .hero__title, .hero__subtitle, .hero__actions, .hero__bar {
        animation: none; opacity: 1; transform: none;
    }
}

@media print {
    .site-header, .site-footer, .lightbox, .mobile-menu, .hero__scroll { display: none !important; }
    body { background: #fff; color: #000; }
}
