/* Double Drop website. No external fonts, scripts or trackers. */
:root {
  --bg: #f6f3ee;
  --panel: #ffffff;
  --ink: #1f1d1a;
  --muted: #6f675e;
  --line: #e6e0d8;
  --cell: #ece6dd;
  --accent: #e8532f;
  --accent-ink: #ffffff;
  --gold: #f5b82e;
  --gold-ink: #7a4e00;
  --good: #2bb673;
  --stone-1: #8a8f98;
  --stone-2: #5d636d;
  --stone-3: #3e434b;
  --shadow: 0 6px 0 rgba(0, 0, 0, 0.08);
  --radius: 22px;
  --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17150f;
    --panel: #221f19;
    --ink: #f4efe6;
    --muted: #b3a998;
    --line: #36312a;
    --cell: #2c2822;
    --shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --bg: #17150f;
  --panel: #221f19;
  --ink: #f4efe6;
  --muted: #b3a998;
  --line: #36312a;
  --cell: #2c2822;
  --shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- header / footer ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 20px; }
.brand .tile { width: 40px; height: 40px; font-size: 18px; border-radius: 12px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
footer { border-top: 1px solid var(--line); margin-top: 72px; padding-top: 28px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* ---------- blocks (same colours as the game) ---------- */
.tile {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; border-radius: 18px;
  font-weight: 800; font-size: 26px; color: #3b2a1a;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.12);
  user-select: none;
}
.v2 { background: #ff8a5b; } .v4 { background: #ffb547; } .v8 { background: #f0c93a; }
.v16 { background: #7ed36b; } .v32 { background: #3cc6a4; } .v64 { background: #36a9e1; color: #fff; }
.v128 { background: #5b7cf0; color: #fff; } .v256 { background: #8b6cf6; color: #fff; } .v512 { background: #c25fd8; color: #fff; }
.v1024 { background: #e8508b; color: #fff; font-size: 19px; } .v2048 { background: #ff4d4d; color: #fff; font-size: 19px; }
.stone { background: var(--stone-1); position: relative; }
.stone.hp2 { background: var(--stone-2); } .stone.hp3 { background: var(--stone-3); }
.stone::after {
  content: ""; position: absolute; inset: 22% 40% 22% 44%;
  border-left: 3px solid rgba(20, 22, 28, 0.55); transform: skewX(-12deg);
}
.empty { background: var(--cell); box-shadow: none; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 40px; padding-bottom: 24px; }
.eyebrow { font-weight: 700; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; font-size: 13px; margin: 0 0 10px; }
h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.04; margin: 0 0 16px; letter-spacing: -0.02em; }
.lede { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 16px; font-weight: 800; text-decoration: none; font-size: 17px;
  background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow);
}
.btn.secondary { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn[aria-disabled="true"] { opacity: 0.7; pointer-events: none; }
.note { color: var(--muted); font-size: 14px; }

/* the mini board */
.board {
  background: var(--panel); border-radius: 28px; padding: 16px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 420px; margin-left: auto;
}
.board .tile { width: 100%; height: auto; aspect-ratio: 1; font-size: clamp(16px, 3.2vw, 26px); }
.board .v1024, .board .v2048 { font-size: clamp(12px, 2.4vw, 19px); }
.hud {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center;
  background: var(--cell); border-radius: 18px; padding: 10px 16px; margin-bottom: 4px;
}
.hud b { font-size: 26px; display: block; line-height: 1; }
.hud small { color: var(--muted); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; }
.hud .goal { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.hud .goal .tile { width: 32px; height: 32px; aspect-ratio: auto; font-size: 13px; border-radius: 9px; }

/* ---------- sections ---------- */
section { padding-top: 40px; padding-bottom: 40px; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 0 0 28px; font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--panel); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 14px 0 6px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; }
.row .tile { width: 46px; height: 46px; font-size: 18px; border-radius: 13px; }
.arrow { color: var(--muted); font-weight: 800; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { background: var(--panel); border-radius: 18px; padding: 16px 18px 16px 64px; position: relative; box-shadow: var(--shadow); }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 16px; top: 14px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800;
}
.promise { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.promise div { background: var(--panel); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); font-weight: 600; }
.promise div::before { content: "✓"; color: var(--good); font-weight: 900; margin-right: 10px; }

/* ---------- legal / text pages ---------- */
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); }
.doc h2 { font-size: 24px; margin-top: 36px; }
.doc p, .doc li { color: var(--ink); }
.doc .meta { color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 700; }
.table-scroll { overflow-x: auto; }
details { background: var(--panel); border-radius: 16px; padding: 14px 18px; margin: 10px 0; box-shadow: var(--shadow); }
summary { font-weight: 700; cursor: pointer; }

/* ---------- share-link pages ---------- */
.center { text-align: center; padding-top: 72px; padding-bottom: 24px; }
.center .row { justify-content: center; margin-bottom: 24px; }
.center .cta { justify-content: center; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; }
  .top { flex-wrap: wrap; }
  .board { margin: 0 auto; }
  .cards { grid-template-columns: 1fr; }
  .promise { grid-template-columns: 1fr; }
  .nav { gap: 12px; }
}
@media (max-width: 420px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .lede { font-size: 18px; }
  .board { padding: 12px; gap: 7px; }
  .nav a { font-size: 14px; }
}
