/* Same design tokens as the player app (apps/app/lib/theme.ts). */
:root {
  --paper: #fdf7f0;
  --surface: #ffffff;
  --ink: #142332;
  --ink-soft: #3b434d;
  --ink-muted: #505963;
  --accent: #a8471b;
  --accent-wash: #fff2e8;
  --line: #e1d9d0;
  --line-strong: #c4bcb4;
  --ok: #317a45;
  --fail: #a51e24;
  --radius: 4px;
  --display: "Petrona", Georgia, serif;
  --body: "Work Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Top bar ---- */

.topbar {
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.langs {
  display: flex;
  gap: 4px;
}

.langs button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  padding: 4px 8px;
  font: 500 13px var(--body);
  color: var(--ink-muted);
  cursor: pointer;
}

.langs button:hover {
  color: var(--ink);
}

.langs button[aria-current="true"] {
  border-color: var(--line-strong);
  color: var(--ink);
}

/* ---- Typography ---- */

.eyebrow {
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

h1 {
  margin: 0 0 8px;
  font: 600 40px/1.05 var(--display);
}

h2 {
  margin: 0;
  font: 600 24px/1.2 var(--display);
}

h3 {
  margin: 0 0 4px;
  font: 600 19px/1.3 var(--display);
}

.tagline {
  margin: 0 0 20px;
  font: italic 500 19px/1.4 var(--display);
  color: var(--accent);
}

.lead,
.body {
  margin: 0 0 24px;
  color: var(--ink-soft);
}

.small {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ---- Hero ---- */

.hero-text {
  grid-area: hero;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 0;
}

.meta dt {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.meta dd {
  margin: 2px 0 0;
  font: 600 17px var(--mono);
}

.hero-map {
  grid-area: map;
  display: none;
  width: 100%;
  height: auto;
}

.map-bg {
  fill: var(--surface);
  stroke: var(--line);
}

.map-streets path {
  fill: none;
  stroke: var(--line);
  stroke-width: 10;
  stroke-linecap: round;
}

.map-route {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-dasharray: 2 9;
  stroke-linecap: round;
}

.map-route-faint {
  stroke: var(--accent);
}

.map-area {
  fill: var(--accent-wash);
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 8 7;
}

.map-stops circle {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 3;
}

.map-stops text {
  font: 600 13px var(--mono);
  fill: var(--surface);
  text-anchor: middle;
}

.map-word {
  font: 600 16px var(--mono);
  fill: var(--accent);
  text-anchor: middle;
  letter-spacing: 0.08em;
}

/* ---- Main layout: stacked on mobile, content + sticky buy card on desktop ---- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "hero"
    "buy"
    "how"
    "gift";
  gap: 40px;
  padding-top: 32px;
  padding-bottom: 64px;
}

.buy {
  grid-area: buy;
}

.how {
  grid-area: how;
}

.gift {
  grid-area: gift;
}

/* ---- Buy card ---- */

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.buy-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.buy-price {
  margin: 0;
  font: 600 20px var(--mono);
}

.buy-price small {
  font: 400 14px var(--body);
  color: var(--ink-muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  font-size: 15px;
}

.field input {
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font: 400 17px var(--body);
  color: var(--ink);
}

.field input:focus {
  outline: 2px solid var(--ink);
  outline-offset: -1px;
}

.hint {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--ink);
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  font: 500 16px var(--body);
  color: var(--surface);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: #1f3347;
}

.button:disabled {
  opacity: 0.4;
  cursor: default;
}

.error {
  margin: 0;
  font-size: 14px;
  color: var(--fail);
}

.ticks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.ticks li {
  position: relative;
  padding-left: 24px;
}

.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--ok);
}

/* ---- How it works / gift ---- */

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

.steps li {
  display: flex;
  gap: 16px;
}

.steps p,
.gift p {
  margin: 0;
  color: var(--ink-soft);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--ink);
  font: 600 15px var(--mono);
  color: var(--surface);
}

.gift {
  padding: 24px;
  border-left: 3px solid var(--accent);
  background: var(--accent-wash);
}

.gift h2 {
  margin-bottom: 8px;
}

/* ---- Footer ---- */

.footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-muted);
}

/* ---- Success / cancel: a single centred column ---- */

.narrow {
  max-width: 560px;
  padding-top: 40px;
  padding-bottom: 64px;
}

.code {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font: 600 26px/1 var(--mono);
  letter-spacing: 0.12em;
  text-align: center;
  user-select: all;
}

#start-note {
  margin-top: 12px;
}

/* ---- Desktop ---- */

@media (min-width: 900px) {
  h1 {
    font-size: 56px;
  }

  .lead {
    font-size: 19px;
    line-height: 1.55;
  }

  .hero-map {
    display: block;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "hero buy"
      "map buy"
      "how buy"
      "gift buy";
    column-gap: 64px;
    row-gap: 48px;
    padding-top: 64px;
    padding-bottom: 96px;
  }

  .buy {
    position: sticky;
    top: 24px;
    align-self: start;
  }

  .gift {
    align-self: start;
  }

  .narrow {
    padding-top: 96px;
  }

  .narrow h1 {
    font-size: 40px;
  }
}

[hidden] {
  display: none !important;
}
