/*
 * Ascent — support site.
 *
 * THE SITE IS THE APP'S OWN DARK, as of 2026-09-08 and by Kevin's explicit
 * call. The first version used the game ART's pale sky, reasoning that legal
 * text reads best on paper and that the app's amber was unreadable at 1.9:1
 * on snow. Kevin wanted the site to feel like the thing you download - same
 * ground, same text, same golds - and the dark ground dissolves the old
 * contrast objection: every token below is lifted straight from the app's
 * src/ui/theme.ts, and gold on this navy sits near 9:1.
 *
 * COLOUR CARRIES THE APP'S OWN GRAMMAR:
 *   gold  = tappable / the climb   (the app's accent, --climb)
 *   red   = the summit, only       (the flag; one appearance per page)
 *   dim   = secondary voice        (the app's textDim)
 *
 * The imagery everywhere is the ICON's mountain - red flag planted. The hero
 * went through three forms in one evening and the simplest won: stepped
 * bar-rules (read as charts), then the playing screen's full painted scene
 * (too busy next to type), then the mark itself, pixel-crisp. The stepped
 * rule is gone from every page for the same reason it lost the hero, and the
 * challenge page carries the same mark instead of a goat frame that read as
 * awkward out of animation. Kevin's calls, 2026-09-08.
 */
:root {
  --bg:      #0E1116;  /* the app's ground */
  --surface: #171C24;  /* cards, the seed chip */
  --raised:  #212936;  /* quiet fills - the steps */
  --border:  #2C3542;
  --text:    #F2F5F8;
  --dim:     #8C99AA;
  --climb:   #F5B841;  /* gold: tappable, and the climb */
  --flag:    #E5484D;  /* the summit. Once per page. */
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Archivo, 'Helvetica Neue', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }

/* ---- the hero row: the climb, and the mountain it climbs --------------- */
/* Bottom-aligned: the mountain's base sits ON the GREATS line, by Kevin's
   spec - the rock and the summit word share a ground. flex-end makes that
   true at every viewport instead of only the one it was eyeballed at. */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-top: 2.75rem; }
.hero .mountain { margin-bottom: 6px; }  /* down to GREATS' baseline, not its descender box */
.hero .climb { margin-top: 0; }
/* The icon's own art at 32x28, scaled so every art pixel stays whole;
   `pixelated` keeps edges square instead of smeared. */
.mountain { height: 150px; width: auto; image-rendering: pixelated; flex-shrink: 0; }

/* ---- masthead -------------------------------------------------------- */
header { padding-top: 3.5rem; }
.mark {
  font-size: 15px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--text); text-decoration: none; display: inline-block;
}
.mark span { color: var(--dim); font-weight: 600; }

/* ---- the climb: the mechanic as type, which is the hero --------------- */
.climb { margin: 0; padding: 0; list-style: none; }
.climb li {
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.18;
  color: var(--text);
}
.climb li:nth-child(1) { font-size: 1.6rem;  margin-left: 0; }
.climb li:nth-child(2) { font-size: 1.85rem; margin-left: 0.7rem; }
.climb li:nth-child(3) { font-size: 2.1rem;  margin-left: 1.4rem; }
.climb li:nth-child(4) { font-size: 2.35rem; margin-left: 2.1rem; color: var(--flag); }
.climb-note { color: var(--dim); margin: 1.1rem 0 3rem; font-size: 1rem; }

h1 { font-size: 2rem; font-weight: 800; line-height: 1.18; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; font-weight: 800; margin: 2.5rem 0 0.6rem; letter-spacing: -0.005em; }
h2:first-of-type { margin-top: 0; }
p, li { color: var(--text); }
p { margin: 0 0 1.1rem; }
ul { padding-left: 1.15rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.5rem; }
strong { font-weight: 700; }
.dek { color: var(--dim); font-size: 1.05rem; margin-bottom: 0; }
.updated { color: var(--dim); font-size: 0.9rem; margin: 0 0 2rem; }

/* Gold is the tappable colour, exactly as it is in the app. */
a { color: var(--climb); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--climb); outline-offset: 3px; border-radius: 2px; }

/* ---- the one call to action ------------------------------------------ */
.get {
  display: inline-block; margin-top: 0.5rem;
  background: var(--climb); color: var(--bg);
  text-decoration: none; font-weight: 700; font-size: 1rem;
  padding: 0.8rem 1.4rem; border-radius: 4px;
}
.get:hover { filter: brightness(1.08); }
/* .soon is gone (2026-09-23): the app is live, so the pill that stood in for
   a button it could not honestly render became the button. */
.fineprint { color: var(--dim); font-size: 0.9rem; margin-top: 0.75rem; }

/* ---- the challenge page ---------------------------------------------- */
/* The seed is the page's whole cargo, so it gets the app's surface-and-gold
   chip treatment and everything else stays quiet. */
.seed-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0 0.75rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.seed-code {
  font-weight: 800; font-size: 1.9rem; letter-spacing: 0.14em;
  color: var(--climb);
  user-select: all; -webkit-user-select: all;  /* one tap selects the whole seed */
  overflow-wrap: anywhere;
}
.seed-copy {
  background: none; border: 1.5px solid var(--climb); color: var(--climb);
  font: inherit; font-weight: 700; font-size: 0.9rem;
  padding: 0.5rem 0.9rem; border-radius: 4px; cursor: pointer;
  flex-shrink: 0;
}
.seed-copy:hover { background: var(--climb); color: var(--bg); }
.seed-copy:focus-visible { outline: 2px solid var(--climb); outline-offset: 3px; }
.challenge-mountain { height: 120px; width: auto; image-rendering: pixelated; display: block; margin: 2.5rem 0 1.25rem; }

/* ---- support answers -------------------------------------------------- */
.qa { margin: 0 0 1.75rem; }
.qa h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.35rem; }
.qa p { margin: 0; color: var(--dim); }

footer { margin: 1rem 0 4rem; color: var(--dim); font-size: 0.9rem; }
footer a { color: var(--dim); }
footer nav { display: flex; gap: 1.25rem; margin-bottom: 0.75rem; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .climb li:nth-child(4) { font-size: 2rem; }
  h1 { font-size: 1.7rem; }
  .seed-code { font-size: 1.5rem; }
  .mountain { height: 108px; }
}

/*
 * One orchestrated moment: the words climb in on load, in the order you would
 * play them.
 *
 * IT NEVER ANIMATES OPACITY. An earlier version faded from 0, which means any
 * failure to run the animation - an old engine, an odd setting, a paint the
 * browser skips - leaves the headline INVISIBLE. On a page whose whole job is
 * to look legitimate to an App Review reviewer, content hidden behind an
 * effect is the wrong trade. Transform only: if it never runs, the words are
 * simply already where they belong.
 */
@media (prefers-reduced-motion: no-preference) {
  .climb li { animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) backwards; }
  .climb li:nth-child(1) { animation-delay: 0.04s; }
  .climb li:nth-child(2) { animation-delay: 0.12s; }
  .climb li:nth-child(3) { animation-delay: 0.20s; }
  .climb li:nth-child(4) { animation-delay: 0.28s; }
  @keyframes rise { from { transform: translateY(10px); } }
}
