/*
 * Heist In 30 - the game page (landing/<lang>/index.html, task 74). Builds on style.css (tokens
 * copied from packages/heist_design). Direction B "Skok stulecia": ink outlines, hard shadows,
 * dotted paper, a dark dock. Legal pages do not load this file.
 */

@font-face { font-family: Archivo; font-weight: 600; font-display: swap; src: url("/fonts/Archivo-SemiBold.woff2") format("woff2"); }
@font-face { font-family: Archivo; font-weight: 700; font-display: swap; src: url("/fonts/Archivo-Bold.woff2") format("woff2"); }
@font-face { font-family: "Archivo Display"; font-weight: 800; font-display: swap; src: url("/fonts/ArchivoSemiExpanded-ExtraBold.woff2") format("woff2"); }

:root {
  --ink: #1f1a16;
  --blue: #2445c2;
  --on-blue: #ffffff;
  --on-blue-muted: #dfe5ff;
  --node: #fff9f0;
  --edge: #a8957d;
  --guard: #bf4416;
  --on-guard: #ffffff;
  --player: #0e6f71;
  --on-player: #ffffff;
  --danger: #be1e2d;
  --on-danger: #ffffff;
  --success: #21774a;
  --on-success: #ffffff;
  --bank: #64798a;
  --dock: #1f1a16;
  --dock-raised: #322a23;
  --dock-line: #5a4d42;
  --on-dock: #f3e8d8;
  --dock-muted: #bbae9c;
  --dock-player: #4fd1c5;
  --dock-guard: #ff8b4d;
  --dock-tool: #f08cc0;
  --dock-loot: #ffd25e;
  --dock-accent: #9db0ff;
  --gutter: 16px;
  scrollbar-color: var(--edge) var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --node: #2f2539;
    --edge: #7d6c84;
    --guard: #ff8b4d;
    --on-guard: #1b1420;
    --player: #4fd1c5;
    --on-player: #1b1420;
    --danger: #ff6b6b;
    --on-danger: #1b1420;
    --success: #5ed193;
    --on-success: #1b1420;
    --bank: #9fb3c2;
    --dock: #0f0a13;
    --dock-raised: #261d2d;
    --dock-line: #4a3d52;
    --on-dock: #f3e6d3;
    --dock-muted: #bcad9b;
  }
}

html { scroll-behavior: smooth; }

body {
  font: 600 1rem/1.5 Archivo, system-ui, sans-serif;
  overflow-x: hidden;
}

::selection { background: var(--loot); color: var(--on-loot); }

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

h1, h2 {
  margin: 0;
  font-family: "Archivo Display", Archivo, sans-serif;
  font-weight: 800;
  font-stretch: normal;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 { font-size: clamp(2.25rem, 7vw, 4rem); line-height: 1.02; }

.shell { max-width: 1160px; margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }

.band { padding-block: clamp(56px, 10vw, 112px); }

/* ---- sticker bits ---- */

.sticker {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 10px 4px 4px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--loot);
  color: #1f1a16;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: "Archivo Display", Archivo, sans-serif;
  font-weight: 800;
  font-size: 0.8125rem;
  text-transform: uppercase;
  text-decoration: none;
}

.sticker img { width: 32px; height: 32px; border-radius: 7px; }

.lang {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 11px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff9f0;
  color: #1f1a16;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.press { transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 120ms cubic-bezier(0.16, 1, 0.3, 1); }
.press:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.press:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }

.store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 20px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--loot);
  color: #1f1a16;
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "Archivo Display", Archivo, sans-serif;
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.store-link.is-soon {
  border-style: dashed;
  border-color: currentColor;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font-family: Archivo, sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

/* ---- hero: the dare and the demo ---- */

.hero {
  padding-block: 16px 40px;
  background: var(--blue) radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px) 0 0 / 16px 16px;
  color: var(--on-blue);
  border-bottom: 3px solid var(--ink);
}

.hero a:focus-visible, .final a:focus-visible { outline-color: #ffffff; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.topbar-end { display: flex; gap: 8px; }
.lang-play { background: var(--loot); }

.kind { margin: 12px 0 0; font-size: 0.9375rem; font-weight: 700; line-height: 1.3; }

.dare { margin-block: clamp(4px, 1svh, 20px) clamp(10px, 1.6svh, 24px); }

.hero h1 {
  font-size: clamp(3.25rem, min(16.5vw, 7.6svh), 6rem);
  line-height: 0.94;
  text-shadow: 4px 4px 0 #1f1a16;
}

.dare p {
  margin: 8px 0 0;
  font-size: clamp(1rem, 2.4vw, 1.375rem);
  font-weight: 700;
  line-height: 1.3;
  max-width: 34ch;
}

/* the level card */

.stage {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--bg) radial-gradient(var(--paper-dot) 1px, transparent 1px) 0 0 / 16px 16px;
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--text);
  overflow: hidden;
}

.board { position: relative; padding: 6px 8px 2px; }

.level-tags { position: absolute; z-index: 1; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border: 1.8px solid var(--outline);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 2px 2px 0 var(--shadow);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tag-loot { background: var(--loot); color: var(--on-loot); }

.map { display: block; width: 100%; max-height: 30svh; margin-inline: auto; }

.map .edge { stroke: var(--edge); stroke-width: 7; stroke-linecap: round; }
.map .plan { stroke: var(--player); stroke-width: 3; stroke-linecap: round; fill: none; }
.map .patrol { stroke: var(--guard); stroke-width: 2.2; stroke-dasharray: 2 5; stroke-linecap: round; fill: none; }
.map .disc { fill: var(--node); stroke: var(--outline); stroke-width: 3; }
.map .disc-exit { stroke: var(--accent); stroke-width: 4; }
.map .art { --body: var(--bank); --detail: var(--node); --lines: var(--outline); }
.map .label { fill: var(--text); font: 700 12.5px Archivo, sans-serif; text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.map .pill { fill: var(--node); stroke: var(--outline); stroke-width: 1.8; }
.map .pill-text { fill: var(--text); font: 700 10.5px Archivo, sans-serif; text-anchor: middle; }
.map .loot-pill { fill: var(--loot); stroke: var(--outline); stroke-width: 1.8; }
.map .loot-text { fill: var(--on-loot); font: 700 11px Archivo, sans-serif; text-anchor: middle; }
.map .bonus-pill { fill: var(--node); stroke: var(--outline); stroke-width: 1.8; stroke-dasharray: 3 2; }
.map .taken { opacity: 0.25; }
.map .guard { --body: var(--guard); --detail: var(--on-guard); --lines: #1f1a16; }
.map .thief { --body: var(--player); --detail: var(--on-player); --lines: #1f1a16; }
.map .badge { fill: var(--guard); stroke: #1f1a16; stroke-width: 1.5; }
.map .badge-text { fill: var(--on-guard); font: 700 9px Archivo, sans-serif; text-anchor: middle; }
.map .alert { fill: none; stroke: var(--danger); stroke-width: 4; opacity: 0; }
.map .alert.on { opacity: 1; }

.stamp {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 16px;
  padding: 4px 14px 6px;
  border: 4px solid currentColor;
  border-radius: 10px;
  background: var(--bg);
  color: var(--danger);
  font-family: "Archivo Display", Archivo, sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 7vw, 2.5rem);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-transform: uppercase;
  transform: translateX(-50%) rotate(-5deg);
  animation: slam 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: none;
}

.stamp.won { color: var(--success); }

.stars { display: flex; justify-content: center; gap: 4px; margin-top: 3px; }
.stars svg { width: 20px; height: 20px; fill: var(--loot); stroke: var(--outline); stroke-width: 2; stroke-linejoin: round; }

@keyframes slam {
  from { transform: translateX(-50%) rotate(-14deg) scale(1.7); opacity: 0; }
  to { transform: translateX(-50%) rotate(-5deg) scale(1); opacity: 1; }
}

/* the dock */

.dock {
  padding: 10px 12px 12px;
  border-top: 3px solid var(--ink);
  border-radius: 20px 20px 0 0;
  background: var(--dock);
  color: var(--on-dock);
}

.chips {
  position: relative;
  display: flex;
  gap: 6px;
  margin: 0 -12px 2px;
  padding: 2px 12px 8px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chips li {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 10px 4px 5px;
  border: 1.5px solid var(--dock-line);
  border-radius: 999px;
  background: var(--dock-raised);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 120ms, border-color 120ms;
}

.chips i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--dock-player); }
.chips .k-wait i { background: repeating-linear-gradient(135deg, var(--on-dock) 0 2px, var(--dock-line) 2px 4px); }
.chips .k-open i { background: var(--dock-tool); }
.chips .k-take i { background: var(--dock-loot); }
.chips .now { border-color: var(--on-dock); background: var(--dock-line); }
.chips .fresh { border-color: var(--dock-loot); }

.clock { position: relative; padding-top: 32px; display: grid; grid-template-columns: 64px 1fr; column-gap: 6px; align-items: center; }

.row-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.1; color: var(--dock-muted); text-transform: uppercase; }

.track { position: relative; grid-column: 2; grid-row: 1 / span 2; touch-action: pan-y; }

.lane { position: relative; height: 15px; margin-inline: 11px; border-radius: 5px; background: var(--dock-raised); overflow: hidden; }
.lane + .lane { margin-top: 4px; }
.lane-g { height: 7px; }
.lane span { position: absolute; top: 1px; bottom: 1px; border-radius: 3px; }
.lane .k-move { background: var(--dock-player); }
.lane .k-wait { background: repeating-linear-gradient(135deg, var(--on-dock) 0 2px, var(--dock-line) 2px 5px); }
.lane .k-open { background: var(--dock-tool); }
.lane .k-take { background: var(--dock-loot); }
.lane .k-guard { background: var(--dock-guard); }

.range {
  position: absolute;
  inset: -16px 0 -16px 0;
  width: 100%;
  height: calc(100% + 32px);
  margin: 0;
  background: transparent;
  cursor: grab;
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-y;
}
.range:disabled { cursor: default; }
.range:active { cursor: grabbing; }
.range::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.range::-moz-range-track { height: 100%; background: transparent; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 44px;
  margin-top: 8px;
  border: 3px solid var(--dock-accent);
  border-radius: 8px;
  background: var(--on-dock) linear-gradient(var(--dock), var(--dock)) center / 10px 2px no-repeat;
}
.range::-moz-range-thumb {
  width: 16px;
  height: 38px;
  border: 3px solid var(--dock-accent);
  border-radius: 8px;
  background: var(--on-dock);
}
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { border-color: var(--dock-loot); box-shadow: 0 0 0 2px var(--dock-loot); }
.range:focus-visible::-moz-range-thumb { border-color: var(--dock-loot); }

.bubble {
  position: absolute;
  top: -40px;
  left: 11px;
  padding: 1px 8px;
  border-radius: 8px;
  background: var(--on-dock);
  color: var(--dock);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.ticks { display: flex; justify-content: space-between; margin: 7px 11px 0 81px; color: var(--dock-muted); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ticks span { width: 0; display: flex; justify-content: center; }

.actions { display: flex; align-items: stretch; flex-direction: column; gap: 8px; margin-top: 8px; }

.status { min-height: 1.4em; margin: 0; font-size: 0.9375rem; line-height: 1.4; }

.go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 16px;
  border: 2.5px solid #000000;
  border-radius: 12px;
  background: var(--dock-accent);
  color: #1b1420;
  box-shadow: 3px 3px 0 #000000;
  font: 800 1.125rem/1.2 "Archivo Display", Archivo, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 120ms cubic-bezier(0.16, 1, 0.3, 1);
}
.go:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #000000; }
.go:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 #000000; }
.go:disabled { border-color: var(--dock-line); background: var(--dock-raised); color: var(--dock-muted); box-shadow: none; cursor: default; }
.go svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.go.play-store { background: var(--dock-loot); }

.again { align-self: center; min-height: 44px; padding-inline: 12px; border: 0; background: none; color: var(--on-dock); font: 700 0.9375rem Archivo, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }
.hero-cta .store-link { flex: 1 1 auto; }
.hero-cta small { flex: 1 1 100%; font-size: 0.9375rem; font-weight: 700; color: var(--on-blue-muted); text-align: center; }

/* ---- no luck, only the plan ---- */

.lede { max-width: 58ch; margin: 18px 0 0; font-size: clamp(1.0625rem, 2vw, 1.25rem); line-height: 1.5; }

.rail {
  display: flex;
  gap: 16px;
  margin: 36px calc(-1 * var(--gutter)) 0;
  padding: 4px var(--gutter) 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  list-style: none;
  scrollbar-width: thin;
}
.rail li { flex: 0 0 min(66vw, 280px); margin: 0; scroll-snap-align: center; }
.rail li:nth-child(even) { margin-top: 28px; }
.rail img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--shadow); }

/* ---- eight buildings ---- */

.buildings { background: var(--dock); color: var(--on-dock); border-block: 3px solid var(--ink); padding-bottom: 0; }

.bands { margin: 36px 0 0; padding: 0; list-style: none; }

.bands li {
  margin: 0;
  border-top: 3px solid #1f1a16;
  color: #ffffff;
}
.bands .inner { display: grid; grid-template-columns: 1fr 92px; align-items: center; gap: 12px; padding-block: 14px; }
.bands b { display: block; font: 800 clamp(1.375rem, 4.4vw, 2.5rem)/1.05 "Archivo Display", Archivo, sans-serif; }
.bands span { display: block; margin-top: 4px; max-width: 46ch; font-size: 0.9375rem; line-height: 1.35; }
.bands img { display: block; width: 92px; height: 58px; }

.b-bank { background: #64798a; }
.b-museum { background: #8a6a55; }
.b-casino { background: #9b3a4a; }
.b-datacenter { background: #3f7a7a; }
.b-train { background: #5e7a4e; }
.b-lab { background: #6a5e8e; }
.b-base { background: #7a6e3f; }
.b-plane { background: #4e6e8e; }

/* ---- three stars ---- */

.rules { margin: 32px 0 0; padding: 0; list-style: none; }
.rules li { display: flex; align-items: center; gap: 14px; margin: 0; padding-block: 8px; font: 800 clamp(1.625rem, 6vw, 3rem)/1.1 "Archivo Display", Archivo, sans-serif; }
.rules svg { flex: none; width: 1.15em; height: 1.15em; fill: var(--loot); stroke: var(--outline); stroke-width: 1.8; stroke-linejoin: round; }

/* ---- questions ---- */

.faq-band { padding-block: 0 clamp(56px, 10vw, 112px); }
.faq { max-width: 72ch; margin-top: 28px; border-bottom: 2px solid var(--outline); }
.faq details { padding-block: 0; border-top: 2px solid var(--outline); }
.faq summary { min-height: 44px; padding-block: 14px; font-size: 1.125rem; font-weight: 700; line-height: 1.3; cursor: pointer; }
.faq summary::marker { color: var(--accent); }
.faq details p { max-width: 62ch; margin: 0; padding-bottom: 16px; }

/* ---- small print ---- */

.print { padding-block: 8px clamp(56px, 10vw, 112px); }
.print-lines { max-width: 62ch; color: var(--text-muted); }
.print-lines a { color: inherit; }
.sticker-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
.sticker-row li { margin: 0; padding: 7px 12px; border: 2px solid var(--outline); border-radius: 8px; background: var(--surface); box-shadow: 3px 3px 0 var(--shadow); font-weight: 700; }

/* ---- last call ---- */

.final {
  padding-block: clamp(56px, 10vw, 112px);
  background: var(--blue) radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px) 0 0 / 16px 16px;
  color: var(--on-blue);
  border-top: 3px solid var(--ink);
}
.final h2 { text-shadow: 3px 3px 0 #1f1a16; }
.final .stores { margin-top: 28px; }
.final .stores-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }

.site-foot { margin: 0; padding-block: 24px calc(24px + env(safe-area-inset-bottom)); background: var(--dock); color: var(--dock-muted); font-size: 0.875rem; }
.site-foot p { margin: 0; }
.site-foot a { display: inline-block; padding-block: 6px; color: var(--on-dock); text-underline-offset: 3px; }

/* ---- wider screens: the same card turned into a plan table ---- */

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .hero { padding-block: 24px 56px; }
  .dare { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
  .dare p { margin: 0 0 6px; flex: 0 1 18em; text-align: right; }
  .stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .board { padding: 16px; }
  .map { max-height: 500px; }
  .dock { display: flex; flex-direction: column; justify-content: center; padding: 24px; border-top: 0; border-left: 3px solid var(--ink); border-radius: 20px 0 0 20px; }
  .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .actions { margin-top: 20px; }
  .lane { height: 20px; }
  .lane-g { height: 10px; }
  .status { font-size: 1.0625rem; min-height: 4.2em; }
  .chips li { font-size: 0.9375rem; }
  .hero-cta { margin-top: 24px; }
  .hero-cta .store-link { flex: 0 0 auto; }
  .hero-cta small { flex: 0 1 auto; text-align: left; }
  .rail { justify-content: space-between; margin-inline: 0; padding-inline: 0; overflow: visible; }
  .rail li { flex: 1 1 0; min-width: 0; }
  .bands .inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px; padding-block: 18px; gap: 32px; }
  .bands span { margin-top: 0; font-size: 1.0625rem; }
  .bands img { width: 120px; height: 75px; }
  .b-row { display: contents; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .rules { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp { animation: none; }
  .press, .go { transition: none; }
}
