/* ---------- Color tokens ---------- */
:root {
  color-scheme: light;
  --forest: #1f3328;
  --gold: #d4ab52;
  --brick: #a8361e;

  --bg: #f7f3ea;
  --surface: #ffffff;
  --ink: #1d2420;
  --muted: #5b625d;
  --line: #d9d2c3;
  /* form field borders need 3:1 against the card (WCAG 1.4.11) */
  --field-border: #8a8374;
  --heading: #1f3328;
  /* gold darkened just enough for 4.5:1 text contrast on cream (WCAG AA) */
  --accent-text: #8c6921;
  --error-text: #a8361e;
  --success-bg: #e8f1ea;
  --success-text: #1f3328;
  --error-bg: #fbeae6;
  --chrome-bg: #1f3328;
  --chrome-text: #f7f3ea;
  --chrome-muted: #c9c3b4;
  --chrome-link: #d4ab52;
  --icon-bg: #f1e8d3;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #131d17;
    --surface: #1b2821;
    --ink: #ece6d8;
    --muted: #b3ad9f;
    --line: #34463b;
    --field-border: #6a7e70;
    --heading: #f3ecdc;
    --accent-text: #d4ab52;
    --error-text: #f2937a;
    --success-bg: #20372a;
    --success-text: #cfe8d6;
    --error-bg: #3a201a;
    --chrome-bg: #0e1611;
    --chrome-text: #f3ecdc;
    --chrome-muted: #b3ad9f;
    --chrome-link: #d4ab52;
    --icon-bg: #26362c;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

h1, h2, h3, .brand {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  /* Turn off Fraunces' "wonky" letterforms and ligatures (e.g. the curly ft) */
  font-variation-settings: "WONK" 0;
  font-variant-ligatures: no-common-ligatures no-discretionary-ligatures;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--heading);
}

a { color: inherit; }

.lede { color: var(--muted); margin: 0 0 32px; font-size: 1.05rem; }

main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 64px;
}
main.wide { max-width: 1040px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--chrome-bg);
  color: var(--chrome-text);
  padding: 14px 16px;
}
.site-header .inner,
.site-footer .inner {
  max-width: 1040px;
  margin: 0 auto;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--chrome-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
}
.brand img { width: 36px; height: 36px; flex-shrink: 0; }
.site-nav { display: flex; gap: 20px; }
.site-nav a {
  color: var(--chrome-link);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--chrome-link); }
.site-nav a[aria-current="page"] {
  color: var(--chrome-text);
  border-bottom-color: var(--chrome-link);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--chrome-bg);
  color: var(--chrome-muted);
  padding: 32px 16px;
  font-size: 0.95rem;
}
.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--chrome-text);
  font-weight: 600;
}
.footer-brand img { width: 28px; height: 28px; }
.footer-details { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.site-footer a { color: var(--chrome-link); }

/* ---------- Buttons & focus ---------- */
.button {
  display: inline-block;
  background: var(--brick);
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.button:disabled { opacity: 0.6; cursor: wait; }
a:focus-visible,
.button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Home ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 8px;
}
.hero-mark { display: block; width: 104px; height: 104px; flex-shrink: 0; }
.hero-mark img { display: block; width: 100%; height: 100%; }
.tagline {
  color: var(--accent-text);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}
.home-copy { margin: 32px 0; }
.home-copy p { margin: 0 0 16px; font-size: 1.05rem; }

.services { margin: 56px 0 8px; }
.services h2 {
  color: var(--heading);
  font-size: 1.6rem;
  margin: 0 0 20px;
}
.service-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--icon-bg);
  color: var(--accent-text);
  margin-bottom: 12px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 {
  color: var(--heading);
  font-size: 1.15rem;
  margin: 0 0 6px;
}
.service-card p { margin: 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.optional { font-weight: 400; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* 16px+ stops iOS from zooming into fields */
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--field-border);
  border-radius: 8px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--error-text); }
.field-error {
  color: var(--error-text);
  font-size: 0.9rem;
  margin: 6px 0 0;
}
.field-error:empty { display: none; }
.captcha { margin-bottom: 12px; }

.next-steps {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 24px;
}
.next-steps h2 {
  color: var(--heading);
  font-size: 1.3rem;
  margin: 0 0 12px;
}
.next-steps ol { margin: 0 0 20px; padding-left: 1.25rem; }
.next-steps li { margin-bottom: 10px; }
.next-steps li::marker { color: var(--accent-text); font-weight: 700; }
.next-steps p { margin: 0; color: var(--muted); }
.next-steps a { color: var(--accent-text); font-weight: 600; }

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.notice[hidden] { display: none; }
.notice-success { background: var(--success-bg); color: var(--success-text); }
.notice-error { background: var(--error-bg); color: var(--error-text); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  main { padding-top: 32px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-mark { width: 72px; height: 72px; }
  .contact-form, .next-steps { padding: 18px; }
  .button { display: block; width: 100%; }
  .site-nav { gap: 14px; }
}

@media (max-width: 370px) {
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
}
