/* Self-hosted fonts (SIL Open Font License). Same-origin keeps the CSP strict. */
@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("../fonts/cormorant-garamond.woff2") format("woff2");
}
@font-face {
    font-family: "Cormorant Garamond";
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
}
@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url("../fonts/montserrat.woff2") format("woff2");
}

:root {
    --bg: #ffffff;
    --bg-soft: #f8f4f0;
    --fg: #1a1a1a;
    --muted: #5c5650;
    --line: #e6ddd4;
    --accent: #c7a082;       /* decorative: dividers, stars, hovers */
    --accent-text: #86684f;  /* accent for text on light bg (AA contrast) */
    --dark: #0f0b06;
    --on-dark: #f5efe9;
    --success-bg: #eef6ee;
    --success-fg: #2f5d34;
    --error-bg: #fbeeee;
    --error-fg: #8f2525;
    --focus: #86684f;
    --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
    --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
    --header-h: 6.25rem;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

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

.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--dark); color: var(--on-dark);
    padding: .5rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 46rem; margin: 0 auto; padding: 0 1.5rem; }

.section { padding-top: 6rem; padding-bottom: 6rem; }

/* ---------- Typography ---------- */

.title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.3;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
}
.title-left { text-align: left; }

.divider {
    display: block;
    width: 3.5rem;
    height: 1px;
    background: var(--accent);
    margin: 1.5rem auto 2.5rem;
}
.divider-left { margin-left: 0; }

.kicker {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .35em;
    text-transform: uppercase;
    margin: 0 0 1.5rem;
}

.signature {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.75rem;
    color: var(--accent-text);
    margin: 2rem 0 0;
}

/* ---------- Buttons ---------- */

.button {
    display: inline-block;
    font: 500 .75rem/1 var(--sans);
    letter-spacing: .25em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: var(--fg);
    border: 1px solid var(--fg);
    padding: 1.1rem 2.25rem;
    cursor: pointer;
    transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.button:hover { background: var(--accent-text); border-color: var(--accent-text); }
.button:disabled { opacity: .6; cursor: progress; }

.button-light { background: transparent; border-color: #fff; color: #fff; }
.button-light:hover { background: #fff; border-color: #fff; color: var(--fg); }

/* ---------- Header: logo left, icon nav right ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid transparent;
    transition: padding .35s var(--ease), border-color .35s var(--ease);
}
.site-header.is-scrolled { padding-top: .6rem; padding-bottom: .6rem; border-bottom-color: var(--line); }

.brand { display: block; flex-shrink: 0; line-height: 0; }
.brand-logo { width: auto; height: 3.75rem; transition: height .35s var(--ease); }
.site-header.is-scrolled .brand-logo { height: 2.75rem; }

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .25rem clamp(1rem, 2.2vw, 2.25rem);
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    text-decoration: none;
    padding: .5rem 0;
    transition: color .3s var(--ease);
}
.site-nav .icon { flex-shrink: 0; color: var(--accent-text); transition: transform .35s var(--ease); }
.site-nav a::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: .2rem;
    height: 1px; background: var(--accent);
    transform: scaleX(0);
    transition: transform .35s var(--ease);
}
.site-nav a:hover .icon,
.site-nav a:focus-visible .icon { transform: translateY(-2px); }
.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }

.nav-toggle { display: none; }

/* Medium screens: icons on top of the labels to save width. */
@media (max-width: 1100px) and (min-width: 861px) {
    .site-nav a { flex-direction: column; gap: .3rem; font-size: .62rem; letter-spacing: .14em; }
    .site-nav a::after { bottom: -.1rem; }
}

@media (max-width: 860px) {
    .site-header { padding: .75rem 1.25rem; }
    .brand-logo,
    .site-header.is-scrolled .brand-logo { height: 2.75rem; }

    .js .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 2.75rem; height: 2.75rem;
        background: none; border: 0; cursor: pointer; padding: 0;
    }
    .nav-toggle-bar,
    .nav-toggle-bar::before,
    .nav-toggle-bar::after {
        display: block; width: 1.5rem; height: 1px; background: var(--fg);
        transition: transform .3s var(--ease), background-color .3s;
    }
    .nav-toggle-bar { position: relative; }
    .nav-toggle-bar::before,
    .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
    .nav-toggle-bar::before { top: -7px; }
    .nav-toggle-bar::after { top: 7px; }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

    /* Without JS the nav simply wraps under the logo. */
    html:not(.js) .site-header { flex-wrap: wrap; justify-content: center; }
    .js .site-nav {
        position: absolute; left: 0; right: 0; top: 100%;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        display: none;
    }
    .js .site-nav.is-open { display: block; }
    .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1rem; }
    .js .site-nav li + li { border-top: 1px solid var(--line); }
    .js .site-nav a { display: flex; gap: 1rem; padding: 1rem .25rem; font-size: .8rem; }
    .js .site-nav a::after { display: none; }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: min(calc(100vh - var(--header-h)), 60rem);
    min-height: min(calc(100svh - var(--header-h)), 60rem);
    overflow: hidden;
    color: #fff;
    text-align: center;
}
.hero-img,
.cta-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.hero-img { animation: hero-zoom 14s var(--ease) both; }
.hero::after,
.cta-band::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15, 11, 6, .25) 0%, rgba(15, 11, 6, .55) 100%);
}
.hero-content,
.cta-content { position: relative; z-index: 1; padding: 4rem 1.5rem; max-width: 50rem; }
.hero-quote {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(2.75rem, 8vw, 5.5rem);
    line-height: 1.05;
    margin: 0 0 1.25rem;
}
.hero-text { font-size: 1.05rem; letter-spacing: .05em; margin: 0 0 2.5rem; }

/* ---------- Intro ---------- */

.intro { text-align: center; }
.intro-text {
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

/* ---------- About ---------- */

.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    padding-top: 0;
}
.about-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-body p { color: var(--muted); }
.about-list { list-style: none; counter-reset: item; padding: 0; margin: 2rem 0 2.5rem; }
.about-list li { counter-increment: item; position: relative; padding-left: 3.5rem; margin-bottom: 1.5rem; }
.about-list li::before {
    content: counter(item, decimal-leading-zero);
    position: absolute; left: 0; top: -.2rem;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.75rem;
    color: var(--accent-text);
}
.about-list h3 {
    font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
    margin: 0 0 .25rem;
}
.about-list p { margin: 0; }

/* ---------- Grids / services / works ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.services { background: var(--bg-soft); }
.service { text-align: center; }
.service img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 1.75rem; }
.service h3 {
    font-family: var(--serif); font-weight: 400; font-size: 1.5rem;
    letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .75rem;
}
.service p { color: var(--muted); margin: 0 auto; max-width: 22rem; }

.works { gap: 1rem; }
.work { position: relative; margin: 0; overflow: hidden; }
.work img { width: 100%; aspect-ratio: 9 / 7; object-fit: cover; transition: transform 1.2s var(--ease); }
.work figcaption {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
    color: #fff; text-align: center;
    background: rgba(15, 11, 6, .45);
    opacity: 0;
    transition: opacity .5s var(--ease);
}
.work:hover img { transform: scale(1.06); }
.work:hover figcaption { opacity: 1; }
.work-cat { font-size: .65rem; font-weight: 500; letter-spacing: .35em; text-transform: uppercase; }
.work-title { font-family: var(--serif); font-style: italic; font-size: 1.75rem; }

@media (hover: none) {
    .work figcaption { opacity: 1; justify-content: flex-end; padding-bottom: 1.25rem; background: linear-gradient(transparent 40%, rgba(15, 11, 6, .6)); }
}

/* ---------- Gallery + lightbox ---------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.gallery a { display: block; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 1.2s var(--ease), opacity .5s; }
.gallery a:hover img { transform: scale(1.05); opacity: .9; }

/* Mosaic: fixed row height, tiles span rows/columns; "dense" back-fills gaps. */
.mosaic {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(9rem, 17vw, 15rem);
    grid-auto-flow: dense;
}
.mosaic li { min-height: 0; }
.mosaic a,
.mosaic img { width: 100%; height: 100%; aspect-ratio: auto; }
.mosaic .tile-big  { grid-column: span 2; grid-row: span 2; }
.mosaic .tile-tall { grid-row: span 2; }
.mosaic .tile-wide { grid-column: span 2; }

.lightbox {
    width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
    margin: 0; padding: 0; border: 0;
    background: rgba(15, 11, 6, .95);
    color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(15, 11, 6, .95); }
.lightbox img { max-width: 90vw; max-height: 85vh; width: auto; height: auto; object-fit: contain; }
.lightbox button {
    position: absolute;
    background: none; border: 0; color: #fff; cursor: pointer;
    font: 300 2.75rem/1 var(--serif);
    width: 3.5rem; height: 3.5rem;
}
.lightbox button:hover { color: var(--accent); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Reviews ---------- */

.reviews { background: var(--bg-soft); }
.review { margin: 0; text-align: center; padding: 2.5rem 2rem; background: var(--bg); }
.review-stars { color: var(--accent); letter-spacing: .3em; font-size: .9rem; }
.review blockquote { margin: 1.25rem 0; }
.review blockquote p {
    font-family: var(--serif); font-style: italic; font-size: 1.35rem; line-height: 1.5; margin: 0;
}
.review figcaption { font-size: .7rem; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }

/* ---------- CTA band ---------- */

.cta-band {
    position: relative;
    display: grid; place-items: center;
    min-height: 26rem;
    overflow: hidden;
    color: #fff;
    text-align: center;
}
.cta-heading {
    font-family: var(--serif); font-style: italic; font-weight: 300;
    font-size: clamp(2.75rem, 7vw, 4.5rem); line-height: 1.1; margin: 0 0 1rem;
}
.cta-content p { margin: 0 0 2rem; letter-spacing: .05em; }

/* ---------- Contact form ---------- */

.contact-intro { text-align: center; color: var(--muted); margin: 0 0 1rem; }

.form { display: grid; gap: 1.75rem; margin-top: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.field label {
    display: block;
    font-size: .7rem; font-weight: 500; letter-spacing: .25em; text-transform: uppercase;
    margin-bottom: .5rem;
}
.field input,
.field textarea {
    width: 100%;
    font: 300 1rem/1.6 var(--sans);
    color: var(--fg);
    background: transparent;
    border: 0;
    border-bottom: 1px solid #b9ada2;
    border-radius: 0;
    padding: .6rem 0;
    transition: border-color .3s;
}
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--fg); box-shadow: 0 1px 0 var(--fg); }
.field textarea { resize: vertical; min-height: 9rem; }
.field [aria-invalid="true"] { border-bottom-color: var(--error-fg); }
.field-error { color: var(--error-fg); font-size: .85rem; margin: .5rem 0 0; }
.field-hint { color: var(--muted); font-size: .85rem; margin: .5rem 0 0; }
.form .button { justify-self: center; }

.alert { padding: 1rem 1.25rem; margin: 1.5rem 0 0; text-align: center; }
.alert-success { background: var(--success-bg); color: var(--success-fg); }
.alert-error { background: var(--error-bg); color: var(--error-fg); }

/* Honeypot: off-screen instead of display:none (some bots skip hidden inputs). */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer: logo left, menu + Instagram right ---------- */

.site-footer { background: var(--dark); color: var(--on-dark); }
.footer-main,
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-left: clamp(1.25rem, 4vw, 3rem);
    padding-right: clamp(1.25rem, 4vw, 3rem);
}
.footer-main { padding-top: 3.5rem; padding-bottom: 3rem; }
.footer-brand { display: block; line-height: 0; }
.footer-brand img { width: auto; height: 4.5rem; }
.footer-quote { font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin: 1rem 0 0; color: #d9cfc5; }

.footer-nav-col { display: flex; flex-direction: column; align-items: flex-end; gap: 1.5rem; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem clamp(1rem, 2.2vw, 2.25rem); list-style: none; padding: 0; margin: 0; }
.footer-nav a,
.footer-social {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
    text-decoration: none;
    transition: color .3s var(--ease);
}
.footer-social { font-size: .75rem; letter-spacing: .12em; text-transform: none; }
.footer-nav .icon,
.footer-social .icon { color: var(--accent); }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.footer-nav a:hover,
.footer-social:hover { color: var(--accent); }

.footer-bottom { padding-top: 1.25rem; padding-bottom: 1.5rem; border-top: 1px solid rgba(245, 239, 233, .12); }
.footer-legal { font-size: .75rem; color: #a89e94; margin: 0; }
.footer-top { font-size: .75rem; color: #a89e94; text-decoration: none; }
.footer-top:hover { color: var(--accent); }
.site-footer :focus-visible { outline-color: var(--accent); }

@media (max-width: 860px) {
    .footer-main,
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-brand-col { display: flex; flex-direction: column; align-items: center; }
    .footer-nav-col { align-items: center; }
    .footer-nav { justify-content: center; }
    .footer-bottom { gap: .5rem; }
}

/* ---------- Error page / debug ---------- */

.error-page { text-align: center; min-height: 50vh; }
.error-page .intro-text { margin-bottom: 2.5rem; }
.debug { text-align: left; white-space: pre-wrap; background: var(--error-bg); color: var(--error-fg); padding: 1rem; margin-top: 2rem; }

/* ---------- Motion ---------- */

@keyframes fade-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: none; }
}
@keyframes hero-zoom {
    from { transform: scale(1.08); }
    to   { transform: scale(1); }
}
.reveal { animation: fade-up 1.2s var(--ease) both; }
.reveal-2 { animation-delay: .2s; }
.reveal-3 { animation-delay: .4s; }

/* Scroll reveals only when JS runs (boot.js adds .js), so no-JS shows everything. */
.js [data-animate] { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js [data-animate].is-visible { opacity: 1; transform: none; }
.grid-3 > [data-animate]:nth-child(3n+2),
.gallery > [data-animate]:nth-child(3n+2) { transition-delay: .12s; }
.grid-3 > [data-animate]:nth-child(3n),
.gallery > [data-animate]:nth-child(3n) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .hero-img { animation: none; }
    .js [data-animate] { opacity: 1; transform: none; transition: none; }
    .work img, .gallery img { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .about { grid-template-columns: 1fr; }
    .about-media img { aspect-ratio: 4 / 3; }
}
@media (max-width: 760px) {
    :root { --header-h: 4.25rem; }
    .section { padding-top: 4rem; padding-bottom: 4rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .gallery, .mosaic { grid-template-columns: repeat(2, 1fr); }
    .mosaic { grid-auto-rows: 38vw; }
    .form-row { grid-template-columns: 1fr; }
}
