/*===========================================================================
  Pier Pressure
  ---------------------------------------------------------------------------
  Direction: British seaside signwriting — pier, funfair and amusement-arcade
  lettering — meets 1980s arcade cabinet side art. Both traditions are flat,
  saturated, screen-printed and outlined in black, so the page is painted,
  not lit. No neon, no glow, no gradient meshes. Depth comes from hard offset
  shadows, the way a signwriter fakes it with a second pass of black.
===========================================================================*/

@font-face {
  font-family: "Bungee";
  src: url("fonts/bungee-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bungee Shade";
  src: url("fonts/bungee-shade-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  /* Paint. Six colours, all flat, all mixable by a sign painter. */
  --night: #0d2438;   /* painted board, the ground               */
  --night-2: #123049; /* one shade up, for panels on the ground  */
  --flame: #f04e23;   /* the red on every pier handrail          */
  --gold:  #f5b921;   /* signwriter's lettering yellow           */
  --jade:  #1e9e6a;   /* deckchair green                         */
  --chalk: #f4efe3;   /* off-white paint                         */
  --ink:   #120e0c;   /* the outline pass                        */

  --display: "Bungee", "Archivo", system-ui, sans-serif;
  --shade:   "Bungee Shade", "Bungee", system-ui, sans-serif;
  --body:    "Archivo", system-ui, -apple-system, sans-serif;

  --gut: clamp(1.25rem, 4vw, 3rem);
  --max: 74rem;
  --edge: 3px;                     /* the outline weight, everywhere */
  --drop: 6px 6px 0 var(--ink);    /* the offset shadow, never blurred */
}

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

body {
  margin: 0;
  background: var(--night);
  color: var(--chalk);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, canvas { display: block; max-width: 100%; }

:focus-visible {
  outline: var(--edge) solid var(--gold);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--gold); color: var(--ink);
  padding: 0.75rem 1.25rem; font-family: var(--display);
}
.skip:focus { left: 0; }

/*--- the bar -------------------------------------------------------------*/

.bar {
  display: flex; align-items: center; gap: var(--gut);
  flex-wrap: wrap;
  padding: 0.9rem var(--gut);
  border-bottom: var(--edge) solid var(--ink);
  background: var(--night-2);
}
.bar__mark {
  font-family: var(--display);
  font-size: 1.15rem; letter-spacing: 0.02em;
  color: var(--gold);
}
.bar__nav { display: flex; gap: 1.4rem; margin-right: auto; flex-wrap: wrap; }
.bar__nav a {
  color: var(--chalk); text-decoration: none;
  font-size: 0.83rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.09em;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
}
.bar__nav a:hover { border-bottom-color: var(--flame); }

.bar__status {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0;
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
}
.dot {
  width: 0.6rem; height: 0.6rem;
  background: var(--jade);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.bar__status[data-state="shut"] .dot { background: var(--flame); }

/*--- hero ----------------------------------------------------------------*/

.hero {
  padding: clamp(2rem, 4.5vw, 3.25rem) var(--gut) clamp(2rem, 5vw, 3.5rem);
}

.sign {
  font-family: var(--shade);
  font-size: clamp(2.9rem, 11.5vw, 7.75rem);
  line-height: 0.88;
  margin: 0;
  color: var(--gold);
  letter-spacing: -0.01em;
}
.sign__sub {
  margin: 0.9rem 0 0;
  font-family: var(--display);
  font-size: clamp(0.72rem, 2vw, 0.95rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chalk);
}
.sign__sub span { color: var(--flame); }

/*--- the signature: a playable cabinet ------------------------------------*/

.game { margin-top: clamp(1.75rem, 4vw, 2.75rem); }

.game__screen {
  position: relative;
  border: var(--edge) solid var(--ink);
  box-shadow: var(--drop);
  background: var(--night-2);
  overflow: hidden;
}
#canvas {
  /* The game thinks in a fixed 900x420 space; the box just scales it. */
  width: 100%; height: auto;
  aspect-ratio: 900 / 420;
  touch-action: none;
  cursor: pointer;
}

.game__hud {
  position: absolute; inset: 0 0 auto 0;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 0.9rem;
  pointer-events: none;
}
.hud {
  display: flex; align-items: baseline; gap: 0.45rem;
  font-family: var(--display);
  font-size: clamp(0.6rem, 1.6vw, 0.8rem);
  letter-spacing: 0.08em;
}
.hud b { color: var(--chalk); opacity: 0.65; font-weight: 400; }
.hud i { font-style: normal; color: var(--gold); }
.hud--best i { color: var(--jade); }

.game__veil {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.9rem;
  padding: 1.25rem;
  text-align: center;
  background: rgba(13, 36, 56, 0.74);
}
.game__veil[hidden] { display: none; }
.veil__line {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.1rem, 4vw, 1.9rem);
  color: var(--gold);
}
.veil__hint {
  margin: 0; max-width: 26rem;
  font-size: 0.82rem; color: var(--chalk); opacity: 0.75;
}
kbd {
  font-family: var(--body); font-weight: 700; font-size: 0.78rem;
  background: var(--chalk); color: var(--ink);
  border: 2px solid var(--ink);
  padding: 0.05rem 0.4rem;
}
.game__foot {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--chalk); opacity: 0.7;
  max-width: 44ch;
}

/*--- buttons -------------------------------------------------------------*/

.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.85rem; letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  color: var(--ink);
  border: var(--edge) solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn--gold  { background: var(--gold); }
.btn--flame { background: var(--flame); color: var(--chalk); }
.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); }

/*--- shared section furniture --------------------------------------------*/

/* One pattern for every section: the section runs the full width and owns the
   padding, and .wrap owns the measure. Constraining some sections and not
   others put their content on two different left edges. */
.rates, .floor, .nights, .visit {
  padding: clamp(3rem, 7vw, 5rem) var(--gut);
}
.floor, .visit { border-top: var(--edge) solid var(--ink); }
.wrap { max-width: var(--max); margin-inline: auto; }
.floor { background: var(--night-2); }

.head {
  font-family: var(--display);
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  line-height: 1.1;
  margin: 0 0 0.85rem;
  color: var(--chalk);
}
.head__eyebrow {
  display: block;
  color: var(--flame);
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.36em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.lede { margin: 0 0 2rem; max-width: 52ch; opacity: 0.85; }
.fine { margin: 1.75rem 0 0; font-size: 0.85rem; opacity: 0.7; max-width: 56ch; }

/*--- the price board -----------------------------------------------------*/

.board {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.tile {
  border: var(--edge) solid var(--ink);
  box-shadow: var(--drop);
  padding: 1.4rem 1.3rem 1.5rem;
  color: var(--ink);
}
.tile--flame { background: var(--flame); color: var(--chalk); }
.tile--gold  { background: var(--gold); }
.tile--jade  { background: var(--jade); color: var(--chalk); }
.tile--chalk { background: var(--chalk); }

.tile__what {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.tile__price {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1;
}
.tile__price span {
  display: block;
  font-family: var(--body);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase;
  margin-top: 0.5rem; opacity: 0.8;
}
.tile__note { margin: 0; font-size: 0.86rem; line-height: 1.5; opacity: 0.88; }

/*--- the floor -----------------------------------------------------------*/

/* These two sections carry no lede, so the grid supplies the gap the lede
   would have given the heading. */
.floor__grid {
  margin-top: 2rem;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.card {
  border-left: var(--edge) solid var(--gold);
  padding: 0.1rem 0 0.1rem 1.25rem;
}
.card:nth-child(2) { border-left-color: var(--flame); }
.card:nth-child(3) { border-left-color: var(--jade); }
.card:nth-child(4) { border-left-color: var(--chalk); }
.card h3 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: 1rem; letter-spacing: 0.01em;
  color: var(--chalk);
}
.card p { margin: 0; font-size: 0.92rem; opacity: 0.82; }

/*--- tournament schedule -------------------------------------------------*/

.sched {
  width: 100%;
  border-collapse: collapse;
  border: var(--edge) solid var(--ink);
  box-shadow: var(--drop);
  background: var(--night-2);
  text-align: left;
}
.sched th, .sched td {
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--ink);
  font-size: 0.9rem;
  font-weight: 400;
}
.sched thead th {
  background: var(--ink);
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.7rem; letter-spacing: 0.11em; text-transform: uppercase;
}
.sched tbody th {
  font-family: var(--display);
  font-size: 0.82rem;
  color: var(--chalk);
}
.sched tbody tr:last-child th,
.sched tbody tr:last-child td { border-bottom: 0; }
.sched tbody tr[data-today] { background: var(--gold); color: var(--ink); }
.sched tbody tr[data-today] th { color: var(--ink); }

/*--- visit ---------------------------------------------------------------*/

.visit__grid {
  margin-top: 2rem;
  display: grid; gap: 2.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.visit__block h3 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: 0.78rem; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--flame);
}
.visit__block p { margin: 0 0 0.9rem; font-size: 0.95rem; }
.visit__block .visit__aside { font-size: 0.83rem; opacity: 0.65; }

.hours { margin: 0; font-size: 0.92rem; }
.hours > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(244, 239, 227, 0.14);
}
.hours dt { font-weight: 600; }
.hours dd { margin: 0; opacity: 0.8; font-variant-numeric: tabular-nums; }
.hours > div[data-today] { color: var(--gold); }
.hours > div[data-today] dd { opacity: 1; }

/*--- foot ----------------------------------------------------------------*/

.foot {
  border-top: var(--edge) solid var(--ink);
  background: var(--ink);
  padding: clamp(2.25rem, 5vw, 3rem) var(--gut);
  text-align: center;
}
.foot p { margin: 0 0 0.6rem; font-size: 0.85rem; opacity: 0.7; }
.foot .foot__mark {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--gold);
  opacity: 1;
}
/* Scoped, because the bare class loses to `.foot p` on specificity and the
   line silently stops centring. */
.foot .foot__spec {
  max-width: 46ch;
  margin: 0 auto;
  font-size: 0.78rem; opacity: 0.45;
}

/*--- narrow --------------------------------------------------------------*/

@media (max-width: 40rem) {
  /* Two rows: the mark and the open/closed line share the first, the nav takes
     the second. Left to wrap on its own the status landed on a row by itself. */
  .bar { gap: 0.6rem 1rem; padding-inline: 1.1rem; }
  .bar__mark { font-size: 1rem; }
  .bar__nav { order: 3; width: 100%; margin-right: 0; gap: 1rem; }
  .bar__status { margin-left: auto; font-size: 0.68rem; letter-spacing: 0.06em; }

  /* The canvas is only ~180px tall at this width, so the overlay has to be
     shorter than it is on the desktop or it centres itself over the HUD. The
     keyboard hint goes first: there is no Space bar on a phone. */
  .veil__hint { display: none; }
  .game__veil { gap: 0.6rem; padding: 0.75rem; }
  .veil__line { font-size: 1.05rem; }
  .btn { padding: 0.7rem 1.2rem; font-size: 0.78rem; }
  .game__hud { padding: 0.45rem 0.6rem; }
  /* No room for four columns. Each row becomes a small block instead: the
     night and its start time on one line, then the game, then the format.
     Every cell is placed explicitly — auto-placement put the start time
     underneath the game and left a hole where the format should be. */
  .sched thead { display: none; }
  .sched tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--ink);
  }
  .sched tbody tr:last-child { border-bottom: 0; }
  .sched tbody th, .sched tbody td { padding: 0; border-bottom: 0; }
  .sched tbody th { grid-column: 1; grid-row: 1; }
  .sched tbody td:nth-of-type(1) { grid-column: 1 / -1; grid-row: 2; padding-top: 0.35rem; }
  .sched tbody td:nth-of-type(2) { grid-column: 1 / -1; grid-row: 3; opacity: 0.72; font-size: 0.85rem; }
  .sched tbody td:nth-of-type(3) {
    grid-column: 2; grid-row: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}
