/* AirIndex landing
   Consumer app page, dark navy locked to the product.
   Variance 7, motion 6, density 3.
   Accent #facc15. Panels 20px, buttons and the PSI meter are pills.
   Outfit is self-hosted (SIL Open Font License). */

@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/outfit-400.woff2") format("woff2");
}

@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/outfit-500.woff2") format("woff2");
}

@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/outfit-600.woff2") format("woff2");
}

:root {
  --bg: #070c16;
  --bg-raise: #0c1422;
  --text: #e7edf4;
  --muted: #c5ced8;
  --line: rgba(226, 232, 240, 0.14);
  --accent: #facc15;
  --accent-ink: #1a1608;
  --accent-hover: #ffe566;
  --good: #22c55e;
  --moderate: #06b6d4;
  --unhealthy: #facc15;
  --very: #f97316;
  --hazard: #ef4444;
  --radius: 20px;
  --nav-h: 4.5rem;
  --z-nav: 20;
  --z-skip: 30;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a,
.btn {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: var(--z-skip);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.logo img {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  border-radius: 0.45rem;
}

.nav-links {
  display: flex;
  gap: 1.15rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-bar .btn {
  justify-self: end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.btn,
.nav-links a,
.logo,
.footer-bar a,
.store {
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline-color: #f4f7fb;
}

.hero {
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 1.25rem 0 1.75rem;
  overflow: clip;
}

.hero .wrap {
  width: min(1180px, calc(100% - 3rem));
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy shot"
    "trust trust";
  column-gap: clamp(1.75rem, 4vw, 4rem);
  row-gap: 1.75rem;
  align-items: center;
}

.hero-copy {
  grid-area: copy;
}

.hero h1,
.section h2,
.prose h1 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.12;
  padding-bottom: 0.06em;
}

.hero h1 {
  max-width: 12em;
  font-size: clamp(2.7rem, 4.2vw, 4.35rem);
  text-wrap: balance;
}

.lede,
.section p {
  max-width: 38rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.55;
}

.hero .btn {
  margin-top: 1.75rem;
  height: 3rem;
  padding: 0 1.3rem;
}

.trust-band {
  grid-area: trust;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.trust-mark {
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
  border-radius: 0.9rem;
}

.trust-band p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.hero-grid .shot {
  grid-area: shot;
}

.shot {
  position: relative;
  margin: 0;
  min-width: 0;
  justify-self: end;
}

.shot::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 8% -6% 4%;
  background: radial-gradient(ellipse at center, rgba(36, 104, 176, 0.42), rgba(7, 12, 22, 0) 68%);
  filter: blur(18px);
  pointer-events: none;
}

.shot img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  max-width: min(400px, 38vw);
  max-height: calc(100dvh - var(--nav-h) - 9.5rem);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(3, 8, 18, 0.45);
}

section[id] {
  scroll-margin-top: 5.25rem;
}

.section {
  padding: 8rem 0;
}

.section-raise {
  background: var(--bg-raise);
}

.section h2 {
  max-width: 16ch;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

.meter {
  margin-top: 2.75rem;
}

.meter-bar,
.bands {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.meter-bar {
  height: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
}

.meter-bar span {
  transform-origin: left center;
}

.bands {
  gap: 0;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}

.bands li {
  min-width: 0;
  padding: 0.7rem 0.75rem 0 0;
  border-top: 3px solid var(--band);
}

.band-name,
.band-range {
  display: block;
}

.band-name {
  font-weight: 600;
  letter-spacing: -0.03em;
}

.band-range {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.places {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 2rem;
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
}

.places li {
  font-size: clamp(1.85rem, 4vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.15;
  padding-bottom: 0.06em;
}

.section h3 {
  margin: 3.25rem 0 0;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.figures {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.1fr;
  gap: 1.75rem 2.25rem;
  align-items: end;
  margin-top: 2.5rem;
}

.figures-pair {
  grid-template-columns: repeat(2, minmax(0, 18rem));
}

.figure {
  margin-top: 2.5rem;
}

.figures .figure {
  margin-top: 0;
}

.figure-name,
.figure-meta,
.now-status,
.now-note,
.region-pm {
  margin: 0;
  color: var(--muted);
}

.figure-name {
  font-size: 1rem;
}

.figure-value,
.region-psi {
  margin: 0.15rem 0 0;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.figure-value {
  font-size: clamp(2.75rem, 4vw, 3.75rem);
}

.figure-lead .figure-value {
  font-size: clamp(4.75rem, 9vw, 7.5rem);
}

.section .figure-value {
  color: var(--text);
  font-size: clamp(2.75rem, 4vw, 3.75rem);
}

.section .figure-lead .figure-value {
  font-size: clamp(4.75rem, 9vw, 7.5rem);
}

.section .figure-value.is-good { color: var(--good); }
.section .figure-value.is-moderate { color: var(--moderate); }
.section .figure-value.is-unhealthy { color: var(--unhealthy); }
.section .figure-value.is-very { color: var(--very); }
.section .figure-value.is-hazard { color: var(--hazard); }

.figures + .now-status {
  margin-top: 1.35rem;
}

.figure-meta,
.now-status,
.now-note {
  margin-top: 0.55rem;
}

.region-now,
.state-now {
  display: grid;
  gap: 1.35rem 1.5rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}

.region-now {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.state-now {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.region-name {
  display: block;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.region-psi {
  display: block;
  font-size: 2rem;
}

.is-highlight .region-psi {
  font-size: clamp(3.25rem, 6vw, 4.75rem);
}

.region-pm {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
}

.region-status {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.is-good { color: var(--good); }
.is-moderate { color: var(--moderate); }
.is-unhealthy { color: var(--unhealthy); }
.is-very { color: var(--very); }
.is-hazard { color: var(--hazard); }

.qa {
  margin-top: 1.5rem;
}

.qa details {
  border-top: 1px solid var(--line);
  padding: 1.15rem 0;
}

.qa details:last-child {
  border-bottom: 1px solid var(--line);
}

.qa summary {
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.qa details p {
  max-width: 62ch;
  margin-top: 0.75rem;
}

.qa-a {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
}

.qa details[open] .qa-a {
  grid-template-rows: 1fr;
  opacity: 1;
}

.qa-a > p {
  min-height: 0;
  overflow: hidden;
}

.split {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(0, 22rem);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.split h2 {
  max-width: 12em;
  text-wrap: balance;
}

.split .shot {
  min-width: 0;
  justify-self: end;
}

.split .shot img {
  width: 100%;
  max-width: 22rem;
  margin-inline: 0;
  max-height: min(72dvh, 680px);
  object-fit: contain;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin-top: 2.75rem;
}

.pair h3 {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.pair p {
  margin-top: 0.65rem;
  font-size: 1.0625rem;
}

.pair > :first-child {
  padding-right: 2rem;
  border-right: 1px solid var(--line);
}

.stores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.store {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 1.15rem 1.05rem;
  border-radius: var(--radius);
  background: #f3f5f7;
  color: #172033;
  text-decoration: none;
}

.store img {
  width: min(100%, 196px);
  height: auto;
  background: #fff;
}

.store span {
  font-weight: 600;
  letter-spacing: -0.03em;
}

.store:hover {
  background: #e7ebef;
  transform: translateY(-4px);
}

.store:active {
  transform: scale(0.98);
}

.store:focus-visible {
  outline-color: #172033;
}

.footer {
  border-top: 1px solid var(--line);
}

.footer-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-bar a {
  margin-left: auto;
  color: var(--text);
  text-decoration: none;
}

.footer-bar a:hover {
  color: var(--accent);
}

.prose {
  padding: 3.5rem 0 5rem;
  max-width: 40rem;
}

.prose h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
}

.prose h2 {
  margin: 2.25rem 0 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
}

.prose a {
  color: var(--text);
}

.prose a:hover {
  color: var(--accent);
}

.prose code {
  color: var(--text);
}

@media (max-width: 860px) {
  .hero-grid,
  .split,
  .pair,
  .stores,
  .figures,
  .figures-pair {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-areas:
      "copy"
      "trust"
      "shot";
  }

  .region-now,
  .state-now {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    min-height: 0;
    align-items: start;
    padding-top: 2rem;
  }

  .shot,
  .split .shot {
    justify-self: center;
  }

  .hero .wrap {
    width: min(1180px, calc(100% - 2rem));
  }

  .shot img,
  .split .shot img {
    margin-inline: auto;
    max-width: min(320px, 78vw);
    max-height: 62dvh;
  }

  .pair > :first-child {
    padding-right: 0;
    padding-bottom: 2rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stores {
    max-width: 320px;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(1120px, calc(100% - 2rem));
  }

  .nav-bar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .section {
    padding: 4.75rem 0;
  }

  .bands {
    grid-template-columns: 1fr 1fr;
  }

  .lede,
  .section p {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 0.08s;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 0.16s;
  }

  .hero-grid .shot {
    animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
  }

  .shot img {
    animation: drift 7.5s ease-in-out 1.1s infinite;
  }

  .shot::before {
    animation: haze 7.5s ease-in-out 1.1s infinite;
  }

  [data-reveal] {
    animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .meter.is-filled .meter-bar span {
    animation: meter-fill 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .meter.is-filled .meter-bar span:nth-child(2) { animation-delay: 0.08s; }
  .meter.is-filled .meter-bar span:nth-child(3) { animation-delay: 0.16s; }
  .meter.is-filled .meter-bar span:nth-child(4) { animation-delay: 0.24s; }
  .meter.is-filled .meter-bar span:nth-child(5) { animation-delay: 0.32s; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes haze {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes meter-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .nav-links a,
  .logo,
  .footer-bar a,
  .store,
  .btn:active,
  .store:active,
  .shot img,
  .shot::before,
  .qa-a {
    transition: none;
    transform: none;
    animation: none;
  }

  .qa-a,
  .qa details[open] .qa-a {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}
