/* BatakSportPro — bataksport.org
 *
 * One stylesheet for the landing page and the two legal pages. Static and
 * self-contained on purpose: no web font, no script, nothing fetched from
 * anywhere else. The privacy policy promises no tracking, and a page that
 * pulled a font from a third party would break that promise on load.
 *
 * The palette is the app's own (lib/design_system/tokens/app_colors.dart in
 * the Flutter app), so a player who follows a link out of the app lands
 * somewhere that looks like the same room.
 */

:root {
  /* Surfaces */
  --canvas: #000000;
  --surface: #0b0c10;
  --surface-sunken: #09090b;
  --surface-raised: #16171c;
  --surface-overlay: #202128;

  /* Borders */
  --border-subtle: #17181d;
  --border: #232429;
  --border-strong: #2e2f36;

  /* Brand: red is intent */
  --primary: #d32f2f;
  --primary-bright: #ff4d4d;
  --primary-pressed: #a31f1f;
  --primary-wash: rgba(211, 47, 47, 0.15);
  --primary-glow: rgba(211, 47, 47, 0.3);

  /* Accent: gold is reward */
  --gold: #f0b429;
  --gold-dim: #8a6a1e;
  --gold-wash: rgba(240, 180, 41, 0.12);
  --gold-rim: #fde047;
  --brass-light: #f3d07a;
  --brass-dark: #b8862f;
  --seat-ring: #d4a24c;

  /* Text: exactly three steps */
  --text: #ffffff;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --text-inverse: #0b0c10;

  /* Game */
  --felt: #18de80;
  --felt-edge: #064f2c;
  --rail: #5a3220;
  --rail-light: #7a4a31;
  --rail-dark: #2e1810;
  --turn: #3be07a;
  --card-face: #f4f4f5;
  --success: #22c55e;

  /* Avatar palette — initials backgrounds */
  --av-1: #7f1d1d;
  --av-2: #1e3a5f;
  --av-3: #4c1d95;
  --av-4: #14532d;

  /* Scale */
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-xxl: 20px;
  --gutter: 16px;
  --wide: 70rem;
  --measure: 44rem;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

a {
  color: var(--primary-bright);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--gold);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  z-index: 10;
}

.skip:focus {
  left: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 40rem) {
  :root {
    --gutter: 24px;
  }
}

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

/* ── Header ─────────────────────────────────────────────────────── */

.site-header {
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--gold);
}

/* ── Hero ───────────────────────────────────────────────────────── */

.hero {
  background: radial-gradient(
      ellipse 90% 70% at 50% 0%,
      #1a0e10 0%,
      var(--surface) 70%
    ),
    var(--surface);
  border-bottom: 1px solid var(--border-subtle);
}

.hero__grid {
  display: grid;
  gap: 40px;
  padding-top: 44px;
  padding-bottom: 56px;
  align-items: center;
}

@media (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    padding-top: 72px;
    padding-bottom: 88px;
  }
}

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.age {
  display: inline-block;
  padding: 2px 8px;
  border: 1.5px solid var(--primary-bright);
  border-radius: 999px;
  color: var(--primary-bright);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary-bright);
}

.lead {
  margin: 0 0 28px;
  max-width: 34rem;
  color: var(--text-2);
  font-size: 1.12rem;
}

.soon__label {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 1rem;
}

.soon__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform {
  flex: 1 1 0;
  max-width: 12rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 18px 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  color: var(--text);
  line-height: 1.2;
}

.platform svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--text-2);
}

.platform b {
  display: block;
  font-size: 1rem;
}

.platform small {
  display: block;
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The table: felt, rail, a trick in the middle and four seats round it.
 * Sized in container units so it is the same picture at 320px and 1400px. */

.table-art {
  container-type: inline-size;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
}

.table-art__rail {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 5.5cqi;
  border-radius: 20cqi;
  background: linear-gradient(
    180deg,
    var(--rail-light),
    var(--rail) 45%,
    var(--rail-dark)
  );
  box-shadow: 0 2cqi 8cqi rgba(0, 0, 0, 0.6),
    inset 0 0.6cqi 0 rgba(255, 255, 255, 0.08);
}

.table-art__felt {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 15cqi;
  background: radial-gradient(
    ellipse 70% 70% at 50% 50%,
    var(--felt) 0%,
    var(--felt-edge) 100%
  );
  box-shadow: inset 0 0 6cqi rgba(0, 0, 0, 0.55);
}

.pcard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 19cqi;
  aspect-ratio: 5 / 7;
  margin: -13.3cqi 0 0 -9.5cqi;
  padding: 1.6cqi 1.8cqi;
  border-radius: 1.8cqi;
  background: var(--card-face);
  color: var(--text-inverse);
  box-shadow: 0 1.4cqi 3.6cqi rgba(0, 0, 0, 0.6);
  font-weight: 800;
  font-size: 5.4cqi;
  line-height: 1;
}

.pcard svg {
  width: 4.2cqi;
  height: 4.2cqi;
  margin-top: 0.8cqi;
  fill: currentColor;
}

.pcard .pip {
  position: absolute;
  right: 1.8cqi;
  bottom: 2cqi;
  width: 9cqi;
  height: 9cqi;
  margin: 0;
}

.pcard--red {
  color: var(--primary);
}

.pcard--top {
  transform: translate(0, -12.5cqi) rotate(-4deg);
}

.pcard--left {
  transform: translate(-13.5cqi, 0) rotate(-10deg);
}

.pcard--bottom {
  transform: translate(0, 12.5cqi) rotate(5deg);
}

.pcard--right {
  transform: translate(13.5cqi, 0) rotate(9deg);
  box-shadow: 0 2.2cqi 5cqi rgba(0, 0, 0, 0.65);
}

.seat {
  position: absolute;
  display: grid;
  place-items: center;
  width: 13cqi;
  height: 13cqi;
  border-radius: 50%;
  padding: 0.8cqi;
  background: linear-gradient(
    180deg,
    var(--brass-light),
    var(--seat-ring) 50%,
    var(--brass-dark)
  );
  box-shadow: 0 1cqi 2.5cqi rgba(0, 0, 0, 0.6);
}

.seat span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 0.4cqi solid #16110b;
  color: var(--text);
  font-weight: 800;
  font-size: 4cqi;
  letter-spacing: -0.02em;
}

.seat--top {
  top: -1.5cqi;
  left: 50%;
  margin-left: -6.5cqi;
}

.seat--top span {
  background: var(--av-2);
}

.seat--left {
  left: -1.5cqi;
  top: 50%;
  margin-top: -6.5cqi;
}

.seat--left span {
  background: var(--av-3);
}

.seat--right {
  right: -1.5cqi;
  top: 50%;
  margin-top: -6.5cqi;
}

.seat--right span {
  background: var(--av-4);
}

.seat--bottom {
  bottom: -1.5cqi;
  left: 50%;
  margin-left: -6.5cqi;
}

.seat--bottom span {
  background: var(--av-1);
}

/* Whose turn it is: a green ring on the face, as on the app's table. */
.seat--turn {
  box-shadow: 0 0 0 0.9cqi var(--turn), 0 0 4cqi rgba(59, 224, 122, 0.55);
}

/* ── Sections ───────────────────────────────────────────────────── */

.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 56rem) {
  .section {
    padding: 88px 0;
  }
}

.section--sunken {
  background: var(--surface-sunken);
}

.kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 14px;
  max-width: 40rem;
  font-size: clamp(1.7rem, 5.5vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.section__intro {
  margin: 0 0 36px;
  max-width: 40rem;
  color: var(--text-2);
  font-size: 1.05rem;
}

.grid-2 {
  display: grid;
  gap: 16px;
}

@media (min-width: 48rem) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.game {
  position: relative;
  overflow: hidden;
  padding: 26px 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
}

@media (min-width: 40rem) {
  .game {
    padding: 32px 30px 30px;
  }
}

.game__mark {
  position: absolute;
  right: -18px;
  top: -18px;
  width: 132px;
  height: 132px;
  color: rgba(211, 47, 47, 0.14);
  pointer-events: none;
}

.game__tag {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-wash);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.game > p {
  position: relative;
  margin: 0 0 18px;
  color: var(--text-2);
}

.ticks {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 28px;
  color: #e4e4e7;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--turn);
  border-bottom: 2.5px solid var(--turn);
  transform: rotate(-45deg);
}

.ticks li:last-child {
  margin-bottom: 0;
}

/* The price on the table: three figures, then the confirmation. */

.figures {
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
}

@media (min-width: 40rem) {
  .figures {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

.figure {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.figure dt {
  margin: 0 0 6px;
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.figure dd {
  margin: 0;
  color: var(--text-2);
  font-size: 0.98rem;
}

.figure dd strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.1rem;
}

.figure--pool {
  border-color: rgba(240, 180, 41, 0.35);
  background: linear-gradient(180deg, var(--gold-wash), var(--surface-raised));
}

.figure--pool dd strong {
  color: var(--gold);
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 18px 18px 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-2);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e03b3b, var(--primary));
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
}

.steps strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

/* Tournaments and private rooms: prose beside a panel of facts. */

.split {
  display: grid;
  gap: 28px;
  align-items: start;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
}

.split .section__intro {
  margin-bottom: 0;
}

.panel {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
}

.facts {
  margin: 0;
}

.facts div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  color: var(--text-2);
}

.facts dd {
  margin: 0;
  font-weight: 700;
}

/* Side by side only where there is room; on a phone the label sits over its
 * value, so a long value does not wrap into a ragged right-aligned block. */
@media (max-width: 39.99rem) {
  .facts div {
    flex-direction: column;
  }

  .facts dt {
    font-size: 0.85rem;
  }
}

@media (min-width: 40rem) {
  .facts dd {
    text-align: right;
  }
}

.code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 20px;
  border: 1px dashed rgba(240, 180, 41, 0.45);
  border-radius: var(--radius-xl);
  background: var(--gold-wash);
}

.code__label {
  margin: 0 0 4px;
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code__value {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.5rem, 7vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.25em;
  font-variant-numeric: tabular-nums;
}

.code__note {
  margin: 0;
  max-width: 16rem;
  color: var(--text-2);
  font-size: 0.92rem;
}

/* Feature tiles */

.features {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 64rem) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: var(--primary-wash);
  color: var(--primary-bright);
}

.feature__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.feature p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.98rem;
}

/* Closing band */

.closing {
  padding: 64px 0;
  text-align: center;
  background: radial-gradient(
      ellipse 80% 90% at 50% 100%,
      #1a0e10 0%,
      var(--surface) 70%
    ),
    var(--surface);
}

.closing img {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
}

.closing h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.closing .section__intro {
  margin: 0 auto;
}

.closing .soon__row {
  justify-content: center;
  margin-top: 20px;
}

.responsible {
  max-width: 38rem;
  margin: 36px auto 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  color: var(--text-2);
  font-size: 0.95rem;
  text-align: left;
}

.responsible strong {
  color: var(--text);
}

/* ── Legal documents ────────────────────────────────────────────── */

.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 44px var(--gutter) 72px;
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.doc .updated {
  margin: 0 0 36px;
  color: var(--text-2);
  font-size: 0.95rem;
}

.doc h2 {
  margin: 44px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 1.3rem;
  line-height: 1.3;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 1.05rem;
}

.doc p,
.doc li {
  color: #e4e4e7;
  line-height: 1.7;
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

.doc strong {
  color: var(--text);
}

.toc {
  margin: 0 0 8px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.toc p {
  margin: 0 0 8px;
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 1;
}

@media (min-width: 40rem) {
  .toc ol {
    columns: 2;
    column-gap: 32px;
  }
}

.toc li {
  margin-bottom: 4px;
  break-inside: avoid;
}

.toc a {
  color: var(--text-2);
}

.callout {
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--felt-edge);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.callout p:first-child {
  margin-top: 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout--gold {
  border-left-color: var(--gold);
}

.callout--red {
  border-left-color: var(--primary);
}

.doc table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.doc th,
.doc td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 600;
}

.doc td {
  color: #e4e4e7;
}

/* A table is the wrong shape for a phone, so on a narrow screen each row
 * becomes its own small block with the column name in front of the value. */
@media (max-width: 34rem) {
  .doc table,
  .doc tbody,
  .doc tr,
  .doc td {
    display: block;
    width: 100%;
  }

  .doc thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .doc tr {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }

  .doc td:last-child {
    border-bottom: 0;
  }

  .doc td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--text-2);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

/* ── Footer ─────────────────────────────────────────────────────── */

.site-footer {
  background: var(--surface-sunken);
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.92rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  padding-bottom: 28px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-footer a {
  color: var(--text-2);
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer__age {
  width: 100%;
  margin: 0;
  color: var(--text-3);
  font-size: 0.85rem;
}

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .doc p,
  .doc li,
  .doc td,
  .doc strong {
    color: #000;
  }

  .site-header,
  .site-footer,
  .callout,
  .toc {
    background: none;
  }

  .site-nav,
  .skip {
    display: none;
  }
}
