/* Drinkomania website
   Direction: a bar at night. The neon lives in one place only, the game's neon sign at the top (assets/drinkomania-sign.svg).
   Everything else is quiet night-purple surfaces with hairlines. Yellow (brand) is the one accent.
   Design pass based on "unslop" by Damir Sokolovsky (@heydamir), CC BY 4.0. */

@font-face {
  font-family: "FreeRoyalty";
  src: url("assets/FreeRoyalty.otf") format("opentype");
  font-display: swap;
}

:root {
  /* night ramp, tinted toward the purple brick of the bar */
  --bg: #110e16;
  --surface: #18141f;
  --raised: #221d2b;
  --raised-2: #2c2637;
  --line: rgba(240, 234, 245, 0.08);
  --line-strong: rgba(240, 234, 245, 0.14);
  --text: #f0eaf5;
  --text-2: #b4acbf;
  --muted: #918a9d;
  /* brand accent */
  --yellow: #ffc21a;

  --radius-card: 16px;
  --radius-control: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  background: rgba(17, 14, 22, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--yellow);
  text-decoration: none;
  font-family: "FreeRoyalty", "Fredoka", sans-serif;
  font-size: 24px;
  line-height: 1;
}
.brand img { width: 36px; height: 36px; border-radius: 8px; display: block; }
.brand:hover { color: #ffd04d; }

.lang {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-control);
  background: var(--surface);
  border: 1px solid var(--line);
}
.lang button {
  min-width: 44px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: 500 14px "Fredoka", sans-serif;
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] {
  background: var(--raised-2);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.lang button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ---------- hero: the neon sign ---------- */
main.landing { max-width: none; padding: 0; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px 16px;
}
.hero-sign {
  display: block;
  width: min(1040px, 100%);
  height: auto;
  margin: 0 auto 16px;
}

.hero-title {
  max-width: 760px;
  margin: 0;
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
}
.hero-tag {
  max-width: 34rem;
  margin: 16px 0 32px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-2);
  text-wrap: balance;
}

.play-badge {
  display: inline-block;
  border-radius: 10px;
  transition: transform 150ms var(--ease), opacity 150ms var(--ease);
}
.play-badge:hover { opacity: 0.9; }
.play-badge:active { transform: scale(0.98); }
.play-badge:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.play-badge img { display: block; width: 216px; height: auto; }

/* ---------- sections ---------- */
.band { max-width: 1120px; margin: 0 auto; padding: 96px 24px 0; }
.band-title {
  display: block;
  margin: 0 0 32px;
  text-align: center;
  font-family: "FreeRoyalty", "Fredoka", sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.05;
  color: var(--text);
}
.landing h2 span { display: inline; width: auto; height: auto; background: none; border: 0; border-radius: 0; color: inherit; font-size: inherit; }

/* screenshots strip */
.shots-wrap { position: relative; }
.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 24px;
  padding: 4px 4px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--raised-2) transparent;
}
.shots:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; border-radius: 12px; }
.shots img {
  flex: 0 0 auto;
  width: 240px;
  height: auto;
  aspect-ratio: 600 / 1067;
  border-radius: 16px;
  scroll-snap-align: start;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.shots img.join { margin-left: -16px; border-top-left-radius: 0; border-bottom-left-radius: 0; scroll-snap-align: none; }
.shots img:has(+ img.join) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.shots-arrow {
  position: absolute;
  top: calc(50% - 32px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  transition: background-color 150ms var(--ease), opacity 150ms var(--ease);
}
.shots-arrow svg { width: 18px; height: 18px; stroke-width: 2; }
.shots-arrow:hover { background: var(--raised-2); }
.shots-arrow:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.shots-arrow[disabled] { opacity: 0; pointer-events: none; }
.shots-arrow.prev { left: -8px; }
.shots-arrow.next { right: -8px; }

/* how it works - each step is a die face */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.steps .die { display: block; color: var(--yellow); }
.steps h3 { margin: 16px 0 4px; font-size: 20px; font-weight: 500; line-height: 1.3; }
.steps p { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.55; }

/* boards */
.boards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.board {
  padding: 12px 12px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  text-align: center;
}
.board img { display: block; width: 100%; height: auto; border-radius: 4px; }
.board h3 { margin: 16px 0 4px; font-family: "FreeRoyalty", "Fredoka", sans-serif; font-weight: 400; font-size: 28px; line-height: 1.1; color: var(--c); }
.board p { margin: 0 8px; font-size: 15px; color: var(--text-2); line-height: 1.5; }
.b-chill { --c: #5b9bff; }
.b-party { --c: #a585ff; }
.b-chaos { --c: #ff9a3d; }
.b-hot   { --c: #ff6b96; }

/* final call to action */
.cta { text-align: center; padding-bottom: 32px; }
.cta-title {
  display: block;
  margin: 0 0 12px;
  font-family: "FreeRoyalty", "Fredoka", sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.05;
  color: var(--text);
}
.cta > p:not(.hero-note) { margin: 0 0 32px; font-size: 19px; color: var(--text-2); }
.hero-note { margin: 24px 0 0; color: var(--muted); font-size: 14px; }

[hidden] { display: none !important; }

/* ---------- legal pages (terms / privacy) ---------- */
.tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: calc(100% - 48px);
  margin: 24px auto 0;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.tabs a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 20px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] {
  background: var(--raised-2);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.tabs a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 24px;
}

.doc h1 {
  margin: 0 0 8px;
  font-family: "FreeRoyalty", "Fredoka", sans-serif;
  font-weight: 400;
  font-size: clamp(40px, 8vw, 56px);
  line-height: 1.05;
  color: var(--yellow);
}

.updated { margin: 0 0 24px; color: var(--muted); font-size: 15px; }

.toc {
  margin: 24px 0 32px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.toc ol { margin: 0; padding-left: 24px; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; padding: 2px 0; }

section {
  margin: 0 0 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  scroll-margin-top: 88px;
}

h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}
h2 span {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  color: var(--yellow);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

section p { margin: 0 0 12px; }
section p:last-child { margin-bottom: 0; }

ol.sub { margin: 0; padding-left: 24px; }
ol.sub li { margin: 0 0 8px; padding-left: 4px; }
ol.sub li:last-child { margin-bottom: 0; }
ol.sub li::marker { color: var(--muted); font-weight: 500; }

ul.sub { margin: 0 0 12px; padding-left: 24px; }
ul.sub:last-child { margin-bottom: 0; }
ul.sub li { margin: 0 0 8px; padding-left: 4px; }
ul.sub li::marker { color: var(--muted); }

.facts { margin: 16px 0 0; display: grid; gap: 8px; }
.facts div {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--raised);
  border: 1px solid var(--line);
}
.facts dt { font-weight: 500; color: var(--text-2); font-size: 14px; }
.facts dd { margin: 4px 0 0; }

a { color: var(--text); text-decoration-color: rgba(240, 234, 245, 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--yellow); }

/* ---------- footer ---------- */
.foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.foot-links { margin: 0 0 8px; font-size: 15px; }
.foot-links a { color: var(--text-2); }
.foot-links a[aria-current="page"] { color: var(--muted); text-decoration: none; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .top { height: 56px; padding: 0 16px; }
  .brand { font-size: 22px; }
  .brand img { width: 32px; height: 32px; }
  .hero { padding: 24px 12px 8px; }
  .hero-sign { margin-bottom: 8px; }
  .hero-title { font-size: 30px; }
  .hero-tag { font-size: 17px; margin: 12px 0 24px; }
  .band { padding: 64px 16px 0; }
  .band-title { margin-bottom: 24px; }
  main { padding: 28px 16px 24px; }
  section { padding: 20px; }
  .toc ol { columns: 1; }
  .tabs a { padding: 4px 16px; font-size: 15px; }
  .shots img { width: 200px; }
  .shots-arrow { display: none; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .steps li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; align-items: start; padding: 20px; }
  .steps .die { grid-row: span 2; }
  .steps h3 { margin: 4px 0 4px; }
  .boards { gap: 12px; }
  .board h3 { font-size: 24px; }
  .board p { margin: 0 4px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- printing ---------- */
@media print {
  body { background: #fff; color: #000; }
  .top, .lang, .toc { display: none; }
  section { border: 0; padding: 0; background: none; }
  .doc h1 { color: #000; }
  .doc[hidden] { display: none; }
}

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 8px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px;
  font-size: 18px; font-weight: 500; line-height: 1.35;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; color: var(--yellow); font-size: 24px; line-height: 1;
  transition: transform 150ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: var(--radius-card); }
.faq details p { margin: 0; padding: 0 24px 20px; color: var(--text-2); font-size: 16px; line-height: 1.55; }

/* 404 */
.notfound { padding-top: 96px; padding-bottom: 96px; text-align: center; }
.notfound p { color: var(--text-2); font-size: 18px; line-height: 1.55; }
.notfound a { color: var(--yellow); }

/* ---------- game rules pages ---------- */
.game h1 { margin-bottom: 12px; }
.lede { margin: 0 0 24px; font-size: 19px; line-height: 1.5; color: var(--text); }
.facts.row { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 24px; }
ol.howto { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
ol.howto li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  min-height: 32px;
  line-height: 1.55;
  color: var(--text-2);
}
ol.howto li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  color: var(--yellow);
  font-size: 15px; font-weight: 500;
}
ol.howto strong { color: var(--text); font-weight: 500; }
dl.scale { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
dl.scale div { padding: 12px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); text-align: center; }
dl.scale dt { font-weight: 500; }
dl.scale dd { margin: 4px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
dl.scale div:nth-child(1) dt { color: #7cc4ff; }
dl.scale div:nth-child(2) dt { color: #a9d6ff; }
dl.scale div:nth-child(3) dt { color: #ffd27a; }
dl.scale div:nth-child(4) dt { color: #ff9a5c; }
dl.scale div:nth-child(5) dt { color: #ff5c5c; }
.game-cta {
  display: grid; justify-items: center; gap: 12px;
  margin: 32px 0 0; padding: 28px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
}
.game-cta img[width="56"] { border-radius: 12px; }
.game-cta p { margin: 0; max-width: 460px; color: var(--text-2); line-height: 1.55; }
@media (max-width: 560px) {
  .facts.row { grid-template-columns: 1fr; }
  dl.scale { grid-template-columns: 1fr; }
  dl.scale div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: left; }
  dl.scale dd { margin: 0; }
}
