/* Shared brand layer for the utility pages: /events/, /legal/ and the 404.
   The landing page carries its own copy of these tokens inline (index.html); /admin/ keeps
   src/styles/base.css. Served as a plain static file so the static 404.html can use it too.

   Four colours, nothing else; the rest are solid tints of them so contrast is checkable.
   Red is for calls to action only. Green is the wordmark's full stop and is never text.
   Pages here are light; only the masthead and the page title sit on dark (.dark). */

@font-face{font-family:"Gelasio";font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/gelasio-700.woff2) format("woff2")}
@font-face{font-family:"Gelasio";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/gelasio-400.woff2) format("woff2")}
@font-face{font-family:"Gelasio";font-style:italic;font-weight:400;font-display:swap;src:url(/fonts/gelasio-400-italic.woff2) format("woff2")}
@font-face{font-family:"DM Sans";font-style:normal;font-weight:100 1000;font-display:swap;src:url(/fonts/dm-sans-var.woff2) format("woff2")}
@font-face{font-family:"DM Mono";font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/dm-mono-500.woff2) format("woff2")}

:root{
  --chiffon:#F5EFD9;
  --bean:#3B2418;
  --red:#B3261E;
  --red-deep:#8F1E18;
  --bean-soft:#645142;
  --chiffon-soft:#D4CAB6;

  --bg:var(--chiffon);
  --fg:var(--bean);
  --fg-soft:var(--bean-soft);
  --rule:#B4A895;

  --display:"Gelasio",Georgia,"Times New Roman",serif;
  --body:"DM Sans",system-ui,sans-serif;
  --label:"DM Mono",ui-monospace,Menlo,monospace;
  color-scheme:light;
}
.dark{
  --bg:var(--bean);
  --fg:var(--chiffon);
  --fg-soft:var(--chiffon-soft);
  --rule:#7C6B5C;
  background:var(--bg);
  color:var(--fg);
}

*{margin:0;padding:0;box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--bg);
  color:var(--fg);
  font-family:var(--body);
  font-size:17px;
  line-height:1.62;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
main,#root{flex:1}
#root{display:flex;flex-direction:column}
.noscript{padding:24px}

.sheet{width:100%;max-width:1120px;margin:0 auto;padding:0 clamp(24px,6vw,84px)}
.col{max-width:720px}

/* ---------- masthead ---------- */
.mast{padding:clamp(34px,6vw,58px) 0 0}
.mast a{display:inline-block}
.mast a:focus-visible{outline:2px solid var(--fg);outline-offset:6px}
.wordmark{display:block;height:var(--wm-h,40px);width:auto;aspect-ratio:10487/1891}
.mast .wordmark{--wm-h:clamp(30px,4.4vw,48px)}

/* ---------- page title ---------- */
.hero{padding:clamp(34px,6vw,64px) 0 clamp(40px,6vw,72px)}
.label,.eyebrow{
  font-family:var(--label);
  font-size:12px;
  font-weight:500;
  letter-spacing:0.16em;
  text-transform:uppercase;
}
.eyebrow{color:var(--fg-soft);margin-bottom:clamp(20px,3vw,32px)}
.eyebrow .em{color:var(--fg)}
h1{
  font-family:var(--display);
  font-weight:700;
  font-size:clamp(34px,6.4vw,68px);
  line-height:1.05;
  letter-spacing:-0.02em;
  color:var(--fg);
  text-wrap:balance;
  overflow-wrap:anywhere;
}
h2{
  font-family:var(--display);
  font-weight:700;
  font-size:clamp(24px,3.4vw,32px);
  line-height:1.1;
  letter-spacing:-0.01em;
  overflow-wrap:anywhere;
}
h3{font-family:var(--display);font-weight:400;font-size:21px;line-height:1.25;margin:28px 0 4px}
.sub{font-family:var(--display);font-size:clamp(19px,2.1vw,23px);line-height:1.5;color:var(--fg-soft);margin-top:14px;max-width:40ch}
/* dates and numbers stay DM Sans: Gelasio's figures are old-style */
.when{color:var(--fg-soft);margin-top:6px}
.hint{color:var(--fg-soft);font-size:15px;margin-top:8px}
p{max-width:62ch}

.content{padding-top:clamp(32px,5vw,56px);padding-bottom:clamp(40px,7vw,80px)}
.content > * + *,.col > * + *{margin-top:16px}

a{color:var(--fg);text-decoration-color:var(--rule);text-underline-offset:4px}
a:hover{text-decoration-color:var(--fg)}
:focus-visible{outline:2px solid var(--fg);outline-offset:3px}

/* ---------- controls: 44px targets, visible focus ---------- */
label{display:block;font-weight:500;margin:20px 0 6px}
input,textarea,select{
  width:100%;
  min-height:48px;
  padding:12px 14px;
  background:var(--bg);
  color:var(--fg);
  border:1.5px solid var(--fg);
  border-radius:2px;
  font:inherit;
}
textarea{resize:vertical}
/* checkboxes: the whole label is the 44px+ target, the box itself stays small */
fieldset{border:0;margin-top:28px}
legend{font-family:var(--label);font-size:12px;font-weight:500;letter-spacing:0.16em;text-transform:uppercase;color:var(--fg-soft);padding:0;margin-bottom:2px}
.check{display:flex;align-items:flex-start;gap:14px;margin:0;padding:11px 0;font-weight:400;cursor:pointer}
input[type="checkbox"]{flex:none;width:24px;height:24px;min-height:0;margin-top:2px;padding:0;accent-color:var(--fg);cursor:pointer}
input[type="checkbox"][aria-invalid="true"]{outline:3px solid var(--fg);outline-offset:2px}
input[aria-invalid="true"],textarea[aria-invalid="true"],select[aria-invalid="true"]{border-width:3px}

.btn{
  display:inline-flex;
  align-items:center;
  min-height:48px;
  padding:0 22px;
  font-family:var(--label);
  font-size:13px;
  font-weight:500;
  letter-spacing:0.12em;
  text-transform:uppercase;
  text-decoration:none;
  color:var(--fg);
  background:transparent;
  border:1.5px solid var(--fg);
  border-radius:2px;
  cursor:pointer;
  transition:background .2s ease,transform .1s ease;
}
.btn:hover:not(:disabled){background:var(--fg);color:var(--bg)}
.btn:active:not(:disabled){transform:translateY(1px)}
/* the one place red appears: the call to action */
.btn.primary{background:var(--red);border-color:var(--red);color:var(--bg)}
.btn.primary:hover:not(:disabled){background:var(--red-deep);border-color:var(--red-deep);color:var(--bg)}
.btn:disabled{opacity:.55;cursor:not-allowed}

/* errors say so in words and carry a rule, not a colour */
.error{font-weight:500;min-height:1.62em;margin-top:6px}
.error:not(:empty){border-left:2px solid var(--fg);padding-left:10px}

/* ---------- 404: the two ways back ---------- */
.lost{list-style:none;display:flex;flex-wrap:wrap;gap:0 28px;margin-top:clamp(20px,3vw,28px)}
.lost a{display:inline-block;padding:11px 0;font-weight:500}

/* ---------- footer ---------- */
footer{
  margin-top:clamp(40px,8vw,96px);
  padding:26px 0 clamp(44px,7vw,72px);
  border-top:1px solid var(--rule);
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:14px 28px;
  font-family:var(--label);
  font-size:12px;
  font-weight:500;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--fg-soft);
}
footer .wordmark{--wm-h:26px}
footer a{color:var(--fg);text-decoration:none;border-bottom:1px solid var(--rule)}
footer a:hover{border-bottom-color:var(--fg)}
footer .legal-links{display:flex;flex-wrap:wrap;gap:6px 20px}

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