/* Topple Day marketing page (index.html). Builds on style.css (header, footer, store badges, colors). Warm sunset
   colors from the game's art: brick, cream, teal, crane yellow, a dusk sky. */

body.home {
  --brick: #d9533b;
  --brick-deep: #9a3f20;
  --cream: #fff6e8;
  --sky: #f6d3b5;
  --dusk: #6b4f9a;
  --crane: #e8b23a;
  --navy: #2e2a4a;
  background: linear-gradient(180deg, #f9d9bd 0%, #fbe7d3 30%, #fdf1e4 60%, #f3e6f4 100%);
  background-attachment: scroll;
  font-weight: 600;
}
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { left: 12px; }
.home .site-head { gap: 8px 16px; }
.home .site-head nav { margin-left: auto; }
.head-stores .store-google img { height: 56px; margin: -10px -8px; }
.head-stores .store-apple img { height: 36px; }

main#content { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
h2 { border-top: 0; padding-top: 0; margin: 0 0 6px; font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h2::before { display: none; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 1.05rem; }
.band { margin: 64px 0; scroll-margin-top: 84px; }
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font: 800 1.1rem/1 var(--display); color: #fff; background: var(--brick);
  padding: 14px 24px; border-radius: 16px; box-shadow: 0 6px 0 var(--brick-deep), 0 14px 26px rgba(154, 63, 32, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn:hover { color: #fff; filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--brick-deep), 0 8px 18px rgba(154, 63, 32, 0.2); }
.btn.ghost { background: rgba(255, 255, 255, 0.85); color: var(--brick-deep); box-shadow: 0 4px 0 #e6c3a4, 0 10px 22px rgba(120, 70, 30, 0.12); }
.btn.ghost:hover { color: var(--brick-deep); }
.fine { color: var(--muted); font-size: 0.86rem; }

/* ------------------------------------------------------------------ hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: center; padding-top: 28px; }
.kicker { display: inline-block; margin: 0; padding: 4px 14px; border-radius: 999px; background: rgba(47, 143, 131, 0.14); color: #1d5f57; font-weight: 800; }
.hero h1 { margin: 8px 0 0; padding: 0; line-height: 0; }
.logo { width: min(520px, 100%); height: auto; filter: drop-shadow(0 14px 18px rgba(120, 50, 20, 0.22)); }
.lead { font: 800 clamp(1.3rem, 2.6vw, 1.7rem)/1.3 var(--display); margin: 6px 0 18px; color: var(--navy); }
.hero .store-row { margin-bottom: 14px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.chips li { background: rgba(255, 255, 255, 0.82); border-radius: 999px; padding: 6px 14px; color: var(--muted); box-shadow: 0 4px 12px rgba(120, 70, 30, 0.08); }
.chips b { color: var(--brick-deep); font-family: var(--display); font-size: 1.1rem; margin-right: 2px; }
.hero-art { position: relative; min-height: 560px; }
.splash { position: absolute; right: 0; top: 0; width: 72%; height: 100%; object-fit: cover; object-position: 50% 70%; border-radius: 32px; box-shadow: var(--shadow); }
.phone {
  position: relative; width: 250px; aspect-ratio: 9 / 16; border-radius: 34px; overflow: hidden; background: #111;
  border: 8px solid #22202f; box-shadow: 0 24px 50px rgba(40, 20, 60, 0.35);
}
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-art .phone { position: absolute; left: 0; bottom: 8px; transform: rotate(-4deg); }

/* ------------------------------------------------------------------ how a day works */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; margin: 0; counter-reset: step; }
.steps li { background: var(--cream); border-radius: 26px; padding: 22px 22px 18px; box-shadow: var(--shadow); position: relative; }
.steps li::before {
  counter-increment: step; content: counter(step); position: absolute; top: 16px; right: 18px;
  font: 800 2rem/1 var(--display); color: rgba(217, 83, 59, 0.2);
}
.steps img { width: 56px; height: 56px; }
.steps h3 { margin: 8px 0 4px; font-size: 1.3rem; }
.steps p { margin: 0; color: var(--muted); }

/* ------------------------------------------------------------------ try it */
.try { text-align: center; }
.try .sub { max-width: 640px; margin-left: auto; margin-right: auto; }
.stage {
  position: relative; width: min(480px, 100%); margin: 0 auto; border-radius: 30px; overflow: hidden;
  background: linear-gradient(180deg, #7c5ea8 0%, #d98fa0 48%, #f6c69a 100%);
  box-shadow: 0 24px 50px rgba(60, 30, 80, 0.28); touch-action: none; user-select: none; -webkit-user-select: none;
}
.stage canvas { display: block; width: 100%; height: auto; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage-top { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; pointer-events: none; }
.pill { background: rgba(255, 255, 255, 0.9); color: var(--navy); border-radius: 999px; padding: 3px 12px; font-weight: 800; font-size: 0.92rem; white-space: nowrap; }
.pill.rule { order: 3; flex-basis: 100%; width: 100%; white-space: normal; text-align: left; border-radius: 14px; font-size: 0.85rem; background: rgba(46, 42, 74, 0.72); color: #fff; }
.height { margin-left: auto; white-space: nowrap; font: 800 1.9rem/1 var(--display); color: #fff; text-shadow: 0 2px 10px rgba(60, 20, 40, 0.45); }
.queue { position: absolute; right: 12px; top: 96px; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
  background: rgba(255, 255, 255, 0.22); border-radius: 14px; padding: 6px; }
.queue img { height: 22px; width: auto; max-width: 36px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); }
.queue img:first-child { height: 30px; max-width: 48px; }
.stage-bottom { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.round {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; border-radius: 999px;
  padding: 6px 14px 6px 8px; background: rgba(255, 255, 255, 0.92); color: var(--navy); font: 800 0.95rem/1 var(--font);
  box-shadow: 0 4px 12px rgba(40, 20, 60, 0.2);
}
.round img { width: 28px; height: 28px; }
.stage-bottom .left { color: #fff; font-weight: 800; text-shadow: 0 1px 6px rgba(40, 20, 40, 0.5); }
.result {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 24px; background: rgba(255, 246, 232, 0.94); backdrop-filter: blur(4px);
}
.result .stamp { width: 70%; height: auto; margin-bottom: 4px; }
.result-title { margin: 0; font: 800 1.5rem/1.2 var(--display); color: var(--navy); }
.result-height { margin: 0; font: 800 3rem/1 var(--display); color: var(--brick); }
.result-text { margin: 0; color: var(--muted); }
.result .btn { margin: 10px 0 4px; }
.result-more { margin: 6px 0 4px; font-size: 0.92rem; color: var(--muted); max-width: 340px; }
.result .store-row { justify-content: center; }
.nolib { padding: 24px; color: #fff; }
.try .fine { max-width: 560px; margin: 14px auto 0; }

/* ------------------------------------------------------------------ rule days */
.week { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; padding: 0; margin: 0; }
.day { background: rgba(255, 255, 255, 0.7); border-radius: 20px; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 190px; }
.day .dname { font: 800 0.85rem/1 var(--display); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.day b { font-family: var(--display); font-size: 1.15rem; color: var(--navy); }
.day span:last-child { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.day.rule { background: var(--cream); box-shadow: var(--shadow); }
.day.crew { background: linear-gradient(160deg, #2f8f83, #24786e); color: #fff; box-shadow: var(--shadow); }
.day.crew b, .day.crew .dname, .day.crew span:last-child { color: #fff; }
.day img, .glyph { width: 40px; height: 40px; }
.glyph { display: block; border-radius: 12px; background: var(--brick); position: relative; }
.glyph.quake { background: repeating-linear-gradient(120deg, var(--brick) 0 8px, #f3a07c 8px 12px); }
.glyph.fog { background: linear-gradient(180deg, #c9c4dc, #f1eef8); }
.glyph.crew { background: var(--crane); }
.glyph.crew::after { content: ""; position: absolute; inset: 9px 12px; border-radius: 4px; background: var(--brick-deep); box-shadow: -7px 12px 0 -2px #fff, 7px 12px 0 -2px #fff; }

/* ------------------------------------------------------------------ watch it fall */
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
.split-art { display: flex; justify-content: center; }
.split-art .phone { width: 260px; transform: rotate(3deg); }
.split-copy p { font-size: 1.1rem; }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; }
.ticks li { position: relative; padding-left: 34px; margin: 10px 0; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 7px; background: var(--teal); }
.ticks li::after { content: ""; position: absolute; left: 7px; top: 7px; width: 7px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(40deg); }

/* ------------------------------------------------------------------ city */
.city { background: linear-gradient(160deg, #2e2a4a, #4a3f78); color: #fff; border-radius: 34px; padding: 34px 30px; }
.city h2, .city p { color: #fff; }
.city-copy { max-width: 640px; }
.city-copy p { opacity: 0.9; font-size: 1.08rem; }
.decor { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 0; margin: 18px 0 0; }
.decor li { background: rgba(255, 255, 255, 0.08); border-radius: 18px; padding: 8px 8px 10px; text-align: center; color: #fff; }
.decor img { width: 100%; height: auto; border-radius: 12px; }
.decor span { display: block; margin-top: 4px; font-size: 0.9rem; }

/* ------------------------------------------------------------------ styles */
.styles { list-style: none; display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; padding: 0; margin: 0; }
.styles li { text-align: center; }
.styles img { width: 100%; height: auto; border-radius: 18px; background: var(--cream); box-shadow: 0 8px 18px rgba(120, 70, 30, 0.12); }
.styles span { display: block; margin-top: 6px; font-size: 0.88rem; color: var(--muted); }
.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.extras > div { background: rgba(255, 255, 255, 0.7); border-radius: 22px; padding: 12px 16px; }
.extras h3 { margin: 4px 0 8px; }
.mini-row { display: flex; gap: 8px; margin: 0; }
.mini-row img { width: 58px; height: 58px; border-radius: 14px; background: var(--cream); }

/* ------------------------------------------------------------------ fair */
.fair { background: var(--cream); border-radius: 34px; padding: 34px 30px; box-shadow: var(--shadow); }
.fair-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 22px; padding: 0; margin: 0; }
.fair-grid li { padding-left: 16px; border-left: 4px solid var(--brick); color: var(--muted); }
.fair-grid b { color: var(--navy); }

/* ------------------------------------------------------------------ screenshots */
.shots-wrap { position: relative; }
.shots { list-style: none; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; margin: 0; scrollbar-width: thin; }
.shots li { flex: 0 0 220px; scroll-snap-align: start; text-align: center; }
.shots img { width: 100%; height: auto; border-radius: 22px; box-shadow: 0 12px 26px rgba(40, 20, 60, 0.2); }
.shots span { display: block; margin-top: 8px; color: var(--muted); }
.shots-nav {
  position: absolute; top: 40%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--brick-deep); font: 800 1.8rem/1 var(--display); box-shadow: 0 6px 16px rgba(40, 20, 60, 0.2);
}
.shots-nav.prev { left: -10px; }
.shots-nav.next { right: -10px; }

/* ------------------------------------------------------------------ finale */
.finale { position: relative; margin: 70px 0 20px; border-radius: 34px; overflow: hidden; min-height: 380px; display: flex; align-items: center; justify-content: center; }
.finale-city { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.finale-card { position: relative; background: rgba(255, 246, 232, 0.93); border-radius: 28px; padding: 26px 30px; text-align: center; max-width: 560px; margin: 30px 16px; box-shadow: var(--shadow); }
.finale-card h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.finale-card .store-row { justify-content: center; }
.home .site-foot nav a { white-space: nowrap; }

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 460px; max-width: 520px; width: 100%; margin: 0 auto; }
  .week { grid-template-columns: repeat(4, 1fr); }
  .styles { grid-template-columns: repeat(5, 1fr); }
  .decor { grid-template-columns: repeat(3, 1fr); }
  .fair-grid { grid-template-columns: repeat(2, 1fr); }
  .extras { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .head-stores { display: none; }
  .home .site-head nav { margin-left: 0; width: 100%; }
  main#content { padding: 0 16px; }
  .band { margin: 48px 0; }
  .hero { padding-top: 16px; text-align: center; }
  .hero .store-row, .chips { justify-content: center; }
  .hero-art { min-height: 400px; }
  .hero-art .phone { width: 190px; }
  .steps { grid-template-columns: 1fr; }
  .week { grid-template-columns: repeat(2, 1fr); }
  .day { min-height: 0; }
  .split { grid-template-columns: 1fr; gap: 22px; }
  .split-art .phone { width: 210px; }
  .city, .fair { padding: 26px 18px; border-radius: 26px; }
  .styles { grid-template-columns: repeat(3, 1fr); }
  .fair-grid { grid-template-columns: 1fr; }
  .shots li { flex-basis: 64%; }
  .shots-nav { display: none; }
  .height { font-size: 1.6rem; }
}
@media (max-width: 440px) {
  .round { padding: 6px; }
  .round span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .store { transition: none; }
  .shots { scroll-behavior: auto; }
}
