/*
 * E P O K — brochure site.
 *
 * The register is The Row / Loro Piana: warm paper, one serif voice, tiny
 * tracked labels, hairline rules, photography doing the talking. Every
 * measurement is generous on purpose — luxury here is unhurried space.
 */

:root {
    --paper: #f6f3ec;
    --paper-deep: #efeadf;
    --ink: #171511;
    --soft: #6f695e;
    --teal: #0f4d55;
    --hairline: rgba(23, 21, 17, 0.16);
    --serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --sans: 'Inter', 'Helvetica Neue', sans-serif;
    --pad: clamp(1.4rem, 6vw, 6rem);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.05rem, 1.35vw, 1.25rem);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ------------------------------------------------------------- lettering -- */

.label {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.66rem;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--soft);
}

.label--ink { color: var(--ink); }

.wordmark {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: 0.52em;
    text-indent: 0.52em; /* recentre tracked text */
    text-transform: uppercase;
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.12;
    margin: 0;
}

.display {
    font-size: clamp(2rem, 4.6vw, 4.2rem);
    font-weight: 300;
    letter-spacing: 0.01em;
}

.display em,
.lede em {
    font-style: italic;
    font-weight: 300;
}

.lede {
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    font-weight: 300;
    line-height: 1.5;
    max-width: 34em;
}

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

.measure { max-width: 38em; }

/* A quiet link: hairline that arrives on hover. */
.qlink {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.66rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--ink);
    padding-bottom: 0.45em;
    position: relative;
}

.qlink::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 100%;
    background: var(--ink);
    transform: scaleX(0.32);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.qlink:hover::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- header -- */

.site-head {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    padding: clamp(1rem, 2.4vw, 1.9rem) var(--pad);
    transition: background 0.5s ease, box-shadow 0.5s ease, color 0.4s ease,
        padding 0.5s ease;
}

.site-head .wordmark {
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    text-indent: 0;
    margin-right: -0.52em;
}

.site-head nav {
    display: flex;
    gap: clamp(1.1rem, 2.6vw, 2.6rem);
}

.site-head nav:last-of-type { justify-content: flex-end; }

.site-head .nav-link {
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    opacity: 0.82;
    transition: opacity 0.3s ease;
}

.site-head .nav-link:hover,
.site-head .nav-link[aria-current='page'] { opacity: 1; }

/* Over the hero the header is pale; once scrolled it becomes paper. */
.site-head--overlay {
    color: #f4efe4;
}

.site-head--solid,
.site-head.is-scrolled {
    color: var(--ink);
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--hairline);
}

/* Mobile menu: a paper sheet with the nav set large. */
.menu-btn {
    display: none;
    background: none;
    border: 0;
    padding: 0.4rem 0;
    cursor: pointer;
    color: inherit;
    justify-self: end;
}

.sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: var(--paper);
    color: var(--ink);
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: clamp(1.2rem, 4vh, 2.4rem) var(--pad) clamp(2rem, 6vh, 3rem);
    transform: translateY(-102%);
    transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}

.sheet.is-open { transform: none; }

.sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sheet-links {
    display: grid;
    align-content: center;
    gap: clamp(1rem, 3.4vh, 2rem);
}

.sheet-links a {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2rem, 9vw, 3.2rem);
    line-height: 1.1;
}

.sheet-links a em { font-style: italic; }

.sheet-foot { display: grid; gap: 0.5rem; }

/* ------------------------------------------------------------------ hero -- */

.hero {
    position: relative;
    height: 100svh;
    min-height: 620px;
    overflow: hidden;
    color: #f4efe4;
}

.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(12, 14, 14, 0.22),
        rgba(12, 14, 14, 0) 34%,
        rgba(12, 14, 14, 0) 62%,
        rgba(12, 14, 14, 0.34)
    );
}

.hero-inner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding: var(--pad);
    padding-bottom: clamp(2.4rem, 7vh, 5rem);
}

.hero-mark {
    font-size: clamp(2.2rem, 5.4vw, 4.6rem);
    font-weight: 300;
    text-indent: 0;
}

.hero-strap {
    margin-top: 1.1rem;
    color: rgba(244, 239, 228, 0.85);
}

.hero-foot {
    position: absolute;
    z-index: 2;
    bottom: clamp(2.6rem, 7.4vh, 5.4rem);
    right: var(--pad);
    display: flex;
    justify-content: flex-end;
}

/* Over the hero, the header carries only the nav; the mark lives in the
   lockup until the page scrolls and the header goes solid. */
.site-head--overlay .wordmark { opacity: 0; transition: opacity 0.4s ease; }
.site-head--overlay.is-scrolled .wordmark { opacity: 1; }

.hero-foot .label { color: rgba(244, 239, 228, 0.75); }

/* ----------------------------------------------------------------- flow -- */

.act {
    padding: clamp(5rem, 12vh, 10rem) var(--pad);
}

.act--tight { padding-top: clamp(3rem, 7vh, 6rem); }

.act-head {
    display: flex;
    align-items: baseline;
    gap: 1.6rem;
    margin-bottom: clamp(2.4rem, 6vh, 4.6rem);
}

.act-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hairline);
    transform: translateY(-0.35em);
}

.centered {
    display: grid;
    justify-items: center;
    text-align: center;
}

/* Manifesto block */
.manifesto {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 2.2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Diptych */
.diptych {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.2rem, 3vw, 3rem);
    align-items: start;
}

.diptych figure { margin: 0; }

.diptych figure:nth-child(2) {
    margin-top: clamp(3rem, 9vh, 7rem);
}

figcaption {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.9rem;
}

figcaption .label { letter-spacing: 0.28em; }

/* Image treatment */
.ph {
    overflow: hidden;
    background: var(--paper-deep);
}

.ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

a.ph:hover img,
.ph a:hover img { transform: scale(1.025); }

.ph--p34 { aspect-ratio: 3 / 4; }
.ph--wide { aspect-ratio: 16 / 9; }

/* Full-bleed band */
.band {
    position: relative;
    height: clamp(420px, 78vh, 780px);
    overflow: hidden;
}

.band img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.band-quote {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: var(--pad);
    text-align: center;
    color: #f4efe4;
    background: rgba(10, 24, 26, 0.28);
}

.band-quote .display { max-width: 18em; }

/* Collection preview grid */
.trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.2rem, 3vw, 3rem);
}

.trio .label { letter-spacing: 0.28em; }

/* Maison split */
.split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 6vw, 7rem);
    align-items: center;
}

/* --------------------------------------------------------- lookbook rows -- */

.piece {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: clamp(2rem, 6vw, 7rem);
    align-items: center;
    padding: clamp(3.4rem, 9vh, 7.5rem) var(--pad);
}

.piece:nth-child(even) .piece-media { order: 2; }

.piece-media { margin: 0; }

.piece-body {
    max-width: 34em;
}

.piece-body .label { display: block; margin-bottom: 1.1rem; }

.piece-name {
    font-size: clamp(1.7rem, 2.9vw, 2.6rem);
    font-weight: 300;
    margin-bottom: 0.55em;
}

.piece-meta {
    display: flex;
    gap: 2rem;
    align-items: baseline;
    margin: 1.4rem 0 1.6rem;
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--soft);
}

.piece-desc {
    color: var(--soft);
    font-size: 1.02rem;
    line-height: 1.75;
}

.piece-thumb {
    width: clamp(72px, 8vw, 108px);
    border: 1px solid var(--hairline);
    padding: 6px;
    background: #fff;
    margin-top: 1.8rem;
}

.piece-actions { margin-top: 2rem; display: flex; gap: 2.6rem; }

/* ---------------------------------------------------------------- footer -- */

.site-foot {
    background: var(--ink);
    color: #efe9dc;
    padding: clamp(4rem, 10vh, 7rem) var(--pad) clamp(2rem, 5vh, 3.4rem);
    margin-top: clamp(5rem, 12vh, 10rem);
}

.band + .site-foot,
.no-gap + .site-foot { margin-top: 0; }

.foot-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    padding-bottom: clamp(3rem, 7vh, 5rem);
    border-bottom: 1px solid rgba(239, 233, 220, 0.18);
}

.site-foot .label { color: rgba(239, 233, 220, 0.55); }

.foot-links {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.foot-links a { opacity: 0.75; transition: opacity 0.3s ease; }
.foot-links a:hover { opacity: 1; }

.foot-note {
    font-size: 0.98rem;
    font-weight: 300;
    color: rgba(239, 233, 220, 0.72);
    max-width: 26em;
    margin-top: 1.4rem;
}

.foot-mark {
    text-align: center;
    padding-top: clamp(2.4rem, 6vh, 4rem);
}

.foot-mark .wordmark {
    font-size: clamp(2.2rem, 7vw, 5rem);
    font-weight: 300;
    color: rgba(239, 233, 220, 0.92);
}

.foot-legal {
    margin-top: 2.2rem;
    display: flex;
    justify-content: center;
    gap: 2.4rem;
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(239, 233, 220, 0.45);
}

/* --------------------------------------------------------------- pages ---- */

.page-hero {
    padding: calc(clamp(4.5rem, 12vh, 8rem) + 4rem) var(--pad)
        clamp(3rem, 8vh, 6rem);
}

.page-hero .display { max-width: 16em; }

.prose {
    columns: 1;
    max-width: 44em;
}

.prose-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
}

.contact-card {
    border-top: 1px solid var(--hairline);
    padding-top: 2rem;
    display: grid;
    gap: 0.6rem;
}

.contact-card .serif-lg {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 300;
}

/* ---------------------------------------------------------------- reveal -- */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .ph img { transition: none; }
}

/* ---------------------------------------------------------------- mobile -- */

@media (max-width: 880px) {
    .site-head { grid-template-columns: auto 1fr; }
    .site-head nav { display: none; }
    .menu-btn { display: block; }
    /* On the phone the mark anchors the header everywhere, hero included. */
    .site-head--overlay .wordmark { opacity: 1; }
    .hide-m { display: none; }

    .diptych,
    .trio,
    .split,
    .prose-grid,
    .piece { grid-template-columns: 1fr; }

    .piece:nth-child(even) .piece-media { order: 0; }

    .diptych figure:nth-child(2) { margin-top: 0; }

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

    .hero-mark { letter-spacing: 0.34em; text-indent: 0.34em; }
}
