/*
 * The front door.
 *
 * Colours, type, cards and buttons come from `theme.css`; this is only what the
 * landing page adds. It is wider than the game (520px rather than 440px),
 * because a page that is read rather than played can take a longer line.
 */

.wrap { max-width: 520px; }

/* MARK: Hero */

.hero { text-align: center; padding: 18px 0 26px; }

.hero-mark {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  /* The paper catches a little light, as it would on a table. */
  filter: drop-shadow(0 6px 10px rgb(22 24 29 / 0.12));
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 6px;
}

.hero h1 {
  font-size: clamp(42px, 13vw, 62px);
  letter-spacing: -1.4px;
  margin: 0 0 12px;
}

.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 auto 22px;
  max-width: 30em;
}

.hero .btn { max-width: 340px; margin-left: auto; margin-right: auto; }
.hero .btn:first-of-type { margin-top: 0; }

/* An anchor styled as a button needs the bits a <button> gets for free. */
a.btn {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* MARK: How it works */

.steps { list-style: none; padding: 0; margin: 14px 0 0; }
.steps li { display: flex; gap: 14px; padding: 12px 0; align-items: flex-start; }
.steps li + li { border-top: 1px solid rgb(22 24 29 / 0.08); }
/* A flex item will not shrink below its own longest word unless it is told it
   may, and `Geschichtenmaschine` is a long word: without this the German page
   scrolled sideways at 200% zoom while the English one did not. */
.steps li > div { min-width: 0; }

.step {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.steps strong { display: block; font-size: 16px; margin-bottom: 2px; }
.steps div { font-size: 15px; color: var(--slate); line-height: 1.5; }
.steps em { color: var(--ink); font-style: italic; }

/* MARK: The worked example */

.sample .lines { list-style: none; padding: 0; margin: 12px 0 14px; }
.sample .lines li {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: 16px;
  line-height: 1.45;
}
/* One line of a story is a flex row: a coloured rule, then the words as an
   anonymous item that nothing can be selected to shrink. `anywhere` on the row
   is the only way to let it narrow, and these are single sentences where a
   broken word costs nothing. */
.sample .lines li { min-width: 0; overflow-wrap: anywhere; }

/* The coloured rule is the whole point: it shows at a glance that the lines
   were written by different people. */
.sample .lines li::before {
  content: "";
  flex: none;
  width: 4px;
  border-radius: 2px;
  background: var(--author, var(--slate));
  align-self: stretch;
}

/* MARK: Store badges */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 9px;
  /* Two of these sit side by side, and at 200% zoom there is not room for
     both at their natural width. */
  min-width: min(168px, 100%);
  padding: 10px 16px;
  border-radius: var(--radius-btn);
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  text-align: left;
}
/* Nothing to tap yet, and it should look like it. */
.badge[aria-disabled="true"] { background: none; border: 1.5px dashed rgb(22 24 29 / 0.25); color: var(--slate); }

.badge svg { flex: none; width: 22px; height: 22px; fill: currentColor; }
.badge span { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.badge small { display: block; font-size: 11px; font-weight: 600; opacity: 0.75; letter-spacing: 0.3px; }

/* MARK: Footer */

.footer { text-align: center; padding: 26px 8px 8px; }
.footer p { font-size: 13px; color: var(--slate); margin-bottom: 8px; }
.footer .tiny { font-size: 12px; opacity: 0.8; }

/* The other five languages. Small and quiet: a reader who wants it is looking
   for it, and a crawler does not care how big it is. Wraps, because six
   language names on a 320px phone do not fit on one line. */
.languages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin-top: 14px;
}
/*
 * 44 high, which is the strict target-size rule; they were about 20. The
 * underline moves from a bottom border to the text's own decoration, or it
 * would sit at the foot of the target rather than under the words.
 */
.languages a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  text-decoration: underline;
  text-decoration-color: rgb(22 24 29 / 0.3);
  text-underline-offset: 3px;
}
.languages a:hover,
.languages a:focus-visible { color: var(--ink); text-decoration-color: currentColor; }

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

