:root {
  --ink: #3a2a1c;
  --soft: #6e5a47;
  --parchment: #f7ecd6;
  --parchment-deep: #ead7b4;
  --wood: #9a6236;
  --leaf: #5c9e3d;
  --leaf-dark: #3f7428;
  --gold: #f1b93b;
  --berry: #d24b3e;
  --meadow: #e4efcf;
  --shadow: 0 8px 22px rgba(58, 42, 28, 0.16);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--meadow);
  line-height: 1.55;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--leaf-dark); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); text-align: center; }
h2.second { margin-top: 56px; }
.kicker { text-align: center; color: var(--leaf-dark); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 6px; }
.sub { text-align: center; color: var(--soft); max-width: 640px; margin: 10px auto 0; font-size: 1.08rem; }
section { padding: 64px 0; }
section:nth-of-type(even) { background: rgba(255, 255, 255, 0.35); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); background: rgba(228, 239, 207, 0.86); border-bottom: 1px solid rgba(58, 42, 28, 0.12); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.top img { height: 38px; width: auto; }
.top nav a { text-decoration: none; color: var(--ink); font-weight: 600; margin-left: 18px; }
.top nav a:hover { color: var(--leaf-dark); }
@media (max-width: 640px) { .top nav a:not(.cta) { display: none; } }
.pill { display: inline-block; background: var(--leaf); color: #fff !important; border-radius: 999px; padding: 8px 16px; font-weight: 700; text-decoration: none; box-shadow: inset 0 -3px 0 var(--leaf-dark); }

/* Hero */
.hero { padding: 40px 0 56px; overflow: hidden; background: linear-gradient(#cde7f6, var(--meadow) 70%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
.hero .logo { width: min(480px, 100%); animation: float 6s ease-in-out infinite; }
.hero .tag { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 600; margin: 14px 0 6px; }
.hero .blurb { color: var(--soft); margin: 0 0 22px; max-width: 520px; }
.soon { font-weight: 700; color: var(--leaf-dark); margin-bottom: 10px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badges img { height: 52px; width: auto; }
.hero .art { position: relative; justify-self: center; }
.hero .art img.key { width: min(420px, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 28px; border: 6px solid #fff; box-shadow: var(--shadow); transform: rotate(2deg); }
.hero .art img.bob { position: absolute; width: 86px; left: -30px; bottom: 30px; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 6px 6px rgba(58, 42, 28, 0.25)); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .logo { margin: 0 auto; }
  .hero .blurb { margin: 0 auto 22px; }
  .badges { justify-content: center; }
  .hero .art img.bob { left: -6px; width: 66px; }
}

/* Cards */
.card { background: var(--parchment); border: 2px solid rgba(154, 98, 54, 0.35); border-radius: 24px; box-shadow: var(--shadow); }

/* How to play */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.step { padding: 24px 22px; text-align: center; }
.step .pic { height: 110px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin-bottom: 10px; }
.step .pic img { height: 100px; width: auto; }
.step .no { display: inline-block; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); font-weight: 700; line-height: 32px; margin-bottom: 8px; }
.step h3 { font-size: 1.3rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--soft); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* Rule demo */
.rule { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; margin-top: 28px; padding: 26px; }
.board { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); width: min(300px, 76vw); aspect-ratio: 1; background: #7f5534; border: 5px solid #5a3a22; border-radius: 16px; gap: 2px; overflow: hidden; }
/* The thick box lines (2×2 boxes). */
.board::before, .board::after { content: ""; position: absolute; background: #5a3a22; pointer-events: none; }
.board::before { left: calc(50% - 3px); top: 0; bottom: 0; width: 6px; }
.board::after { top: calc(50% - 3px); left: 0; right: 0; height: 6px; }
.cell { appearance: none; border: 0; padding: 4px; margin: 0; background: #9bcb6a; cursor: pointer; display: flex; align-items: center; justify-content: center; font: inherit; border-radius: 4px; transition: background 0.15s; }
.cell { min-width: 0; min-height: 0; overflow: hidden; }
.cell img { width: 92%; height: 92%; object-fit: contain; }
.cell.ok { background: #b9e38a; box-shadow: inset 0 0 0 3px rgba(255, 255, 210, 0.85); }
.cell.no { background: #a99577; background-image: repeating-linear-gradient(45deg, rgba(210, 75, 62, 0.28) 0 6px, transparent 6px 12px); }
.cell:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.rule-text h3 { font-size: 1.4rem; margin-bottom: 6px; }
.rule-text p { margin: 0 0 10px; color: var(--soft); }
.rule-text .small { font-size: 0.95rem; }
.legend { list-style: none; padding: 0; margin: 0 0 12px; }
.legend li { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 4px 0; }
.sw { width: 22px; height: 22px; border-radius: 5px; display: inline-block; }
.sw.ok { background: #b9e38a; box-shadow: inset 0 0 0 3px rgba(255, 255, 210, 0.85), 0 0 0 1px rgba(58, 42, 28, 0.3); }
.sw.no { background: #a99577 repeating-linear-gradient(45deg, rgba(210, 75, 62, 0.28) 0 4px, transparent 4px 8px); box-shadow: 0 0 0 1px rgba(58, 42, 28, 0.3); }
@media (max-width: 720px) { .rule { grid-template-columns: 1fr; justify-items: center; text-align: center; } .legend li { justify-content: center; } }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; padding: 34px 0 6px; }
.shots figure { margin: 0; scroll-snap-align: center; text-align: center; }
.phone { border: 9px solid #2f241b; border-radius: 34px; overflow: hidden; box-shadow: var(--shadow); background: #2f241b; aspect-ratio: 780 / 1688; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shots figcaption { margin-top: 10px; color: var(--soft); font-weight: 600; font-size: 0.98rem; }
@media (max-width: 900px) {
  .shots { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 58%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px 4px 6px; }
}

/* Towers and enemies */
.towers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.tower { display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; padding: 16px 18px; align-items: start; }
.tower img { grid-row: span 2; width: 96px; height: auto; align-self: center; }
.tower h3 { font-size: 1.25rem; margin-top: 4px; }
.tower p { margin: 2px 0 0; color: var(--soft); font-size: 0.95rem; }
@media (max-width: 900px) { .towers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .towers { grid-template-columns: 1fr; } }
.enemies { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; margin-top: 26px; }
.enemy { text-align: center; }
.enemy img { width: 84px; margin: 0 auto; animation: bob 3.6s ease-in-out infinite; }
.enemy:nth-child(2n) img { animation-delay: -1.1s; }
.enemy:nth-child(3n) img { animation-delay: -2.2s; }
.enemy h4 { margin: 4px 0 0; font-size: 1.1rem; }
.enemy p { margin: 0; color: var(--soft); font-size: 0.9rem; line-height: 1.3; }
@media (max-width: 900px) { .enemies { grid-template-columns: repeat(4, 1fr); row-gap: 20px; } }

/* Worlds */
.worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 34px; }
.world { overflow: hidden; }
.world img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.world div { padding: 12px 14px 16px; }
.world small { color: var(--leaf-dark); font-weight: 700; letter-spacing: 0.06em; }
.world h3 { font-size: 1.2rem; margin: 2px 0 4px; }
.world p { margin: 0; color: var(--soft); font-size: 0.95rem; }
@media (max-width: 900px) { .worlds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .worlds { grid-template-columns: 1fr; } }

/* Promises */
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.promise { padding: 22px 18px; text-align: center; }
.promise img { height: 72px; width: auto; margin: 0 auto 8px; }
.promise h3 { font-size: 1.15rem; margin-bottom: 4px; }
.promise p { margin: 0; color: var(--soft); font-size: 0.95rem; }
@media (max-width: 900px) { .promises { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .promises { grid-template-columns: 1fr; } }

/* Closing */
.closing { text-align: center; padding: 40px 24px; }
.closing img.logo { width: min(340px, 80%); margin: 0 auto 14px; }
.closing .badges { justify-content: center; margin-top: 14px; }

footer { text-align: center; color: var(--soft); font-size: 0.95rem; padding: 28px 16px 40px; }
footer a { margin: 0 8px; }

/* Policy pages */
.page { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.page .card { padding: 22px 24px; margin: 18px 0; }
.page h1 { font-size: 2rem; margin: 6px 0 4px; }
.page h2 { font-size: 1.3rem; text-align: left; margin: 22px 0 6px; }
.page ul { padding-left: 1.2rem; }
header.site { display: flex; align-items: center; }
header.site img { height: 52px; width: auto; }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(-0.6deg); } 50% { transform: translateY(-8px) rotate(0.6deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; } }
