/* JINGLE HILLS — the site's one stylesheet.
 *
 * Two palettes, both lifted from the game itself so the page and the thing it is
 * selling are visibly the same product: a light viewer gets daylight over the drifts, a
 * dark one gets the midnight sky the game's own menus sit on, with the snowflake
 * counter's gold as the accent in both. Change them in jinglehills.html first, then here.
 *
 * No framework and no web fonts. The page is a few screens of text and five images; a
 * CSS bundle to lay that out would outweigh the content, and system fonts render
 * instantly on a phone on a bad connection, which is where a store link is usually
 * opened.
 */

:root {
  /* Daylight over snow: a cold blue-white ground rather than a neutral grey, with the
     gold of the game's own snowflake counter as the accent and its ribbon red for
     anything that has gone wrong. */
  --bg:        #eef4fb;   /* overcast sky over the drifts */
  --panel:     #ffffff;
  --tile:      #f6faff;
  --line:      #cfdcee;
  --ink:       #11203a;
  --ink-dim:   #5a7495;
  --accent:    #b9770a;   /* the snowflake counter, dark enough to read on white */
  --accent-lo: #8c5a05;
  --on-accent: #fffdf6;
  --snow:      #cfe4f7;   /* the hills themselves — snow, not grass */
  --roof:      #3d4f6b;   /* drawn ON the snow, so dark in both themes */
  --bad:       #c0392b;   /* the ribbon */
  --radius:    16px;
  --maxw:      920px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0b1b34;   /* the midnight sky the game's own menus sit on */
    --panel:   #122544;
    --tile:    #183055;
    --line:    #2c4a72;
    --ink:     #eaf4ff;
    --ink-dim: #93b0d2;
    --accent:  #ffd34d;   /* the snowflake counter, as the game draws it */
    --accent-lo: #ffe489;
    --on-accent: #231a05;
    --snow:    #dcecfb;   /* moonlit snow stays pale even at night */
    --roof:    #32425c;
    --bad:     #ff7a8a;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  /* AXIOM's ruled paper belongs to a crossword. This game's ground is sky, so the page
     gets a single soft wash from the top rather than a repeating pattern — texture, not
     decoration, and it costs one gradient. */
  background-image: linear-gradient(
      to bottom,
      color-mix(in srgb, var(--accent) 9%, transparent) 0,
      transparent 620px);
  background-repeat: no-repeat;
}

/* The app icon, leading the page. Rounded to the same squircle-ish radius the stores
   draw it with, so it reads as an app icon rather than as a picture of a bird. */
.hero-icon {
  display: block;
  width: 118px; height: 118px;
  margin: 0 auto 22px;
  border-radius: 26px;
  box-shadow: 0 10px 34px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.14);
}
@media (max-width: 560px) {
  .hero-icon { width: 92px; height: 92px; border-radius: 21px; margin-bottom: 16px; }
}

/* The mechanic, drawn once. A still of the thing the trailer spends four seconds on:
   tuck down the slope, and the crest turns that speed into height. */
.demo svg { width: 100%; height: auto; display: block; }

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

a { color: var(--accent); }
a:hover { color: var(--accent-lo); }

/* Digits in a grid have to line up, and the board below is nothing but
   digits in a grid. */
.board, .tnum { font-variant-numeric: tabular-nums; }

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(140%) blur(8px);
}
.bar { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.brandmark { display: flex; align-items: center; gap: 12px; }
.brandmark img { width: 42px; height: 42px; border-radius: 10px; display: block; }
.brandmark .name {
  display: block; font-weight: 800; font-size: 18px;
  color: var(--ink); text-decoration: none; letter-spacing: .6px;
}
.brandmark .badge { font-size: 12px; color: var(--ink-dim); text-decoration: none; }
.site-nav { margin-left: auto; display: flex; gap: 18px; font-size: 15px; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero { padding: 56px 0 36px; text-align: center; }
.hero h1 {
  margin: 0 0 10px; font-size: clamp(32px, 6vw, 48px);
  letter-spacing: -.5px; line-height: 1.12; text-wrap: balance;
}
.hero .sub {
  margin: 0 auto 28px; max-width: 34em;
  font-size: clamp(17px, 2.4vw, 20px); color: var(--ink-dim);
}

.stores {
  display: flex; gap: 16px; justify-content: center;
  align-items: center; flex-wrap: wrap;
}

/* The official badges. Both stores publish exact artwork and forbid
   redrawing it, so these are sized by HEIGHT only and never restyled.
   Apple's badge carries its own padding, which is why the two look aligned
   at one height despite different aspect ratios. */
.store-badge { display: inline-flex; line-height: 0; }
.store-badge img { height: 54px; width: auto; display: block; }
@media (max-width: 420px) { .store-badge img { height: 46px; } }

/* ── The board, drawn in CSS ───────────────────────────────────────────
 *
 * One real Axiom board, solved. It costs no image and it says what the game
 * is faster than a paragraph does. The arithmetic is correct in all four
 * directions — see the comment in index.html before changing a digit.
 */

.demo { display: flex; justify-content: center; margin: 10px 0 6px; }
.board {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 6px;
  align-items: center; justify-items: center;
}
.board .c, .board .t {
  width: 54px; height: 54px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 22px;
}
.board .c {                         /* a cell holding a number */
  background: var(--tile); border: 2px solid var(--line); color: var(--ink);
}
.board .c.lit {                     /* the tile just placed */
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--tile));
}
.board .t {                         /* the target chip at the end of a run */
  background: var(--accent); color: var(--on-accent);
  border: 2px solid var(--accent);
}
.board .o {                         /* an operator between two cells */
  color: var(--ink-dim); font-weight: 700; font-size: 19px;
  width: 20px; height: 20px; display: grid; place-items: center;
}
.board .eq { color: var(--ink-dim); font-weight: 700; font-size: 17px; }
.board .gap { width: 20px; height: 20px; }
@media (max-width: 420px) {
  .board .c, .board .t { width: 46px; height: 46px; font-size: 19px; }
}
.caption {
  text-align: center; color: var(--ink-dim);
  font-size: 15px; margin: 2px 0 26px;
}

/* ── Shots ────────────────────────────────────────────────────────────── */

.shots {
  display: grid; gap: 16px; padding: 18px 0 8px;
  /* 190px suits the portrait phone shots the other app pages use. These are landscape
     and 16:7, so at that width the bird is a speck — two or three per row instead. */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.shots img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--tile);
}

/* ── Content ──────────────────────────────────────────────────────────── */

section { padding: 34px 0; }
h2 { font-size: clamp(22px, 3.6vw, 28px); margin: 0 0 12px; letter-spacing: -.2px; text-wrap: balance; }
h3 { font-size: 19px; margin: 26px 0 6px; }
p  { margin: 0 0 14px; max-width: 68ch; }

.cards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p  { margin: 0; color: var(--ink-dim); font-size: 15px; max-width: none; }

/* The chapter list. A table of ten rows is the honest shape for it: the
   chapters ARE ordered, by difficulty, and the number carries that. */
.chapters { display: grid; gap: 10px; }
.chapter {
  display: grid; grid-template-columns: 2.4em 1fr; gap: 14px;
  align-items: baseline;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 16px;
}
.chapter .no {
  font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums; font-size: 15px;
}
.chapter h3 { margin: 0 0 2px; font-size: 16px; }
.chapter p  { margin: 0; color: var(--ink-dim); font-size: 15px; max-width: none; }

.note {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 14px 18px; color: var(--ink-dim);
}

ul { margin: 0 0 14px; padding-left: 22px; max-width: 68ch; }
li { margin: 4px 0; }

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line); margin-top: 20px;
  padding: 26px 0 40px; color: var(--ink-dim); font-size: 14px;
}
.site-footer a { color: var(--ink-dim); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* The browser demo link, under the store badges.

   Deliberately not a third badge and not a button: the two stores are the call to
   action, and a control with equal weight next to them would compete with the thing
   the page is actually for. A text link with the caveat attached reads as the lesser
   offer it is — try it here, install it there. */
.try {
  margin: 18px auto 0; text-align: center;
  /* One line where there is room, two where there is not. Stacking it unconditionally
     made a two-line block out of six words and gave the demo more visual weight than
     the store badges above it, which are the actual call to action. */
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: baseline; gap: 2px 10px;
}
.try-link {
  font-weight: 800; font-size: 1.02rem; white-space: nowrap;
  border-bottom: 2px solid var(--accent); padding-bottom: 1px;
}
.try-link:hover { border-bottom-color: var(--accent-lo); }
.try-note { font-size: .86rem; color: var(--ink-dim); }
