:root {
  --ink: #1c1c1c;
  --green: #2b6a14;
  --line: #d8d8d8;
  --white: #ffffff;
}

* { box-sizing: border-box; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 19px;
  line-height: 1.5;
}

main { flex: 1; }
h1, h2, p { margin: 0; font-weight: 400; }
h1 { font-size: 2.3rem; line-height: 1.15; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.wrap { width: min(820px, 100% - 40px); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 12px;
}
.brand { display: block; }
.brand img { display: block; width: auto; height: 54px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--green); }
.site-nav a[aria-current="page"] { color: var(--green); text-decoration: underline; }

.page { padding-block: 52px 72px; }
.home { padding-block: 64px 72px; text-align: center; }
.home img { display: block; width: min(440px, 85vw); height: auto; margin: 0 auto 32px; }
.home h1 { max-width: 16em; margin-inline: auto; }
.home p { margin-top: 14px; }
.home .intro { max-width: 34em; margin-inline: auto; }

.rows { margin-top: 10px; border-top: 1px solid var(--ink); }
.row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 2px 16px;
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}
.row.schedule { grid-template-columns: 170px minmax(0, 1fr) auto; }
.row.single { grid-template-columns: minmax(0, 1fr); }

.captain-name { font-size: 1.2rem; line-height: 1.3; }
.captain-bio { max-width: 44em; margin-top: 6px; font-size: 17px; line-height: 1.55; }
.captain summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}
.captain summary::-webkit-details-marker { display: none; }
.captain summary::after { content: "+"; color: var(--green); font-size: 1.25rem; line-height: 1; }
.captain[open] summary::after { content: "\2212"; }
.captain summary:hover .captain-name { color: var(--green); }

.year { margin-top: 34px; font-size: 1.35rem; }
.year + .rows { margin-top: 8px; }

.merch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 18px; }
.merch figure { margin: 0; }
.merch img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
}
.merch img.dark { padding: 0; background: #000000; border-color: #000000; }

/* Search */
.site-search { position: relative; flex: 0 0 130px; }
.site-search input {
  width: 100%;
  padding: 5px 9px;
  background: var(--white);
  border: 1px solid #8c8c8c;
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  appearance: none;
}
.site-search input::placeholder { color: #666666; }
.site-search input:focus { border-color: var(--green); outline: 1px solid var(--green); }
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 100;
  width: min(340px, calc(100vw - 40px));
  max-height: 390px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--ink);
}
.search-result {
  display: block;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  line-height: 1.3;
  text-decoration: none;
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover, .search-result[aria-selected="true"] { background: #fff6c2; color: var(--ink); }
.search-title { display: block; font-size: 17px; }
.search-sub { display: block; color: #555555; font-size: 14px; }
.search-empty { padding: 10px 11px; font-size: 16px; }
.row:target { background: #fff6c2; box-shadow: -8px 0 0 #fff6c2, 8px 0 0 #fff6c2; }
#contact:target { background: #fff6c2; }
.not-found { margin-top: 10px; }
figure:target img { outline: 3px solid var(--green); outline-offset: 2px; }

@media (max-width: 880px) {
  .site-search { flex: 1 0 100%; order: 3; }
  .search-results { left: 0; right: auto; width: 100%; }
}

/* Lemon cursor */
html.lemon-on, html.lemon-on * { cursor: none !important; }
.lemon {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  width: 46px;
  height: 34px;
  opacity: 0;
  pointer-events: none;
}
.lemon.show { opacity: 1; }
.lemon-body { width: 46px; height: 34px; transform-origin: 2px 18px; }
.lemon svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lemon .eye { transform-box: fill-box; transform-origin: center; }
.lemon.blink .eye { transform: scaleY(0.1); }
.lemon .happy, .lemon .sleepy { display: none; }
.lemon[data-mood="happy"] .happy,
.lemon[data-mood="sleepy"] .sleepy { display: inline; }
.lemon[data-mood="happy"] .normal,
.lemon[data-mood="sleepy"] .normal { display: none; }

.juice {
  position: fixed;
  z-index: 9998;
  width: 7px;
  height: 7px;
  background: var(--juice, #ffd60a);
  border: 1px solid #8a6d00;
  border-radius: 0 50% 50% 50%;
  pointer-events: none;
  animation: juice 480ms ease-out forwards;
}
@keyframes juice {
  from { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); opacity: 1; }
  to { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)) scale(0.3); opacity: 0; }
}

@media (max-width: 600px) {
  h1 { font-size: 1.95rem; }
  .merch { grid-template-columns: minmax(0, 1fr); }
  .page { padding-block: 36px 52px; }
  .home { padding-block: 44px 52px; }
  .row.schedule { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 400px) {
  .site-nav { gap: 2px 11px; font-size: 17px; }
}
