/* =========================================================================
   JUGAR POOL — landing
   A pool hall at night, not a startup: tournament-blue and green cloth
   under warm lamps, wooden rails, brass fittings, chalk on a slate, and
   numbered balls marking each section. No web fonts (it must load fast and
   work offline): a classic serif for headings, the system face for text.
   ========================================================================= */
:root {
  color-scheme: dark;
  --night: #071119;
  --blue-felt: #0f3a5c;
  --blue-felt-lit: #1d5e8c;
  --felt-deep: #0c2d22;
  --felt: #15573f;
  --felt-lit: #2c8a62;
  --panel: rgba(14, 34, 46, 0.78);
  --line: rgba(236, 199, 119, 0.18);
  --line-strong: rgba(236, 199, 119, 0.45);
  --ink: #f5efe1;
  --muted: #a9bcc2;
  --brass: #e2b25a;
  --brass-hi: #f7d892;
  --brass-lo: #9c7330;
  --chalk: #8fd0f5;
  --slate: #1b2426;
  --wood: #4a2c1b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  font-family: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background-color: var(--night); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  /* The hall at night: blue cloth to one side, green to the other, and the
     warm pools of the lamps over the tables */
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse 55% 40% at 72% 0%, rgba(255, 205, 120, 0.3), transparent 70%),
    radial-gradient(ellipse 60% 55% at 0% 25%, rgba(29, 94, 140, 0.45), transparent 70%),
    radial-gradient(ellipse 60% 55% at 100% 70%, rgba(44, 138, 98, 0.32), transparent 70%),
    linear-gradient(180deg, #0b1f2c 0%, var(--night) 45%, #050c11 100%);
  background-attachment: fixed;
}
/* The nap of the cloth: a whisper of noise over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.8 0 0 0 0 0.7 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3 { margin: 0; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 4px; border-radius: 4px; }
section[id] { scroll-margin-top: 6.5rem; }

.wrap { width: min(100% - 3rem, 74rem); margin-inline: auto; }

.skip-link {
  position: absolute;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  color: #1d1408;
  background: var(--brass);
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

/* ---- Fixed menu: a brass-edged pill floating over the felt --------------- */
.site-header {
  position: fixed;
  top: 0.85rem;
  left: 50%;
  z-index: 50;
  width: min(100% - 1.5rem, 74rem);
  transform: translateX(-50%);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.45rem 0.5rem 0.45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 22, 31, 0.6);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(247, 216, 146, 0.1);
  transition: background 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.site-header.is-scrolled .header-inner {
  border-color: var(--line-strong);
  background: rgba(6, 17, 24, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(247, 216, 146, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  font: 700 1.3rem/1 var(--serif);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand > span:last-child { color: var(--brass); font-style: italic; }
/* An 8 ball: black, with its white circle */
.brand-ball {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #5c6166 0, #16181b 42%, #050506 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.brand-ball i {
  display: grid;
  place-items: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #f6f1e4;
  color: #111;
  font: 800 0.62rem/1 var(--sans);
  font-style: normal;
}

.site-header nav { display: flex; gap: 0.2rem; margin-left: auto; }
.site-header nav a {
  position: relative;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.site-header nav a:hover { color: var(--ink); background: rgba(247, 216, 146, 0.08); }
/* The section on screen: a chalk-blue dot, like a cue tip */
.site-header nav a.is-current { color: var(--ink); }
.site-header nav a.is-current::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.12rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--chalk);
  box-shadow: 0 0 8px var(--chalk);
  transform: translateX(-50%);
}

/* Music: four little bars that dance while the blues plays */
.music-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 0.88rem var(--sans);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.music-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.music-toggle.is-playing { color: var(--brass-hi); border-color: var(--line-strong); background: rgba(226, 178, 90, 0.14); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 4px; border-radius: 1px; background: currentColor; }
.music-toggle.is-playing .eq i { animation: eq 0.9s ease-in-out infinite; }
.music-toggle.is-playing .eq i:nth-child(2) { animation-delay: 0.2s; }
.music-toggle.is-playing .eq i:nth-child(3) { animation-delay: 0.45s; }
.music-toggle.is-playing .eq i:nth-child(4) { animation-delay: 0.1s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* ---- Buttons: brass, like the rail fittings ----------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3.3rem;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--brass-hi);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, var(--brass-lo));
  box-shadow: 0 6px 18px rgba(224, 178, 92, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #241707;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 10px 26px rgba(224, 178, 92, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.button-small { min-height: 2.5rem; padding: 0.3rem 1.05rem; font-size: 0.9rem; }
.button span { font-size: 1.1em; line-height: 1; }

.text-link { width: fit-content; color: var(--brass-hi); font-weight: 700; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--ink); }
.text-link span { display: inline-block; margin-left: 0.25rem; }

/* ---- Type ---------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; text-wrap: balance; }
h1, h2 { letter-spacing: -0.02em; line-height: 0.98; }
h1 { margin-bottom: 1.2rem; font-size: clamp(3.2rem, 6.6vw, 6.4rem); }
h1 em, h2 em { color: var(--brass); font-style: italic; text-shadow: 0 0 40px rgba(226, 178, 90, 0.35); }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.9rem); }
h3 { letter-spacing: -0.005em; line-height: 1.2; font-size: 1.32rem; }
.eyebrow {
  margin-bottom: 1rem;
  color: var(--chalk);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Numbered pool balls mark the sections (1 yellow, 2 blue, 3 red…) */
.ball {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background-color: var(--c);
  background-image:
    radial-gradient(circle at 50% 50%, #f7f2e5 0 0.62rem, transparent 0.64rem),
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.5) 0, transparent 26%);
  box-shadow: inset -4px -6px 10px rgba(0, 0, 0, 0.35), 0 6px 14px rgba(0, 0, 0, 0.35);
  color: #111;
  font: 800 0.92rem/1 var(--sans);
}
.ball-1 { --c: #e9b520; }
.ball-2 { --c: #2554b8; }
.ball-3 { --c: #c8322f; }
.ball-4 { --c: #5b3a99; }
.ball-5 { --c: #e0702a; }
.ball-6 { --c: #1f7a4b; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding-top: clamp(7rem, 12vw, 9.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(1.75rem, 4vw, 4rem);
}
.hero-description { max-width: 29rem; color: var(--muted); font-size: clamp(1.02rem, 1.45vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.4rem; margin-top: 1.8rem; }

/* The essentials, like chalk marks on the rail */
.essentials { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.essentials li {
  padding: 0.3rem 0.75rem 0.3rem 0.65rem;
  border: 1px solid rgba(143, 208, 245, 0.3);
  border-radius: 999px;
  background: rgba(15, 58, 92, 0.35);
  color: #d9eefb;
  font-size: 0.82rem;
  font-weight: 600;
}
.essentials li::before { content: "✓"; margin-right: 0.4rem; color: var(--chalk); font-weight: 800; }

/* The screenshot sits in a wooden rail with brass corners */
.hero-shot {
  position: relative;
  padding: 0.7rem;
  border-radius: 22px;
  background: linear-gradient(160deg, #6a4128, var(--wood) 45%, #2a180e);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 90px rgba(255, 205, 120, 0.12), inset 0 1px 0 rgba(255, 220, 170, 0.25), inset 0 -2px 0 rgba(0, 0, 0, 0.4);
  transform: perspective(1400px) rotateY(-5deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.hero-shot:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }
.hero-shot::before, .hero-shot::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brass-hi), var(--brass-lo));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.hero-shot::before { top: -5px; left: -5px; }
.hero-shot::after { bottom: -5px; right: -5px; }
.hero-shot img { width: 100%; aspect-ratio: 8 / 5; border-radius: 12px; background: #132621; }
.hero-shot figcaption {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.3rem 0;
  color: #e9cfa6;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) { .hero-shot, .hero-shot:hover { transform: none; } }

/* Under the rail, its diamonds: 15 · 61 · 1 vs 1 / 2 vs 2 */
.quick-facts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.quick-facts li {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
  padding: 1rem 0.6rem;
  color: var(--muted);
  text-align: center;
}
.quick-facts li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 9px;
  height: 9px;
  background: #f0e2c4;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 6px rgba(240, 226, 196, 0.5);
}
.quick-facts strong { color: #fff6e2; font: 700 clamp(1.15rem, 2.3vw, 1.8rem)/1.2 var(--serif); }

/* ---- Sections ------------------------------------------------------------ */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem 2.5rem;
  margin-bottom: 2rem;
}
.section-heading > div { display: flex; flex-direction: column; align-items: flex-start; }
.section-heading > p { max-width: 25rem; color: var(--muted); }

.mode-grid, .multiplayer-grid, .install-grid, .custom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.character-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }

.mode, .character-grid figure, .custom-grid figure,
.control-grid article, .multiplayer-grid article, .install-grid article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(247, 216, 146, 0.06);
  transition: border-color 0.2s, transform 0.2s;
}
.mode:hover, .control-grid article:hover, .character-grid figure:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.card-copy, .custom-preview figcaption, .control-grid article,
.multiplayer-grid article, .install-grid article { padding: clamp(1.05rem, 1.9vw, 1.45rem); }
.card-copy p, .custom-grid figcaption p, .control-grid p, .multiplayer-grid p, .ai-note p { margin-top: 0.4rem; color: var(--muted); }
.mode h3, .multiplayer-grid h3 { color: var(--brass-hi); }

.multiplayer-grid { margin-top: 1rem; }
.multiplayer-grid article, .install-grid article { background: rgba(9, 26, 36, 0.82); }

.capture-link { display: block; overflow: hidden; }
.capture-link:focus-visible { outline-offset: -4px; }
.capture-link img { width: 100%; aspect-ratio: 8 / 5; background: #0e2230; transition: transform 0.4s ease, filter 0.3s; }
.capture-link:hover img { transform: scale(1.03); filter: brightness(1.1); }

/* Barrios: a warm street-lamp glow */
/* Barrios: a band of real felt under a lamp, framed by wooden rails */
.neighborhood-section {
  color: #f6f1e2;
  border-block: 14px solid var(--wood);
  background:
    radial-gradient(ellipse 55% 80% at 50% 0%, rgba(255, 230, 170, 0.28), transparent 70%),
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.35), transparent 60%),
    var(--felt);
  box-shadow: inset 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 -10px 24px rgba(0, 0, 0, 0.3);
}
.neighborhood-section .section-heading > p { color: #d6e6dc; }
.neighborhood-section .character-grid figure { border-color: rgba(255, 230, 170, 0.25); background: rgba(8, 40, 28, 0.55); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3); }
.character-grid img { width: 100%; aspect-ratio: 1; background: var(--portrait-color); }
.character-grid figcaption { padding: 0.7rem 0.9rem; font: 700 clamp(1.05rem, 2.2vw, 1.35rem)/1.2 var(--serif); }
.ai-note {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin-top: 1rem;
  padding: 1.05rem 1.25rem;
  border: 1px dashed rgba(255, 230, 170, 0.45);
  border-radius: var(--radius);
}
.ai-note h3 { color: var(--brass-hi); }
.neighborhood-section .ai-note p { color: #d6e6dc; }
.ai-note p { max-width: 47rem; margin-top: 0; }

.custom-grid { grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); }
.custom-preview { align-self: start; }
.custom-preview h3 { color: var(--brass-hi); }
.custom-options { display: grid; gap: 0.7rem; }
.custom-options figure { display: grid; grid-template-columns: minmax(0, 34%) minmax(0, 1fr); align-items: center; gap: 0.85rem; padding: 0.6rem; }
.custom-options .capture-link { border-radius: 8px; }
.custom-options figcaption { padding-right: 0.4rem; }
.custom-options h3 { font-size: 1.1rem; }
.custom-options p { font-size: 0.9rem; line-height: 1.45; }

/* ---- Rules: chalk on a slate board in a wooden frame ---------------------- */
.rules-section { padding-block: clamp(1rem, 3vw, 2rem); }
.rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2.4rem clamp(2rem, 6vw, 5rem);
  padding-inline: clamp(1.25rem, 4vw, 3.25rem);
  border: 12px solid var(--wood);
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.05), transparent 60%),
    var(--slate);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(0, 0, 0, 0.45), 0 0 0 1px #6a4128;
}
.rules-heading h2 { color: #f4f1ea; }
.rules-heading > p { max-width: 23rem; margin-top: 1rem; color: #c9d2d4; }
.rules-heading .text-link { display: inline-block; margin-top: 1.25rem; }
.rule-list { counter-reset: rules; margin: 0 0 0.9rem; padding: 0; list-style: none; }
.rule-list li { display: grid; grid-template-columns: 2.1rem 1fr; gap: 0.9rem; counter-increment: rules; padding-bottom: 1.1rem; }
.rule-list li + li { padding-top: 1.1rem; border-top: 1px dashed rgba(255, 255, 255, 0.16); }
/* chalk-circled numbers */
.rule-list li::before {
  content: counter(rules);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(244, 241, 234, 0.75);
  border-radius: 50%;
  color: #f4f1ea;
  font: 700 1rem/1 var(--serif);
  transform: rotate(-6deg);
}
.rule-list h3 { margin-bottom: 0.28rem; color: #f4f1ea; }
.rule-list p { color: #c9d2d4; }
.rules-section details { border-top: 1px dashed rgba(255, 255, 255, 0.16); padding: 0.75rem 0; }
.rules-section details:last-child { border-bottom: 1px dashed rgba(255, 255, 255, 0.16); }
.rules-section summary { color: #a9d6f2; font-weight: 700; cursor: pointer; }
.rules-section details p { margin: 0.4rem 0 0 1.05rem; color: #c9d2d4; }

/* ---- Controls ------------------------------------------------------------ */
.control-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.control-icon { display: block; margin-bottom: 0.6rem; font-size: 1.6rem; line-height: 1; }
kbd {
  padding: 0.05em 0.4em;
  border: 1px solid rgba(247, 216, 146, 0.4);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink);
  font: 700 0.85em var(--sans);
}

/* ---- Install ------------------------------------------------------------- */
/* Install: a band of tournament-blue cloth between wooden rails */
.install-section {
  border-block: 14px solid var(--wood);
  background:
    radial-gradient(ellipse 55% 80% at 30% 0%, rgba(255, 230, 170, 0.2), transparent 70%),
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.35), transparent 60%),
    var(--blue-felt);
  box-shadow: inset 0 10px 24px rgba(0, 0, 0, 0.35), inset 0 -10px 24px rgba(0, 0, 0, 0.35);
}
.install-section .section-heading > p { color: #cfe3f0; }
.install-grid ol { margin: 0.8rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.install-grid li + li { margin-top: 0.4rem; }
.install-grid h3 { color: var(--brass-hi); }
.install-section .button { margin-top: 1.5rem; }

/* ---- Smaller screens ------------------------------------------------------ */
@media (max-width: 64rem) {
  .control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header nav a { padding-inline: 0.5rem; }
}
@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-shot, .hero-shot:hover { transform: none; }
  .section-heading { align-items: start; flex-direction: column; }
  .site-header nav { display: none; } /* the pill keeps brand, music and Jugar */
  .music-toggle { margin-left: auto; }
}
@media (max-width: 42rem) {
  .wrap { width: calc(100% - 2rem); }
  .site-header { top: 0.5rem; width: calc(100% - 1rem); }
  .header-inner { gap: 0.5rem; padding-left: 0.75rem; }
  .brand { font-size: 1.12rem; }
  .music-label { display: none; }
  .music-toggle { min-width: 2.5rem; justify-content: center; padding: 0 0.7rem; }
  .quick-facts { border-radius: 18px; }
  .quick-facts li { flex-direction: column; align-items: center; justify-content: start; font-size: 0.75rem; }
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules-grid, .control-grid, .multiplayer-grid, .install-grid, .custom-grid { grid-template-columns: 1fr; }
  .rules-grid { border-width: 8px; }
  .mode:has(.capture-link) { grid-column: 1 / -1; }
}
@media (max-width: 23rem) { h1 { font-size: 2.9rem; } }

/* ---- The 15 balls along a wooden rail (pool chileno starts them there) --- */
.ball-rail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.3rem;
  margin-top: clamp(2.2rem, 5vw, 3.5rem);
  padding: 0.75rem clamp(0.9rem, 3vw, 2rem);
  border-radius: 999px;
  background: linear-gradient(180deg, #6a4128, var(--wood) 55%, #2a180e);
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 18px 36px rgba(0, 0, 0, 0.45);
}
.ball-rail span {
  position: relative;
  flex: none;
  width: clamp(1.25rem, 3.6vw, 2.6rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.6) 0, transparent 24%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.28) 100%),
    var(--c);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.45);
  animation: rack-in 0.6s cubic-bezier(.2, .9, .3, 1.2) both;
  animation-delay: calc(var(--i) * 45ms);
}
/* Stripes (9–15): a white ball with a coloured band */
.ball-rail span.stripe {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.6) 0, transparent 24%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(180deg, #f6f1e4 0 26%, var(--c) 26% 74%, #f6f1e4 74%);
}
.ball-rail span::after {
  content: attr(data-n);
  position: absolute;
  inset: 30%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f7f2e5;
  color: #111;
  font: 800 clamp(0.42rem, 1.1vw, 0.7rem)/1 var(--sans);
}
@keyframes rack-in { from { transform: translateY(-14px) scale(0.6); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ball-rail span { animation: none; } }
@media (max-width: 42rem) {
  .ball-rail { flex-wrap: wrap; justify-content: center; border-radius: 22px; }
}

/* ---- Full-body characters ----------------------------------------------- */
/* Hero: Don Tito stands by the table, half in front of its rail, lit by the
   same lamp (a warm halo behind him) */
.hero-stage { position: relative; }
.hero-stage::before {
  content: "";
  position: absolute;
  left: -8%;
  bottom: -6%;
  width: 46%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 205, 120, 0.32), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}
.hero-figure {
  position: absolute;
  z-index: 2;
  left: -9%;
  bottom: -14%;
  width: 34%;
  max-width: 260px;
  filter: drop-shadow(0 22px 22px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  animation: figure-in 0.9s cubic-bezier(.2, .8, .3, 1) 0.15s both;
}
.hero-stage .hero-shot { margin-left: 12%; }
/* only a slide: if animations are paused (power saving), he is still there */
@keyframes figure-in { from { transform: translateX(-24px); } to { transform: none; } }

/* The eight CPU rivals: chips with their portrait and their style */
.cpu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.cpu-grid li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 230, 170, 0.22);
  border-radius: var(--radius);
  background: rgba(8, 40, 28, 0.55);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}
.cpu-grid img { flex: none; width: 3.3rem; aspect-ratio: 1; border: 2px solid var(--brass); border-radius: 50%; }
.cpu-grid h3 { color: var(--brass-hi); font-size: 1.08rem; }
.cpu-grid p { margin-top: 0.15rem; color: #d6e6dc; font-size: 0.88rem; line-height: 1.35; }

/* Barrios: La Vigía leans on the scene, binoculars in hand */
.barrios-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.32fr);
  grid-template-areas: "copy figure" "faces figure";
  align-items: end;
  gap: 1rem 2rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(255, 230, 170, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 40% 90% at 88% 30%, rgba(255, 205, 120, 0.22), transparent 80%),
    rgba(6, 32, 23, 0.5);
}
.barrios-copy { grid-area: copy; }
.barrios-copy h3 { color: var(--brass-hi); font-size: clamp(1.5rem, 3vw, 2.2rem); }
.barrios-copy p { max-width: 32rem; margin-top: 0.3rem; color: #d6e6dc; }
.barrios-stage .character-grid { grid-area: faces; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.barrios-figure {
  grid-area: figure;
  align-self: end;
  width: 100%;
  max-width: 240px;
  margin: -5rem auto -2rem;
  filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.55));
}

@media (max-width: 64rem) {
  .cpu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 56rem) {
  .hero-figure { left: -2%; bottom: -10%; width: 30%; }
  .hero-stage .hero-shot { margin-left: 16%; }
}
@media (max-width: 42rem) {
  .hero-figure { width: 27%; left: 0; bottom: -6%; }
  .hero-stage .hero-shot { margin-left: 22%; }
  .cpu-grid { grid-template-columns: 1fr; }
  .barrios-stage { grid-template-columns: 1fr minmax(6rem, 0.4fr); grid-template-areas: "copy figure" "faces faces"; }
  .barrios-stage .character-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .barrios-figure { margin: -3rem auto 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-figure { animation: none; } }

/* ---- En la mesa se habla: two rivals trading lines ----------------------- */
.table-talk {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem);
  margin-bottom: 2rem;
}
.table-talk-copy h3 { color: var(--brass-hi); font-size: clamp(1.5rem, 3vw, 2.2rem); }
.table-talk-copy p { margin-top: 0.4rem; color: #d6e6dc; }
.talk { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.talk li { display: flex; align-items: flex-end; gap: 0.6rem; }
.talk-right { flex-direction: row-reverse; }
.talk img { flex: none; width: 2.8rem; aspect-ratio: 1; border: 2px solid var(--brass); border-radius: 50%; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35); }
/* Bubbles like the game's: dark glass, brass edge, the name on top */
.talk p {
  position: relative;
  max-width: 22rem;
  padding: 0.55rem 0.9rem 0.6rem;
  border: 1px solid rgba(255, 230, 170, 0.35);
  border-radius: 16px 16px 16px 4px;
  background: rgba(6, 18, 14, 0.82);
  color: #fdf6e6;
  font-size: 0.98rem;
  line-height: 1.35;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}
.talk-right p { border-radius: 16px 16px 4px 16px; background: rgba(15, 45, 70, 0.85); }
.talk b { display: block; color: var(--brass-hi); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
/* One after another once the section is on screen (landing.js adds .is-on) */
.talk li { opacity: 0; transform: translateY(10px); }
.talk.is-on li { animation: talk-in 0.45s ease-out both; animation-delay: calc(var(--d) * 0.7s); }
@keyframes talk-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .talk li { opacity: 1; transform: none; } .talk.is-on li { animation: none; } }
@media (max-width: 56rem) { .table-talk { grid-template-columns: 1fr; } }

/* =========================================================================
   SALÓN — second pass: lamp light, brass details, bento modes, real footer
   ========================================================================= */

/* A vignette: the corners of the hall fall into shadow */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(2, 6, 9, 0.55) 100%);
}

/* ---- Lamp over the table ------------------------------------------------- */
.hero { position: relative; }
.lamp {
  position: absolute;
  top: 0;
  left: 66%;
  z-index: 0;
  width: min(30rem, 44vw);
  height: 38rem;
  transform: translateX(-50%);
  pointer-events: none;
}
.lamp i { /* the shade: a brass cone */
  position: absolute;
  top: 3.4rem;
  left: 50%;
  width: 9rem;
  height: 2.4rem;
  transform: translateX(-50%);
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 45%, var(--brass-lo));
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
}
.lamp i::after { content: ""; position: absolute; inset: auto 8% 0; height: 3px; background: #fff3cf; box-shadow: 0 0 14px 3px rgba(255, 226, 150, 0.8); }
.lamp i::before { content: ""; position: absolute; top: -3.4rem; left: 50%; width: 2px; height: 3.4rem; background: rgba(247, 216, 146, 0.35); }
.lamp b { /* the cone of light, falling onto the felt */
  position: absolute;
  top: 5.7rem;
  left: 50%;
  width: 100%;
  height: 30rem;
  transform: translateX(-50%);
  clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255, 220, 150, 0.34), rgba(255, 220, 150, 0.08) 60%, transparent);
  filter: blur(3px);
  animation: lamp-sway 7s ease-in-out infinite;
  transform-origin: 50% 0;
}
@keyframes lamp-sway { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lamp b { animation: none; } }
.hero-grid, .ball-rail, .quick-facts { position: relative; z-index: 1; }
@media (max-width: 56rem) { .lamp { left: 50%; width: 100vw; } .lamp i { display: none; } }

/* ---- Hero polish ---------------------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 0.8rem; }
.eyebrow::before { content: ""; width: 2.2rem; height: 1px; background: linear-gradient(90deg, transparent, var(--chalk)); }
h1 { text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.hero-shot {
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 120px rgba(255, 205, 120, 0.22), 0 0 0 1px rgba(255, 220, 170, 0.12), inset 0 1px 0 rgba(255, 220, 170, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.4);
}
.hero-shot img { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(0, 0, 0, 0.35); }
.essentials li { backdrop-filter: blur(6px); }
.quick-facts { border-block: 1px solid var(--line); margin-top: 2rem; background: linear-gradient(90deg, transparent, rgba(226, 178, 90, 0.05), transparent); }
.quick-facts strong { color: var(--brass-hi); }

/* ---- Sections: brass rule with a diamond, a lit numbered ball ------------ */
.section.wrap, .rules-section { position: relative; }
.section.wrap:not(.rules-grid)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}
.section.wrap:not(.rules-grid)::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  background: var(--brass);
  box-shadow: 0 0 12px rgba(226, 178, 90, 0.7);
  transform: rotate(45deg);
}
.neighborhood-section .section.wrap::before, .neighborhood-section .section.wrap::after,
.install-section .section.wrap::before, .install-section .section.wrap::after { display: none; }
.section-heading { margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-heading > p { font-size: 1.05rem; border-left: 2px solid var(--brass-lo); padding-left: 1rem; }
.ball { width: 3rem; height: 3rem; box-shadow: inset -4px -6px 10px rgba(0, 0, 0, 0.35), 0 8px 18px rgba(0, 0, 0, 0.45), 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); }

/* ---- Modes: bento --------------------------------------------------------- */
.mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode { position: relative; }
.mode-text {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon num" "copy copy";
  align-items: center;
  padding: clamp(1rem, 2vw, 1.5rem) clamp(1rem, 2vw, 1.5rem) 0;
  background:
    radial-gradient(ellipse 70% 120% at 100% 0, rgba(44, 138, 98, 0.28), transparent 70%),
    var(--panel);
}
.mode-text:nth-child(2) { background: radial-gradient(ellipse 70% 120% at 100% 0, rgba(29, 94, 140, 0.45), transparent 70%), var(--panel); }
.mode-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(247, 216, 146, 0.25), rgba(0, 0, 0, 0.25));
  color: var(--brass-hi);
}
.mode-icon svg, .control-icon svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mode-num { grid-area: num; justify-self: end; color: rgba(247, 216, 146, 0.16); font: 700 clamp(3rem, 6vw, 4.6rem)/1 var(--serif); letter-spacing: -0.04em; }
.mode-text .card-copy { grid-area: copy; padding-inline: 0; }
.mode-shot { display: flex; flex-direction: column; }
.mode-shot .capture-link { position: relative; }
.mode-shot .capture-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7, 17, 25, 0.75)); pointer-events: none; }
.mode:hover { box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line-strong), inset 0 1px 0 rgba(247, 216, 146, 0.1); }
.multiplayer-grid article { border-left: 3px solid var(--brass-lo); }

/* ---- Rivals: lit cards ----------------------------------------------------- */
.cpu-grid li { transition: transform 0.2s, border-color 0.2s, background 0.2s; }
.cpu-grid li:hover { transform: translateY(-3px); border-color: var(--line-strong); background: rgba(8, 40, 28, 0.85); }
.cpu-grid img { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.4); }
.character-grid figure { position: relative; }
.character-grid figcaption { background: linear-gradient(180deg, rgba(6, 22, 16, 0.4), rgba(6, 22, 16, 0.85)); border-top: 2px solid var(--brass-lo); }

/* ---- Rules: chalk board gets a brass plate -------------------------------- */
.rules-grid { position: relative; }
.rules-grid::before {
  content: "REGLAMENTO";
  position: absolute;
  top: -1.55rem;
  left: 50%;
  padding: 0.18rem 1.2rem;
  border: 1px solid var(--brass-hi);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass-lo));
  color: #241707;
  font: 800 0.66rem/1.5 var(--sans);
  letter-spacing: 0.3em;
  transform: translateX(-50%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
.rules-section { padding-block: clamp(3rem, 6vw, 5rem); }
.rule-list li::before { font-size: 1.1rem; background: rgba(255, 255, 255, 0.04); }

/* ---- Controls: brass medallions instead of emoji -------------------------- */
.control-icon {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(247, 216, 146, 0.2), rgba(0, 0, 0, 0.3));
  color: var(--brass-hi);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.control-icon svg { width: 1.75rem; height: 1.75rem; }
.control-grid article { background: linear-gradient(180deg, rgba(20, 46, 60, 0.85), rgba(9, 26, 36, 0.85)); }

/* ---- Install -------------------------------------------------------------- */
.install-grid ol { counter-reset: step; list-style: none; padding: 0; }
.install-grid ol li { counter-increment: step; position: relative; padding-left: 2.2rem; }
.install-grid ol li::before { content: counter(step); position: absolute; left: 0; top: 0.15rem; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--brass); color: #241707; font: 800 0.75rem/1 var(--sans); }

/* ---- Footer: the hall's front desk ---------------------------------------- */
.site-footer {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(74, 44, 27, 0.35), transparent 70%), linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 0.7fr)); gap: 2rem clamp(1.5rem, 5vw, 4rem); }
.footer-brand p { max-width: 26rem; margin: 0.9rem 0 1.2rem; }
.site-footer nav { display: flex; flex-direction: column; gap: 0.55rem; }
.site-footer nav h2 { margin-bottom: 0.3rem; color: var(--brass-hi); font: 800 0.72rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 2.5rem; padding-block: 1.25rem 1.75rem; border-top: 1px solid var(--line); font-size: 0.82rem; }
@media (max-width: 42rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---- Scroll reveal (landing.js adds .reveal, then .is-in) ------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--r, 0) * 80ms); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* =========================================================================
   BARRIO, PLANO — flat colour, thick outlines and hard shadows, like a sign
   painted on the wall of the local hall. No glass, no glow, no gradients:
   this block turns the lit look above into flat colour.
   ========================================================================= */
:root {
  --night: #0d1b24;
  --panel: #12303f;
  --line: #2f5a48;
  --line-strong: #e2b25a;
  --ink-line: #05100f;
  --brass-solid: #e2b25a;
}
body { background: var(--night); }
body::before, body::after, .lamp, .hero-stage::before { display: none; }

/* Menu: a solid bar with a hard edge */
.header-inner, .site-header.is-scrolled .header-inner {
  background: #0a1620;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 2px solid var(--brass-solid);
  box-shadow: 0 4px 0 var(--ink-line);
}

/* Buttons: flat brass, outlined, they press down */
.button, .button:hover {
  background: var(--brass-solid);
  border: 2px solid var(--ink-line);
  box-shadow: 0 4px 0 #7a5320;
  filter: none;
  transition: transform 0.1s, box-shadow 0.1s;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #7a5320; }
.button:active { transform: translateY(4px); box-shadow: 0 0 0 #7a5320; }
.music-toggle { border-width: 2px; }

/* Headings: flat, no glow */
h1, h1 em, h2 em { text-shadow: none; }
h1 { text-shadow: 4px 4px 0 #05100f; }
.eyebrow { color: var(--brass-solid); }
.eyebrow::before { background: var(--brass-solid); }

/* Hero: the screenshot in a flat wooden frame, straight, with a hard shadow */
.hero-shot, .hero-shot:hover {
  transform: none;
  padding: 0.6rem;
  border: 2px solid var(--ink-line);
  border-radius: 10px;
  background: #5b3822;
  box-shadow: 10px 10px 0 var(--ink-line);
}
.hero-shot::before, .hero-shot::after { background: var(--brass-solid); box-shadow: none; border: 2px solid var(--ink-line); }
.hero-shot img { border-radius: 4px; box-shadow: none; }
.hero-figure { filter: drop-shadow(5px 6px 0 rgba(5, 16, 15, 0.85)); }
.essentials li { background: transparent; border: 2px solid #3d7a9c; border-radius: 6px; backdrop-filter: none; color: #e6f3fb; }
.quick-facts { background: none; border-block: 2px solid var(--line); }
.quick-facts li + li::before { box-shadow: none; }

/* The rail of balls: flat wood and flat balls */
.ball-rail { border-radius: 10px; border: 2px solid var(--ink-line); background: #5b3822; box-shadow: 6px 6px 0 var(--ink-line); }
.ball-rail span { box-shadow: none; border: 2px solid var(--ink-line); background: var(--c); }
.ball-rail span.stripe { background: linear-gradient(180deg, #f6f1e4 0 26%, var(--c) 26% 74%, #f6f1e4 74%); }
.ball { box-shadow: none; border: 2px solid var(--ink-line); background-image: radial-gradient(circle at 50% 50%, #f7f2e5 0 0.62rem, transparent 0.64rem); }

/* Section rule: plain line, square mark */
.section.wrap:not(.rules-grid)::before { background: var(--line); height: 2px; }
.section.wrap:not(.rules-grid)::after { box-shadow: none; }
.section-heading > p { border-left-color: var(--brass-solid); }

/* Cards: flat fill, thick outline, hard shadow, they lift on hover */
.mode, .character-grid figure, .custom-grid figure, .control-grid article, .multiplayer-grid article, .install-grid article,
.cpu-grid li, .neighborhood-section .character-grid figure {
  border: 2px solid var(--ink-line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--ink-line);
}
.mode:hover, .control-grid article:hover, .character-grid figure:hover, .cpu-grid li:hover {
  transform: translate(-2px, -2px);
  border-color: var(--ink-line);
  background: var(--panel);
  box-shadow: 7px 7px 0 var(--ink-line);
}
.mode-text, .mode-text:nth-child(2) { background: var(--panel); }
.mode-text { border-top: 6px solid #2c8a62; }
.mode-text:nth-child(2) { border-top-color: #3d7a9c; }
.mode-icon, .control-icon { border: 2px solid var(--ink-line); background: var(--brass-solid); color: var(--ink-line); box-shadow: 3px 3px 0 var(--ink-line); }
.mode-num { color: rgba(226, 178, 90, 0.22); }
.mode-shot .capture-link::after { display: none; }
.control-grid article, .multiplayer-grid article, .install-grid article { background: var(--panel); }
.multiplayer-grid article { border-left: 6px solid var(--brass-solid); }
.cpu-grid img, .talk img { border: 2px solid var(--ink-line); box-shadow: none; outline: 2px solid var(--brass-solid); }
.character-grid figcaption { background: #0e2a20; border-top: 2px solid var(--ink-line); }

/* Barrios + install bands: flat colour between flat wooden rails */
.neighborhood-section {
  background: #15573f;
  border-block: 12px solid #5b3822;
  box-shadow: none;
}
.neighborhood-section .cpu-grid li, .neighborhood-section .character-grid figure { background: #0f4331; }
.barrios-stage { background: #0f4331; border: 2px solid var(--ink-line); box-shadow: 5px 5px 0 var(--ink-line); }
.ai-note { border: 2px dashed var(--brass-solid); }
.barrios-figure { filter: drop-shadow(5px 6px 0 rgba(5, 16, 15, 0.85)); }
.install-section {
  background: #0f3a5c;
  border-block: 12px solid #5b3822;
  box-shadow: none;
}
.install-section .install-grid article { background: #0a2a43; }

/* Talk bubbles: flat, outlined */
.talk p { border: 2px solid var(--ink-line); background: #0a1a14; box-shadow: 3px 3px 0 var(--ink-line); }
.talk-right p { background: #123a58; }

/* Rules: slate board, flat frame */
.rules-grid {
  background: var(--slate);
  border: 12px solid #5b3822;
  border-radius: 4px;
  box-shadow: 8px 8px 0 var(--ink-line), 0 0 0 2px var(--ink-line);
}
.rules-grid::before { background: var(--brass-solid); border: 2px solid var(--ink-line); box-shadow: none; }
.rule-list li::before { background: none; }
kbd { border: 2px solid var(--ink-line); border-bottom-width: 3px; background: #0a1620; }

/* Footer */
.site-footer { background: #0a1620; border-top: 4px solid #5b3822; }
.footer-legal { border-top: 2px solid var(--line); }

/* =========================================================================
   THE GAME'S LOOK — the page dresses like the game itself: its navy
   background, the home menu's dark glass cards with a gold edge, the gold
   "Jugar" button, the gradient of the POOL title, bold sans-serif type and
   the white speech bubbles with gold-ringed portraits.
   ========================================================================= */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: var(--sans);
  --brass: #eab308;
  --brass-hi: #fde047;
  --brass-lo: #ca8a04;
  --line: rgba(250, 204, 21, 0.2);
  --line-strong: rgba(250, 204, 21, 0.45);
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --game-card: linear-gradient(180deg, rgba(13, 19, 31, 0.86) 0%, rgba(8, 12, 20, 0.93) 100%);
}
body {
  background-color: #090c12;
  background-image:
    radial-gradient(ellipse 60% 45% at 70% 0%, rgba(250, 204, 21, 0.1), transparent 70%),
    radial-gradient(circle at 50% 35%, #162030 0%, #090c12 100%);
}

/* Titles like the game's POOL: heavy, white turning gold */
h1, h2, h3 { font-family: var(--sans); }
h1, h2 { font-weight: 900; letter-spacing: -0.01em; }
h1 {
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 45%, #fef08a 75%, #eab308 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* gradient text can't carry a text-shadow (it shows through): a soft drop
   shadow on the glyphs instead */
h1 { text-shadow: none; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55)); }
h1 em { -webkit-text-fill-color: #eab308; color: #eab308; font-style: normal; text-shadow: none; }
h2 em { color: #eab308; font-style: normal; }
h3 { font-weight: 800; letter-spacing: 0; }
.eyebrow { color: #fde047; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.22em; }
.brand { font-family: var(--sans); font-weight: 900; letter-spacing: 0.04em; }
.brand > span:last-child { font-style: normal; color: #eab308; }

/* Buttons: the game's gold accent button */
.button {
  border: 1px solid #fde047;
  border-radius: 10px;
  background: linear-gradient(135deg, #eab308, #ca8a04);
  box-shadow: 0 8px 22px rgba(234, 179, 8, 0.25);
  color: #111827;
}
.button:hover { background: linear-gradient(135deg, #facc15, #eab308); filter: none; }
.music-toggle { border-radius: 10px; }
.header-inner {
  border-color: rgba(250, 204, 21, 0.28);
  background: rgba(13, 19, 31, 0.78);
}
.site-header.is-scrolled .header-inner { background: rgba(8, 12, 20, 0.94); }

/* Cards: the home menu's glass panel */
.mode, .control-grid article, .multiplayer-grid article, .install-grid article,
.custom-grid figure, .cpu-grid li, .dialogue-grid figure {
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 16px;
  background: var(--game-card);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mode:hover, .control-grid article:hover, .cpu-grid li:hover { border-color: rgba(250, 204, 21, 0.45); }
.mode h3, .multiplayer-grid h3, .custom-preview h3, .install-grid h3, .cpu-grid h3, .barrios-copy h3, .table-talk-copy h3 { color: #fef08a; }
.cpu-grid img { border-color: #facc15; }

/* Keys like the game's badges */
kbd { border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 6px; background: #1e2736; color: #f1f5f9; font-weight: 800; }

/* Speech bubbles exactly like in the match: white, bold, speaker on top */
.talk img { width: 3.2rem; border: 3px solid #facc15; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); background-color: #0f172a; }
.talk p, .talk-right p {
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}
.talk-right p { background: rgba(241, 245, 249, 0.96); }
.talk p::before {
  content: "";
  position: absolute;
  bottom: 0.9rem;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: rotate(45deg);
}
.talk-left p::before { left: -5px; }
.talk-right p::before { right: -5px; }
.talk b { color: #475569; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; margin-bottom: 2px; }

/* Three real captures of the same conversations, at three tables */
.dialogue-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.dialogue-grid figure { overflow: hidden; }
.dialogue-grid img { width: 100%; aspect-ratio: 12 / 5; object-fit: cover; }
.dialogue-grid figcaption { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.65rem 0.9rem; font-size: 0.85rem; }
.dialogue-grid figcaption strong { color: #fef08a; }
.dialogue-grid figcaption span { color: var(--muted); }
@media (max-width: 56rem) { .dialogue-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   PHONE — short and calm: less height, swipe rows instead of long stacks,
   one big Jugar for the thumb, nothing decorative that pushes content down
   ========================================================================= */
@media (max-width: 42rem) {
  .wrap { width: calc(100% - 2rem); }
  .section { padding-block: 2.6rem; }
  .section.wrap::before, .section.wrap::after { display: none; }
  .section-heading { gap: 0.6rem; margin-bottom: 1.3rem; }
  .section-heading > p { font-size: 0.95rem; padding-left: 0.75rem; }
  h1 { font-size: clamp(2.6rem, 12.5vw, 3.4rem); margin-bottom: 0.8rem; }
  h2 { font-size: clamp(1.9rem, 9vw, 2.4rem); }
  .ball { width: 2.1rem; height: 2.1rem; margin-bottom: 0.6rem; font-size: 0.78rem; }

  /* Hero: title, one line, one big button, the table */
  .hero { padding-top: 5.6rem; }
  .hero-actions { margin-top: 1.2rem; }
  .button-play { width: 100%; min-height: 3.4rem; font-size: 1.1rem; }
  .ball-rail, .hero-shot figcaption, .lamp { display: none; }
  .hero-stage { margin-top: 0.6rem; }
  .hero-stage::before { display: none; }

  /* Swipe rows: rivals, captures, customization — no endless stacks */
  .cpu-grid, .dialogue-grid, .custom-options, .control-grid, .mode-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 78%;
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: -1rem;
    padding: 0.25rem 1rem 0.9rem;
    scrollbar-width: none;
  }
  .cpu-grid { grid-auto-columns: 62%; }
  .cpu-grid::-webkit-scrollbar, .dialogue-grid::-webkit-scrollbar, .custom-options::-webkit-scrollbar,
  .control-grid::-webkit-scrollbar, .mode-grid::-webkit-scrollbar { display: none; }
  .cpu-grid > *, .dialogue-grid > *, .custom-options > *, .control-grid > *, .mode-grid > * { scroll-snap-align: start; }
  .mode:has(.capture-link) { grid-column: auto; }
  .custom-options figure { grid-template-columns: 1fr; }
  .cpu-grid li { padding: 0.6rem; }
  .cpu-grid img { width: 2.6rem; }
  .multiplayer-grid { gap: 0.6rem; }

  /* Conversation: bubbles a touch smaller */
  .table-talk { gap: 1rem; margin-bottom: 1rem; }
  .talk p, .talk-right p { font-size: 0.95rem; max-width: 15rem; }
  .talk img { width: 2.6rem; }

  /* Barrios: the figure beside the copy, three faces in a row */
  .barrios-stage { padding: 1rem; }
  .barrios-figure { max-width: 120px; }
  .character-grid figcaption { font-size: 0.85rem; padding: 0.45rem 0.55rem; }

  /* Rules on the slate: tighter */
  .rules-grid { gap: 1.4rem; padding-inline: 1rem; }
  .rule-list li { padding-bottom: 0.8rem; }
  .rule-list li + li { padding-top: 0.8rem; }

  /* Footer: brand and Jugar, the link lists live in the top menu already */
  .site-footer nav { display: none; }
  .footer-legal { flex-direction: column; gap: 0.2rem; }
}

/* Install (phones / tablets): a quiet second action under Jugar */
.hero-install { margin-top: 0.8rem; }
.hero-install[hidden], .hero-install [hidden] { display: none; }
.button-ghost {
  width: 100%;
  min-height: 3rem;
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 10px;
  background: rgba(13, 19, 31, 0.6);
  color: #fef08a;
  font: 800 1rem var(--sans);
  cursor: pointer;
}
.hero-install p { color: var(--muted); font-size: 0.9rem; text-align: center; }
.hero-install b { color: #fef08a; }
@media (min-width: 42.01rem) { .button-ghost { width: auto; padding: 0 1.2rem; } .hero-install p { text-align: left; } }
@media (max-width: 42rem) { .mode-grid { align-items: start; } }

@media (max-width: 42rem) { .hero-stage .hero-shot { margin-left: 17%; } }
