:root {
    --paper: #fbfaf7;
    --surface: #f1eee9;
    --ink: #111111;
    --muted: #6d6862;
    --rule: #d8d3cc;
    --danger: #9b1c1c;
    --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
    --serif: 'Source Serif 4', Georgia, serif;
    --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --gutter: 16px;
    --max: 1240px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0e0e0d;
        --surface: #1c1b19;
        --ink: #f3f0eb;
        --muted: #a29d96;
        --rule: #34322f;
        --danger: #f0a3a3;
    }
}

@media (min-width: 720px) {
    :root {
        --gutter: 40px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Small tracked uppercase label */
.label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
}

/* ---------- Masthead ---------- */
.masthead {
    text-align: center;
    padding-top: 20px;
}

.masthead .topline {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    padding-bottom: 8px;
}

.masthead .logo {
    display: inline-block;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(4.2rem, 17vw, 10.5rem);
    line-height: 0.9;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 4px 0 12px;
}

.nav {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 6vw, 56px);
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
    padding: 14px 0;
    margin-top: 4px;
}

.nav a {
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.nav a[aria-current="page"] {
    border-bottom-color: var(--ink);
}

/* ---------- Photos ---------- */
.photo {
    background: var(--surface);
    overflow: hidden;
    position: relative;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.photo .placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-style: italic;
    font-size: 5rem;
    color: var(--muted);
}

/* ---------- Lead story ---------- */
.lead {
    display: grid;
    gap: 24px;
    padding: 40px 0 56px;
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
}

.lead .photo {
    aspect-ratio: 4 / 5;
}

.lead .text {
    align-self: center;
}

.lead h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.6rem, 7vw, 5rem);
    line-height: 1.02;
    margin: 14px 0 18px;
}

.lead .standfirst {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--muted);
    max-width: 34ch;
}

.lead:hover img, .card:hover img {
    transform: scale(1.03);
}

@media (min-width: 860px) {
    .lead {
        grid-template-columns: 7fr 5fr;
        gap: 56px;
    }
}

/* ---------- Section heading ---------- */
.section-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 40px 0 24px;
}

.section-head::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--rule);
}

/* ---------- Card grid ---------- */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px 32px;
    padding-bottom: 72px;
}

@media (min-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    text-decoration: none;
    display: block;
}

.card .photo {
    aspect-ratio: 3 / 4;
    margin-bottom: 16px;
}

.card h3 {
    font-family: var(--display);
    font-weight: 400;
    font-size: 1.75rem;
    line-height: 1.12;
    margin: 8px 0 8px;
}

.card .standfirst {
    color: var(--muted);
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Story page ---------- */
.story {
    padding: 32px 0 80px;
}

.story .back {
    text-decoration: none;
    color: var(--muted);
}

.story header {
    text-align: center;
    max-width: 900px;
    margin: 40px auto 40px;
}

.story h1 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.8rem, 9vw, 6.2rem);
    line-height: 1;
    margin: 18px 0 22px;
}

.story .standfirst {
    font-style: italic;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    color: var(--muted);
    max-width: 40ch;
    margin: 0 auto 22px;
}

.story .hero {
    max-height: 88vh;
    aspect-ratio: 4 / 5;
    margin: 0 auto;
    max-width: 960px;
}

.facts {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    margin: 48px auto 0;
    max-width: 960px;
}

.facts div {
    padding: 16px 28px;
    text-align: center;
}

.facts div + div {
    border-left: 1px solid var(--rule);
}

.facts dd {
    font-family: var(--display);
    font-size: 1.4rem;
    margin-top: 4px;
}

.body {
    display: grid;
    gap: 48px;
    max-width: 960px;
    margin: 48px auto 0;
}

@media (min-width: 820px) {
    .body.split {
        grid-template-columns: 1fr 2fr;
        gap: 64px;
    }
}

.body h2 {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ink);
}

.list {
    list-style: none;
}

.list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
}

.steps {
    list-style: none;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 8px;
    margin-bottom: 24px;
}

.steps li::before {
    content: counter(step);
    font-family: var(--display);
    font-size: 2.2rem;
    line-height: 1;
}

.notes {
    max-width: 680px;
    margin: 64px auto 0;
    text-align: center;
}

.notes p {
    font-family: var(--display);
    font-style: italic;
    font-size: clamp(1.4rem, 3.2vw, 1.9rem);
    line-height: 1.35;
    white-space: pre-line;
    margin-top: 14px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    max-width: 960px;
    margin: 64px auto 0;
}

.gallery .photo {
    aspect-ratio: 4 / 5;
}

.message {
    text-align: center;
    padding: 100px 0 120px;
}

.message p {
    font-family: var(--display);
    font-style: italic;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-top: 14px;
}

footer.site {
    border-top: 1px solid var(--ink);
    padding: 28px 0 48px;
    text-align: center;
    color: var(--muted);
}

footer.site .mark {
    font-family: var(--display);
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    color: var(--ink);
    margin-bottom: 6px;
}

/* ---------- Buttons and forms (admin) ---------- */
.btn {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    background: transparent;
    padding: 12px 22px;
    cursor: pointer;
    white-space: nowrap;
}

.btn.solid {
    background: var(--ink);
    color: var(--paper);
}

.btn.quiet {
    border-color: var(--rule);
}

.btn.danger {
    color: var(--danger);
    border-color: var(--rule);
}

.btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.btn:focus-visible, .field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible, a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
}

.field .hint {
    font-size: 0.9rem;
    color: var(--muted);
    font-style: italic;
}

.field input, .field textarea, .field select {
    border: none;
    border-bottom: 1px solid var(--rule);
    background: transparent;
    padding: 8px 0;
    width: 100%;
    border-radius: 0;
}

.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-bottom-color: var(--ink);
}

.field textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.field .big {
    font-family: var(--display);
    font-size: 2rem;
}
