/* Shield & Subnet — vert, a chevron gules, in 255 bits */

:root {
  --field: #e7ebe6;      /* pale grey-green ground */
  --surface: #f5f7f4;
  --ink: #14201a;
  --ink-soft: #46524b;
  --vert: #1f5c38;       /* heraldic green */
  --gules: #b8352a;      /* heraldic red */
  --rule: #c6cec7;
  --ok: #1f5c38;
  --err: #a12a22;
  --focus: #b8352a;

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --measure: 36rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --field: #0f1813;
    --surface: #16221b;
    --ink: #e5ebe6;
    --ink-soft: #a2afa7;
    --vert: #74c28f;
    --gules: #f07b6d;
    --rule: #26362d;
    --ok: #74c28f;
    --err: #f2918a;
    --focus: #f07b6d;
  }
}

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

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

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}

a { color: var(--vert); text-underline-offset: 0.18em; }
a:hover { color: var(--gules); }

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

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- Header ---------- */

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--vert); }

.site-nav { display: flex; gap: 1.25rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* ---------- Hero: the one bold moment ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 8vw, 5.5rem) 0 clamp(2rem, 6vw, 4rem);
}

.blazon { margin: 0; }
.blazon svg { width: 100%; height: auto; display: block; }
.blazon figcaption {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: balance;
}

/* The shield keeps its true tinctures in both light and dark mode */
.bits .g { fill: #1f5c38; }
.bits .r { fill: #e04a3a; }
@media (prefers-color-scheme: dark) { .bits .g { fill: #2b7a4b; } }

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0 0 1.25rem;
}

.hero h1 .amp {
  display: block;
  font-size: 0.5em;
  color: var(--gules);
  margin: 0.15em 0;
}

.hero p {
  max-width: var(--measure);
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

.hero p:last-child { margin-bottom: 0; }

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

.section {
  border-top: 1px solid var(--rule);
  padding: clamp(2rem, 6vw, 3.5rem) 0;
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.section h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}

.section-body { max-width: var(--measure); }
.section-body > :first-child { margin-top: 0; }

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

.contact-form { display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 500; }
.field .hint { font-size: 0.9rem; color: var(--ink-soft); }

.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
  width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--vert); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  justify-self: start;
  font: 600 1rem/1 var(--body);
  color: var(--field);
  background: var(--vert);
  border: 2px solid var(--vert);
  border-radius: 4px;
  padding: 0.85rem 1.4rem;
  cursor: pointer;
}
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.form-status { margin: 0; min-height: 1.6em; font-weight: 500; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-err { color: var(--err); }

/* ---------- Simple pages (404) ---------- */

.page-head { padding: clamp(2rem, 7vw, 4rem) 0 2rem; max-width: var(--measure); }
.page-head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.08;
  margin: 0 0 1rem;
}
.page-head p { color: var(--ink-soft); margin: 0; font-size: 1.1rem; }

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

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 40rem) {
  .hero, .section { grid-template-columns: 1fr; }
  .blazon { max-width: 11rem; }
}

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