/*
Theme Name: Evenue Lookbook
Description: A split stage — a fixed plate on the left cross-fades as the column on the right is read. Numbered like plates in a book; squared, like print. Port of the legacy evenue-lookbook design exploration onto the v2 starter structure.
Version: 0.5.1
Requires PHP: 8.1
Author: Evenue
Text Domain: evenue-lookbook
Contract: 2.12.0
*/

/* Colors and fonts ride the --evenue-* tokens: brand = petrol (the one
   accent), page-bg = alabaster paper, surface-bg = the pressed wells,
   heading/body/muted text = ink strengths. Geometry is the design's
   identity and stays fixed: zero radius everywhere, no shadows — squared,
   like print. A page turning, never a bounce. */

:root {
    --alabaster: var(--evenue-page-bg);
    --pressed: var(--evenue-surface-bg);
    --ink: var(--evenue-heading-text);
    --ink-soft: var(--evenue-body-text);
    --ink-faint: var(--evenue-muted-text);
    --petrol: var(--evenue-brand);
    --petrol-deep: var(--evenue-secondary);
    --rule: color-mix(in srgb, var(--evenue-heading-text) 14%, transparent);
    --rule-strong: color-mix(in srgb, var(--evenue-heading-text) 38%, transparent);

    --t-mark: 0.6875rem;
    --t-meta: 0.8125rem;
    --t-body: clamp(0.9375rem, 0.88rem + 0.2vw, 1.0625rem);
    --t-lead: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
    --t-plate: clamp(2rem, 1.2rem + 2.6vw, 3.75rem);
    --t-title: clamp(2.75rem, 1.6rem + 4.4vw, 6rem);
    --track-mark: 0.2em;

    --gutter: clamp(1.5rem, 4vw, 4.5rem);
    /* The chrome's height: its padding twice plus the wordmark. It is fixed
       and has no bar, so anchor targets scroll to clear it, not under it. */
    --chrome-h: calc(2 * clamp(1rem, 2.5vh, 1.5rem) + 34px);
    --stage-width: 46vw;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast: 240ms;
    --t-base: 520ms;
    --dur-plate: 900ms;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--alabaster);
    color: var(--ink-soft);
    font-family: var(--evenue-body-font);
    letter-spacing: var(--evenue-body-letter-spacing);
    line-height: var(--evenue-body-line-height);
    font-size: var(--t-body);
}

h1, h2, h3 {
    font-family: var(--evenue-heading-font);
    font-weight: 400;
    letter-spacing: var(--evenue-heading-letter-spacing);
    color: var(--ink);
    margin: 0 0 0.4em;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--alabaster); }

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

/* Every uppercase label: the mark voice. */
.mark, .page__mark, .chapter__mark, .chapter__facts, .opening__mark, .opening__meta, .closing__no,
.sheet__no, .sheet__place, .stage__caption, .chrome__nav a, .page__facts dt,
.chapter__link, .lang-switcher .lang, .facts-row, .legal {
    font-family: var(--evenue-body-font);
    font-size: var(--t-mark);
    letter-spacing: var(--track-mark);
    text-transform: uppercase;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
}

.legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    width: min(1200px, calc(100% - 2 * var(--gutter)));
    margin: 0 auto;
    padding-block: 1.25rem 2rem;
    border-top: 1px solid var(--rule);
}
.legal a:hover { color: var(--petrol); }
.legal-note {
    width: min(1200px, calc(100% - 2 * var(--gutter)));
    margin: 0 auto;
    padding-block: 1.25rem 1rem;
    border-top: 1px solid var(--rule);
    font-size: var(--t-meta);
    color: var(--ink-faint);
}
.legal-note + .legal { border-top: 0; padding-top: 0; }

.skip-link {
    position: fixed;
    top: 0;
    left: var(--gutter);
    z-index: 999;
    transform: translateY(-160%);
    transition: transform var(--t-fast) var(--ease);
    background: var(--ink);
    color: var(--alabaster);
    padding: 0.6rem 1rem;
    font-size: var(--t-meta);
}
.skip-link:focus { transform: none; }

/* ---------- the chrome: floating, pointer-transparent ---------- */

.chrome {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--gutter);
    padding: clamp(1rem, 2.5vh, 1.5rem) var(--gutter);
    min-height: var(--chrome-h);
    pointer-events: none;
}
.chrome > * { pointer-events: auto; }
.chrome.is-stuck {
    background: color-mix(in srgb, var(--alabaster) 93%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
    pointer-events: auto;
}
@media (prefers-reduced-motion: no-preference) {
    .chrome { transition: background var(--t-base) var(--ease-out); }
}
.chrome__mark {
    font-family: var(--evenue-heading-font);
    font-size: 1.5rem;
    color: var(--ink);
}
.chrome__mark img { height: 34px; width: auto; }
/* The chrome is the only navigation this design has, and it floats over
   photography: at the caption size it was barely there. It is set at meta
   size, and once the page moves it takes a paper backing so it stays
   readable over whatever plate is under it. */
.chrome__nav { display: flex; gap: 1.25rem; align-items: baseline; flex-wrap: wrap; font-size: var(--t-meta); }
.chrome__nav a { position: relative; color: var(--ink); padding-bottom: 2px; }
.chrome__nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--petrol);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform var(--t-base) var(--ease-out);
}
.chrome__nav a:hover::after, .chrome__nav a[aria-current]::after { transform: scaleX(1); transform-origin: left center; }
.chrome__nav .chrome__book { color: var(--petrol); }
.lang-switcher { display: inline-flex; gap: 0.75rem; border: 0; padding: 0; }
.lang-switcher .lang.current { color: var(--petrol); }

/* From four languages up the codes fold into a disclosure. */
.lang-switcher--menu { position: relative; }
.lang-switcher--menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4em; }
.lang-switcher--menu > summary::-webkit-details-marker { display: none; }
.lang-switcher--menu > summary::after { content: "\203a"; transform: rotate(90deg); transition: transform var(--t-base) var(--ease-out); }
.lang-switcher--menu[open] > summary::after { transform: rotate(-90deg); }
.lang-menu { position: absolute; top: 100%; right: 0; display: grid; gap: 0.5rem; margin-top: 0.5rem; padding: 0.75rem 1rem; background: var(--alabaster); border: 1px solid var(--rule); }
.lang-menu .lang { color: var(--ink); }

/* In-page jumps glide instead of cutting: #stay, #units, the sheets' #content. Motion is a preference. */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}
@media (max-width: 900px) {
}

/* Anchor targets (#stay, #units, #events, #amenities, #content) clear the chrome. */
[id] { scroll-margin-top: calc(var(--chrome-h) + 1rem); }

/* ---------- buttons: squared, baseline-rising fill ---------- */

.btn, .button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: var(--evenue-button-padding-y) var(--evenue-button-padding-x);
    border: var(--evenue-button-border-width) solid var(--evenue-button-border-color);
    border-radius: 0; /* labeled identity: "zero radius everywhere" in the header above */
    background: var(--evenue-button-bg);
    color: var(--evenue-button-text);
    font-family: var(--evenue-body-font);
    font-size: var(--evenue-button-font-size);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
}
.btn::before, .button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--evenue-button-bg-hover);
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform var(--t-base) var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before,
.button:hover::before, .button:focus-visible::before { transform: scaleY(1); }
.btn:hover, .button:hover { color: var(--evenue-button-text-hover); }
.btn:hover .btn__mark { transform: translateX(0.3rem); }
.btn:active, .button:active { background: var(--evenue-button-bg-active); }
.btn__mark { display: inline-block; transition: transform var(--t-base) var(--ease-out); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }

/* ---------- the spread ---------- */

.spread { display: grid; grid-template-columns: var(--stage-width) 1fr; min-height: 100vh; }

.stage {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--pressed);
}
.stage__plate {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--dur-plate) var(--ease);
}
.stage__plate img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 2.4s var(--ease-out); }
.stage__plate.is-current { opacity: 1; }
.stage__plate.is-current img { transform: scale(1); }
.stage__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: clamp(1rem, 2.5vh, 1.5rem) var(--gutter);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
}
.stage__caption span { color: #fff; }

.column { padding-inline: var(--gutter); background: var(--alabaster); }

.opening {
    display: grid;
    align-content: center;
    gap: clamp(0.85rem, 2.5vh, 1.5rem);
    min-height: 100vh;
    padding-block: clamp(4rem, 12vh, 8rem);
}
.opening__title { font-size: var(--t-title); line-height: 0.94; max-width: 12ch; margin: 0; }
.opening__note { font-size: var(--t-lead); font-weight: 300; max-width: 40ch; color: var(--ink-soft); margin: 0; }
.opening__meta { display: flex; gap: var(--gutter); padding-top: 1rem; border-top: 1px solid var(--rule); }
.opening__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: clamp(1rem, 2.5vh, 1.5rem); }

/* The closing index: the sheets this book does not print, one named line
   each. Three identical buttons said nothing about where they led. */
.closing__index { list-style: none; margin: clamp(1rem, 3vh, 2rem) 0 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.closing__index li { border-bottom: 1px solid var(--rule); }
.closing__index a {
    display: flex;
    align-items: baseline;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    padding-block: clamp(0.85rem, 2.5vh, 1.35rem);
    color: var(--ink);
    transition: color var(--t-base) var(--ease-out);
}
.closing__index a:hover { color: var(--petrol); }
.closing__no { color: var(--petrol); font-variant-numeric: tabular-nums; }
.closing__name { flex: 1; font-family: var(--evenue-heading-font); font-size: clamp(1.5rem, 1rem + 1.8vw, 2.25rem); line-height: 1.1; }
.closing__index .btn__mark { transition: transform var(--t-base) var(--ease-out); }
.closing__index a:hover .btn__mark { transform: translateX(0.4rem); }
.closing__links { margin-top: clamp(1rem, 3vh, 1.75rem); }

.chapter {
    display: grid;
    align-content: center;
    gap: clamp(0.85rem, 2.5vh, 1.5rem);
    min-height: 100vh;
    padding-block: clamp(3rem, 10vh, 6rem);
    border-top: 1px solid var(--rule);
}
.chapter__figure { display: none; margin: 0; }
.chapter__figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.chapter__mark b { color: var(--petrol); font-weight: 400; }
.chapter__title { font-size: var(--t-plate); line-height: 1.04; max-width: 14ch; margin: 0; }
.chapter__note { max-width: 42ch; margin: 0; }
.chapter__note p { margin: 0; }
.chapter__link {
    position: relative;
    display: inline-block;
    color: var(--ink);
    font-size: var(--t-meta);
    letter-spacing: 0.1em;
    padding-bottom: 0.45rem;
    width: fit-content;
}
.chapter__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--petrol);
    transform: scaleX(0.28);
    transform-origin: left center;
    transition: transform var(--t-base) var(--ease-out);
}
.chapter__link:hover { color: var(--petrol); }
.chapter__link:hover::after { transform: scaleX(1); }
.chapter__link .btn__mark { display: inline-block; transition: transform var(--t-base) var(--ease-out); }
.chapter__link:hover .btn__mark { transform: translateX(0.4rem); }

.closing {
    display: grid;
    align-content: center;
    gap: clamp(0.85rem, 2.5vh, 1.5rem);
    min-height: 70vh;
    padding-block: clamp(3rem, 10vh, 6rem);
    border-top: 1px solid var(--rule);
}
.closing__title { font-size: var(--t-plate); margin: 0; }
.closing__links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* The fold: one column, plates become inline illustrations. */
@media (max-width: 900px) {
    .spread { grid-template-columns: 1fr; }
    .stage { display: none; }
    .opening, .chapter, .closing { min-height: 0; padding-block: clamp(2rem, 6vh, 3.5rem); }
    .chapter__figure { display: block; }
}

/* ---------- breadcrumbs: the running head ---------- */

/* The chrome is fixed, pointer-transparent and has no bar, so the trail
   does not stick under it: it opens every page and the destination's
   column as the book's running head, one line in the mark voice,
   scrollable on phones. */
.breadcrumbs { font-size: var(--t-mark); letter-spacing: var(--track-mark); text-transform: uppercase; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.breadcrumbs ol { display: flex; gap: 0.75rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.breadcrumbs ol::-webkit-scrollbar { display: none; }
.breadcrumbs li { display: flex; gap: 0.75rem; align-items: center; }
.breadcrumbs li + li::before { content: "\203a"; color: var(--petrol); }
.breadcrumbs a { color: var(--ink-faint); }
.breadcrumbs a:hover, .breadcrumbs a:focus-visible { color: var(--petrol); }
.breadcrumbs [aria-current] { color: var(--ink); }
.page > .breadcrumbs { margin-bottom: clamp(1rem, 2.5vh, 1.5rem); }
.column > .breadcrumbs { padding-top: clamp(6rem, 14vh, 9rem); }

/* ---------- documents: one plate, printed ---------- */

.page {
    width: min(68ch, calc(100% - 2 * var(--gutter)));
    margin-inline: auto;
    padding-block: clamp(6rem, 14vh, 9rem) clamp(4rem, 10vh, 7rem);
}
.page--wide { width: min(1200px, calc(100% - 2 * var(--gutter))); }

.plate-hero { margin: 0 0 clamp(1.5rem, 4vh, 2.5rem); background: var(--pressed); }
.plate-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.page__mark { display: block; color: var(--petrol); }
/* A mark that heads a section of the plate is a heading, not a caption: at
   the caption's size it disappeared between two grids of cards. */
.page__section > .page__mark {
    font-size: 0.95rem;
    letter-spacing: 0.16em;
    color: var(--ink);
}
.page__title { font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem); line-height: 1.02; margin: 0.4rem 0 0; }
/* Title on the left, the house dropdown on its right, sitting on the title's last line. */
.page__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.sheet-select { margin: 0 0 0.55rem; }
.sheet-select__field { position: relative; display: inline-block; }
.sheet-select__field::after { content: "\203a"; position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%) rotate(90deg); color: var(--petrol); pointer-events: none; }
.sheet-select select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--rule-strong);
    border-radius: 0;
    padding: 0.4rem 1.6rem 0.4rem 0;
    font-family: var(--evenue-body-font);
    font-size: var(--t-mark);
    letter-spacing: var(--track-mark);
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
}
.sheet-select select:hover, .sheet-select.is-set select { color: var(--petrol); border-bottom-color: var(--petrol); }
/* iOS zooms into a field whose text is under 16px; on touch screens the dropdown reads at 1rem. */
@media (pointer: coarse) { .sheet-select select { font-size: 1rem; letter-spacing: 0.08em; } }
.sheet-select__go { margin-left: 0.75rem; padding: 0 0 2px; background: none; border: 0; border-bottom: 1px solid var(--petrol); font-family: var(--evenue-body-font); font-size: var(--t-mark); letter-spacing: var(--track-mark); text-transform: uppercase; color: var(--petrol); cursor: pointer; }


.page__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem clamp(1rem, 3vw, 2rem);
    margin: clamp(1.25rem, 3vh, 2rem) 0 0;
    padding-top: clamp(1rem, 2.5vh, 1.5rem);
    border-top: 1px solid var(--rule);
}
.page__facts dt { margin: 0; }
.page__facts dd { margin: 0.2rem 0 0; font-family: var(--evenue-heading-font); font-size: 1.25rem; color: var(--ink); }
.page__facts dd { overflow-wrap: anywhere; } /* an e-mail address has no break opportunity; in the second ledger column it ran off a phone */
.page__facts dd a { border-bottom: 1px solid var(--rule-strong); }
.page__facts dd a:hover { color: var(--petrol); border-color: var(--petrol); }
.page__facts { align-items: start; }

/* An amenity ledger is a list of names with occasional notes, not a run of
   facts: the name leads in ink, the note follows quietly. Set the other way
   round, a two-line price note in display type shouted over the name it
   belonged to, and rows of wildly different height left the grid ragged. */
.page__facts--notes dt { color: var(--ink); }
.page__facts--notes dd {
    font-family: var(--evenue-body-font);
    font-size: var(--t-meta);
    font-weight: 300;
    line-height: 1.5;
    color: var(--ink-faint);
}
.page__facts--notes dd a { color: var(--ink-faint); border-bottom-color: var(--rule); }
.page__facts--notes dd a:hover { color: var(--petrol); }

.facts-row {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem var(--gutter);
    margin: clamp(1.25rem, 3vh, 2rem) 0 0;
    padding: clamp(1rem, 2.5vh, 1.5rem) 0 0;
    border-top: 1px solid var(--rule);
}

/* Each part of a plate opens on its own rule: the rooms sheet and the
   programme sheet are the same grid of cards, and with only a small mark
   between them they read as one long catalogue. */
.page__section {
    margin-top: clamp(2.5rem, 7vh, 4rem);
    padding-top: clamp(1.25rem, 3.5vh, 2rem);
    border-top: 1px solid var(--rule-strong);
}
.page__section > .page__facts, .page__section > .sheet { margin-top: clamp(0.75rem, 2vh, 1rem); }
/* A ledger directly under a section mark brings its own rule; one is enough. */
.page__section > .page__facts { border-top: 0; padding-top: 0; }

/* The way into the whole sheet, under the sheet: a line of its own, not a
   section, and not squeezed against the cards above and the mark below. */
.page__more { margin: clamp(1.25rem, 3.5vh, 2rem) 0 0; }

.page__body { margin-top: clamp(1.5rem, 4vh, 2.5rem); font-size: var(--t-lead); font-weight: 300; line-height: 1.73; }
.page__body > * + * { margin-top: 1em; }
.page__body a { color: var(--evenue-link); text-decoration: underline; text-underline-offset: 0.2em; }
.page__body h2 { font-size: 1.5rem; margin-top: 1.6em; line-height: 1.15; }
.page__body h3 { font-size: 1.2rem; margin-top: 1.6em; line-height: 1.15; }

.page__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 0.85rem;
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
}
.page__gallery img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }

.page__foot {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
    padding-top: clamp(1rem, 2.5vh, 1.5rem);
    border-top: 1px solid var(--rule);
}

/* ---------- the contact sheet ---------- */

.sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: clamp(1.25rem, 3vw, 2.5rem);
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
}
.sheet__item { display: grid; gap: 0.6rem; }
.sheet__figure { display: block; margin: 0; overflow: hidden; background: var(--pressed); }
.sheet__figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform var(--dur-plate) var(--ease-out); }
.sheet__item:hover .sheet__figure img, .sheet__item:focus-within .sheet__figure img { transform: scale(1.05); }
.sheet__title { font-size: 1.5rem; margin: 0; line-height: 1.1; }

/* The reel: two plates on a line that slides. Where a sheet is a grid you
   read down, a reel is a row you read across — which is the whole point on a
   plate that already showed a grid of rooms above it. */
.reel { position: relative; margin-top: clamp(1.5rem, 4vh, 2.5rem); }
.reel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - clamp(1.25rem, 3vw, 2.5rem)) / 2);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: clamp(1rem, 2.5vh, 1.5rem);
}
.reel__track::-webkit-scrollbar { display: none; }
.reel__track > * { scroll-snap-align: start; align-content: start; }
/* Every plate in a reel keeps its 3:4 well whether or not it has a picture.
   The well takes its height from the image, so an entry without one used to
   be a third as tall as its neighbours — and a column track is as tall as its
   tallest child, which left a void under the short ones. */
.reel__track .sheet__figure { aspect-ratio: 3 / 4; }
.reel__controls { display: flex; justify-content: flex-end; gap: 0.5rem; }
.reel__arrow {
    width: 42px;
    height: 42px;
    border: 1px solid var(--rule-strong);
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out);
}
.reel__arrow:hover:not(:disabled) { color: var(--petrol); border-color: var(--petrol); }
.reel__arrow:disabled { opacity: 0.3; cursor: default; }
@media (max-width: 768px) { .reel__track { grid-auto-columns: 84%; } }
.sheet__item:hover .sheet__title { color: var(--petrol); }
/* A pointer sweeping across a sheet must not wake every plate it crosses:
   the zoom and the petrol title come once the pointer has rested on a plate
   for a moment. The delay sits on the way in alone — leaving is immediate,
   and a hover that ends inside the delay never starts the transition.
   Keyboard focus is deliberate and answers at once. */
.sheet__title { transition: color var(--t-base) var(--ease-out); }
.sheet__item:hover .sheet__figure img, .sheet__item:hover .sheet__title { transition-delay: 220ms; }
.sheet__item:focus-within .sheet__figure img, .sheet__item:focus-within .sheet__title { transition-delay: 0s; }

/* The pager: the mark voice under the sheet, a hairline above, squared. */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
    padding-top: clamp(1rem, 2.5vh, 1.5rem);
    border-top: 1px solid var(--rule);
    font-size: var(--t-mark);
    letter-spacing: var(--track-mark);
    text-transform: uppercase;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
}
.pager__step { display: inline-block; padding: 0.75rem 0; color: var(--ink); }
a.pager__step:hover, a.pager__step:focus-visible { color: var(--petrol); }
.pager__step[aria-hidden] { color: var(--ink-faint); opacity: 0.5; }

.pagination { display: flex; gap: 0.5rem; margin-top: clamp(1.5rem, 4vh, 2.5rem); flex-wrap: wrap; }
.pagination .page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 2.5rem;
    height: 2.5rem;
    box-shadow: inset 0 0 0 1px var(--rule);
    font-size: var(--t-meta);
    font-variant-numeric: tabular-nums;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--alabaster); }

/* ---------- filter marks (archives): text, not pills ---------- */

/* One line of marks, never a stack: the row scrolls sideways (drag on a
   pointer, swipe on a phone) and hides its scrollbar like the trail. */
.sheet-filters { display: flex; gap: 1.25rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; cursor: grab; margin-top: clamp(1rem, 2.5vh, 1.5rem); padding-top: 0.85rem; border-top: 1px solid var(--rule); }
.sheet-filters::-webkit-scrollbar { display: none; }
.sheet-filters > * { flex-shrink: 0; white-space: nowrap; }
.sheet-filters.dragging { cursor: grabbing; scroll-behavior: auto; }
.sheet-filters.dragging a { pointer-events: none; }
.sheet-filters a {
    font-size: var(--t-mark);
    letter-spacing: var(--track-mark);
    text-transform: uppercase;
    color: var(--ink-faint);
    padding-bottom: 2px;
}
.sheet-filters__label { color: var(--ink-faint); opacity: 0.7; } /* two filter rows need names */
/* What is narrowing the sheet right now, and the way off it. */
.sheet-filters--on { border-top: 0; padding-top: 0; margin-top: clamp(0.75rem, 2vh, 1rem); }
.sheet-filters--on a { color: var(--petrol); border-bottom: 1px solid var(--petrol); }
.sheet-filters__off { margin-left: 0.5em; }
.sheet-filters a:hover { color: var(--petrol); }
.sheet-filters a.active { color: var(--petrol); border-bottom: 1px solid var(--petrol); }

/* The badge shows only the short mark; its full label stays readable for
   screen readers. */
.ai-label__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- AI-generated images: the label as a mark ---------- */

/* An image the plugin flags as AI-generated (contract 2.11.0) carries one
   line in the mark voice, like the caption under a plate in a book: under
   the plate or the figure, first under a sheet figure. The faint ink alone
   falls under 4.5:1 on several palettes, so the line takes some ink. */
.ai-label--caption {
    display: block;
    font-size: var(--t-mark);
    line-height: 1.5;
    letter-spacing: var(--track-mark);
    text-transform: uppercase;
    color: color-mix(in srgb, var(--ink-faint) 70%, var(--ink));
}
.ai-label[hidden] { display: none; }
.plate-hero .ai-label,
.chapter__figure .ai-label { padding-top: 0.6rem; background: var(--alabaster); }
/* On the stage the caption lies on the photograph: the line takes its
   right end, on a solid ink ground. */
.stage__caption .ai-label {
    margin-left: auto;
    padding: 0.3em 0.7em;
    background: var(--ink); /* without color-mix() */
    background: color-mix(in srgb, var(--ink) 80%, transparent);
    color: var(--alabaster);
}

/* ---------- lightbox ---------- */

.starter-lightbox { display: none; position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 90%, transparent); z-index: 2000; align-items: center; justify-content: center; }
.starter-lightbox.open { display: flex; }
.starter-lightbox img { max-width: 88vw; max-height: 86vh; object-fit: contain; }
.starter-lightbox button { position: absolute; background: none; border: none; color: #fff; font-size: 2.4rem; cursor: pointer; padding: 12px 20px; line-height: 1; }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.starter-lightbox .lb-ai { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); text-align: center; margin: 0; padding: 4px 12px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 0.75rem; letter-spacing: 0.06em; }

/* ---------- reduced motion: a page turning, never a bounce ---------- */

/* On a phone the nav wraps under the wordmark, and a fixed, transparent
   chrome would then sit over the running head (measured: 170px of chrome
   over a trail at 126px). Below 900px the chrome flows instead, the pages
   start right under it, and anchor targets need no clearance. */
@media (max-width: 900px) {
    :root { --chrome-h: 0px; }
    .chrome { position: static; flex-wrap: wrap; row-gap: 0.5rem; pointer-events: auto; }
    .page { padding-top: clamp(1.5rem, 4vh, 2.5rem); }
    .column > .breadcrumbs { padding-top: clamp(1.5rem, 4vh, 2.5rem); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
    .stage__plate img { transform: none; }
}

/* Booking embed: 290px holds the booking widget's stacked form, a second
   status line included. A shorter frame gets a denser form, never a cut one. */
.booking-embed { display: block; width: 100%; height: 290px; border: 0; }

/* Gallery tiles: the picture sits in a tile, so an image the plugin flags as
   AI-generated carries its label on the tile itself, not only in the lightbox.
   The label lets clicks through to the picture, which opens the lightbox. */
.gallery-tile { position: relative; display: block; }
.gallery-tile > img { display: block; }
.gallery-tile > .ai-label { position: absolute; left: 0.5rem; bottom: 0.5rem; max-width: calc(100% - 1rem); margin: 0; padding: 0.25rem 0.5rem; background: var(--ink); color: var(--alabaster); pointer-events: none; }
