/* LEARN: Oathstead holding page styles. "Vellum and ink": an engraved-certificate look.
   LEARN: One file, no build tools. Colours are CSS variables, so a change here applies everywhere. */

/* LEARN: Self-hosted variable fonts (SIL Open Font Licence; licence files sit beside them).
   LEARN: One variable file covers every weight, so there are fewer downloads. */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  --vellum: #F5F0E6;
  --paper: #FFFDF8;
  --ink: #1A2130;
  --muted: #4A5363;
  --brass: #7A5A22;
  --brass-dark: #5A4116;
  --teal: #2D6B5F;
  --gold: #D8B873;
  --hatch: #EAE3D3;
  --line: rgba(26, 33, 48, 0.18);
  --error: #A12A1F;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* LEARN: Respect people who've asked their device to reduce motion. */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--vellum);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
h1, h2, h3 { margin: 0; }
p { margin: 0; }
a { color: var(--brass); text-underline-offset: 0.15em; }
a:hover { color: var(--brass-dark); }
/* LEARN: A thick, high-contrast focus ring for keyboard users (WCAG 2.2: Focus Appearance). */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
main:focus { outline: none; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--ink); color: var(--vellum); padding: 12px 20px; font-weight: 600;
}
.skip-link:focus { top: 16px; color: var(--vellum); }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.centre { text-align: center; }

/* ---------- Header and footer ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 48px; }
.brand:hover { color: var(--ink); }
.wordmark { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; letter-spacing: 0.04em; }
.main-nav { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 0.9375rem; }
/* LEARN: Each link is at least 48px tall so it's easy to tap. */
.main-nav a { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); text-decoration: none; }
.main-nav a:hover { color: var(--ink); text-decoration: underline; }
.main-nav .nav-cta { color: var(--brass); font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  padding-top: 32px; padding-bottom: 32px; font-size: 0.875rem; color: var(--muted);
}
.footer-inner p { max-width: 44rem; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a, .footer-inner p a { display: inline-flex; align-items: center; min-height: 48px; }

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 16px;
}
.eyebrow-left { text-align: left; }
.eyebrow-gold { color: var(--gold); }
.section { padding-top: 88px; padding-bottom: 40px; }
.section h2, .page-title {
  font-family: var(--serif); font-weight: 300; font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.1; max-width: 44rem;
}
.centre h2 { margin: 0 auto; }
.intro-text { font-size: 1.125rem; color: var(--muted); margin-top: 24px; }

/* ---------- Buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0 28px; border-radius: 2px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--vellum); border: 1px solid var(--ink); }
.btn-primary:hover { background: #2A3346; color: var(--vellum); }
.btn-secondary { border: 1px solid var(--ink); color: var(--ink); font-weight: 400; background: transparent; }
.btn-secondary:hover { background: var(--paper); color: var(--ink); }
.btn-block { width: 100%; min-height: 52px; }

/* ---------- Hero ---------- */
.hero-wrap { padding-top: 56px; padding-bottom: 64px; }
.certificate { border: 1px solid rgba(26, 33, 48, 0.35); padding: 6px; }
.certificate-inner {
  border: 1px solid rgba(122, 90, 34, 0.5); padding: 64px 32px 56px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.certificate-inner .eyebrow { margin: 28px 0 0; }
.certificate-inner h1 {
  margin-top: 20px; font-family: var(--serif); font-weight: 300;
  font-size: clamp(3rem, 7vw, 5.75rem); line-height: 1.02; letter-spacing: -0.01em;
}
.rule { width: 120px; height: 3px; margin-top: 28px; border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); }
.lede { margin-top: 28px; font-size: 1.25rem; line-height: 1.55; color: var(--muted); max-width: 38rem; }
.status-pill {
  margin-top: 24px; padding: 6px 14px; border: 1px solid rgba(122, 90, 34, 0.55); border-radius: 999px;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-dark);
}

/* ---------- Photo slots ---------- */
.photo { margin: 0; text-align: left; width: 100%; }
.certificate-inner .photo { margin-top: 48px; }
.photo-slot, .photo-img {
  display: flex; align-items: center; justify-content: center; width: 100%; height: auto;
  border: 1px solid rgba(26, 33, 48, 0.4); outline: 1px solid rgba(122, 90, 34, 0.55); outline-offset: -10px;
  object-fit: cover;
}
.photo-slot {
  background-color: var(--hatch);
  background-image: repeating-linear-gradient(135deg, rgba(26, 33, 48, 0.07) 0 1px, transparent 1px 14px);
  padding: 24px; text-align: center;
}
.photo-slot span { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--muted); max-width: 34rem; }
.photo--wide { aspect-ratio: 21 / 9; }
.photo--square { aspect-ratio: 4 / 3; }
.photo--banner { aspect-ratio: 3 / 1; }
.photo figcaption {
  margin-top: 10px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
/* LEARN: On phones a 21:9 or 3:1 slot is too thin to read, so it gets taller. */
@media (max-width: 640px) {
  .photo--wide, .photo--banner { aspect-ratio: 4 / 3; }
  .certificate-inner { padding: 48px 18px 40px; }
}

/* ---------- Record card and Aldric ---------- */
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 24px; padding-bottom: 40px; }
.record-col { flex: 1 1 380px; min-width: 0; }
.aldric-col { flex: 1 1 420px; min-width: 0; }
.record-card { background: var(--paper); border: 1px solid var(--line); padding: 28px; }
.record-top {
  display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono);
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.double-rule { height: 4px; margin: 16px 0 20px; border-top: 1px solid rgba(26, 33, 48, 0.35); border-bottom: 1px solid rgba(26, 33, 48, 0.15); }
.record-title { font-family: var(--serif); font-size: 1.625rem; }
.record-list { margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.9375rem; }
.record-list div { display: flex; justify-content: space-between; gap: 12px; }
.record-list dt { color: var(--muted); }
.record-list dd { margin: 0; text-align: right; }
.record-list .ok { color: var(--teal); font-weight: 600; }
.seal { margin-top: 24px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid rgba(45, 107, 95, 0.5); font-size: 0.875rem; line-height: 1.4; }
.seal svg { flex: none; }
.seal span { display: block; color: var(--muted); }
/* LEARN: The plain notice is deliberately plain: system font, no character, no flourish. */
.plain-notice {
  margin-top: 16px; padding: 14px 16px; background: var(--paper); border: 2px solid var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.9375rem;
}
.plain-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; margin-bottom: 4px; }
.small-print { margin-top: 12px; font-size: 0.8125rem; color: var(--muted); }
.aldric-quote { margin: 0; }
.aldric-quote p { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.4; }
.aldric-col .eyebrow { margin: 24px 0 0; }
.aldric-col .muted { margin-top: 12px; font-size: 0.9375rem; }

/* ---------- Oath ---------- */
.promises {
  list-style: none; margin: 56px 0 0; padding: 0; display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.promises li { flex: 1 1 260px; min-width: 0; padding: 32px 24px; border-right: 1px solid var(--line); }
.promises li:last-child { border-right: 0; }
/* LEARN: One numeral style for the whole page (the oath and the switching steps):
   a Roman numeral in a fine brass ring, echoing the seal. */
.numeral, .step-num {
  flex: none; width: 48px; height: 48px; border: 1px solid var(--brass); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.25rem; font-weight: 400; line-height: 1; color: var(--brass);
}
.promises h3 { margin: 18px 0 8px; font-size: 1.25rem; font-weight: 600; }
.promises p { color: var(--muted); }

/* ---------- What it keeps ---------- */
.photo-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 56px; }
.photo-row .photo { flex: 1 1 320px; min-width: 0; width: auto; }
.cards { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.cards li { flex: 1 1 340px; min-width: 0; background: var(--paper); border: 1px solid var(--line); padding: 32px; }
.cards h3 { margin-bottom: 8px; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; }
.cards p { color: var(--muted); }

/* ---------- Driven by the law ---------- */
/* LEARN: Two columns framed by double rules, like the certificate border above. */
.law {
  display: flex; flex-wrap: wrap; gap: 24px 56px; padding: 40px 0;
  border-top: 3px double var(--ink); border-bottom: 3px double var(--ink);
}
.law-head { flex: 1 1 300px; min-width: 0; }
.law-head h2 { font-size: clamp(2rem, 3.6vw, 2.75rem); }
.law-body { flex: 1.4 1 420px; min-width: 0; color: var(--muted); font-size: 1.0625rem; }
.law-body p + p { margin-top: 14px; color: var(--ink); font-weight: 500; }
#law.section { padding-top: 64px; }

/* ---------- Beyond compliance ---------- */
.ops-intro { max-width: 46rem; }
.ops { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 48px; align-items: stretch; }
.ops-points { list-style: none; margin: 0; padding: 0; flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.ops-points li { padding: 22px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 32px; }
.ops-points h3 { flex: 0 0 13rem; font-size: 1.125rem; font-weight: 600; }
.ops-points p { flex: 1 1 18rem; color: var(--muted); }
.experience { flex: 1 1 320px; min-width: 0; background: var(--ink); color: var(--vellum); padding: 32px; }
.experience .card-label { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.experience h3 { font-family: var(--serif); font-size: 1.625rem; font-weight: 300; margin-bottom: 12px; }
.experience p:last-child { color: #D9D4C8; }

/* ---------- Made to fit ---------- */
.fit-cards { margin-top: 48px; }
/* LEARN: Four cards sit two by two on wide screens and stack on phones. */
.fit-cards li { flex: 1 1 calc(50% - 12px); min-width: 280px; }
.fit-cards li { border-top: 3px solid var(--brass); }
.cards .card-label {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brass-dark); margin-bottom: 12px;
}

.connect { margin-top: 24px; padding: 28px 32px; border: 1px solid var(--line); border-top: 3px solid var(--teal); background: var(--paper); }
.connect h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; margin-bottom: 8px; }
.connect p { color: var(--muted); max-width: 52rem; }

/* ---------- Six questions ---------- */
.dark-band { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; background: var(--ink); color: var(--vellum); padding: 48px; }
.dark-intro { flex: 1 1 320px; min-width: 0; }
.dark-band h2 { font-size: 2.5rem; line-height: 1.15; }
.dark-intro p:last-child { margin-top: 24px; color: #D9D4C8; }
.questions { flex: 1 1 420px; min-width: 0; margin: 0; padding-left: 28px; display: flex; flex-direction: column; gap: 14px; font-size: 1.125rem; }
@media (max-width: 640px) { .dark-band { padding: 32px 22px; } .dark-band h2 { font-size: 2rem; } }

/* ---------- Switching ---------- */
#switching .photo { margin-top: 48px; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.steps li { flex: 1 1 300px; min-width: 0; display: flex; gap: 20px; }
.steps h3 { margin: 11px 0 6px; font-size: 1.25rem; font-weight: 600; }
.steps p { color: var(--muted); }

/* ---------- Founding places and the form ---------- */
.interest { display: flex; flex-wrap: wrap; gap: 56px; padding-bottom: 96px; }
.interest-intro { flex: 1 1 380px; min-width: 0; }
.form-col { flex: 1 1 440px; min-width: 0; }
.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
/* LEARN: The bullet is the small Oathstead seal, drawn as an image so it stays decorative
   (screen readers still hear an ordinary list). */
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; background: url("seal-bullet.svg") no-repeat center / contain; }
.price-line { margin-top: 32px; font-family: var(--serif); font-size: 1.75rem; }
.interest-intro .muted { margin-top: 6px; }

.form-panel { display: flex; flex-direction: column; gap: 20px; background: var(--paper); border: 1px solid rgba(26, 33, 48, 0.25); padding: 36px; }
@media (max-width: 640px) { .form-panel { padding: 24px 18px; } }
.form-panel.success h3 { font-family: var(--serif); font-size: 1.75rem; font-weight: 400; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.optional { font-weight: 400; color: var(--muted); }
.hint { font-size: 0.875rem; color: var(--muted); }
.field input {
  min-height: 48px; padding: 0 14px; background: #FFFFFF; border: 1px solid #6E7480;
  border-radius: 2px; color: var(--ink); font: inherit; width: 100%;
}
.field select {
  min-height: 48px; padding: 0 14px; background: #FFFFFF; border: 1px solid #6E7480;
  border-radius: 2px; color: var(--ink); font: inherit; width: 100%; max-width: 26rem;
}
.field select[aria-invalid="true"] { border: 2px solid var(--error); }
.field input::placeholder { color: #6E7480; }
.input-short { max-width: 10ch; }
.field input[aria-invalid="true"] { border: 2px solid var(--error); }
.field-error { color: var(--error); font-weight: 600; font-size: 0.9375rem; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.check label { font-size: 0.9375rem; color: var(--muted); }
.error-summary { border: 3px solid var(--error); padding: 16px 18px; background: #FFFFFF; }
.error-summary h3 { font-size: 1.125rem; margin-bottom: 8px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--error); font-weight: 600; }
/* LEARN: The honeypot is moved off-screen rather than display:none, which some bots detect. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Text pages (privacy, accessibility, confirm) ---------- */
.prose { max-width: 760px; padding-top: 64px; padding-bottom: 64px; }
.prose .page-title { margin-bottom: 16px; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 1.625rem; margin: 40px 0 12px; }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.action-page .action-form { margin: 32px 0; }
.action-page p a { display: inline-flex; align-items: center; min-height: 48px; }

/* LEARN: Windows High Contrast / forced colours: keep borders visible. */
@media (forced-colors: active) {
  .btn, .photo-slot, .record-card, .plain-notice { border: 1px solid CanvasText; }
}
