/* markapsey.co.uk — layout: quiet editorial pages, one measure of text, a single bottle-green carrying colour on cream */
:root {
  --paper: #F7F3EA;
  --paper-2: #EFE9DC;
  --ink: #1A1F1C;
  --ink-2: #4A524D;
  --rule: #D8D1C2;
  --green: #0F3D2E;
  --green-2: #1C5A45;
  --green-tint: #E3EBE4;
  --on-green: #F7F3EA;
  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 64ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1D17; --paper-2: #13261E; --ink: #EFE9DC; --ink-2: #B9B3A5; --rule: #2A3D34;
    --green: #9FC9B2; --green-2: #C4DFCE; --green-tint: #16302A; --on-green: #0E1D17; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1D17; --paper-2: #13261E; --ink: #EFE9DC; --ink-2: #B9B3A5; --rule: #2A3D34;
  --green: #9FC9B2; --green-2: #C4DFCE; --green-tint: #16302A; --on-green: #0E1D17; color-scheme: dark;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-2); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
p + p { margin-top: 1em; }
.lede { font-family: var(--font-display); font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.45; color: var(--ink); }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); font-weight: 500; }
.muted { color: var(--ink-2); }
small, .small { font-size: 0.9rem; }

.wrap {
  max-width: 1120px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 18px; }
.wordmark { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.wordmark span { color: var(--green); }
.nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--ink-2); text-decoration: none; padding-block: 4px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--green); }
.nav a.pending { color: var(--ink-2); opacity: 0.6; pointer-events: none; }

/* Sections */
.section { padding-block: 64px; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }

/* Hero: full-width photograph, headline on a paper panel over the quiet side of the frame */
.hero-full { position: relative; background: var(--green); }
.hero-full > img { width: 100%; height: auto; max-height: 82vh; object-fit: cover; object-position: 70% 30%; display: block; }
.hero-panel-wrap { position: absolute; inset: 0; display: flex; align-items: center; max-width: 1120px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); pointer-events: none; }
.hero-panel { pointer-events: auto; background: color-mix(in srgb, var(--paper) 94%, transparent); padding: 36px 40px; max-width: 46ch; display: grid; gap: 18px; border-radius: 2px; }
.hero-panel .lede { max-width: 42ch; }
.cred { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink-2); }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .hero-panel { background: var(--paper); } }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.role { display: grid; gap: 8px; min-width: 0; padding-top: 16px; border-top: 2px solid var(--green); }
.role h3 { font-size: 1.15rem; }
.role p { color: var(--ink-2); font-size: 0.98rem; }

/* Latest */
.latest { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.latest-item { display: grid; grid-template-columns: 9ch minmax(0, 1fr); gap: 20px; padding-block: 20px; border-bottom: 1px solid var(--rule); align-items: baseline; }
.latest-item time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.9rem; }
.latest-item h3 { font-size: 1.15rem; font-weight: 500; }
.latest-item p { color: var(--ink-2); margin-top: 4px; font-size: 0.97rem; }

/* Green band */
.band { background: var(--green); color: var(--on-green); }
.band .wrap { padding-block: 56px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.band h2, .band p, .band a { color: var(--on-green); }
.band .eyebrow { color: var(--on-green); opacity: 0.8; }
.band .button { justify-self: start; }
.button { display: inline-block; padding: 12px 22px; border: 1px solid currentColor; border-radius: 2px; text-decoration: none; font-size: 0.95rem; }
.button:hover { background: rgba(255,255,255,0.08); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; padding-block: 56px; }
.about-grid figure { margin: 0; position: sticky; top: 24px; }
.about-grid figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--ink-2); }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.timeline li { display: grid; grid-template-columns: 11ch minmax(0, 1fr); gap: 20px; padding-block: 16px; border-bottom: 1px solid var(--rule); }
.timeline time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.9rem; padding-top: 3px; }
.timeline strong { font-weight: 500; display: block; }
.timeline span { color: var(--ink-2); font-size: 0.97rem; }
.credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; margin: 0; padding: 0; }
.credentials div { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--rule); }
.credentials dt { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.credentials dd { margin: 0; }
.film { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; background: var(--green-tint); padding: 28px; border-radius: 2px; }
.film img { border-radius: 2px; }
.film-text { display: grid; gap: 12px; }
.film-text .button { color: var(--green); justify-self: start; }
.film-text .button:hover { background: rgba(15,61,46,0.06); }
blockquote { margin: 0; padding-left: 20px; border-left: 2px solid var(--green); font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--paper-2); }
.site-footer .wrap { padding-block: 36px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 0.9rem; color: var(--ink-2); }
.site-footer a { color: var(--ink-2); }

@media (max-width: 760px) {
  .band .wrap, .about-grid, .film { grid-template-columns: minmax(0, 1fr); }
  .hero-full > img { max-height: none; aspect-ratio: 4 / 3; object-position: 75% 25%; }
  .hero-panel-wrap { position: static; display: block; padding-block: 28px 8px; }
  .hero-panel { background: none; padding: 0; max-width: none; }
  .roles { grid-template-columns: minmax(0, 1fr); }
  .about-grid figure { position: static; }
  .credentials { grid-template-columns: minmax(0, 1fr); }
  .section { padding-block: 44px; }
  .latest-item, .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  .nav a, a, .button { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
}
