/* Park Finder at parks.az.dev: the site's whole look, in the app's park green.
   Served from /static/ on the channel host. */

/* Every color is a semantic token: the light values here, the dark ones under
   .dark on <html>, which the head's script sets before the first paint. A new
   color is a new token in both blocks, and its pairings join the contrast test
   (web/src/__tests__/park-finder-theme-contrast.test.ts). The green is the
   app's AccentColor, #2e7d4f in light and #4fb477 in dark, for links, the
   button and the focus ring. The type is the system font, as in the
   app; the site serves no font files. The layout steps wider from 720px.
   (No comments inside a token block: the contrast test reads them bare.) */
:root {
  --p-bg: #f4f7f2;
  --p-surface: #ffffff;
  --p-ink: #15211a;
  --p-soft: #435a4b;
  --p-link: #2e7d4f;
  --p-button: #2e7d4f;
  --p-button-ink: #ffffff;
  --p-border: #d6e0d2;
  --p-focus: #2e7d4f;
  --p-band: #2e7d4f;
  --p-band-ink: #ffffff;
  color-scheme: light;
  --p-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* On screen only: a page prints light whatever the theme. */
@media screen {
  .dark {
    --p-bg: #101712;
    --p-surface: #18231b;
    --p-ink: #eef4ee;
    --p-soft: #b3c4b7;
    --p-link: #4fb477;
    --p-button: #4fb477;
    --p-button-ink: #0b1410;
    --p-border: #2c3a30;
    --p-focus: #4fb477;
    --p-band: #4fb477;
    --p-band-ink: #0b1410;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--p-font);
  background: var(--p-bg);
  color: var(--p-ink);
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--p-link);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--p-focus);
  outline-offset: 3px;
}

:where(h1, h2, h3, p) {
  margin: 0;
}

/* The container every row shares. */
.p-in {
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* An image for one theme: the App Store badge. A page with scripting off is
   light, so it shows the light one. */
.only-dark {
  display: none;
}

@media screen {
  .dark .only-dark {
    display: block;
  }

  .dark .only-light {
    display: none;
  }
}

/* Header: the mark and the name, linking home. */
.p-top {
  display: flex;
  align-items: center;
  padding-block: 16px;
}

.p-top a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--p-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.p-mark {
  width: 36px;
  height: 36px;
  border-radius: 22.5%;
}

.p-h1 {
  font-size: 40px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.p-lede {
  font-size: 19px;
  color: var(--p-soft);
  margin-top: 16px;
  max-width: 34ch;
}

.p-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 0;
  background: var(--p-button);
  color: var(--p-button-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* The home page: the hero, the parts, and the promise. */
.p-hero {
  display: grid;
  justify-items: start;
  padding-block: 24px 40px;
}

.p-icon {
  width: 96px;
  height: 96px;
  margin-bottom: 20px;
}

.p-store {
  margin-top: 28px;
}

.p-soon {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 14px;
  border: 2px solid var(--p-soft);
  color: var(--p-ink);
  font-weight: 700;
  font-size: 16px;
}

.p-badge {
  display: inline-block;
}

/* No display here: .only-light and .only-dark pick the theme's badge. */
.p-badge img {
  height: 52px;
  width: auto;
  vertical-align: top;
}

.p-parts {
  display: grid;
  gap: 16px;
  padding-bottom: 48px;
}

.p-part {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: 20px;
  padding: 22px 20px;
}

.p-part h2 {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.p-part p {
  color: var(--p-soft);
}

.p-part p + p {
  margin-top: 12px;
}

.p-promise {
  background: var(--p-band);
  color: var(--p-band-ink);
  padding-block: 32px;
}

.p-promise h2 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* The 404 and the error page: the line, and the way home. */
.p-lost {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-block: 64px 80px;
}

.p-lost .p-lede {
  margin-top: 0;
}

.p-lost .p-button {
  margin-top: 8px;
}

/* The reading pages: privacy, terms and support. */
.p-read {
  max-width: 40rem;
  padding-block: 20px 64px;
}

.p-read .p-h1 {
  font-size: 38px;
}

.p-read .p-lede {
  max-width: none;
}

.p-read .p-date {
  font-size: 15px;
  color: var(--p-soft);
  margin-top: 8px;
}

.p-read h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 8px;
  letter-spacing: -0.01em;
}

.p-read p + p {
  margin-top: 12px;
}

.p-read ul {
  padding-left: 1.2em;
  margin: 0;
  display: grid;
  gap: 10px;
}

.p-read ul + p,
.p-read p + ul {
  margin-top: 12px;
}

/* Support: the address, and the button the page's script adds to copy it. */
.p-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: 20px;
  padding: 20px;
  margin: 28px 0;
}

.p-address strong {
  font-size: 24px;
  font-weight: 700;
  overflow-wrap: anywhere;
  user-select: all;
}

.p-quiet {
  background: transparent;
  color: var(--p-ink);
  border: 2px solid var(--p-soft);
  min-height: 44px;
  padding: 0 16px;
}

/* Read by a screen reader, never seen: the copy button's "Copied". */
.p-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Footer: the site's links and the theme picker, then where the park data
   comes from, who makes the app, and the family line. */
.p-foot {
  border-top: 1px solid var(--p-border);
  padding-block: 28px 36px;
  display: grid;
  gap: 14px;
}

.p-foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}

.p-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.p-links a {
  font-weight: 600;
  color: var(--p-ink);
}

.p-osm,
.p-made,
.p-family {
  font-size: 15px;
  color: var(--p-soft);
}

/* The family line: the sister sites linked, this one in plain words. Each
   name stays on one line, so a narrow footer wraps between names. */
.p-family a,
.p-family [aria-current] {
  white-space: nowrap;
}

.p-family a {
  font-weight: 600;
}

.p-family [aria-current] {
  font-weight: 600;
  color: var(--p-ink);
}

/* The theme picker: System, Light, Dark. Shown by the script, which runs it. */
.p-theme {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--p-soft);
}

.p-theme[hidden] {
  display: none;
}

.p-theme button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--p-soft);
  background: transparent;
  color: var(--p-ink);
  cursor: pointer;
}

.p-theme button[aria-pressed="true"] {
  background: var(--p-ink);
  color: var(--p-bg);
  border-color: var(--p-ink);
}

@media (min-width: 720px) {
  .p-in {
    padding-inline: 40px;
  }

  .p-h1 {
    font-size: 56px;
  }

  .p-lede {
    font-size: 21px;
  }

  .p-hero {
    padding-block: 48px 64px;
  }

  .p-parts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 72px;
  }

  .p-part {
    padding: 28px;
  }

  /* A last part alone on its row takes the row. */
  .p-part:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .p-promise {
    padding-block: 44px;
  }

  .p-promise h2 {
    font-size: 30px;
  }

  .p-read {
    padding-block: 40px 96px;
  }

  .p-read .p-h1 {
    font-size: 52px;
  }
}

@media print {
  .p-theme,
  .p-quiet {
    display: none;
  }
}
