/* ==========================================================================
   Going the Distance with Paula Didham — main stylesheet
   Palette drawn from Paula's photographs: lake ink, warm paper, trail orange.
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #16323e;
  --ink-band: #2a6076;
  --ink-soft: #3c5866;
  --paper: #faf7f1;
  --paper-2: #f1ebe0;
  --accent: #c9502c;
  --accent-deep: #a03d1c;
  --line: rgba(22, 50, 62, 0.16);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1120px;
  --pad: clamp(1.25rem, 4vw, 2rem);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
[id] { scroll-margin-top: 4.75rem; }
#top { scroll-margin-top: 0; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
figcaption {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  padding-top: 0.5rem;
  letter-spacing: 0.01em;
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 6vw, 3.7rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
em { font-style: italic; }
blockquote { margin: 0; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.wrap.narrow { max-width: 760px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  border: 2px solid transparent;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-solid { background: var(--accent-deep); color: #fff; }
.btn-solid:hover { background: var(--ink); color: #fff; }
.btn-quiet { border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--accent-deep); color: var(--accent-deep); }
.btn-lg { padding: 0.95rem 2rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 620;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.post-noms {
  font-size: 0.7em;
  font-weight: 460;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .wordmark { line-height: 1.1; }
  .post-noms { display: block; font-size: 0.62em; }
  .pn-comma { display: none; }
}
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.6rem);
  margin: 0;
  padding: 0;
}
.nav-list a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-list a:not(.btn):hover { color: var(--accent-deep); }
.nav-cta .btn { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.nav-toggle {
  font: inherit;
  font-weight: 600;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  color: var(--ink);
  display: none;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  content: "";
  position: relative;
}
.nav-toggle-bars::before { position: absolute; top: -5px; }
.nav-toggle-bars::after { position: absolute; top: 5px; }

/* Mobile nav (JS-enhanced; without JS the list simply wraps) */
@media (max-width: 899px) {
  .js .nav-toggle { display: flex; }
  .js .nav-list {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem var(--pad) 1.25rem;
    gap: 0.25rem;
    box-shadow: 0 18px 30px -18px rgba(22, 50, 62, 0.35);
  }
  .js .nav-list.open { display: flex; }
  .js .nav-list li { border-top: 1px solid var(--line); }
  .js .nav-list li:first-child { border-top: 0; }
  .js .nav-list a:not(.btn) { display: block; padding: 0.8rem 0.25rem; font-size: 1.05rem; }
  .js .nav-cta { border-top: 0 !important; padding-top: 0.75rem; }
  .site-nav { position: static; }
  .head-row { position: relative; }
  html:not(.js) .nav-list { flex-wrap: wrap; row-gap: 0.25rem; }
}

/* ---------- Hero (full-bleed photo, overlaid text) ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 880px);
  display: flex;
  background: var(--ink);
}
.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-media img {
  object-fit: cover;
  /* Y is kept high in the frame so the sky band under the headline survives the
     hard vertical crop that wide, short windows force. */
  object-position: 60% 30%;
}
/* legibility scrim: gentle darkening low and left, sky left untouched */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10, 24, 31, 0.82) 0%, rgba(10, 24, 31, 0.60) 28%,
                            rgba(10, 24, 31, 0.26) 50%, transparent 68%),
    linear-gradient(100deg, rgba(10, 24, 31, 0.18) 0%, transparent 42%);
  pointer-events: none;
}
.hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: clamp(1rem, 2.2vw, 1.6rem) var(--pad) clamp(2rem, 5vw, 3.5rem)
           max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad)));
}
.hero-top { max-width: 760px; }
.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  margin-bottom: 0;
  /* Optical alignment: the round shoulder of the G carries side bearing, so at
     display size it reads indented against the flat-sided type above and below.
     Pull it back until its ink slightly overhangs, the way it should. */
  margin-left: -0.043em;
}
/* Desktop/tablet: keep the overlaid text clear of the figure on the dock,
   which sits at ~50% of the frame once the photo fills the width. */
.hero-bottom { max-width: min(30rem, calc(50vw - 6rem)); }

/* Phones and tablets: there is no room for sky, figure and the text in one
   screen, so the photo becomes a band and the text sits beneath it. */
@media (max-width: 899px) {
  .hero { display: block; min-height: 0; background: var(--ink); }
  .hero::after { display: none; }
  .hero-media { position: relative; display: block; }
  .hero-media img {
    position: relative;
    height: clamp(480px, 62vh, 580px);
    object-position: 60% 22%;
  }
  .kicker { font-size: 0.7rem; margin-bottom: 0.5rem; }
  .hero h1 { font-size: clamp(1.75rem, 8.6vw, 2.9rem); }
  .hero-overlay { position: static; display: block; padding: 0; gap: 0; }
  .hero-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 2;
    max-width: none;
    padding: 1rem var(--pad) 0;
  }
  .hero-bottom {
    max-width: none;
    padding: 1.5rem var(--pad) 2.25rem;
  }
  .hero-support { text-shadow: none; }
}

.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.7rem;
}
.hero-support {
  font-size: 1.13rem;
  line-height: 1.6;
  color: #f4efe6;
  text-shadow: 0 1px 14px rgba(10, 24, 31, 0.55);
  max-width: 34em;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.3rem 0 0; }
.btn-ghost {
  border-color: rgba(250, 247, 241, 0.75);
  color: var(--paper);
  text-shadow: 0 1px 8px rgba(10, 24, 31, 0.4);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); text-shadow: none; }

/* ---------- Sections & route markers ---------- */
.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.section-tint { background: var(--paper-2); }
.marker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}
.marker.light { color: rgba(250, 247, 241, 0.75); }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  position: relative;
}
.dot::before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 14px;
  width: 2px;
  height: 34px;
  background: linear-gradient(to top, var(--line), transparent);
}

.grid-2 { display: grid; gap: 2.25rem; }
.col-text { max-width: 60ch; }
.fine-facts {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.col-media img { border-radius: 12px; }
.col-media.stack { display: grid; gap: 1.75rem; align-content: start; }

@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1.08fr 0.92fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
  .grid-2.rev > .col-media { order: 1; }
  .grid-2.rev > .col-text { order: 2; }
  .grid-2.rev { grid-template-columns: 0.85fr 1.15fr; }
}

/* Archival strip */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; }
.strip figcaption { font-size: 0.72rem; line-height: 1.4; }

/* Pull quote */
.pull {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-left: 4px solid var(--accent);
  padding-left: clamp(1.25rem, 3vw, 2rem);
}
.pull p {
  font-family: var(--serif);
  /* matched to the statement band so the two quoted moments read as one device */
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-weight: 480;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.4em;
  max-width: none;
}
.q-br { display: none; }
@media (min-width: 720px) { .q-br { display: inline; } }
.pull cite { font-style: normal; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Statement band ---------- */
.statement-band {
  background: var(--ink-band);
  padding-block: clamp(3.25rem, 8vw, 5.5rem);
}
.statement-band p {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-weight: 540;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #f0b9a0;
  margin: 0;
  max-width: 18em;
  text-wrap: balance;
}

/* ---------- Themes list (section 01) ---------- */
.themes {
  list-style: none;
  margin: 1.4rem 0 1.6rem;
  padding: 0;
}
.themes li {
  border-left: 3px solid var(--accent);
  padding: 0.15rem 0 0.15rem 1.1rem;
  margin-bottom: 1rem;
}
.themes strong {
  font-family: var(--serif);
  font-weight: 640;
  font-size: 1.08em;
}

/* ---------- Credentials list (Meet Paula) ---------- */
.creds {
  list-style: none;
  margin: 1.6rem 0 1.8rem;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.creds li {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}
.cred-name {
  display: block;
  font-family: var(--serif);
  font-weight: 580;
  font-size: 1.06rem;
  line-height: 1.25;
}
.cred-where {
  display: block;
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-top: 0.12rem;
}

/* ---------- Portrait feature ---------- */
.portrait-feature {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: clamp(2.5rem, 7vw, 4.5rem) var(--pad) 0;
  background: var(--paper);
}
.portrait-feature img {
  width: min(88vw, 480px);
  border-radius: 14px;
  box-shadow: 0 24px 60px -30px rgba(22, 50, 62, 0.45);
}
.portrait-feature figcaption {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

/* ---------- Full-bleed figure ---------- */
.bleed { position: relative; }
.bleed img {
  width: 100%;
  height: clamp(340px, 62vh, 640px);
  object-fit: cover;
  object-position: 50% 38%;
}
/* Phones: show the portrait STEEP crop whole — no cropping at all. */
@media (max-width: 719px) {
  .bleed img { height: auto; aspect-ratio: 2524 / 3365; }
}
/* Tablets: crop from the bottom only, keeping banner and face in frame. */
@media (min-width: 720px) and (max-width: 899px) {
  .bleed img { height: clamp(480px, 62vh, 660px); object-position: 50% 7%; }
}

.bleed figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.5rem var(--pad) 1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(10, 24, 31, 0.65), transparent);
  font-size: 0.85rem;
}

/* ---------- Invite ---------- */
.section-invite { background: var(--paper-2); }
.section-invite h2 { max-width: 14em; }
.invite-lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 38em; margin-bottom: 2rem; }

.invite-form .field { margin: 0 0 0.9rem; }
.invite-form label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}
.invite-form input,
.invite-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
}
.invite-form textarea { min-height: 8.5rem; }
.invite-form input:focus-visible,
.invite-form textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
.invite-form ::placeholder { color: rgba(60, 88, 102, 0.82); }
.field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-actions { margin: 1.4rem 0 0.5rem; }
#form-status { min-height: 1.5em; font-weight: 600; }
#form-status.ok { color: #1e6b46; }
#form-status.err { color: #a03d1c; }
.invite-alt { color: var(--ink-soft); font-size: 0.95rem; margin-top: 1.5rem; }

/* Honeypot — off-screen for humans, present for bots */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Field-level error styling hook */
.invite-form .invalid { border-color: var(--accent-deep); }

/* ---------- Footer ---------- */
.site-foot {
  background: var(--ink-band);
  color: var(--paper);
  padding-block: 2.75rem;
}
.site-foot a { color: inherit; }
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-end;
}
.site-foot .wordmark { font-size: 1.35rem; margin: 0 0 0.4rem; }
.foot-line { margin: 0.15rem 0; color: rgba(250, 247, 241, 0.8); font-size: 0.92rem; }
.foot-end {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(250, 247, 241, 0.78);
  font-size: 0.85rem;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Print-lite ---------- */
@media print {
  .site-head, .cta-row, .invite-form, .nav-toggle { display: none !important; }
}
