/* ── B-Genius shared base ──────────────────────────────────────────
   FOUNDATION (defaults a designer can replace; page files build on these):
   --paper  #faf6ee  page ground: warm paper, suits bright-daylight browsing
   --ink    #0e224e  text, masthead anchors, footer (deep logo navy)
   --blue   #0b4fa3  links/labels only (darkened for 4.5:1 on paper)
   --signal #bc3d0c  ONE accent: rules, numerals, single CTA per viewport
   TYPE: display serif stack (Georgia/Palatino) + system sans body.
         DEFAULT: replace with self-hosted faces via @font-face when available;
         offline-first kept the installed stack so pages render in low bandwidth.
   Depth = 1px hairlines + one soft shadow. No gradients, no block shadows. */

:root {
  --paper: #faf6ee;
  --card: #fffdf7;
  --ink: #0e224e;
  --ink-soft: #33406b;
  --blue: #0b4fa3;
  --signal: #bc3d0c;
  --signal-soft: #fbe9dc;
  --line: #e2d9c2;
  --muted: #5b6478;
  --ok: #16713f;
  --ok-bg: #e2f3e8;
  --err: #9c1f1f;
  --err-bg: #fbe6e3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --radius: 12px;
  --shadow: 0 18px 44px rgba(14, 34, 78, .14);
  --ease-out: cubic-bezier(.2, .65, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  caret-color: var(--signal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #c9bfa4; border-radius: 8px; border: 3px solid var(--paper); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 99; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }

/* utility strip */
.strip { background: var(--ink); color: #e9e4d4; font-size: 13.5px; }
.strip .wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 7px; padding-bottom: 7px; }
.strip a { color: #ffd98a; font-weight: 600; }

/* header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(250, 246, 238, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; max-width: var(--max); margin: 0 auto; padding-left: clamp(18px, 4vw, 32px); padding-right: clamp(18px, 4vw, 32px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 46px; height: 46px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: 0; line-height: 1.1; display: block; }
.brand-sub { display: block; font-size: 11px; letter-spacing: 2.5px; color: var(--muted); font-weight: 700; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-list a:not(.btn) { position: relative; display: block; padding: 10px 12px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.nav-list a:not(.btn)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.nav-list a:not(.btn):hover { color: var(--ink); }
.nav-list a:not(.btn):hover::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--ink); }
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.nav-btn { display: none; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 14px; color: var(--ink); cursor: pointer; font-family: inherit; }
.nav-btn svg { width: 18px; height: 18px; }

/* buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-size: 16px; border-radius: 10px; padding: 13px 24px; border: 1.5px solid var(--ink); cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: #162d68; }
.btn-signal { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-signal:hover { background: #a33408; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 14.5px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 6px; }

/* page title block: heading carries its own weight (no eyebrow kicker) */
.page-head { padding: clamp(44px, 6vw, 80px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-family: var(--serif); font-size: clamp(38px, 5.2vw, 62px); line-height: 1.04; letter-spacing: -.02em; max-width: 18ch; text-wrap: balance; }
.page-head h1 em { font-style: italic; font-weight: 400; }
.page-head .standfirst { color: var(--muted); font-size: 18px; max-width: 68ch; margin-top: 16px; }
.page-head .crumb { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.page-head .crumb a { color: var(--muted); }
section.block { padding: clamp(48px, 6vw, 80px) 0; }
section.block + section.block { border-top: 1px solid var(--line); }
h2.title { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.02em; max-width: 22ch; text-wrap: balance; margin-bottom: 4px; }
h2.title em { font-style: italic; font-weight: 400; }
.standfirst { color: var(--muted); font-size: 18px; max-width: 68ch; margin-top: 12px; }
.text-link { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.text-link:hover { color: var(--signal); }

/* shared bits carried over from the single page */
.motto { border-bottom: 1px solid var(--line); background: var(--card); }
.motto .wrap { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 11px; padding-bottom: 11px; font-family: var(--serif); font-style: italic; font-size: 15.5px; color: var(--ink-soft); }
.tick-list { list-style: none; display: grid; gap: 7px; font-size: 15.5px; }
.tick-list li { padding-left: 28px; position: relative; }
.tick-list li::before { content: ""; position: absolute; left: 4px; top: .42em; width: 8px; height: 13px; border: solid var(--signal); border-width: 0 2.5px 2.5px 0; transform: rotate(42deg); }
.invite { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: clamp(22px, 3.5vw, 34px); margin-top: 34px; background: var(--card); }
.invite h3 { font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }

/* forms (contact + inbox share the language) */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3.5vw, 34px); }
.form-card h3 { font-family: var(--serif); font-size: 24px; margin-bottom: 4px; }
.field { margin-top: 16px; }
label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
input, select, textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 16px; font-family: inherit; color: var(--ink); background: #fff; font-variant-numeric: tabular-nums; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(188, 61, 12, .15); }
textarea { min-height: 128px; resize: vertical; }
.field-err { color: var(--err); font-size: 14px; margin-top: 6px; font-weight: 600; }
.input-bad { border-color: var(--err) !important; }
.flash { border-radius: 10px; padding: 14px 16px; font-size: 15px; margin-top: 16px; }
.flash-ok { background: var(--ok-bg); border: 1.5px solid var(--ok); color: #0d4d2a; }
.flash-err { background: var(--err-bg); border: 1.5px solid var(--err); color: #7c1616; }

/* footer */
footer.site { background: var(--ink); color: #c7cfe6; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; padding: 48px 0 30px; }
.foot-grid h2 { color: #fff; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; font-family: var(--sans); font-weight: 800; }
.foot-grid ul { list-style: none; display: grid; gap: 8px; font-size: 15px; }
.foot-grid a { color: #c7cfe6; text-decoration: none; }
.foot-grid a:hover { color: #ffd98a; text-decoration: underline; }
.foot-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.foot-brand img { width: 44px; height: 44px; border-radius: 10px; background: #fff; }
.copy { border-top: 1px solid rgba(255, 255, 255, .18); padding: 16px 0 22px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }

/* inbox table (local admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.inbox { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; font-variant-numeric: tabular-nums; }
table.inbox th, table.inbox td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.inbox th { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); background: var(--paper); }

/* base entrance: quiet; pages add their own signature moment */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-btn { display: inline-flex; }
  .nav-list { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 10px 18px 18px; border-bottom: 1.5px solid var(--ink); }
  #site-nav.open .nav-list { display: flex; }
  .nav-list a:not(.btn) { padding: 13px 6px; border-top: 1px solid var(--line); }
  .nav-list .btn { margin-top: 12px; text-align: center; }
  .foot-grid { grid-template-columns: 1fr; }
  .invite { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
