/* Site palette. Each pair is the light color followed by the dark color. */
:root {
  color-scheme: light dark;
  --surround: light-dark(#ffffff, #161715);
  --bg: light-dark(#fefdfa, #232521);
  --warm: light-dark(#f8f5f1, #2b2d28);
  --surface: light-dark(#ffffff, #30322d);
  --ink: light-dark(#1f1f1d, #f5f2eb);
  --text: light-dark(#2b2b29, #e5e2d9);
  --muted: light-dark(#575752, #c0c0b5);
  --line: light-dark(#e2ddd4, #50534a);
  --control-line: light-dark(#888980, #818779);
  --sage: light-dark(#4f5c4b, #bdcfb3);
  --sage-hover: light-dark(#3d483a, #d1e2c8);
  --on-sage: light-dark(#ffffff, #20291d);
  --sage-tint: light-dark(#edf0ea, #323c2e);
  --success-bg: light-dark(#e9f7ee, #203729);
  --success-line: light-dark(#328051, #95c7a0);
  --success-ink: light-dark(#17542f, #d1ecd6);
  --error-bg: light-dark(#fdeeec, #422a26);
  --error-line: light-dark(#c8473a, #df988c);
  --error-ink: light-dark(#8a2a1f, #ffcec5);
  --focus-ring: light-dark(rgba(79, 92, 75, 0.22), rgba(189, 207, 179, 0.35));
  --frame-edge: light-dark(rgba(31, 31, 29, 0.06), rgba(235, 238, 225, 0.12));
  --frame-shadow: light-dark(rgba(31, 31, 29, 0.11), rgba(0, 0, 0, 0.35));

  --serif: "Roboto Serif", Georgia, "Times New Roman", serif;
  --sans: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --max: 76rem;
  --narrow: 67rem;
  --reading-width: 47.5rem;
  --gutter: clamp(1.25rem, 6vw, 5.5rem);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Only transparent ink marks switch color. Keep the art and color chart faithful. */
:root[data-theme="dark"] { --ink-filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink-filter: invert(1); }
}
.brand img, .signoff img { filter: var(--ink-filter, none); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--surround);
  font-family: var(--sans);
  font-size: 1.125rem;      /* 18px */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p, ul, ol { margin-top: 0; }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; color: var(--bg); background: var(--ink);
  transform: translateY(-200%); transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

.site-frame {
  width: min(calc(100% - 48px), 84rem);
  margin: clamp(16px, 2.4vw, 40px) auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--frame-edge), 0 10px 42px var(--frame-shadow);
}
.shell { width: min(calc(100% - 2 * var(--gutter)), var(--max)); margin-inline: auto; }
.shell-narrow { max-width: var(--narrow); }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(3rem, 5.25vw, 5rem); line-height: 1.05; margin-bottom: 24px; }
h2 { font-size: clamp(2.125rem, 3.6vw, 3.25rem); line-height: 1.12; margin-bottom: 20px; }
h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.3; color: var(--ink); margin-bottom: 10px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--sage);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Announcement bar */
.announce {
  color: var(--on-sage);
  background: var(--sage);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 7px 20px;
}
.announce a { color: inherit; text-underline-offset: 4px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.55fr);
  align-items: center; gap: 24px; padding: 13px 0;
}
.brand img { width: clamp(170px, 18vw, 220px); }
.site-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 clamp(18px, 4vw, 56px); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
}
.site-nav a:hover { color: var(--sage); text-decoration: underline; text-underline-offset: 6px; }

/* Appearance control: a moon in light mode, a sun in dark mode.
   theme.js sets the spoken label and hover tooltip. */
.theme-toggle {
  justify-self: end;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  color: var(--sage);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--sage-tint); }
.theme-toggle svg { display: block; width: 22px; height: 22px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}
.brand { width: fit-content; max-width: 100%; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 26px;
  font-size: 1.0625rem; font-weight: 500; line-height: 1.2;
  text-align: center; text-decoration: none;
  border: 1.5px solid var(--sage); border-radius: 2px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.button-primary { color: var(--on-sage); background: var(--sage); }
.button-primary:hover { background: var(--sage-hover); border-color: var(--sage-hover); }
.button-secondary { color: var(--ink); background: transparent; border-color: var(--control-line); }
.button-secondary:hover { color: var(--bg); background: var(--ink); }
.button[disabled] { opacity: 0.6; cursor: wait; }

.text-link {
  color: var(--ink); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--sage);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.text-link:hover { color: var(--sage); }

/* Forms */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field label, .field legend { font-size: 1rem; font-weight: 500; color: var(--ink); padding: 0; }
.field .hint { margin: -2px 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.field input[type=text], .field input[type=email], .field select, .field textarea {
  width: 100%;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--control-line);
  border-radius: 3px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input[type=text], .field input[type=email], .field select { min-height: 50px; padding: 10px 14px; }
.select-wrap { position: relative; }
.select-wrap select { display: block; appearance: none; padding-inline-end: 38px; }
.select-wrap::after {
  content: ""; position: absolute; inset-inline-end: 16px; top: 50%;
  width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.field textarea { min-height: 132px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--sage);
  box-shadow: 0 0 0 4px var(--focus-ring);
}
.field textarea::placeholder, .field input::placeholder { color: var(--muted); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.botcheck { display: none !important; }
form[hidden] { display: none; }

.form-status { margin: 0; font-size: 1.1rem; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.error {
  padding: 16px 20px; color: var(--error-ink); background: var(--error-bg);
  border: 2px solid var(--error-line); border-radius: 6px;
}
.form-success {
  padding: clamp(32px, 5vw, 52px) clamp(24px, 4vw, 44px);
  text-align: center; background: var(--success-bg);
  border: 3px solid var(--success-line); border-radius: 8px;
}
.form-success:focus { outline: none; }
.form-success[hidden] { display: none; }
.success-check {
  display: grid; place-items: center;
  width: 80px; height: 80px; margin: 0 auto 20px;
  color: var(--bg); background: var(--success-line); border-radius: 50%;
  font-size: 2.8rem; line-height: 1;
}
.success-title { margin: 0 0 12px; color: var(--success-ink); font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 500; line-height: 1.2; }
.success-text { margin: 0 auto 22px; max-width: 460px; color: var(--success-ink); font-size: 1.15rem; line-height: 1.6; }
.success-again {
  padding: 10px 6px; color: var(--ink); background: none; border: 0;
  font-size: 1rem; font-weight: 500; text-decoration: underline; text-underline-offset: 5px; cursor: pointer;
}

/* Footer */
.footer-inner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding: 24px 0 34px;
}
.footer-mark { width: 50px; height: 50px; }
.footer-copy { flex: 1; line-height: 1.4; }
.footer-copy strong { display: block; font-weight: 500; color: var(--ink); }
.footer-copy span { color: var(--muted); font-size: 0.95rem; }
.copyright { margin: 0; color: var(--muted); font-size: 0.95rem; }
.theme-note { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

/* Enlarge view (js/zoom.js). A link with class "zoomable" opens its picture over the page.
   The overlay stays dark in both themes, like a photo viewer. */
.zoomable { position: relative; display: block; cursor: zoom-in; }
.zoomable::after {
  content: ""; position: absolute; right: 10px; bottom: 10px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d483a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
html:has(.zoom-view[open]) { overflow: hidden; }
.zoom-view {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 76px 16px 16px; border: 0;
  background: rgba(17, 18, 16, 0.97); color: #ffffff;
  overflow: auto; overscroll-behavior: contain;
  touch-action: manipulation;
}
.zoom-view[open] { display: flex; }
.zoom-view::backdrop { background: rgba(17, 18, 16, 0.6); }
.zoom-picture {
  margin: auto; flex: none;
  max-width: 100%; max-height: calc(100vh - 92px); max-height: calc(100dvh - 92px);
  width: auto; height: auto;
  cursor: zoom-in; user-select: none; -webkit-user-select: none;
}
.zoom-view.is-zoomed .zoom-picture { max-width: none; max-height: none; cursor: grab; }
.zoom-view.is-dragging .zoom-picture { cursor: grabbing; }
.zoom-tools { position: fixed; top: 14px; right: 14px; display: flex; gap: 10px; z-index: 1; }
.zoom-tools button {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  font: 500 1.0625rem var(--sans);
  color: #1f1f1d; background: #ffffff;
  border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.zoom-tools button:hover { background: #edf0ea; }
.zoom-tools button:focus-visible { outline: 3px solid #bdcfb3; outline-offset: 3px; }
.zoom-toggle.is-out .zoom-plus { display: none; }

@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .site-frame { width: 100%; margin: 0; box-shadow: none; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0 4px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; }
  .theme-toggle { grid-column: 2; grid-row: 1; }
  .brand img { width: 170px; }
  .site-nav { gap: 22px; }
  .site-nav a { font-size: 0.85rem; letter-spacing: 0.1em; }
  .footer-inner .copyright { flex-basis: 100%; }
}

@media (forced-colors: active) {
  .select-wrap select { appearance: auto; }
  .select-wrap::after { display: none; }
  .theme-toggle { border: 1px solid ButtonText; }
  .zoom-tools button { border: 1px solid ButtonText; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
