/* Speedyword site: the game's look (pastels, rounded tiles, soft shadows). */

:root {
  --peach: #FFE3D8;
  --sky: #D8E9FA;
  --rose: #F8DAE7;
  --lavender: #E4DDF7;
  --butter: #FBEFC4;
  --green: #6AAA64;
  --green-dark: #4E8A48;
  --yellow: #C9B458;
  --gray: #787C7E;
  --ink: #111;
  --muted: #3c3c3c;
  --card: rgba(255, 255, 255, 0.72);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  --radius: 22px;
  --page: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--peach);
  line-height: 1.55;
  font-size: 18px;
}

a { color: var(--green-dark); font-weight: 600; }
a:hover { color: var(--ink); }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 20px; }

section { padding: 64px 0; }
section.sky { background: var(--sky); }
section.rose { background: var(--rose); }
section.lavender { background: var(--lavender); }
section.butter { background: var(--butter); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }

/* ---- Header ---- */

.topbar { padding: 18px 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: var(--shadow); }
.topbar nav a { margin-left: 18px; text-decoration: none; color: var(--ink); font-weight: 600; }
.topbar nav a:hover { color: var(--green-dark); }

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

.hero { padding: 32px 0 72px; text-align: center; }
.hero .icon { width: 132px; height: 132px; border-radius: 30px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18); }

.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0 22px; }
.tile {
  width: clamp(34px, 7.4vw, 62px);
  height: clamp(34px, 7.4vw, 62px);
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: clamp(20px, 4.4vw, 36px);
  color: #fff;
  box-shadow: var(--shadow);
  animation: drop 0.5s cubic-bezier(0.55, 0, 1, 0.45) both;
}
.tile.g { background: var(--green); }
.tile.y { background: var(--yellow); }
.tile.x { background: var(--gray); }

/* The game's heavy "drop into place" reveal */
@keyframes drop {
  0% { transform: translateY(-120px) scale(1.1); opacity: 0; }
  70% { transform: translateY(0) scale(1); opacity: 1; }
  80% { transform: translateY(4px) scale(1.12, 0.84); }
  90% { transform: translateY(-1px) scale(0.97, 1.04); }
  100% { transform: none; }
}
.tile:nth-child(2) { animation-delay: 0.08s; }
.tile:nth-child(3) { animation-delay: 0.16s; }
.tile:nth-child(4) { animation-delay: 0.24s; }
.tile:nth-child(5) { animation-delay: 0.32s; }
.tile:nth-child(6) { animation-delay: 0.40s; }
.tile:nth-child(7) { animation-delay: 0.48s; }
.tile:nth-child(8) { animation-delay: 0.56s; }
.tile:nth-child(9) { animation-delay: 0.64s; }
.tile:nth-child(10) { animation-delay: 0.72s; }
@media (prefers-reduced-motion: reduce) { .tile { animation: none; } }

.tagline { font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; margin: 0 auto 10px; max-width: 760px; }
.lede { font-size: 19px; color: var(--muted); max-width: 680px; margin: 0 auto 30px; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 18px;
  box-shadow: var(--shadow);
}
.store-badge:hover { color: #fff; transform: translateY(-1px); }
.small { font-size: 15px; color: var(--muted); margin-top: 14px; }

/* ---- Feature cards ---- */

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px; }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.card .badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card p { color: var(--muted); margin: 0; }

/* ---- How to play ---- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.steps li {
  counter-increment: step;
  background: var(--card);
  border-radius: 18px;
  padding: 18px 20px 18px 72px;
  position: relative;
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 22px; height: 22px; border-radius: 6px; display: inline-block; }

/* ---- Screenshots ---- */

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; margin-top: 28px; }
.shot { margin: 0; text-align: center; }
.shot .frame {
  aspect-ratio: 9 / 19.5;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.55);
  border: 3px dashed rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-weight: 600;
}
.shot .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .frame:has(img) { border: none; }
.shot figcaption { margin-top: 12px; font-weight: 600; }

/* ---- Text pages (support, privacy) ---- */

.page { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px clamp(22px, 5vw, 48px); margin: 12px 0 64px; }
.page h1 { font-size: clamp(30px, 5vw, 42px); }
.page h2 { font-size: 24px; margin-top: 1.6em; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 0.4em; }
.updated { color: var(--muted); font-size: 15px; }

details { background: rgba(255, 255, 255, 0.6); border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
details summary { font-weight: 700; cursor: pointer; }
details p { margin: 10px 0 0; color: var(--muted); }

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

footer { padding: 34px 0 44px; text-align: center; color: var(--muted); font-size: 15px; }
footer a { margin: 0 10px; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  section { padding: 48px 0; }
  .topbar nav { white-space: nowrap; }
  .topbar nav a { margin-left: 12px; }
  .brand { font-size: 18px; }
  /* all ten title tiles on one line */
  .tiles { gap: 4px; flex-wrap: nowrap; }
  .tile { width: 8.2vw; height: 8.2vw; border-radius: 8px; font-size: 5vw; }
}
