/* ============================================================
   APP PAGES — Stratus and Pulsar (2026-11-30)

   Loaded after styles.css by stratus.html and pulsar.html only,
   scoped to body.ap, so nothing here reaches the rest of the site.
   Modeled on drywater.css (Ricky, 2026-11-30): each page wears its
   app's own look, taken from its Google Play feature graphic, not
   the Applied Flux paper look. Its job is a click on the Play badge.

   Type is Segoe UI, the face the store graphics were set in; Noto
   Sans stands in where Segoe UI is not installed.

   Re-pointing the shared tokens re-themes the shared components
   (section headings, stat table, legal text, footer) for free.
   ============================================================ */
body.ap {
  --font-app: 'Segoe UI', 'Noto Sans', system-ui, sans-serif;
  --font-display: var(--font-app);
  --font-body: var(--font-app);
  --dark-border: var(--border);
}

/* Stratus: the feature graphic's blue, the app's slate, the icon's sun */
body.ap--stratus {
  --bg:          #0c1427;
  --bg-alt:      #111c36;
  --text:        #eef2fb;
  --text-muted:  #a3b2d1;
  --accent:      #f5a524;
  --accent-deep: #e08e0b;
  --border:      rgba(238, 242, 251, 0.12);
  --border-card: rgba(238, 242, 251, 0.2);
  --dark-bg:     #080e1d;
  --dark-muted:  #a3b2d1;
  --hero:        linear-gradient(135deg, #2157ce 0%, #183b8a 55%, #122245 100%);
  --cta-ink:     #1a1200;
}

/* Pulsar: the feature graphic's indigo-to-violet and its teal rule */
body.ap--pulsar {
  --bg:          #0e0c28;
  --bg-alt:      #15113a;
  --text:        #f2f0ff;
  --text-muted:  #b5aedb;
  --accent:      #18e0c8;
  --accent-deep: #10bfaa;
  --border:      rgba(242, 240, 255, 0.12);
  --border-card: rgba(242, 240, 255, 0.2);
  --dark-bg:     #0a0820;
  --dark-muted:  #b5aedb;
  --hero:        linear-gradient(120deg, #0f2c9a 0%, #2a2fb0 45%, #5a2ec3 100%);
  --cta-ink:     #04201c;
}

.ap .section-heading,
.ap .cta-heading,
.ap .stat-table tbody th,
.ap .legal h3 {
  font-weight: 700;
  letter-spacing: -0.015em;
}

.ap .section-heading em,
.ap .cta-heading em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Nav: floats over the hero ---------- */
.ap .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.ap .nav--scrolled {
  background-color: color-mix(in srgb, var(--bg) 90%, transparent);
}

.ap .nav-wordmark {
  font-family: var(--font-app);
  font-weight: 600;
}

.ap .nav-wordmark,
.ap .nav-link {
  color: var(--text);
}

.ap .nav-link {
  opacity: 0.85;
}

.ap .nav-cta {
  padding: 0.55rem 1rem;
  font-weight: 600;
  color: var(--cta-ink);
  background-color: var(--accent);
  border-radius: 999px;
  transition: filter 0.2s ease;
}

.ap .nav-cta::after {
  display: none;
}

.ap .nav-cta:hover {
  color: var(--cta-ink);
  filter: brightness(1.1);
}

/* ---------- Hero: copy beside two store screenshots ---------- */
.ap-hero {
  position: relative;
  overflow: hidden;
  background: var(--hero);
}

/* Fades the hero's bottom edge into the page */
.ap-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5rem;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.ap-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: center;
  padding-top: 7.5rem;
  padding-bottom: 5.5rem;
}

.ap-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

.ap-wordmark {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-family: var(--font-app);
  font-size: clamp(3rem, 7.5vw, 5.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1.25rem;
}

.ap-wordmark img {
  width: 1.15em;
  height: 1.15em;
  border-radius: 0.24em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.ap-tagline {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 0.9rem;
}

.ap-tagline em {
  font-style: normal;
  color: var(--accent);
}

.ap-hero-sub {
  max-width: 32rem;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 1.4rem;
}

/* Two store screenshots side by side, the second stepped down */
.ap-hero-shots {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.25rem;
}

.ap-hero-shots img {
  width: min(240px, 100%);
  height: auto;
  border-radius: 22px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

.ap-hero-shots picture + picture {
  margin-top: 3rem;
}

/* ---------- Google Play badge ----------
   The official PNG is used unmodified. 41px of its 250px height is built-in
   clear space on every side, so the visible badge is ~67% of the box height;
   the negative margin only pulls neighbours in over that transparent padding. */
.ap-badge {
  display: inline-block;
  line-height: 0;
  margin: -0.6rem;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.ap-badge img {
  height: 6rem;
  width: auto;
  max-width: none;
}

.ap-badge:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

.ap-badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -8px;
}

.ap-badge--sm img {
  height: 3.9rem;
}

.ap-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
}

.ap-price {
  font-size: 0.95rem;
  color: var(--text);
}

.ap-price strong {
  font-weight: 600;
  color: var(--accent);
}

.ap-hero .ap-price {
  color: rgba(255, 255, 255, 0.9);
}

.ap-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.ap-trust li {
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

/* ---------- Sections ---------- */
.ap-section {
  padding: 6rem 0;
}

.ap-section + .ap-section,
.ap-depth {
  border-top: 1px solid var(--border);
}

.ap .section-heading {
  margin-bottom: 3rem;
}

.ap .section-label {
  font-weight: 600;
}

/* ---------- Feature rows: store screenshot beside its claim ---------- */
.ap-rows {
  display: grid;
  gap: 5rem;
}

.ap-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 4rem;
  align-items: center;
}

.ap-row:nth-child(even) > picture {
  order: 2;
}

.ap-row > picture {
  display: flex;
  justify-content: center;
}

.ap-shot {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--border-card);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}

.ap-row-copy h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}

.ap-row-copy p {
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.ap-row-copy p + p {
  margin-top: 0.8rem;
}

/* ---------- Mid-page band: the Play feature graphic, whole ---------- */
.ap-band {
  padding: 6rem 0;
  text-align: center;
  background: var(--hero);
}

.ap-band-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ap-feature {
  width: 100%;
  max-width: 820px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  margin-bottom: 1.75rem;
}

.ap-band .ap-price {
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Depth: grids of store shots, then a facts table ---------- */
.ap-depth {
  padding: 6rem 0;
  background-color: var(--bg-alt);
}

.ap-depth-sub {
  max-width: 44rem;
  margin: -1.75rem 0 2.75rem;
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.ap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  justify-items: center;
  margin-bottom: 1rem;
}

.ap-grid--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ap-grid figure {
  margin: 0;
  width: 100%;
  text-align: center;
}

.ap-grid--wide .ap-shot {
  max-width: none;
  border-radius: 14px;
}

.ap-grid figcaption {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.ap .stat-table tbody th {
  font-size: 1.05rem;
  white-space: normal;
}

.ap .stat-table tbody td:nth-child(2) {
  font-family: var(--font-app);
  font-size: 0.95rem;
  white-space: normal;
  color: var(--text-muted);
}

.ap .stat-table a {
  color: var(--text);
  border-bottom: 1px solid var(--border-card);
}

.ap .stat-table a:hover {
  color: var(--accent);
}

.ap-note {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 44rem;
}

/* ---------- FAQ: visible answers, two columns on wide screens ---------- */
.ap-faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 3.5rem;
}

.ap-faq-list h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.ap-faq-list p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.ap-faq-list a {
  color: var(--text);
  border-bottom: 1px solid var(--border-card);
}

.ap-faq-list a:hover {
  color: var(--accent);
}

@media (max-width: 760px) {
  .ap-faq-list {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* ---------- Closing CTA ---------- */
.ap-close {
  padding: 7rem 0 4rem;
  background-color: var(--dark-bg);
  border-top: 1px solid var(--border);
  scroll-margin-top: 2rem;
}

.ap-close-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4rem;
  align-items: center;
}

.ap-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 1.5rem;
  border-radius: 20px;
}

.ap-close .cta-heading {
  color: var(--text);
}

.ap-close .cta-sub {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.ap-qr {
  margin: 0;
  text-align: center;
}

.ap-qr img {
  width: 184px;
  height: 184px;
  margin: 0 auto;
  border-radius: 12px;
}

.ap-qr figcaption {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.ap-community {
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.ap-community p {
  flex: 1 1 22rem;
  max-width: 36rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.ap-mail {
  font-size: 0.95rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 2px;
}

.ap-mail:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Privacy: complete, but visually quiet ---------- */
.ap .legal-section {
  padding: 4.5rem 0;
  scroll-margin-top: 4.5rem;
}

.ap .legal-section .section-label {
  color: var(--text-muted);
}

.ap .legal-section .section-heading {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  margin-bottom: 2rem;
}

.ap .legal-meta {
  font-family: var(--font-app);
}

.ap .legal h3 {
  font-size: 1.1rem;
}

.ap .legal p {
  font-size: 0.95rem;
  font-weight: 400;
}

.ap .legal p + p {
  margin-top: 0.8rem;
}

.ap .legal .stat-table tbody th {
  font-size: 0.95rem;
}

.ap .stat-table tbody th {
  width: 34%;
}

/* Phones: stack each table row so no column hides behind a sideways scroll */
@media (max-width: 640px) {
  .ap .stat-table { display: block; min-width: 0; }
  .ap .stat-table thead { display: none; }
  .ap .stat-table tbody,
  .ap .stat-table tr,
  .ap .stat-table tbody th,
  .ap .stat-table tbody td { display: block; width: auto; }
  .ap .stat-table tr { padding: 0.9rem 0; border-top: 1px solid var(--border); }
  .ap .stat-table tbody th,
  .ap .stat-table tbody td { padding: 0; border-top: none; }
  .ap .stat-table tbody td { margin-top: 0.35rem; }
}

/* ---------- Sticky bar (phones) ---------- */
.ap-sticky {
  display: none;
}

@media (max-width: 760px) {
  .ap-sticky:not([hidden]) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.75rem;
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom));
    background-color: color-mix(in srgb, var(--dark-bg) 96%, transparent);
    border-top: 1px solid var(--border-card);
  }

  .ap-sticky-icon {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 9px;
  }

  .ap-sticky-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
  }

  .ap-sticky-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
  }

  .ap-sticky-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ap-sticky .ap-badge {
    flex: none;
    margin: -0.5rem -0.6rem -0.5rem -0.4rem;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ap-hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .ap-row,
  .ap-row:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .ap-row:nth-child(even) > picture {
    order: 0;
  }

  .ap-shot {
    max-width: 260px;
  }

  .ap-rows {
    gap: 4rem;
  }

  .ap-close-inner {
    grid-template-columns: 1fr;
  }

  /* A QR is no use on the device that would scan it */
  .ap-qr {
    display: none;
  }
}

@media (max-width: 760px) {
  .ap .nav-link {
    display: none;
  }

  .ap .nav-inner {
    padding: 0.9rem 1rem;
  }

  /* Sides only: a shorthand here would outrank .ap-hero-inner's top padding */
  .ap .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .ap-hero-inner {
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  .ap-kicker {
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
  }

  .ap-hero-shots {
    gap: 0.75rem;
  }

  .ap-hero-shots picture {
    flex: 0 1 46%;
  }

  .ap-hero-shots picture + picture {
    margin-top: 2rem;
  }

  .ap-section,
  .ap-depth {
    padding: 4rem 0;
  }

  .ap-band {
    padding: 4rem 0;
  }

  .ap-grid,
  .ap-grid--wide {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .ap-grid .ap-shot {
    max-width: 260px;
  }

  .ap-grid--wide .ap-shot {
    max-width: 100%;
  }

  .ap-close {
    padding: 4.5rem 0 3rem;
  }

  .ap-community {
    margin-top: 3.5rem;
  }

  .ap .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ap-badge,
  .ap-badge:hover {
    transition: none;
    transform: none;
  }
}
