/* The Taboo Tour — house style, lifted from the poster set (v6/render.py).
   Palette, type sizes and the gold-rule-between-blocks rhythm are the poster's;
   everything else is what those rules imply on a screen. */

:root {
  --green:     #113f2d;
  --green-dk:  #0b2b1f;
  --green-dkr: #071c14;
  --gold:      #c6a04a;
  --gold-lt:   #e8c97a;
  --cream:     #f5f0e1;
  --rule:      rgba(198, 160, 74, 0.35);
  --panel:     rgba(11, 43, 31, 0.86);

  --shell: 1080px;
  --head:  'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --script: 'Great Vibes', 'Snell Roundhand', cursive;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--green-dkr);
  color: var(--cream);
  font-family: var(--head);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* The poster is a signboard standing in front of a sunlit course. On screen
   that becomes a fixed backdrop the panels float over. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('/assets/course.jpg') center / cover no-repeat;
  opacity: 0.30;
  z-index: -2;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(17, 63, 45, 0.30), transparent 60%),
    linear-gradient(180deg, rgba(7, 28, 20, 0.55) 0%, rgba(7, 28, 20, 0.92) 100%);
  z-index: -1;
}

a { color: var(--gold-lt); }

/* --- Header ---------------------------------------------------------------- */

header.site {
  border-bottom: 2px solid var(--rule);
  background: rgba(7, 28, 20, 0.82);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.head-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
  margin-right: auto;
}
.brand img { height: 40px; width: auto; display: block; }
.brand > span {
  border-left: 1px solid var(--rule);
  padding-left: 12px;
}
.brand b {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--cream);
}
.brand span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold-lt);
  font-weight: 500;
}

nav.site { display: flex; gap: 6px; flex-wrap: wrap; }
nav.site a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 3px;
}
nav.site a:hover { border-color: var(--rule); color: var(--gold-lt); }
nav.site a[aria-current='page'] {
  border-color: var(--gold);
  color: var(--gold-lt);
  background: rgba(198, 160, 74, 0.10);
}

/* --- Layout ---------------------------------------------------------------- */

main { max-width: var(--shell); margin: 0 auto; padding: 32px 20px 72px; }

.panel {
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 30px;
  margin-bottom: 26px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  /* The poster's double border: a thin inner gold line inside the frame. */
  outline: 1px solid rgba(198, 160, 74, 0.30);
  outline-offset: -8px;
}
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

h1, h2, h3 { font-weight: 700; letter-spacing: 0.02em; margin: 0 0 14px; }
h1 { font-size: 46px; line-height: 1.06; text-transform: uppercase; }
h2 { font-size: 30px; text-transform: uppercase; }
h3 { font-size: 19px; text-transform: uppercase; color: var(--gold-lt); letter-spacing: 0.10em; }
p { margin: 0 0 14px; }
.lead { font-size: 19px; font-weight: 300; }
.muted { color: rgba(245, 240, 225, 0.62); font-weight: 300; }
.script { font-family: var(--script); color: var(--gold-lt); font-size: 34px; line-height: 1.2; }

/* The gold ribbon under the headline, as on every poster. */
.ribbon {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dk);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 26px;
  box-shadow: inset 0 0 0 2px rgba(11, 43, 31, 0.55);
  margin-bottom: 18px;
}

/* --- Hero ------------------------------------------------------------------ */

.hero { text-align: center; padding: 44px 30px; }
.hero h1 { font-size: 62px; margin-bottom: 6px; }
.plaques {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 22px;
  margin-bottom: 28px;
}
/* The two marks have opposite proportions — Taboo is a wide wordmark, Take 5 a
   tall lockup. A square card would fit the tall one to its height and leave it
   reading half the size of its neighbour, so the cards share a HEIGHT and each
   takes the width its own artwork needs. */
.plaque {
  height: 172px;
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.plaque.light { background: #fff; }
.plaque.dark  { background: #0a0a0a; }
.plaque img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

/* --- Row blocks, gold-ruled like the poster -------------------------------- */

.rows { margin: 26px 0; }
.row {
  text-align: center;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.row:first-child { border-top: 0; }
.row b {
  display: block;
  color: var(--gold-lt);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.row span { font-weight: 500; font-size: 20px; }

/* --- Stats ----------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat {
  text-align: center;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 20px 12px;
  background: rgba(17, 63, 45, 0.40);
}
.stat b { display: block; font-size: 42px; font-weight: 700; color: var(--gold-lt); line-height: 1; }
.stat span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 8px;
  color: rgba(245, 240, 225, 0.72);
}

/* --- Buttons --------------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dk);
  font-family: var(--head);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 13px 32px;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--gold-lt); }
.btn.ghost {
  background: transparent;
  color: var(--gold-lt);
  border: 2px solid var(--gold);
}
.btn.ghost:hover { background: rgba(198, 160, 74, 0.14); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* --- Tables ---------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-lt);
  padding: 12px 10px;
  border-bottom: 2px solid var(--rule);
  white-space: nowrap;
}
td { padding: 13px 10px; border-bottom: 1px solid rgba(198, 160, 74, 0.16); }
tbody tr:hover { background: rgba(198, 160, 74, 0.07); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { font-weight: 700; font-size: 19px; color: var(--gold-lt); width: 56px; }
tr.medal-1 { background: rgba(198, 160, 74, 0.15); }
tr.medal-1 .pos { font-size: 23px; color: var(--gold); }
tr.medal-2, tr.medal-3 { background: rgba(198, 160, 74, 0.07); }
.player-name { font-weight: 500; font-size: 18px; }
.total { font-weight: 700; font-size: 20px; color: var(--gold-lt); }
.form { display: flex; gap: 4px; justify-content: flex-end; }
.form i {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  min-width: 26px;
  text-align: center;
  padding: 3px 0;
  border-radius: 2px;
  background: rgba(198, 160, 74, 0.16);
  color: var(--cream);
}
tr.withdrawn { opacity: 0.45; }

/* --- Forms ----------------------------------------------------------------- */

.field { margin-bottom: 18px; }
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 7px;
}
input, textarea, select {
  width: 100%;
  font-family: var(--head);
  font-weight: 400;
  font-size: 17px;
  color: var(--cream);
  background: rgba(7, 28, 20, 0.75);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 12px 14px;
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 160, 74, 0.18);
}
textarea { min-height: 92px; resize: vertical; }
select option { background: var(--green-dk); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.hint { font-size: 13px; color: rgba(245, 240, 225, 0.55); margin-top: 6px; font-weight: 300; }

.note { padding: 14px 18px; border-radius: 3px; margin-bottom: 18px; font-weight: 500; }
.note.ok  { background: rgba(60, 140, 90, 0.22); border: 1px solid #4c9c6a; }
.note.err { background: rgba(150, 50, 40, 0.22); border: 1px solid #b4584c; }

/* --- Footer ---------------------------------------------------------------- */

footer.site {
  border-top: 2px solid var(--rule);
  background: rgba(7, 28, 20, 0.86);
  text-align: center;
  padding: 30px 20px 38px;
}
footer.site .venue { font-weight: 500; font-size: 17px; letter-spacing: 0.04em; }
footer.site .strap {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(245, 240, 225, 0.66);
  margin: 6px 0 10px;
}

/* --- Narrow screens -------------------------------------------------------- */

@media (max-width: 720px) {
  /* On a phone the wordmark alone identifies the site; the subtitle would
     wrap the header onto a second line. */
  .brand > span { display: none; }
  /* Seven nav items wrapped onto three rows and ate a third of the screen
     before any content. Tighter type and padding fit them into two. */
  .head-inner { padding: 10px 14px; gap: 10px; }
  nav.site { gap: 3px; }
  nav.site a { font-size: 12px; padding: 6px 8px; letter-spacing: 0.05em; }
  .brand img { height: 34px; }
  h1 { font-size: 34px; }
  .hero h1 { font-size: 40px; }
  h2 { font-size: 24px; }
  main { padding: 22px 16px 56px; }
  .panel { padding: 22px 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .plaques { gap: 14px; }
  .plaque { height: 124px; padding: 10px; }
  .hide-sm { display: none; }
}

/* --- Gallery ---------------------------------------------------------------- */

/* auto-fill rather than a fixed column count: four across on a desktop, two on
   a phone, without a breakpoint for each step. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.tile {
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: rgba(7, 28, 20, 0.6);
  cursor: pointer;
  overflow: hidden;
  /* A square tile whatever shape the photo is. The inner img is positioned
     absolutely: a button's intrinsic sizing otherwise lets the image's own
     aspect ratio win and the tile letterboxes. */
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.tile:hover { border-color: var(--gold); }
.tile:hover img { transform: scale(1.05); }
.tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* --- Lightbox --------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  /* Near-opaque: at 0.94 the sticky header read through it and competed
     with the photo. The gallery behind should be barely a texture. */
  background: rgba(4, 16, 11, 0.985);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lb-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lb-figure img {
  max-width: 100%;
  /* Leave room for the caption and the close button. */
  max-height: calc(100vh - 130px);
  object-fit: contain;
  border: 2px solid var(--gold);
  border-radius: 3px;
  display: block;
}
.lb-figure figcaption {
  color: var(--cream);
  font-size: 15px;
  font-weight: 300;
  text-align: center;
  max-width: 70ch;
}
.lb-figure figcaption:empty { display: none; }

.lb-close, .lb-nav {
  position: absolute;
  background: rgba(11, 43, 31, 0.85);
  color: var(--gold-lt);
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--head);
  line-height: 1;
}
.lb-close {
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  font-size: 30px;
}
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 68px;
  font-size: 36px;
}
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-close:hover, .lb-nav:hover { border-color: var(--gold); color: var(--cream); }

@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 9px; }
  .lb-nav { width: 40px; height: 58px; font-size: 30px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-figure img { max-height: calc(100vh - 150px); }
}
