/* Geonary — geonary.app
 *
 * The palette is lifted from the app's own tokens (lib/ui/tokens/
 * geonary_palette.dart) so the site and the product read as one thing. The
 * night atlas is the product's signature, so this page commits to dark rather
 * than following the visitor's theme: a light screenshot of Geonary would be
 * a screenshot of something else. */

:root {
  --canvas: #0a0c0e;
  --surface: #14181b;
  --surface-raised: #1b2024;

  --ink: #f2f4f5;
  --ink-muted: #a0a8af;
  --ink-faint: #6b747c;

  --hairline: rgba(255, 255, 255, 0.12);

  --accent: #5cc9b4;
  --accent-subtle: rgba(92, 201, 180, 0.18);

  /* Traversal frequency raises luminance as well as width. */
  --trace-rare: #b87730;
  --trace-recurring: #ee8c24;
  --trace-frequent: #ffbf55;
  --trace-busiest: #ffd477;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-color: var(--accent-subtle);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

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

img,
svg {
  max-width: 100%;
}

.shell {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--surface-raised);
  border-radius: 8px;
}

/* ------------------------------------------------------------------ head --- */

.masthead {
  padding-block: 1.75rem;
}

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

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark__mark {
  display: block;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
}

.masthead__links {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.masthead__links a {
  color: var(--ink-muted);
  text-decoration: none;
}

.masthead__links a:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------------ hero --- */

.hero {
  position: relative;
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.4rem;
  padding: 0.32rem 0.8rem 0.32rem 0.55rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-subtle);
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 620;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(
    100deg,
    var(--trace-recurring),
    var(--trace-busiest)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 1rem;
  max-width: 46ch;
  color: var(--ink-muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
}

.hero__principle {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--ink);
  font-weight: 550;
}

.hero__principle span {
  color: var(--accent);
}

.cta {
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(
    100deg,
    var(--trace-recurring),
    var(--trace-frequent)
  );
  color: #1b1005;
  font: inherit;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(238, 140, 36, 0.24);
}

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

.cta__note {
  margin: 0.85rem 0 0;
  max-width: 42ch;
  color: var(--ink-faint);
  font-size: 0.86rem;
}

/* ------------------------------------------------------------------ atlas -- */

.atlas {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background:
    radial-gradient(
      120% 90% at 70% 20%,
      rgba(92, 201, 180, 0.07),
      transparent 60%
    ),
    var(--surface);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-width: 100%;
}

@media (min-width: 900px) {
  .atlas {
    aspect-ratio: 1 / 1;
  }
}

.atlas svg {
  display: block;
  width: 100%;
  height: 100%;
}

.atlas__trace {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: draw 2.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atlas__trace {
    stroke-dashoffset: 0;
  }
}

/* Top-left, not bottom: the routes run from the lower left to the upper
   right, so a caption at the foot of the panel sits on the one anchor point
   the drawing is about. */
.atlas__caption {
  position: absolute;
  left: 1rem;
  top: 1rem;
  margin: 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: rgba(20, 24, 27, 0.82);
  backdrop-filter: blur(10px);
  color: var(--ink-faint);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------- sections -- */

.section {
  padding-block: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--hairline);
}

.section__title {
  margin: 0 0 2.5rem;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--surface);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

.card__icon {
  display: block;
  width: 22px;
  height: 22px;
  margin-bottom: 1rem;
  color: var(--accent);
}

/* ---------------------------------------------------------------- promise -- */

.promise {
  padding: clamp(1.6rem, 4vw, 2.5rem);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background:
    radial-gradient(
      100% 140% at 0% 0%,
      rgba(238, 140, 36, 0.06),
      transparent 55%
    ),
    var(--surface);
}

.promise ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.promise li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.75rem;
  align-items: start;
  color: var(--ink-muted);
  font-size: 0.96rem;
}

.promise li::before {
  content: "";
  margin-top: 0.55em;
  width: 1.1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.promise strong {
  color: var(--ink);
  font-weight: 550;
}

/* ---------------------------------------------------------------- footer --- */

.footer {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--ink-faint);
  font-size: 0.86rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.6rem;
  align-items: center;
  justify-content: space-between;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.footer a {
  color: var(--ink-muted);
  text-decoration: none;
}

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

/* ----------------------------------------------------------------- legal --- */

.legal {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.legal__head {
  padding-bottom: 1.75rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--hairline);
}

.legal h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 1.6rem + 1.8vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 620;
}

.legal__meta {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

.legal__body {
  max-width: var(--measure);
}

.legal__body h2 {
  margin: 2.75rem 0 0.85rem;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
}

.legal__body h3 {
  margin: 1.9rem 0 0.6rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}

.legal__body p,
.legal__body li {
  color: var(--ink-muted);
}

.legal__body p {
  margin: 0 0 1rem;
}

.legal__body ul {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
}

.legal__body li {
  margin-bottom: 0.5rem;
}

.legal__body strong {
  color: var(--ink);
  font-weight: 550;
}

.callout {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}

.callout p:last-child {
  margin-bottom: 0;
}

.legal__toc {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface);
}

.legal__toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.legal__toc ol {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

.legal__toc li {
  margin-bottom: 0.35rem;
}

/* A table is the clearest way to answer "which data, where, and for how
   long" — and Google Play's data-deletion review asks exactly that. It is the
   one element allowed to be wider than the page, inside its own scroller. */
.table-scroll {
  margin: 1.25rem 0 1.75rem;
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface);
}

.legal__body table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal__body th,
.legal__body td {
  padding: 0.8rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}

.legal__body tbody tr:last-child th,
.legal__body tbody tr:last-child td {
  border-bottom: 0;
}

.legal__body thead th {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal__body tbody th {
  color: var(--ink);
  font-weight: 550;
}

.legal__body td {
  color: var(--ink-muted);
}

/* Four columns do not fit a reading measure, so on a wide screen the table
   alone steps outside it. Only where the shell has the room to spare: at
   narrower widths a fixed width here would push past the page's side gutter. */
@media (min-width: 1000px) {
  .table-scroll {
    width: 900px;
  }
}

/* Numbered instructions that have to be followed exactly, rather than read. */
.steps {
  counter-reset: step;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  position: relative;
  margin-bottom: 0.85rem;
  padding-left: 2.6rem;
  min-height: 1.75rem;
  color: var(--ink-muted);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.steps strong {
  color: var(--ink);
  font-weight: 550;
}

/* ------------------------------------------------------------------- 404 --- */

.notfound {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding-block: 4rem;
}

.notfound h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 1.5rem + 1.4vw, 2.4rem);
  letter-spacing: -0.02em;
}

.notfound p {
  margin: 0 0 1.5rem;
  color: var(--ink-muted);
}
