/* PENGOOF / $GOOF
   One scrolling column of windows over a live pool. The ground is a clip pushed
   through a water shader. Every panel is ONE real object: a poolside enamel
   notice board, generated, keyed off magenta and nine-sliced, so its rim, bolts
   and rust chips keep their own scale at any size. Nothing here is a CSS box,
   and no type is ever laid on the moving picture. */

@font-face { font-family: Roundo; src: url(../assets/font/Roundo-Regular.woff2) format("woff2");
             font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Roundo; src: url(../assets/font/Roundo-Medium.woff2) format("woff2");
             font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Roundo; src: url(../assets/font/Roundo-Bold.woff2) format("woff2");
             font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* measured off his own plates */
  --rim:    #013eaa;
  --rim-lo: #012f80;
  --cream:  #fdf4ca;
  --pink:   #fb5bb0;
  --orange: #f57a1a;
  --ink:    #10233f;
  --ink-2:  #4a5b74;
  --red:    #a52036;

  --slice: 150;                       /* board px kept unstretched per corner */
  --rimpx: clamp(22px, 3.4vw, 42px);
  --pad:   clamp(16px, 2.2vw, 30px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: Roundo, ui-rounded, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: #0b7fc0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

/* ---------- the ground --------------------------------------------------- */

#world {
  position: fixed; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; pointer-events: none; z-index: -2;
}
#pool { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; }
body.no-gl #world { opacity: 1; }
body.no-gl #pool { display: none; }

/* ---------- the ticker: a solid band, never type on the water ------------ */

.marquee {
  position: sticky; top: 0; z-index: 15;
  overflow: hidden; white-space: nowrap;
  background: var(--rim);
  border-bottom: 3px solid var(--cream);
  box-shadow: 0 3px 0 rgba(1, 30, 80, .45);
}
.marquee span {
  display: inline-block; padding: 9px 0;
  font-weight: 700; font-size: clamp(11px, 1.15vw, 14px); letter-spacing: .06em;
  color: var(--cream);
  animation: slide 26s linear infinite;
}
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- the column --------------------------------------------------- */

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 40px) clamp(10px, 2.2vw, 22px) clamp(60px, 9vh, 110px);
  display: flex; flex-direction: column;
  gap: clamp(20px, 3.2vw, 38px);
}

/* ---------- one window language, used eight times ------------------------ */

.panel {
  position: relative;
  display: flex; flex-direction: column;
  border-style: solid;
  border-width: var(--rimpx);
  border-image: url(../assets/img/panel.webp) var(--slice) fill / var(--rimpx) / 0 stretch;
  filter: drop-shadow(0 12px 16px rgba(1, 40, 90, .4));
}

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: calc(var(--rimpx) * -0.12);
  padding: .5em .85em;
  background: linear-gradient(180deg, #2a63d8, var(--rim));
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.bar h1, .bar h2 {
  font-size: clamp(12px, 1.25vw, 15px); font-weight: 500;
  letter-spacing: .02em; color: var(--cream);
}

.face {
  display: flex; flex-direction: column; gap: var(--pad);
  padding: var(--pad) 4px 4px;
}
.face--hero { align-items: center; text-align: center; gap: clamp(12px, 1.8vw, 20px); }

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

.wordmark { width: min(88%, 460px); height: auto; display: block; }
.tag {
  font-weight: 700; font-size: clamp(17px, 2.4vw, 28px);
  color: var(--rim);
}

.acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  padding: .42em .8em;
  font-size: clamp(12px, 1.15vw, 14px); font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 2px solid #c3cede;
  border-radius: 999px;
}
.chip--pill { font-weight: 700; color: #fff; border-color: transparent; }
.chip--pill.wait { background: var(--red); }
.chip--pill.ready { background: var(--orange); }
.chip--pill.live { background: #1f9b3c; }

/* ---------- his window: the clip fills the board ------------------------- */

.face--cam { padding: 0; }
.cam {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 6px; background: #7fd6ef;
}

/* ---------- controls ----------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .58em 1.15em;
  font: 700 clamp(13px, 1.15vw, 16px)/1 Roundo, sans-serif;
  color: var(--ink); background: #fff;
  border: 2px solid var(--rim); border-radius: 999px;
  box-shadow: 0 5px 0 var(--rim-lo);
  text-decoration: none; cursor: pointer;
  transition: transform .07s, box-shadow .07s;
}
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--rim-lo); }
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btn img { display: block; height: 1.2em; width: auto; }
.btn--go { background: var(--cream); }
.btn--sm { min-height: 38px; padding: .42em .85em; font-size: 13px; box-shadow: 0 3px 0 var(--rim-lo); }
.btn[aria-disabled="true"] { opacity: .55; box-shadow: none; cursor: default; }
.btn[aria-disabled="true"]:active { transform: none; }

/* ---------- text blocks -------------------------------------------------- */

.acro { text-align: center; font-size: clamp(18px, 2.4vw, 27px); font-weight: 500; }
.acro b { color: var(--orange); font-weight: 700; }

.note { font-size: clamp(13px, 1.2vw, 15px); color: var(--ink-2); line-height: 1.5; }
.note .k { color: var(--red); font-weight: 700; }

.ticket, .nom { display: grid; gap: .5em; }
.ticket > div, .nom > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1em;
  border-bottom: 2px dotted #c8d2e0; padding-bottom: .4em;
}
.ticket dt, .nom dt { font-size: clamp(13px, 1.2vw, 15px); color: var(--ink-2); }
.ticket dd { font-weight: 700; font-size: clamp(13px, 1.25vw, 16px); }
.nom dd {
  font-weight: 700; font-size: clamp(17px, 1.9vw, 24px);
  color: var(--rim); font-variant-numeric: tabular-nums;
}
.nom--live dd { font-size: clamp(15px, 1.6vw, 20px); }

.shift { font-weight: 700; font-size: clamp(15px, 1.7vw, 21px); line-height: 1.3; }

.pill {
  padding: .25em .7em; font-size: 11px; font-weight: 700; color: #fff;
  border-radius: 999px; background: var(--red);
}
.pill.live { background: #1f9b3c; }

.steps { padding-left: 1.3em; display: grid; gap: .45em; }
.steps li { font-size: clamp(14px, 1.35vw, 17px); }

/* ---------- contract ----------------------------------------------------- */

.ca { display: grid; gap: .6em; }
.ca__k { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.ca__v {
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  font-size: clamp(12px, 1.25vw, 16px); line-height: 1.5;
  word-break: break-all; user-select: all;
  background: #fff; border: 2px solid #c8d2e0; border-radius: 9px;
  padding: .6em .7em;
}
.ca__v.is-empty { color: var(--ink-2); font-style: italic; user-select: none; }
.ca__row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- the gallery -------------------------------------------------- */

.gal {
  list-style: none; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 20vw, 185px), 1fr));
}
.gal.collapsed li:nth-child(n+9) { display: none; }
.gal-more { display: flex; justify-content: center; }

.tile {
  display: block; width: 100%; padding: 0; cursor: pointer;
  background: #cfe6f4; border: 3px solid #fff; border-radius: 10px;
  overflow: hidden; box-shadow: 0 4px 0 rgba(1, 47, 128, .35);
  transition: transform .09s;
}
.tile img, .tile video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tile:hover { transform: translateY(-2px); }
.tile:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- sound: its own object at the pool edge ----------------------- */

.sound {
  position: fixed; right: clamp(12px, 2vw, 26px); bottom: clamp(12px, 2vh, 24px);
  z-index: 20;
  display: inline-flex; align-items: center; gap: .5em;
  min-height: 44px; padding: .5em 1em;
  font: 700 14px/1 Roundo, sans-serif; color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--rim); border-radius: 999px;
  box-shadow: 0 5px 0 var(--rim-lo); cursor: pointer;
}
.sound:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--rim-lo); }
.sound:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.sound__ico { width: 14px; height: 14px; border-radius: 50%; background: #c0392b;
              box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .18); }
.sound[aria-pressed="true"] .sound__ico { background: #35c14a; }

/* ---------- lightbox ----------------------------------------------------- */

.lb { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible; }
.lb::backdrop { background: rgba(2, 30, 62, .84); }
.lb__frame {
  border-style: solid; border-width: clamp(18px, 2.6vw, 34px);
  border-image: url(../assets/img/panel.webp) var(--slice) fill / clamp(18px, 2.6vw, 34px) / 0 stretch;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .5));
}
.lb__frame img, .lb__frame video {
  display: block; width: 100%; height: auto; max-height: 72vh;
  object-fit: contain; border-radius: 4px; background: #cfe6f4;
}
.lb__x { position: absolute; right: 0; top: 0; transform: translate(26%, -46%); }

/* ---------- toast -------------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 14px); z-index: 40;
  padding: .6em 1.1em; font: 700 14px/1 Roundo, sans-serif; color: var(--ink);
  background: var(--cream); border: 3px solid var(--rim); border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

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

@media (max-width: 620px) {
  :root { --rimpx: 20px; }
  .wrap { gap: 22px; }
  .gal { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .ticket > div, .nom > div { flex-direction: column; align-items: flex-start; gap: .1em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee span { animation: none; }
  .btn, .tile, .toast { transition: none; }
}
