:root {
  --bg: #f3eee4;
  --bg-2: #e7e0d2;
  --plate: #ddd4c4;
  --ink: #1c1915;
  --muted: #4e493f;
  --faint: #5e574c;
  --line: #d4cbbd;
  --accent: #1d4e78;
  --header: #f3eee4;
  --shadow: 0 22px 50px rgba(48, 32, 14, 0.12);
  --chip: #e4dccb;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #10141b;
  --bg-2: #191f2a;
  --plate: #1a2030;
  --ink: #f3ecdf;
  --muted: #cfc6b8;
  --faint: #b7ad9f;
  --line: #2c3444;
  --accent: #e0c48a;
  --header: #10141b;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  --chip: #242b38;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h, 4.5rem) + 3.4rem);
}

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(255, 250, 240, 0.7), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(48, 58, 88, 0.45), transparent 50%),
    var(--bg);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.page {
  width: min(1672px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.top-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.35rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  text-decoration: none;
  margin-right: auto;
}

.brand svg {
  display: block;
  color: var(--ink);
}

.brand strong {
  display: block;
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.nav {
  display: flex;
  gap: 1.25rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 1rem;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--ink);
}

.switch {
  display: flex;
  flex-shrink: 0;
  padding: 0.2rem;
  background: var(--chip);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}

html[data-theme="light"] .switch button[data-set-theme="light"],
html[data-theme="dark"] .switch button[data-set-theme="dark"] {
  background: var(--ink);
  color: var(--bg);
}

.hero {
  padding: 4.5rem 0 1rem;
}

.eyebrow,
.kicker {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h1 {
  margin: 0;
  font-size: clamp(3.1rem, 6vw, 5.4rem);
}

.num {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  margin-right: 0.55rem;
}

h1 em {
  font-style: italic;
  font-weight: 480;
  color: var(--accent);
}

.lede {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--muted);
}

.rooms-wrap {
  padding: 3.5rem 0 1rem;
}

.rooms-wrap h2,
.screens-intro h2,
.ground h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 3vw, 2.7rem);
}

.rooms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 62rem;
}

.room {
  padding-right: 2.5rem;
}

.room + .room {
  padding-right: 0;
  padding-left: 2.5rem;
  border-left: 1px solid var(--line);
}

.room .kicker {
  color: var(--accent);
}

.room h3 {
  margin: 0 0 0.85rem;
  font-size: 1.85rem;
}

.room p {
  margin: 0;
  color: var(--muted);
}

.ground {
  margin: 3rem 0 1rem;
  padding: 1.75rem 1.75rem 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 62rem;
}

.ground h2 {
  font-size: 1.7rem;
  margin-bottom: 1.1rem;
}

.ground dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 0;
}

.ground dt {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.ground dd {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.scribes {
  margin: 1.25rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.02rem;
}

.screens-intro {
  padding-top: 4.5rem;
  max-width: 40rem;
}

.screens-intro p {
  margin: 0;
  color: var(--muted);
}

.index {
  position: sticky;
  top: calc(var(--header-h, 4.5rem) - 1px);
  z-index: 25;
  margin: 1.75rem 0 0.25rem;
  padding: 0.55rem 0;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.index-scroll {
  display: flex;
  gap: 1.35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.index-scroll::-webkit-scrollbar {
  display: none;
}

.index a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--faint);
  font-size: 0.98rem;
  padding: 0.35rem 0 0.45rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.index a[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.figure {
  margin: 4.25rem 0 0;
}

.cap {
  max-width: 40rem;
  margin-bottom: 1.15rem;
}

.cap h3 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.8rem, 2.5vw, 2.35rem);
}

.cap p {
  margin: 0;
  color: var(--muted);
}

.study {
  margin-left: 0.75rem;
  letter-spacing: 0.12em;
}

html[data-theme="light"] .when-dark,
html[data-theme="dark"] .when-light {
  display: none;
}

.plate {
  position: relative;
  aspect-ratio: 1672 / 941;
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.plate img.shot:not([src]) {
  display: none;
}

.foot {
  margin: 5rem 0 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 0.98rem;
}

.foot a {
  color: var(--muted);
}

@media (max-width: 860px) {
  .page {
    width: min(1672px, calc(100% - 1.5rem));
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 1rem;
  }

  .rooms,
  .ground dl {
    grid-template-columns: 1fr;
  }

  .room,
  .room + .room {
    padding: 0;
    border: 0;
  }

  .room + .room {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
  }

  h1 {
    max-width: none;
  }

  .hero {
    padding-top: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
