/* The OpenDoctrines site.
 *
 * SEAMLESS NAVIGATION WITHOUT A SINGLE-PAGE APP. `@view-transition` is the
 * cross-document View Transitions API: the browser keeps the old page painted,
 * fades to the new one, and morphs any element the two pages agree on by
 * name -- here the masthead and the nav. Chrome, Edge and Safari 18 do it;
 * Firefox navigates normally and loses nothing but the animation. No router,
 * no framework, no JavaScript at all.
 */
@view-transition { navigation: auto; }

:root {
  --ground:   #0C0F16;
  --raise:    #141822;
  --sunken:   #090B11;
  --ink:      #E8E4DA;   /* warm, not white: this is a paper-and-maps game */
  --muted:    #9AA0AE;
  --faint:    #666D7C;
  --rule:     #232936;
  --rule-firm:#333B4B;
  --gold:     #C9A227;
  --gold-dim: #8C7320;
  --sea:      #16202E;
}
/* The page commits to one look on purpose -- a lamplit map table -- so it
 * paints its own ground rather than borrowing the host's. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
  font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── masthead, shared across every page and morphed between them ── */
.top {
  view-transition-name: masthead;
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top-in {
  max-width: 1060px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap;
}
.mark {
  font-family: Spectral, Georgia, serif; font-weight: 600; font-size: 19px;
  letter-spacing: .01em; color: var(--ink); text-decoration: none;
  white-space: nowrap;
}
.mark span { color: var(--gold); }
nav { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
nav a {
  font-size: 14.5px; color: var(--muted); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
nav a:hover { color: var(--ink); border-bottom-color: var(--gold-dim); }
nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
nav a.play { color: var(--gold); font-weight: 600; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

main { max-width: 1060px; margin: 0 auto; padding: 0 24px 96px; }
.narrow { max-width: 680px; }

h1, h2, h3 { font-family: Spectral, Georgia, serif; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.08; margin: 0 0 18px; text-wrap: balance; }
h2 { font-size: 27px; margin: 52px 0 14px; }
h3 { font-size: 19px; margin: 28px 0 8px; }
p { margin: 0 0 16px; }
a { color: var(--gold); text-underline-offset: 3px; }
.lede { font-size: 20px; color: var(--muted); max-width: 60ch; }
.lede strong { color: var(--ink); font-weight: 600; }

.label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint);
}

/* ── the one flourish: a lamplit map table behind the opening ── */
.hero { position: relative; padding: 76px 0 60px; }
.hero::before {
  content: ""; position: absolute; inset: -40px -50vw 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%,
      color-mix(in srgb, var(--sea) 80%, var(--gold) 4%) 0%, transparent 70%),
    var(--ground);
}

.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 3px;
  font-weight: 600; font-size: 15.5px; text-decoration: none;
  border: 1px solid var(--gold); color: var(--ground); background: var(--gold);
}
.btn:hover { background: #DCB434; border-color: #DCB434; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-firm); }
.btn.ghost:hover { border-color: var(--gold-dim); color: var(--gold); background: transparent; }
.note { font-size: 14px; color: var(--faint); margin-top: 12px; }

/* ── cards ── */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 26px 0; }
.card {
  background: var(--raise); border: 1px solid var(--rule);
  border-radius: 4px; padding: 22px 22px 20px;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }

figure { margin: 30px 0; }
figure img { width: 100%; border-radius: 4px; border: 1px solid var(--rule); display: block; }
figcaption { font-size: 13.5px; color: var(--faint); margin-top: 10px; }

.facts { border-top: 1px solid var(--rule); margin: 30px 0 0; }
.facts div {
  display: grid; grid-template-columns: 176px 1fr; gap: 18px;
  padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.facts dt { font-size: 14px; font-weight: 600; color: var(--gold); }
.facts dd { margin: 0; color: var(--muted); font-size: 15.5px; }
.facts dd strong { color: var(--ink); font-weight: 600; }

.alert {
  background: color-mix(in srgb, var(--gold) 9%, var(--raise));
  border-left: 2px solid var(--gold-dim);
  padding: 18px 20px; border-radius: 0 4px 4px 0; margin: 24px 0;
}
.alert strong { color: var(--gold); }

ul.plain { padding-left: 20px; margin: 0 0 16px; }
ul.plain li { margin-bottom: 10px; }

footer {
  border-top: 1px solid var(--rule); margin-top: 70px;
  background: var(--sunken);
}
footer .top-in { padding: 30px 24px 44px; display: block; }
footer p { font-size: 14px; color: var(--faint); max-width: 62ch; }
footer a { color: var(--muted); }
footer a:hover { color: var(--gold); }
.flinks { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14.5px; }

@media (max-width: 560px) {
  .facts div { grid-template-columns: 1fr; gap: 3px; }
  .top-in { gap: 14px; }
  nav { gap: 16px; }
}

/* ── the consent bar ──
 * Deliberately not a modal and not full-screen: it asks a small question and
 * the page behind it is readable while it is up. Nothing loads until it is
 * answered, so it is honest to keep it quiet. */
.cookiebar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 620px; margin: 0 auto;
  background: var(--raise); border: 1px solid var(--rule-firm);
  border-radius: 5px; padding: 18px 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.cookiebar p { margin: 0; flex: 1 1 300px; font-size: 14.5px; color: var(--muted); }
.cookiebar-b { display: flex; gap: 10px; margin-left: auto; }
.cookiebar .btn { padding: 9px 18px; font-size: 14px; }
@media (max-width: 520px) { .cookiebar-b { width: 100%; } .cookiebar .btn { flex: 1; text-align: center; } }
