@font-face {
  font-family: Display;
  src: url("/assets/fonts/SofiaSansExtraCondensed.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Text;
  src: url("/assets/fonts/GolosText.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3f0e8;
  --ink: #1c1916;
  --muted: #6f6b64;
  --line: #ddd6cb;
  --card: #fff;
  --blue: #245a78;
  --red: #f04b3a;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Text, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
}

a { color: inherit; }

.stripe {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #ffc627 0 35%, #00c9dc 35% 65%, #43c65f 65% 100%);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 640px;
  padding: 1.4rem 0 3.2rem;
  color: white;
  background: #161616 url("/assets/photos/group.jpg") center 28% / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18) 42%, rgba(0, 0, 0, 0.55));
}

.hero > * { position: relative; z-index: 1; }

.hero.compact { min-height: 250px; padding-bottom: 1.6rem; }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem 1.5rem;
  width: min(820px, 100%);
  margin-top: 0.4rem;
}

.nav a,
.search-open {
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 white; }

.search-open {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.search-open svg { width: 22px; height: 22px; }

.search-form,
.search-page {
  display: flex;
  gap: 0.45rem;
  width: min(640px, 100%);
  margin-top: 0.8rem;
}

.search-form[hidden] { display: none; }

.search-form input,
.search-page input,
.search-form button,
.search-page button,
.read-btn,
#clear-read,
.view-switch button,
.close {
  font: inherit;
}

.search-form input,
.search-page input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid #c9c3b8;
  background: white;
  color: var(--ink);
  font-size: 1.05rem;
}

.search-form button,
.search-page button,
.read-btn,
#clear-read {
  border: 1px solid #c9c3b8;
  background: white;
  color: var(--ink);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.search-form button:hover,
.search-page button:hover,
.read-btn:hover,
#clear-read:hover,
.play:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.hero .nav,
.hero .search-form,
.hero-copy {
  box-sizing: border-box;
  width: min(1040px, 100%);
  margin-right: auto;
  margin-left: auto;
  padding-right: 1.1rem;
  padding-left: 1.1rem;
}

.hero-copy { width: min(1040px, 100%); }

.logo {
  display: block;
  margin: 3.4rem 0 0;
  color: white;
  font-family: Display, "Arial Narrow", sans-serif;
  font-size: clamp(3.1rem, 8vw, 6.4rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: 0.01em;
  text-align: left;
  text-decoration: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.hero.compact .logo {
  margin-top: 1.5rem;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
}

.stair { margin: 1.5rem 0 0; }

.stair span {
  display: block;
  margin-left: calc(var(--x, 0) * 1em);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.3;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.section-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1040px;
  min-height: 132px;
  margin: 3.2rem auto 0.4rem;
  padding: 0 1.1rem;
}

.wave {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='12' viewBox='0 0 72 12'%3E%3Cpath d='M0 7 Q9 1 18 7 T36 7 T54 7 T72 7' fill='none' stroke='%23d9d2c6' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
}

.hex {
  z-index: 1;
  grid-column: 2;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 124px;
  color: white;
  background: var(--red);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.hex small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hex strong {
  font-family: Display, sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.more {
  z-index: 1;
  grid-column: 3;
  justify-self: end;
  padding: 0 0.35rem;
  background: var(--paper);
  color: #8d887f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

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

.cards,
.shots,
.hits {
  display: grid;
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto 1rem;
  padding: 0 1.1rem 1.5rem;
}

.cards { grid-template-columns: repeat(3, 1fr); margin-top: 2rem; }

.card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 1.5rem 1.35rem 1.1rem;
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.card h3 {
  margin: 0 0 0.8rem;
  color: var(--blue);
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 1.35rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

.card .year {
  margin-bottom: 0.7rem;
  color: var(--red);
  font-family: Display, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.04em;
}

.card .go {
  margin-top: auto;
  padding-top: 1.4rem;
  color: #8a8680;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.card:hover h3 { color: var(--red); }

.seen {
  display: none;
  margin-bottom: 0.4rem;
  color: #2f7d46;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.seen.on { display: inline; }

.player {
  max-width: 1040px;
  margin: 1rem auto 0;
  padding: 2.2rem 1.1rem 1rem;
  text-align: center;
}

.player h2 {
  margin: 0;
  font-family: Display, "Arial Narrow", sans-serif;
  font-size: clamp(3.2rem, 10vw, 6.6rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
}

.controls {
  display: flex;
  align-items: center;
  width: min(460px, 100%);
  margin: 1.4rem auto 0;
}

.nib,
.play {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  line-height: 0;
  border-radius: 50%;
}

.nib {
  width: 52px;
  height: 52px;
  color: white;
  background: var(--red);
  border: 0;
}

.nib svg { width: 24px; height: 24px; display: block; }

.play {
  width: 108px;
  height: 108px;
  margin: 0;
  color: var(--red);
  background: transparent;
  border: 3px solid var(--red);
  cursor: pointer;
}

.play svg { width: 54px; height: 54px; display: block; }

.line { flex: 1; height: 2px; background: var(--red); }

.stage {
  position: relative;
  width: min(960px, 100%);
  height: clamp(300px, 46vh, 480px);
  margin: 1.1rem auto 0;
  overflow: hidden;
  container-type: size;
}

.stage[hidden] { display: none; }

.beat {
  position: absolute;
  inset: 0;
  z-index: var(--z, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  font-family: Display, "Arial Narrow", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

.stage.is-on .beat {
  animation: hold 1.45s ease forwards;
  animation-delay: var(--d, 0s);
}

@keyframes hold {
  0% { opacity: 0; }
  16% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

.stage.is-on .b-question { animation-name: stay; }

@keyframes stay {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 1; }
}

.giant {
  color: var(--red);
  font-size: 62cqh;
  line-height: 0.72;
}

.up {
  font-size: 7cqh;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.side {
  color: var(--red);
  font-size: 6.2cqh;
  line-height: 0.95;
}

.b-ya,
.b-show { gap: 2cqw; }

.giant { font-size: 46cqh; }

.b-splash { font-size: 8cqh; letter-spacing: 0.03em; }

.stage.is-on .b-splash { animation-name: sweep; }

@keyframes sweep {
  0% { opacity: 0; transform: translateX(28%); }
  16% { opacity: 1; transform: none; }
  70% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateX(-18%); }
}

.b-slant { font-size: 7.2cqh; }

.stage.is-on .b-slant { animation-name: tilt; }

@keyframes tilt {
  0% { opacity: 0; transform: rotate(-14deg); }
  16% { opacity: 1; transform: rotate(-7deg); }
  70% { opacity: 1; transform: rotate(-7deg); }
  100% { opacity: 0; transform: rotate(-7deg); }
}

.b-stack {
  flex-direction: column;
  font-size: 8cqh;
  line-height: 1.05;
}

.b-stack span { display: block; }

.b-bar {
  color: var(--paper);
  font-size: 6.4cqh;
  background: linear-gradient(transparent 36%, var(--red) 36%, var(--red) 64%, transparent 64%);
}

.b-ask { gap: 3cqw; }
.b-ask b { font-size: 22cqh; line-height: 0.78; }
.b-ask span { font-size: 5.6cqh; line-height: 1.02; text-align: left; }

.b-flute { color: var(--red); font-size: 7cqh; }
.b-flute i { color: var(--ink); font-style: normal; }

.b-question { font-size: 42cqh; line-height: 0.75; }

.shots { grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 2rem; }

.library {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.1rem 2.5rem;
}

.library .toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  align-items: center;
  column-gap: 2rem;
  max-width: none;
  margin-top: 0.4rem;
  padding: 0;
}
.library .view-switch { flex-wrap: nowrap; min-height: 2.2rem; }
.library .count { margin: 1rem 0 0; }

.lib-q {
  width: 18rem;
  min-width: 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 0.25rem 0;
}

.shelf { margin: 0 0 2.2rem; }
.shelf h2 {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0.2rem 0 0;
  font-family: Display, sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
}
.shelf h2 span { color: var(--muted); font-size: 1.3rem; }

.shots.archive {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  max-width: none;
  margin-top: 0.8rem;
  padding: 0;
}

.shot {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: zoom-in;
}

.shot img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #e7e1d6;
  padding: 8px;
}

.shots.archive .shot img {
  height: 230px;
  object-fit: contain;
  background: #e7e1d6;
  padding: 8px;
}

.shot small {
  display: block;
  margin-top: 0.35rem;
  color: var(--red);
  font-family: Display, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.shot span {
  display: block;
  padding: 0.45rem 0.1rem 0;
  font-size: 0.92rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  max-width: 1040px;
  margin: 1.6rem auto 0;
  padding: 0 1.1rem;
}

.view-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.9rem; color: var(--muted); }

.view-switch button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.view-switch button[aria-pressed="true"] { border-color: var(--red); }

.years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  max-width: 1040px;
  margin: 1rem auto 0;
  padding: 0 1.1rem;
}

.years a {
  color: var(--ink);
  font-family: Display, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  opacity: 0.45;
}

.years a:hover { opacity: 1; color: var(--blue); }

.year-block { max-width: 1040px; margin: 0 auto; }
.year-block h2 {
  max-width: 1040px;
  margin: 1.4rem 0 0.2rem;
  padding: 0 1.1rem;
  font-family: Display, sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
}

.sheet {
  max-width: 1040px;
  margin: 2rem auto 3rem;
  padding: 0 1.1rem;
}

.sheet h1 {
  margin: 0 0 1rem;
  font-family: Display, sans-serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 0.9;
}

.sheet .year {
  margin: 0;
  color: var(--red);
  font-family: Display, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
}

.note {
  margin-top: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.poem-text { overflow-x: auto; }

.poem-text p { margin: 0 0 1rem; }

.poem-text span {
  display: block;
  margin-left: calc(var(--x, 0) * 1em);
  font-size: 1.2rem;
  line-height: 1.45;
}

.prose p { font-size: 1.12rem; line-height: 1.6; }
.prose .verse { margin: 1.2rem 0 1.4rem; line-height: 1.45; }
.prose a { color: var(--blue); }

.actions { display: flex; align-items: center; gap: 1.2rem; margin-top: 2rem; }
.actions a { color: var(--blue); }
.read-btn.is-on { color: #2f7d46; border-color: #2f7d46; }

.hits { grid-template-columns: 1fr; }

.hit {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.hit small {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hit strong { font-size: 1.25rem; }
.hit span { color: var(--muted); }
.hit[hidden] { display: none !important; }
.count { color: var(--muted); }

.site-foot {
  padding: 2.5rem 1.2rem 3rem;
  color: var(--muted);
  text-align: center;
}

.site-foot p { margin: 0.2rem 0; }
.site-foot a { color: var(--blue); }

dialog {
  max-width: min(960px, 94vw);
  padding: 0;
  border: 0;
  background: transparent;
}

dialog form {
  margin: 0 0 0.45rem;
  text-align: right;
}

dialog::backdrop { background: rgba(0, 0, 0, 0.9); }

dialog figure { margin: 0; }

dialog img {
  display: block;
  max-width: min(960px, 94vw);
  max-height: 82vh;
  margin: 0 auto;
}

dialog figcaption {
  padding: 0.7rem 0.2rem 0;
  color: white;
  text-align: center;
}

.close {
  color: white;
  background: rgba(0, 0, 0, 0.45);
  border-color: transparent;
}

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

@media (max-width: 860px) {
  .cards,
  .shots { grid-template-columns: 1fr; }
  .shots.archive { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 520px; }
  .section-head { grid-template-columns: 1fr; justify-items: center; gap: 0.8rem; }
  .hex, .more { grid-column: auto; }
  .more { justify-self: center; }
  .shot img { height: 260px; }
  .library .toolbar { grid-template-columns: 1fr; row-gap: 0.8rem; }
  .library .view-switch { flex-wrap: wrap; }
  .lib-q { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage.is-on {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: auto !important;
    overflow: visible;
  }
  .stage.is-on .beat,
  .stage.is-on .b-splash,
  .stage.is-on .b-slant,
  .stage.is-on .b-question {
    position: relative;
    inset: auto;
    height: auto;
    opacity: 1;
    animation: none;
    transform: none;
    background: none;
    color: var(--ink);
  }
}
