/* ERHML: shared design tokens and primitives
 *
 * Colours follow the EFPRP trademark policy (efprp.org/trademark-policy):
 * EFPRP Green #11804B, Star Yellow #FFD700, Brand Black #000000, Brand White #FFFFFF.
 * Greys and darker greens are only used for interface states.
 *
 * Type: Junicode (SIL Open Font License) for headings, PT Sans for everything else.
 */
@font-face {
  font-family: "Junicode";
  src: url("https://cdn.jsdelivr.net/gh/psb1558/Junicode-font@master/webfiles/JunicodeVFsubset.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Junicode";
  src: url("https://cdn.jsdelivr.net/gh/psb1558/Junicode-font@master/webfiles/JunicodeVF-Italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --green: #11804B;
  --green-dark: #0d673c;
  --green-deep: #0a4d2d;
  --yellow: #FFD700;
  --yellow-dark: #ecc600;
  --black: #000000;
  --white: #FFFFFF;

  --ink: #111111;
  --ink-2: #404040;
  --muted: #6b6b6b;
  --line: #e7e7e4;
  --line-2: #cbcbc6;
  --surface: #f5f5f2;

  --danger: #b3261e;
  --danger-tint: #fbe8e6;
  --warn-tint: #fff3b8;
  --green-tint: #e7f2ec;

  --display: "Junicode", "EB Garamond", "Iowan Old Style", Georgia, serif;
  /* The name of the library is set in a bold grotesque, like its logo; only the accent word stays in the serif */
  --display-strong: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --sans: "PT Sans", "Myriad Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --r-s: 8px;
  --r: 14px;
  --r-l: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html { scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.01em;
}
h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; }
p { margin: 0; }
strong, b { font-weight: 700; }

.label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.on-green :focus-visible { outline-color: var(--yellow); }

.icon { width: 1.1em; height: 1.1em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 0 1.3em;
  border: 1.5px solid var(--black); border-radius: 10px; background: transparent; color: var(--black);
  font-family: var(--sans); font-size: 1rem; font-weight: 700; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease-soft), border-color .25s var(--ease-soft), color .25s var(--ease-soft), transform .2s var(--ease);
}
.btn:hover { background: var(--black); color: var(--white); }
.btn:active { transform: scale(.97); }
.btn .icon { transition: transform .3s var(--ease); }
.btn:hover .icon-nudge { transform: translateX(3px); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--white); }
.btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--black); }
.btn.yellow:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); color: var(--black); }
.btn.light { border-color: rgba(255, 255, 255, .7); color: var(--white); }
.btn.light:hover { background: var(--white); border-color: var(--white); color: var(--green-deep); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: var(--surface); color: var(--black); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--white); }
.btn.small { min-height: 36px; padding: 0 .9em; font-size: .94rem; border-radius: 8px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: inherit; }

/* Form controls */
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field > label { font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: .45em .85em;
  background: var(--white); border: 1px solid var(--line-2); border-radius: 10px;
  font-family: var(--sans); font-size: 1rem;
  transition: border-color .2s var(--ease-soft), box-shadow .2s var(--ease-soft);
}
.input::placeholder, .textarea::placeholder { color: #8a8a8a; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(17, 128, 75, .18); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 2.2em; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23111111' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85em center;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; font-size: 1.05rem; }

/* Notifications */
.toasts { position: fixed; z-index: 1000; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 440px); }
.toast { background: var(--black); color: var(--white); padding: .8em 1.1em; border-radius: 12px; font-weight: 700; animation: toast-in .45s var(--ease) both; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
