/* Anyway, landing page styles.
   The page sits on the app's own sky: azure by day, navy after dark
   (lib/config/sky_config.dart). Nothing is written on the bare sky:
   every word rides on a panel that darkens the day sky or lightens the
   night one, so white ink clears 4.5:1 at both ends of the gradient.
   That is the same rule the app's settings screens follow (ADR 0075). */

:root {
  /* Day sky. SkyConfig.day */
  --sky-top: #0068b3;
  --sky-bottom: #008cf0;
  /* The film a panel lays over the sky. It has to hold white ink at 4.5:1
     not just over the gradient's two ends, but over a lit bubble drifting
     behind the words, so it is heavier than the sky alone would need.
     Worst case, a full highlight straight behind a word, measures 7.7:1. */
  --panel: rgba(0, 44, 80, 0.8);
  --panel-strong: rgba(0, 30, 56, 0.55);
  --panel-edge: rgba(255, 255, 255, 0.16);
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.78);
  --ink-faint: rgba(255, 255, 255, 0.6);
  --accent: #ffe3c4; /* the warm star (SkyPainter) */
  /* Free reads cool and included, paid reads warm and separate. Both are
     films thin enough that white ink on them stays over 5:1 even with a lit
     bubble passing behind, and neither is brighter than the other, so the
     paid card is marked out rather than sold (ADR 0002 bans the nudge). */
  --card-free: rgba(0, 200, 165, 0.3);
  --card-free-edge: rgba(120, 235, 210, 0.6);
  --tag-free: #b6efe4;
  --card-paid: rgba(255, 140, 40, 0.32);
  --card-paid-edge: rgba(255, 198, 140, 0.6);
  --tag-paid: #ffdcb8;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --radius: 18px;
  --page: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Night sky. SkyConfig.night */
    --sky-top: #0f192e;
    --sky-bottom: #1f2e4c;
    /* Same job after dark, and the same worst case: 7.4:1. */
    --panel: rgba(12, 20, 38, 0.72);
    --panel-strong: rgba(255, 255, 255, 0.07);
    /* The night panel is a darker ground, so the same film reads hotter on
       it and needs less of itself. Worst case here is 5.3:1. */
    --card-free: rgba(0, 190, 160, 0.26);
    --card-paid: rgba(255, 150, 60, 0.26);
    --panel-edge: rgba(255, 255, 255, 0.12);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: 0.005em;
  color: var(--ink);
  background-color: var(--sky-top);
  background-image: linear-gradient(
    to bottom,
    var(--sky-top) 0%,
    var(--sky-bottom) 100%
  );
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Stars, for the night sky only. Two fixed layers of dots, no motion:
   the app's faint majority never move either. */
@media (prefers-color-scheme: dark) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
      radial-gradient(1.4px 1.4px at 12% 18%, #ffffff 50%, transparent 51%),
      radial-gradient(1.2px 1.2px at 78% 9%, #cfe0ff 50%, transparent 51%),
      radial-gradient(1.6px 1.6px at 34% 62%, #ffe3c4 50%, transparent 51%),
      radial-gradient(1.1px 1.1px at 61% 41%, #ffffff 50%, transparent 51%),
      radial-gradient(1.3px 1.3px at 88% 73%, #cfe0ff 50%, transparent 51%),
      radial-gradient(1.1px 1.1px at 22% 85%, #ffffff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 47% 27%, #ffffff 50%, transparent 51%),
      radial-gradient(1.2px 1.2px at 7% 47%, #cfe0ff 50%, transparent 51%);
    opacity: 0.85;
  }
}

/* --- Shared shapes --------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* The bubble field is the page's background, not the hero's: fixed to the
   viewport, drawn over the sky and its stars, and under every panel. The
   script listens on the document, so a tap anywhere that is not on a panel
   pops whatever is under it. */
#bubbles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--panel);
  border-radius: 0 0 var(--radius) 0;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

a {
  color: var(--ink);
}

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

/* --- Header ---------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 2;
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.98rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* --- Hero ------------------------------------------------------------ */

.hero {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}


.wordmark {
  margin: 0;
  font-size: clamp(3.25rem, 14vw, 7rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.tagline {
  margin: 1.25rem auto 0;
  max-width: 30ch;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-note {
  margin: 0.75rem auto 0;
  max-width: 44ch;
  color: var(--ink-soft);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-hint {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--ink-faint);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.7rem 1.25rem;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  line-height: 1.3;
}

.badge .badge-store {
  font-weight: 700;
}

.badge .badge-state {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* --- Sections -------------------------------------------------------- */

main {
  position: relative;
  z-index: 2;
}

.section {
  padding: 2rem 0;
}

.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.25;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.section h3 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

.section .panel {
  padding: 1.75rem;
}

.lead {
  max-width: 62ch;
  margin: 0 0 1rem;
}

.lead:last-child {
  margin-bottom: 0;
}

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  margin-top: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--panel-edge);
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

/* Free and paid are told apart by the whole card, not by a word tucked
   under the text. The tint is the loud part; the tag stays because colour
   may never carry the meaning on its own. `margin-top: auto` pushes every
   tag to the floor of its card, and the grid already stretches the cards
   in a row to one height, so the tags land on one line. */
.card--free {
  background: var(--card-free);
  border-color: var(--card-free-edge);
}

.card--paid {
  background: var(--card-paid);
  border-color: var(--card-paid-edge);
}

.card .tag {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

.card--free .tag {
  color: var(--tag-free);
}

.card--paid .tag {
  color: var(--tag-paid);
}

.plain-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.plain-list li {
  padding-left: 1.5rem;
  position: relative;
  max-width: 62ch;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-soft);
}

.price {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1;
}

/* --- Screenshots ----------------------------------------------------- */

.shots {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin-top: 1.5rem;
  justify-items: center;
}

.shots figure {
  margin: 0;
  max-width: 17rem;
  text-align: center;
}

.shots img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--panel-edge);
  box-shadow: var(--shadow);
  display: block;
}

.shots figcaption {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* --- Text pages ------------------------------------------------------ */

.text-page {
  padding: 2rem 0 1rem;
}

.text-page .panel {
  padding: 2rem;
}

.text-page h1 {
  margin-top: 0;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.2;
}

.text-page h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.5rem;
}

.text-page h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.4rem;
}

.text-page p,
.text-page li {
  max-width: 68ch;
}

.updated {
  color: var(--ink-faint);
  font-size: 0.92rem;
  margin-top: 0;
}

/* --- Footer ---------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 2;
  padding: 3rem 0 2.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin: 0 0 1rem;
  padding: 0;
}

.site-footer a {
  color: var(--ink-soft);
}

/* --- Motion ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Narrow phones ---------------------------------------------------- */

@media (max-width: 30rem) {
  .container {
    padding: 0 1rem;
  }

  .section .panel,
  .text-page .panel {
    padding: 1.25rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .site-header .container {
    justify-content: center;
  }
}
