/* chesslings.app. The look follows the app icon: a sunny checkerboard sky, the mascot's thick navy
   outline on every card and frame, and the rainbow wordmark. No web fonts and no third-party
   requests: the rounded face is the system's where it has one. */
:root {
  --ink: #1f2a4d; --ink-soft: #4a5578; --paper: #fffaf0; --card: #ffffff;
  --sun-top: #fff1a6; --sun-bottom: #ffc44d; --blue: #4b9df0; --blue-soft: #e3f1ff; --orange: #ff7a1f;
  --yellow-soft: #fff3c4; --green: #2f9e44;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --line: 3px solid var(--ink);
  --pop: 6px 6px 0 var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 18px/1.55 var(--round); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
h2 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12; font-weight: 900; letter-spacing: -.01em; text-wrap: balance; }
h3 { font-size: 21px; line-height: 1.25; font-weight: 800; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; margin-inline: auto; }
.center { text-align: center; }
.lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--ink-soft); margin-top: 14px; text-wrap: pretty; }
.fine { font-size: 14px; color: var(--ink-soft); margin-top: 14px; }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.tint-blue { background: var(--blue-soft); }
.tint-yellow { background: var(--yellow-soft); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* ---- wordmark ---- */
.wordmark { display: inline-flex; font-weight: 900; font-size: 26px; line-height: 1; }
.wordmark i { font-style: normal; display: inline-block; -webkit-text-stroke: .16em var(--ink); paint-order: stroke fill; text-shadow: 0 .09em 0 var(--ink); transform: rotate(var(--tilt)); }
.wordmark i:nth-child(6n+1) { color: #ff6b6b; } .wordmark i:nth-child(6n+2) { color: #ffa94d; } .wordmark i:nth-child(6n+3) { color: #ffd43b; }
.wordmark i:nth-child(6n+4) { color: #69db7c; } .wordmark i:nth-child(6n+5) { color: #4dabf7; } .wordmark i:nth-child(6n) { color: #b197fc; }
.wordmark i:nth-child(odd) { --tilt: -5deg; } .wordmark i:nth-child(even) { --tilt: 4deg; }
.wordmark.big { font-size: clamp(50px, 12vw, 104px); letter-spacing: .02em; }
.wordmark.big i { animation: bob 2.4s ease-in-out infinite; animation-delay: calc(var(--n, 0) * -.2s); }
.wordmark.big i:nth-child(2) { --n: 1; } .wordmark.big i:nth-child(3) { --n: 2; } .wordmark.big i:nth-child(4) { --n: 3; } .wordmark.big i:nth-child(5) { --n: 4; }
.wordmark.big i:nth-child(6) { --n: 5; } .wordmark.big i:nth-child(7) { --n: 6; } .wordmark.big i:nth-child(8) { --n: 7; } .wordmark.big i:nth-child(9) { --n: 8; } .wordmark.big i:nth-child(10) { --n: 9; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--tilt)); } 50% { transform: translateY(-.1em) rotate(var(--tilt)); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }

/* ---- top bar ---- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 241, 166, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: var(--line); }
.bar { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.top nav { display: flex; gap: 20px; margin-left: auto; font-weight: 700; font-size: 16px; }
.top nav a { text-decoration: none; padding: 6px 0; }
.top nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.langs { display: flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; font-size: 13px; font-weight: 800; background: var(--card); }
.langs a { padding: 4px 10px; text-decoration: none; }
.langs a[aria-current] { background: var(--ink); color: #fff; }
.cta { background: var(--orange); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; padding: 7px 16px; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); white-space: nowrap; }
.cta:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
@media (max-width: 900px) { .top nav { display: none; } .langs { margin-left: auto; } }
@media (max-width: 480px) { .cta { display: none; } .bar { gap: 10px; } }

/* ---- hero ---- */
.hero { padding: clamp(28px, 5vw, 56px) 0 0; border-bottom: var(--line);
  background:
    radial-gradient(60% 46% at 50% 30%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 70%),
    repeating-conic-gradient(rgba(255, 255, 255, .22) 0 25%, transparent 0 50%) 0 0 / 120px 120px,
    linear-gradient(var(--sun-top), var(--sun-bottom)); }
.mascot { margin-inline: auto; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 8px 0 rgba(31, 42, 77, .15)); }
.kicker { display: inline-block; margin-top: 10px; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 14px; font-size: 15px; font-weight: 800; }
h1 { margin-top: 18px; }
h1 .tagline { display: block; margin-top: 18px; font-size: clamp(26px, 4.4vw, 42px); line-height: 1.15; font-weight: 900; text-wrap: balance; }
.hero .lead { max-width: 640px; margin-inline: auto; color: var(--ink); }
.hero-art { margin: clamp(28px, 5vw, 48px) auto calc(-1 * clamp(40px, 7vw, 80px)); position: relative; }
.hero + .section { padding-top: clamp(96px, 15vw, 170px); }

/* ---- store buttons ---- */
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 26px; }
.store { display: inline-flex; align-items: center; gap: 10px; min-width: 200px; padding: 9px 18px 9px 14px; background: var(--ink); color: #fff; text-decoration: none; text-align: left; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 rgba(31, 42, 77, .3); font-size: 20px; font-weight: 800; line-height: 1.15; transition: transform .12s ease-out; }
.store small { display: block; font-size: 12px; font-weight: 600; opacity: .85; }
.store svg { width: 28px; height: 28px; flex: none; }
a.store:hover { transform: translateY(-2px); }
.store.soon { background: transparent; color: var(--ink); border-style: dashed; box-shadow: none; opacity: .75; }

/* ---- frames, cards ---- */
.frame { border: var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--pop); background: var(--ink); }
.frame img { width: 100%; }
.card { background: var(--card); border: var(--line); border-radius: 22px; box-shadow: var(--pop); padding: 24px; }
.card p { margin-top: 8px; color: var(--ink-soft); font-size: 17px; }
.card .icon { display: block; font-size: 34px; line-height: 1; margin-bottom: 12px; }

/* ---- learn ---- */
.bands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.badge { display: inline-block; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.band-1 .badge { background: #ffd43b; } .band-2 .badge { background: #8ce99a; } .band-3 .badge { background: #a5d8ff; }
.duo { position: relative; margin-top: 44px; padding-right: clamp(0px, 9vw, 120px); }
.phone { position: absolute; right: 0; bottom: -28px; width: clamp(110px, 21vw, 250px); border: var(--line); border-width: 5px; border-radius: clamp(18px, 3vw, 34px); overflow: hidden; box-shadow: var(--pop); background: var(--ink); transform: rotate(4deg); }
.callout { display: flex; gap: 18px; align-items: center; max-width: 820px; margin: 72px auto 0; background: var(--yellow-soft); border: var(--line); border-radius: 22px; padding: 22px 26px; }
.callout-star { font-size: 46px; line-height: 1; }
.callout p { margin-top: 4px; color: var(--ink-soft); }
@media (max-width: 820px) { .bands { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .callout { flex-direction: column; text-align: center; } }

/* ---- coach ---- */
.split { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.ticks { list-style: none; padding: 0; margin-top: 20px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 40px; font-weight: 700; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; background: var(--green); color: #fff; border: 2px solid var(--ink); border-radius: 50%; font-size: 16px; font-weight: 900; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---- worlds ---- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.trio .frame:nth-child(1) { transform: rotate(-1.5deg); } .trio .frame:nth-child(3) { transform: rotate(1.5deg); }
.worlds { list-style: none; padding: 0; margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.worlds li { display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px 6px 12px; font-weight: 800; font-size: 16px; box-shadow: 3px 3px 0 var(--ink); }
.worlds li span { font-size: 22px; line-height: 1; }
.worlds li:nth-child(4n+1) { background: #ffe3e3; } .worlds li:nth-child(4n+2) { background: #fff3bf; } .worlds li:nth-child(4n+3) { background: #d3f9d8; } .worlds li:nth-child(4n) { background: #d0ebff; }
@media (max-width: 700px) { .trio { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } .trio .frame { transform: none !important; } }

/* ---- screenshots ---- */
.gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x proximity; padding: 28px max(16px, calc((100vw - 1120px) / 2)) 22px; scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
.gallery .frame { flex: none; scroll-snap-align: center; height: clamp(240px, 42vw, 440px); }
.gallery img { height: 100%; width: auto; max-width: none; }

/* ---- parents ---- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* ---- get ---- */
.get { border-top: var(--line);
  background:
    repeating-conic-gradient(rgba(255, 255, 255, .22) 0 25%, transparent 0 50%) 0 0 / 120px 120px,
    linear-gradient(var(--sun-top), var(--sun-bottom)); }
.get .lead { color: var(--ink); }
.devices { list-style: none; padding: 0; margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.devices li { border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-size: 14px; font-weight: 800; background: rgba(255, 255, 255, .6); }

/* ---- trailer ---- */
.video { margin-top: 30px; aspect-ratio: 16 / 9; position: relative; }
.video button { all: unset; display: block; width: 100%; height: 100%; cursor: pointer; position: relative; }
.video button img { width: 100%; height: 100%; object-fit: cover; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-badge { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; display: grid; place-items: center; background: var(--orange); color: #fff; border: var(--line); border-radius: 50%; box-shadow: 5px 5px 0 var(--ink); transition: transform .15s ease-out; }
.play-badge svg { width: 46px; height: 46px; margin-left: 4px; }
.video button:hover .play-badge, .video button:focus-visible .play-badge { transform: scale(1.08); }

/* ---- footer ---- */
.foot { background: var(--ink); color: #dfe6ff; padding: 32px 0 40px; font-size: 15px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.foot-langs { margin-left: auto; }
.foot .fine { color: #9aa6cf; font-size: 12px; margin-top: 18px; }
@media (max-width: 640px) { .foot-langs { margin-left: 0; width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mascot, .wordmark.big i { animation: none; }
  .wordmark.big i { transform: rotate(var(--tilt)); }
}
