/* ============================================================
   DESIGN TOKENS — Sue MacLaine
   Direction: modern / minimal, gallery — a single typeface (Hanken Grotesk)
   carries headings, body and labels; hierarchy from weight, size and case.
   Light + dark themes. Oxblood primary, sea-teal secondary.
   ============================================================ */

:root {
  color-scheme: light dark;

  /* --- Palette: light (oxblood on cool gallery-bone) --- */
  --paper:       #ECEAE3; /* page background — cool bone, gallery wall */
  --paper-deep:  #E4E1D8; /* alternate section background */
  --ink:         #18191B; /* primary text — near-black, faintly cool */
  --ink-soft:    #53545A; /* secondary text, captions */
  --rule:        #C8C4B8; /* hairline rules, borders */
  --accent:      #6C1D2C; /* oxblood — links, marks, the one bold note */
  --accent-ink:  #FBF8F1; /* text on accent fills */
  --accent-2:    #1E4D4B; /* sea-teal — sparing secondary (2026 sea piece) */

  /* --- Type: one family, differentiated by weight / size / case / tracking --- */
  --font-display: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-meta:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* --- Fluid type scale --- */
  --step--1: clamp(0.84rem, 0.81rem + 0.15vw, 0.94rem);
  --step-0:  clamp(1.06rem, 1.00rem + 0.30vw, 1.21rem);
  --step-1:  clamp(1.32rem, 1.20rem + 0.55vw, 1.70rem);
  --step-2:  clamp(1.70rem, 1.45rem + 1.10vw, 2.45rem);
  --step-3:  clamp(2.15rem, 1.70rem + 2.10vw, 3.55rem);
  --step-4:  clamp(2.70rem, 1.95rem + 3.70vw, 5.10rem);

  /* --- Measure / spacing --- */
  --measure-prose: 62ch;
  --measure-wide:  78rem;
  --gap:    clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --gap-lg: clamp(2.75rem, 1.6rem + 5.5vw, 6.5rem);

  --radius: 0; /* hard edges — gallery print, not soft card */
}

/* --- Palette: dark ("the gallery at night") --- */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #1A1A18;
    --paper-deep: #232420;
    --ink:        #ECE9E0;
    --ink-soft:   #A8A29A;
    --rule:       #3A3933;
    --accent:     #E0929B;
    --accent-ink: #1A1A18;
    --accent-2:   #74B7A8;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 390;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  body { font-weight: 400; } /* light-on-dark wants a touch more weight */
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  transition: text-decoration-color 0.2s ease;
}
a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--accent); }

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

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* --- Skip link --- */
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* --- Layout containers --- */
.wrap { width: min(100% - 2.5rem, var(--measure-wide)); margin-inline: auto; }
.prose { max-width: var(--measure-prose); }

/* ============================================================
   TYPE — headings are Hanken at heavier weight + tight tracking
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.022em;
  margin: 0 0 0.4em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 650; letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1.15em; }

em { font-style: italic; }

/* Shared "label" typography — tracked caps in the meta family. Every small
   uppercase label on the site builds on this; each keeps only its own
   letter-spacing / colour / spacing below. */
.eyebrow,
.site-nav a,
.pullquote cite,
.media-row__meta,
.show-back,
.field label,
.btn,
.site-footer__credits-label {
  font-family: var(--font-meta);
  font-size: var(--step--1);
  font-weight: 600;
  text-transform: uppercase;
}

/* Eyebrow / meta label */
.eyebrow {
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin: 0 0 0.9rem;
}

/* ============================================================
   PROSE — the long-form reading experience
   ============================================================ */
.prose { font-size: var(--step-0); }
.prose p { line-height: 1.72; margin: 0 0 1.3em; }
.prose > p:last-child { margin-bottom: 0; }

/* (The first paragraph used to be enlarged as a "lead-in", but that made the
   font size change within a single block of reading; body text now stays one
   consistent size throughout.) */

/* In-prose section headings (e.g. "About Sue MacLaine") */
.prose h2 { font-size: var(--step-2); margin: 1.6em 0 0.5em; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8em 0 0.4em; }

/* The "second voice": a fully-italic standalone paragraph (the Anaïs Nin line
   in the bio is the only one site-wide) is lifted into a pull-quote — purely in
   CSS, so the prose markup stays untouched. Upright + oxblood for the clean
   modern look; the rule and colour carry the "second voice", not a serif italic. */
.prose p:has(> em:only-child) {
  font-weight: 400;
  color: var(--accent);
  max-width: 46ch;
  margin: 1.8em 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
}
.prose p:has(> em:only-child) em { font-style: normal; }

.prose a { font-weight: 500; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.6rem;
  margin: 0; padding: 0;
}
.site-nav a {
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.hero { margin-bottom: var(--gap-lg); }
.hero__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
/* Stacked fallback (a hero with text but no image): strap sits below. */
.hero__strap { margin-top: var(--gap); }
.hero__strap h1 { max-width: 18ch; margin: 0 0 0.35em; }
.hero__strap .lede {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--accent);
  max-width: 28ch;
  margin: 0;
}

/* Overlay treatment (hero--media): the strap is laid over the photo, like the
   original site. A dark gradient "scrim" sits between image and text so the
   white text always clears WCAG AA contrast (>=4.5:1) over ANY photo — the
   scrim, not the text-shadow, is what guarantees legibility. */
.hero--media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.hero--media .hero__img {        /* fill the box rather than keep its own ratio */
  position: absolute;
  inset: 0;
  height: 100%;
  aspect-ratio: auto;
}
.hero--media::after {            /* contrast scrim, anchored to the bottom-left */
  content: "";
  position: absolute;
  inset: 0;
  /* ONE smooth gradient from the bottom-left (dark, behind the text) to the
     top-right (clear, showing the photo). A single gradient can't form the
     muddy ridge that stacking a vertical scrim + horizontal mask produced, and
     a lower peak alpha keeps it from looking heavy. */
  background: linear-gradient(to top right,
              rgba(0, 0, 0, 0.72) 0%,
              rgba(0, 0, 0, 0.45) 22%,
              rgba(0, 0, 0, 0.18) 40%,
              rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
}
.hero--media .hero__strap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 1;                   /* sit above the scrim (::after paints last otherwise) */
  margin-top: 0;
  padding-block: var(--gap) var(--gap-lg);
}
.hero--media .hero__strap .eyebrow,
.hero--media .hero__strap h1 { color: #fff; }
.hero--media .hero__strap .lede { color: rgba(255, 255, 255, 0.92); }
/* Tight dark halo + soft drop. Under the heading the scrim carries contrast,
   but where the horizontal fade thins the scrim (right-hand ends of long lines
   over a bright patch of photo) the halo keeps the white text legible. */
.hero--media .hero__strap > * {
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.75), 0 1px 10px rgba(0, 0, 0, 0.45);
}

/* Narrow screens: the image gets short, so guarantee height for the overlaid
   text and let the absolutely-positioned image cover the taller box. */
@media (max-width: 40rem) {
  .hero--media { aspect-ratio: auto; min-height: 24rem; }
}

/* The home lede carries a hard break so it reads as two balanced lines on
   phones ("My work is radical," / "poetic and funny."). Above mobile there's
   room for the natural wrap, so drop the forced break. */
@media (min-width: 40.0625rem) {
  .hero-lede-br { display: none; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
main { padding-bottom: var(--gap-lg); }
.section { padding-block: var(--gap-lg); }
.section + .section { padding-top: 0; }

/* Explicit pull-quote (used on show pages) — the "second voice" signature */
.pullquote {
  margin: var(--gap-lg) 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
  max-width: 46ch;
}
.pullquote p {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.pullquote cite {
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* Credits block — small, quiet sans, set off by a hairline rule */
.credits {
  font-family: var(--font-meta);
  font-size: var(--step--1);
  line-height: 1.85;
  color: var(--ink-soft);
  margin-top: var(--gap-lg);
  padding-top: var(--gap);
  border-top: 1px solid var(--rule);
}
.credits li { list-style: none; }
.credits ul { margin: 0; padding: 0; }

/* ============================================================
   MEDIA ROW — shared image | text index row (Shows + Journal)
   ============================================================ */
.media-list { list-style: none; margin: var(--gap-lg) 0 0; padding: 0; }
.media-list li { border-top: 1px solid var(--rule); }
.media-list li:last-child { border-bottom: 1px solid var(--rule); }

.media-row {
  display: grid;
  grid-template-columns: minmax(0, 22rem) 1fr;
  gap: clamp(1.2rem, 3vw, 2.75rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.4rem) 0;
  text-decoration: none;
  color: var(--ink);
}
.media-row__img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
  filter: saturate(0.96);
  transition: filter 0.3s ease;
}
.media-row:hover .media-row__img { filter: saturate(1.08); }
.media-row__title {
  font-size: var(--step-2);
  letter-spacing: -0.022em;
  line-height: 1.1;
  margin: 0 0 0.25rem;
  transition: color 0.2s ease;
}
.media-row:hover .media-row__title { color: var(--accent); }
.media-row__meta {
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}
.media-row__desc {
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  max-width: 50ch;
  margin: 0;
}
/* Journal excerpts read as secondary text (dimmer; wider for citations) */
.media-row__desc--muted { color: var(--ink-soft); max-width: 60ch; }
@media (max-width: 40rem) {
  .media-row { grid-template-columns: 1fr; gap: 1rem; align-items: start; }
  .media-row__img { max-width: 22rem; }
}

/* Journal fallback: a post with no feature image is a text-only row */
.entry-row {
  display: block;
  padding: clamp(1.5rem, 3vw, 2.4rem) 0;
  text-decoration: none;
  color: var(--ink);
}
.entry-row:hover .media-row__title { color: var(--accent); }

/* Journal post — standfirst, video embed, actions */
.post-standfirst {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: var(--measure-prose);
  margin: 0.6rem 0 var(--gap);
  text-wrap: pretty;
}
.video {
  aspect-ratio: 16 / 9;
  margin: var(--gap-lg) 0;
  background: var(--paper-deep);
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.post-actions { margin-top: var(--gap); }
.post-figure { margin: var(--gap) 0 var(--gap-lg); }
.post-figure img {
  display: block;
  width: 100%;
  max-width: 44rem;
  height: auto;
}

/* Show page gallery */
.show-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--gap);
  margin-top: var(--gap-lg);
}
.show-back {
  letter-spacing: 0.1em;
  margin-top: var(--gap-lg);
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.form { max-width: 38rem; margin-top: var(--gap); }
.field { margin-bottom: 1.4rem; }
.field label {
  display: block;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 60%, var(--paper-deep));
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.field textarea { min-height: 9rem; resize: vertical; }

.btn {
  display: inline-block;
  letter-spacing: 0.1em;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem 1.6rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.honeypot { position: absolute; left: -9999px; }
.form-privacy {
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 1.4rem;
}

.form-fallback {
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin-top: var(--gap);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--gap);
  font-family: var(--font-meta);
  font-size: var(--step--1);
  color: var(--ink-soft);
  line-height: 1.5;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 1.25rem 3rem;
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }
.site-footer__socials {
  flex-basis: 100%;
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__meta p { margin: 0; }
.site-footer__meta .site-footer__legal { margin-top: 0.6rem; }
.site-footer__credits { max-width: 52ch; } /* mobile: let long credit lines wrap */
.site-footer__credits-label {
  margin: 0 0 0.15rem;
  letter-spacing: 0.1em;
}
.site-footer__credits ul { list-style: none; margin: 0; padding: 0; }
.site-footer__credits li { margin: 0; }
/* Tablet and up: one credit per line, no wrapping */
@media (min-width: 48rem) {
  .site-footer__credits { max-width: none; }
  .site-footer__credits li { white-space: nowrap; }
}

/* ============================================================
   MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
