/* Edition chooser — Far Horizon Group page chrome.
   Token names and values follow the far-horizon-group-web brand stylesheet
   ("dawn at altitude": deep navy, gold as the only accent, serif display over
   system sans) so the door reads as FHG's, not as either app's.

   That site is deliberately dark-only. This page is not: it is the first thing
   a pilot sees on a machine we know nothing about, so it answers
   prefers-color-scheme in both directions with one palette translated, not two
   designs. Mobile-first — the tiles stack, and only widen into a row when
   there is room for two. */

:root {
  color-scheme: dark;
  --deep: #050d16;
  --panel: #0b1a29;
  --panel-lift: #0e2032;
  --line: rgba(150, 178, 205, 0.14);
  --line-strong: rgba(150, 178, 205, 0.28);
  --ink: #eef3f8;
  --slate: #93a8bf;
  --dim: #6f869d;
  --gold: #d4a24a;
  --gold-bright: #f0c46b;
  --glow: rgba(212, 162, 74, 0.1);
  --tile-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.45);
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --deep: #f3f1ec;
    --panel: #fffefb;
    --panel-lift: #fffefb;
    --line: rgba(31, 51, 71, 0.14);
    --line-strong: rgba(31, 51, 71, 0.28);
    --ink: #10202f;
    --slate: #4a5f75;
    --dim: #6c7f93;
    --gold: #9a6f1d;
    --gold-bright: #b8862c;
    --glow: rgba(154, 111, 29, 0.08);
    --tile-shadow: 0 1rem 2.5rem rgba(16, 32, 47, 0.12);
  }
}

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

html {
  min-width: 20rem;
  background: var(--deep);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.25rem calc(2.5rem + env(safe-area-inset-bottom));
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  background:
    radial-gradient(80% 26rem at 50% 0%, var(--glow), transparent 72%),
    var(--deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

.door {
  width: min(100%, 46rem);
  display: grid;
  gap: 2.5rem;
}

.door__head {
  text-align: center;
}

.door__eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.door__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.door__title::after {
  display: block;
  width: 4rem;
  height: 1px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  content: "";
}

.door__lede {
  margin: 1rem 0 0;
  color: var(--slate);
}

.door__editions {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 42rem) {
  .door__editions {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* The tap target IS the tile — art, name and line all inside one anchor, so
   there is no small link to hunt for on a phone. */
.tile {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding: 2rem 1.5rem;
  min-height: 11rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--tile-shadow);
  color: inherit;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.tile:hover,
.tile:focus-visible {
  border-color: var(--line-strong);
  background: var(--panel-lift);
  transform: translateY(-2px);
}

.tile:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.tile:active {
  transform: translateY(0);
}

.tile__art {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 22%;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
}

@media (min-width: 42rem) {
  .tile__art {
    width: 8rem;
    height: 8rem;
  }
}

.tile__line {
  color: var(--slate);
  font-size: 0.95rem;
  text-wrap: balance;
}

.tile__name {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.door__note {
  margin: 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.85rem;
  text-align: center;
  text-wrap: pretty;
}

.door__note a {
  color: var(--gold);
  text-underline-offset: 0.2em;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .tile:hover,
  .tile:focus-visible {
    transform: none;
  }
}
