:root {
  color-scheme: light;

  /* Palette derived from the supplied reference design (green + amber on soft green paper) */
  --canvas: #f3f6f2;        /* page background */
  --paper: #ffffff;         /* cards and sheets */
  --ink: #22302a;           /* near-black green ink */
  --muted: #54645c;         /* secondary text */
  --accent: #1d6a52;        /* primary action green */
  --accent-dark: #14503d;
  --accent-soft: #e4efe7;
  --amber: #e9a13b;         /* decorative amber (fills, markers, rules) */
  --amber-ink: #8a5a12;     /* amber used as TEXT — darkened to stay readable */
  --amber-soft: #fdf1dc;
  --clay: #d96c4a;          /* coral highlight */
  --line: #dde5dd;
  --error: #a8302a;
  --error-soft: #fbeceb;
  --success: #1d6a52;
  --radius: 14px;
  --wrap: 1120px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* Offset anchor targets so the sticky header doesn't cover section headings. */
:target, [id] { scroll-margin-top: 5.5rem; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
  background: var(--canvas);
}

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

.wrap { width: min(var(--wrap), 92vw); margin-inline: auto; }

/* Editorial serif for headings, quiet grotesque sans for everything else. */
:is(h1, h2, h3, .brand) {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}
.brand { font-size: 1.4rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: .5rem; }
.brand-text > span { color: var(--amber-ink); font-style: italic; }
/* Header logo. Height is capped so wide/narrow logos both fit the header without layout shift.
   The text brand sits underneath in the markup and only appears if the image fails to load. */
.brand-logo { height: 2rem; width: auto; max-width: 12rem; object-fit: contain; display: block; }
.brand-text { display: none; }
.brand-logo-failed .brand-logo { display: none; }
.brand-logo-failed .brand-text { display: inline; }
.site-header nav { display: flex; align-items: center; gap: 1.4rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600; }
.site-header nav a:hover { color: var(--accent); }
.nav-cta { color: var(--accent) !important; border: 1.5px solid var(--accent); padding: .4rem .9rem; border-radius: 999px; }
.nav-cta:hover { background: var(--accent-soft); }

/* Buttons */
.btn {
  display: inline-block;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: .8rem 1.5rem;
  min-height: 48px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent-dark); border-color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-full { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

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

/* Hero */
.hero { background: linear-gradient(160deg, var(--paper) 0%, var(--canvas) 70%); padding: 4.5rem 0 3.5rem; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--amber-ink); margin: 0 0 .6rem; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 1.2rem; text-wrap: balance; }
.hero h1 em { color: var(--amber-ink); font-style: italic; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 38rem; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-note { color: var(--muted); font-size: .85rem; margin-top: 1.2rem; text-wrap: pretty; border-inline-start: 3px solid var(--amber); padding-inline-start: .8rem; }
/* Hero photo: cropped to a 3:2 frame instead of its native 1731x909 (1.9:1).
   The narrower column still reads bigger because the frame is taller;
   object-fit: cover trims ~10% off each side and keeps the subjects centred. */
.hero-art img { width: 100%; max-width: 640px; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: center; display: block; margin-inline: auto; border-radius: var(--radius); }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--accent-soft); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.01em; margin: 0 0 .8rem; }
.section-lede { color: var(--muted); max-width: 60ch; margin: 0 0 2rem; text-wrap: pretty; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; background: var(--paper); }
/* Landscape crop (3:2) keeps the three photos on one visual line.
   height: auto is REQUIRED: the width/height attributes on <img> otherwise pin the
   rendered height and the photo stretches vertically. */
.card-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: calc(var(--radius) - 6px); margin-bottom: 1rem; }
.card h3 { margin: 0 0 .5rem; font-size: 1.3rem; }
.card p { color: var(--muted); margin: 0; text-wrap: pretty; }

.benefits { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem 2rem; }
.benefits li { padding-left: 1.8rem; position: relative; color: var(--muted); }
.benefits li::before { content: "✦"; position: absolute; left: 0; color: var(--amber-ink); }
.benefits strong { color: var(--ink); }

/* Apply */
.apply-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: start; }
.steps { padding-left: 1.3rem; color: var(--muted); }
.steps li { margin-bottom: .6rem; }
.fine-print { font-size: .85rem; color: var(--muted); margin-top: 1.5rem; text-wrap: pretty; }

.form-card { border: 1px solid var(--line); border-top: 4px solid var(--amber); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); box-shadow: 0 12px 32px rgba(34,48,42,.07); background: var(--paper); }
.form-card h3 { margin: 0 0 .3rem; font-size: 1.5rem; }
.form-intro { color: var(--muted); font-size: .9rem; margin: 0 0 1.4rem; }
.req { color: var(--error); }

.field { display: flex; flex-direction: column; align-items: stretch; margin-block-end: 1.35rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-weight: 650; font-size: .95rem; margin-block-end: .3rem; }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: max(1rem, 1em);
  color: var(--ink);
  padding: .7rem .85rem;
  min-height: 48px;
  border: 1.5px solid #767676;
  border-radius: 8px;
  background: var(--paper);
  width: 100%;
  margin: 0;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.hint { color: var(--muted); font-size: .83rem; margin-block-start: .25rem; }
.error-msg { display: none; color: var(--error); font-size: .85rem; margin-block-start: .3rem; }
.error-msg .icon { margin-inline-end: .25rem; }

/* Only show errors after the user interacts, never while they type. */
:is(input, select, textarea):user-invalid,
:is(input, select, textarea).user-invalid-fallback {
  border-color: var(--error);
  background-color: var(--error-soft);
}
:is(input, select, textarea):user-invalid + .error-msg,
:is(input, select, textarea).user-invalid-fallback + .error-msg { display: block; }
:is(input, select, textarea):user-valid { border-color: var(--success); }

.checkbox-field { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: .6rem; }
.checkbox-field input { width: 1.25rem; height: 1.25rem; min-height: 0; accent-color: var(--accent); margin-top: .2rem; }
.checkbox-field label { flex: 1 1 16rem; font-weight: 450; margin: 0; }
.checkbox-field .hint, .checkbox-field .error-msg { flex-basis: 100%; margin-inline-start: 1.85rem; }

.form-status { min-height: 1.4em; margin: 1rem 0 0; font-weight: 650; }
.form-status[data-tone="success"] { color: var(--success); }
.form-status[data-tone="error"] { color: var(--error); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; background: color-mix(in srgb, var(--canvas) 60%, var(--accent-soft)); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .9rem; }
.footer-inner p { margin: 0; }

/* Simple content pages */
.prose { max-width: 60ch; margin-inline: auto; padding: 3rem 0 5rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -.01em; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose p, .prose li { color: var(--muted); text-wrap: pretty; }
.prose time { color: var(--muted); font-size: .9rem; }

@media (max-width: 820px) {
  .hero-inner, .apply-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 460px; margin-inline: auto; }
  .site-header nav { gap: .8rem; }
  .site-header nav a:not(.nav-cta) { display: none; }
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Keep boundaries and focus visible with Windows High Contrast / forced colors. */
@media (forced-colors: active) {
  .card, .form-card, .field input, .field select, .field textarea, .nav-cta {
    border: 1px solid CanvasText;
  }
  :focus-visible { outline-color: Highlight; }
}
