/* markrobsonmd.com
   Every value here comes from DESIGN.md: navy on parchment, one ember accent,
   Cormorant Garamond headlines and Source Sans 3 body text, both served from this
   site. Flat surfaces, hairlines, no drop shadows. No third-party requests. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
}

:root {
  /* Colours (DESIGN.md section 2) */
  --parchment: #fdf6ee;
  --navy: #1a2d57;
  --navy-deep: #111f3f;
  --wash: #e8eef7;
  --ring: #c5d3ec;
  --card: #ffffff;
  --pebble: #d9cfc3;
  --ink: #21201c;
  --bronze: #7f6e60;
  --driftwood: #94877c;
  --ember: #f65726;
  --soft-cream: #f0e6dc; /* portrait placeholder only */

  /* Type (section 3) */
  --display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --text: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale (section 4): 4 8 12 16 20 24 32 40 48 64 80 96 120 */
  --gutter: 24px;
  --section: 64px;
  --half: 32px;
  --band: 48px;
  --measure: 640px;
  --r-control: 12px;
  --r-card: 20px;
  --r-panel: 24px;
}
@media (min-width: 640px) {
  :root { --gutter: 40px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 64px; --section: 96px; --half: 48px; --band: 80px; }
}

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

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

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  /* Source Sans 3 draws small. This keeps its letters the size the type scale intends,
     and keeps the fallback face the same size while the font loads. */
  font-size-adjust: 0.52;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (min-width: 640px) { body { font-size: 18px; } }

/* Short pages: keep the footer at the bottom of the window */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

::selection { background: var(--ring); color: var(--navy-deep); }

[hidden] { display: none !important; }

p { margin: 0 0 20px; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ember);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transition: text-decoration-thickness 0.15s ease, color 0.15s ease;
}
a:hover { text-decoration-thickness: 2px; }

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

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999rem; top: 8px; z-index: 10; padding: 12px 16px; background: var(--navy); color: #fff; border-radius: var(--r-control); text-decoration: none; }
.skip:focus { left: 8px; }

/* ---------- Headings ---------- */

h1, h2, h3 { font-family: var(--display); font-size-adjust: none; color: var(--navy); margin: 0; font-kerning: normal; }
h1 {
  font-weight: 300;
  font-size: clamp(44px, 20px + 6.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 12em;
  text-wrap: balance;
}
h2 {
  font-weight: 300;
  font-size: clamp(32px, 26px + 1.6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h3 { font-weight: 500; font-size: 26px; line-height: 1.22; letter-spacing: -0.013em; }

/* The site's one italic headline: a publication title with an uneven ember stroke under it */
h1 em {
  font-style: italic;
  padding-bottom: 0.08em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2 C 36 2.4, 70 6.6, 106 4 S 166 2.8, 198 5' fill='none' stroke='%23f65726' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat left bottom / 100% 0.14em;
}

/* ---------- Navigation ---------- */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 32px;
  padding-block: 20px 8px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--display);
  font-size-adjust: none;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--bronze);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--navy); }
.site-nav a.nav-pill {
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--r-control);
}
.site-nav a.nav-pill:hover, .site-nav a.nav-pill[aria-current="page"] { background: var(--navy-deep); color: #fff; }
@media (max-width: 599px) {
  .site-nav { flex: 1 1 100%; }
  .site-nav ul { justify-content: space-between; gap: 0 8px; }
  .site-nav a.nav-pill { padding: 10px 14px; }
}

/* ---------- Hero ---------- */

.hero { padding-block: 40px var(--half); }
@media (min-width: 1024px) { .hero { padding-top: 64px; } }
.hero .wrap { display: grid; gap: 48px; align-items: start; }
@media (min-width: 900px) {
  .hero--split .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; }
}
.status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bronze);
}
.status::before, .note::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); }
.lede { max-width: var(--measure); margin-top: 32px; }
.lede > p:first-child { font-size: 20px; line-height: 1.45; }

/* Portrait panel. Replace the placeholder with the photograph when it arrives. */
.portrait { margin: 0; width: 100%; max-width: 440px; }
@media (min-width: 900px) { .portrait { justify-self: end; } }
.portrait img, .portrait .placeholder { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-card); }
.portrait .placeholder { display: grid; place-items: center; padding: 16px; background: var(--soft-cream); color: var(--ink); font-size: 14px; line-height: 1.4; }

/* ---------- Buttons ---------- */

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 24px;
  background: var(--navy);
  color: #fff;
  font-family: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid var(--navy);
  border-radius: var(--r-control);
  box-shadow: 0 8px 28px -4px var(--ring); /* the one glow DESIGN.md allows */
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.button:disabled { opacity: 0.6; cursor: default; }
.button--ghost { background: transparent; color: var(--navy); border-color: var(--driftwood); box-shadow: none; }
.button--ghost:hover { background: var(--card); border-color: var(--navy); }
.cta-note { flex: 1 1 240px; max-width: 360px; margin: 0; font-size: 16px; line-height: 1.5; color: var(--bronze); }

/* ---------- Sections ---------- */

.section { padding-block: var(--half); }
.section h2 { margin-bottom: 24px; }
.prose { max-width: var(--measure); }
.prose h3 { margin: 40px 0 12px; }
.more { margin-top: 24px; font-weight: 500; }
.more a { display: inline-flex; align-items: center; min-height: 44px; }
.more a::after { content: "\2192"; display: inline-block; margin-left: 8px; transition: transform 0.15s ease; }
.more a:hover::after { transform: translateX(4px); }

/* A hairline between stacked sections on parchment */
.section:not(.section--band) + .section:not(.section--band) { padding-top: 0; }
.section:not(.section--band) + .section:not(.section--band) > .wrap::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: var(--half);
  background: var(--pebble);
}

/* The blue wash band, one per page */
.section--band { background: var(--wash); padding-block: var(--band); margin-block: var(--half); }

/* ---------- Cards ---------- */

.cards { display: grid; gap: 24px; margin: 32px 0; padding: 0; list-style: none; }
.cards:last-child { margin-bottom: 0; }
@media (min-width: 800px) {
  .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.card { background: var(--card); border: 1px solid var(--pebble); border-radius: var(--r-card); padding: 24px; }
@media (min-width: 640px) { .card { padding: 32px; } }
.card h3 { margin: 0 0 12px; }
.card p { font-size: 16px; line-height: 1.5; color: var(--bronze); }
.card h3 a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -8px; color: var(--navy); text-decoration-color: transparent; }
.card h3 a:hover { text-decoration-color: var(--ember); }

/* ---------- Note panel ---------- */

.note {
  display: flex;
  align-items: baseline;
  gap: 12px;
  max-width: var(--measure);
  margin: 24px 0 0;
  padding: 16px 20px;
  background: var(--wash);
  border-radius: var(--r-control);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.note::before { transform: translateY(-1px); }
.note > span { min-width: 0; }

/* ---------- Closing panel ---------- */

.closing { padding-block: var(--half) var(--section); }
.panel {
  position: relative;
  padding: 32px;
  background: var(--navy);
  color: var(--parchment);
  border-radius: var(--r-panel);
  text-align: center;
}
@media (min-width: 800px) { .panel { padding: 64px; } }
.panel::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(253, 246, 238, 0.16);
  border-radius: var(--r-control);
  pointer-events: none;
}
.panel > * { position: relative; }
.panel h2 { color: var(--parchment); font-size: clamp(44px, 36px + 1.4vw, 52px); margin-top: 16px; }
.panel p { max-width: 520px; margin: 20px auto 0; }
.panel .button { margin: 32px 0 16px; background: var(--parchment); color: var(--navy); border-color: var(--parchment); box-shadow: none; }
.panel .button:hover { background: #fff; border-color: #fff; }
.after-panel { margin-top: calc(var(--half) - var(--section)); padding-bottom: var(--section); }
.after-panel .note { margin-top: 0; }

/* ---------- Form ---------- */

.form { max-width: var(--measure); }
.field { margin: 0 0 24px; }
.field-row { display: grid; gap: 0 24px; }
@media (min-width: 640px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field > label:not(.choice), .field legend { display: block; padding: 0; margin-bottom: 8px; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--navy); }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--driftwood);
  border-radius: var(--r-control);
  padding: 12px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input[type="text"], .field input[type="email"] { min-height: 48px; }
.field textarea { display: block; min-height: 168px; resize: vertical; line-height: 1.5; }
.field input[type="text"]:focus-visible, .field input[type="email"]:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy), 0 0 0 5px var(--ring); /* 2px navy edge and a pale blue ring */
}
.field .hint { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: var(--bronze); }
fieldset.field { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 12px; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--driftwood);
  border-radius: var(--r-control);
  font-size: 17px;
  line-height: 1.2;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.choice:has(input:checked) { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 1px var(--navy), 0 0 0 5px var(--ring); border-color: var(--navy); }
.choice input { width: 20px; height: 20px; margin: 0; color: var(--ink); accent-color: var(--navy); }
.choice input:focus-visible { outline: none; }
.choice--plain { padding: 0; background: none; border: 0; min-height: 44px; }
.choice--plain:has(input:checked), .choice--plain:has(input:focus-visible) { box-shadow: none; }
.choice--plain input:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
.hp { position: absolute; left: -999rem; }
.form-after { max-width: var(--measure); margin-top: 48px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-deep); color: var(--parchment); padding-block: 48px; font-size: 14px; line-height: 1.4; }
.site-footer .wrap { display: grid; gap: 16px 48px; }
@media (min-width: 800px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.site-footer p { margin: 0 0 8px; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 24px; list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer :focus-visible { outline-color: var(--parchment); }

/* ---------- Preferences ---------- */

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

@media print {
  body { background: #fff; }
  .site-nav, .cta, .closing, .skip { display: none; }
}
