/* Self-hosted (no third-party font CDN): same Fredoka as in the game, OFL. */
@font-face {
  font-family: "Fredoka";
  src: url("fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg-top: #ffe7c7;
  --bg-bottom: #f6b98a;
  --surface: #fff8ee;
  --surface-2: #fdeedb;
  --line: #ecd3b4;
  --ink: #3b2a20;
  --muted: #7a5c48;
  --primary: #ff7a45;
  --primary-shadow: #d9552a;
  --accent: #2ec4b6;
  --accent-shadow: #1f8f85;
  --gold: #ffc94a;
  --gold-shadow: #e09b12;
  --frame: #c98b5a;
  --frame-dark: #8e5a33;
  --radius: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: linear-gradient(180deg, var(--bg-top) 0, #fbd3ab 900px, var(--bg-top) 1800px);
  color: var(--ink);
  font-family: "Fredoka", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: #c2491c; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; max-width: 1040px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.nav .links { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; }
.nav .links a { color: var(--muted); font-weight: 600; }
.nav .links a:hover { color: var(--ink); text-decoration: none; }
.lang { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.04em; }
.lang strong { color: var(--ink); }
.lang a { color: var(--muted); }

/* Hero */
.hero { text-align: center; padding: 40px 20px 20px; }
.hero .app-icon {
  width: 120px; height: 120px; border-radius: 30px;
  box-shadow: 0 18px 50px rgba(217, 85, 42, 0.35);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 22px 0 8px; padding: 6px 16px; border-radius: 999px;
  background: rgba(46, 196, 182, 0.16); color: #17786f;
  font-size: 0.95rem; font-weight: 700;
}
.hero h1 {
  font-size: clamp(2.3rem, 6.5vw, 4rem); line-height: 1.05; font-weight: 700;
  letter-spacing: -0.01em; margin: 10px auto 16px; max-width: 820px;
}
.hero h1 .grad {
  background: linear-gradient(180deg, #ffd85c 0%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1.5px var(--frame-dark);
}
.hero p.tag { color: var(--muted); font-size: 1.2rem; max-width: 640px; margin: 0 auto 26px; }

/* 3D pill buttons, same as in the game */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; margin: 8px; border-radius: 999px;
  font-weight: 700; font-size: 1.1rem; color: #fff;
  background: var(--primary); box-shadow: 0 5px 0 var(--primary-shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--primary-shadow); }
.btn small { font-weight: 600; opacity: 0.85; font-size: 0.85rem; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--gold-shadow); }
.btn-gold:active { box-shadow: 0 1px 0 var(--gold-shadow); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: 0 5px 0 var(--line); }
.btn-ghost:active { box-shadow: 0 1px 0 var(--line); }

/* Phones */
.phones {
  display: flex; gap: 22px; justify-content: flex-start; align-items: flex-start;
  padding: 36px 20px 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.phones figure { flex: 0 0 auto; scroll-snap-align: center; }
.phones figure:first-child { margin-left: auto; }
.phones figure:last-child { margin-right: auto; }
.phones figure:nth-child(even) { transform: translateY(-18px); }
.phone {
  width: 236px; border-radius: 36px; padding: 9px;
  background: linear-gradient(160deg, var(--frame), var(--frame-dark));
  box-shadow: 0 26px 60px rgba(142, 90, 51, 0.35);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 28px; }
.phones figcaption { text-align: center; color: var(--muted); font-size: 0.95rem; margin-top: 12px; font-weight: 600; }

/* Sections */
section { padding: 56px 0; }
section h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); font-weight: 700; margin-bottom: 8px; }
section .sub { color: var(--muted); margin-bottom: 28px; max-width: 680px; font-size: 1.05rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: step; }
.step, .card, details, .promise, .download {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--line), 0 14px 30px rgba(142, 90, 51, 0.12);
}
.step { padding: 22px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  margin-bottom: 12px; background: var(--primary); color: #fff; font-weight: 700;
  box-shadow: 0 3px 0 var(--primary-shadow);
}
.step h3, .card h3 { font-size: 1.15rem; margin-bottom: 4px; font-weight: 700; }
.step p, .card p { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card { padding: 22px; }
.card .ic {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  font-size: 1.35rem; margin-bottom: 12px; background: var(--surface-2);
}

.promise { padding: 30px; }
.promise ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.promise li { color: var(--muted); padding-left: 28px; position: relative; }
.promise li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-shadow); font-weight: 700; }
.promise li strong { color: var(--ink); }

.download { padding: 34px 28px; text-align: center; }
.download .meta { color: var(--muted); margin: 6px 0 18px; }
.download .sha {
  display: block; margin: 18px auto 0; max-width: 640px; font-size: 0.82rem; color: var(--muted);
  word-break: break-all; font-family: ui-monospace, Consolas, monospace;
}
.howto { text-align: left; max-width: 620px; margin: 22px auto 0; color: var(--muted); padding-left: 22px; }
.howto li { margin-bottom: 6px; }

details { padding: 16px 20px; margin-bottom: 12px; }
details summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); margin-top: 10px; }

/* Legal pages */
.legal { padding-top: 30px; padding-bottom: 80px; max-width: 760px; }
.legal h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 6px; }
.legal .updated { color: var(--muted); margin-bottom: 26px; }
.legal h2 { font-size: 1.3rem; margin: 30px 0 10px; padding-top: 10px; border-top: 2px dashed var(--line); font-weight: 700; }
.legal h2:first-of-type { border-top: none; }
.legal p, .legal li { margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.callout {
  background: var(--surface); border-left: 5px solid var(--accent); border-radius: 14px;
  padding: 16px 18px; margin: 18px 0; box-shadow: 0 4px 0 var(--line);
}

/* Footer */
footer { padding: 30px 20px 50px; text-align: center; color: var(--muted); font-size: 0.95rem; }
footer a { color: var(--muted); margin: 0 8px; font-weight: 600; }
footer a:hover { color: var(--ink); }
footer .made { margin-top: 10px; font-size: 0.88rem; }

@media (max-width: 640px) {
  .nav .links a.hide-sm { display: none; }
  .phone { width: 210px; }
  .phones figure:nth-child(even) { transform: none; }
}
