/* ==========================================================================
   pages.css
   Site-wide supplementary styles, built page-by-page. Currently covers:
   Home, Install, Pricing, Guide, Help.
   Load order: base.css -> components.css -> pages.css
   Consumes tokens from base.css and primitives from components.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Accessibility utility
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Nav — Install + hamburger group
   .nav-cta pairs the always-visible Install button with the mobile menu
   toggle. components.css's nav rules (space-between on .nav-inner) didn't
   anticipate this pairing, so the wrapper and its icon sizing live here.
   -------------------------------------------------------------------------- */
.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-cta .icon {
  width: 24px;
  height: 24px;
}

/* --------------------------------------------------------------------------
   Card content
   .card itself (components.css) is just surface + border + padding. These
   rules give heading/body rhythm to cards used as content tiles (seats,
   wedge, pricing) across the site.
   -------------------------------------------------------------------------- */
.card h3 {
  margin-bottom: var(--space-1);
}

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

/* --------------------------------------------------------------------------
   Section titles
   -------------------------------------------------------------------------- */
.section-title {
  margin-bottom: var(--space-4);
}

/* --------------------------------------------------------------------------
   Page lead
   Generic subhead under an <h1>, used below the page header on Install,
   Pricing, and Guide pages (doubles as the ~50-word article summary).
   Lighter-weight cousin of .hero-subhead, without the hero's
   centering/layout.
   -------------------------------------------------------------------------- */
.lead {
  color: var(--muted);
  font-size: 1.0625rem;
  margin: var(--space-2) 0 var(--space-3);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   Home — Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-top: var(--space-6);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 60ch;
}

.hero-content .pill {
  margin-bottom: var(--space-1);
}

.hero h1 {
  font-size: 2.25rem;
}

.hero-subhead {
  color: var(--muted);
  font-size: 1.0625rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* The phone-frame "device" and its background glow */
.hero-device {
  position: relative;
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: center;
}

/* Subtle radial darkening behind the hero device — the one gradient
   exception in the visual system (SITE-PLAN 5. Motion / Color). */
.hero-device::before {
  content: '';
  position: absolute;
  inset: -10% -20%;
  background: radial-gradient(circle, rgba(224, 163, 64, 0.10), transparent 70%);
  z-index: -1;
}

.phone-frame {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  padding: var(--space-1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
}

.phone-screen {
  width: 100%;
  border-radius: 20px;
}

@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--space-8);
  }

  .hero-content {
    align-items: flex-start;
    flex: 1;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-ctas {
    justify-content: flex-start;
  }

  .hero-device {
    flex: 1;
    max-width: 360px;
  }
}

/* --------------------------------------------------------------------------
   Home — "For every seat" / "Built different" / Pricing teaser grids
   -------------------------------------------------------------------------- */
.seats-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

.wedge-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

.pricing-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .seats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .wedge-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Home — Feature deep-dive (5 alternating rows)
   -------------------------------------------------------------------------- */
.feature-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

.feature-row + .feature-row {
  margin-top: var(--space-8);
}

.feature-text h3 {
  margin-bottom: var(--space-2);
}

.feature-text p {
  color: var(--muted);
  margin: 0 auto;
}

.feature-media {
  width: 100%;
}

@media (min-width: 768px) {
  .feature-row {
    flex-direction: row;
    text-align: left;
    gap: var(--space-8);
  }

  .feature-row-reverse {
    flex-direction: row-reverse;
  }

  .feature-text,
  .feature-media {
    flex: 1;
  }

  .feature-text p {
    margin: 0;
  }
}

/* --------------------------------------------------------------------------
   Home — Pricing teaser
   -------------------------------------------------------------------------- */
.price {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  margin: var(--space-2) 0;
}

.price-period {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
}

.pricing-grid .lifetime-counter {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.875rem;
}

.pricing-cta {
  margin-top: var(--space-4);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Home — Trust band
   -------------------------------------------------------------------------- */
.trust-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--muted);
}

.discord-tile {
  text-align: center;
}

.discord-tile h3 {
  margin: var(--space-1) 0;
}

.discord-tile p {
  color: var(--muted);
  margin: 0 auto var(--space-3);
  max-width: 50ch;
}

@media (min-width: 768px) {
  .trust-list {
    flex-direction: row;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
  }

  .trust-list li {
    flex: 1;
  }
}

/* --------------------------------------------------------------------------
   iOS banner (/install)
   Hidden by default via the [hidden] attribute; site.js removes it for
   iOS user agents. Sits above the page header, inside <main>.
   -------------------------------------------------------------------------- */
.ios-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-2);
}

.ios-banner p {
  margin: 0;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Install — Download block
   -------------------------------------------------------------------------- */
.download-card {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.download-btn {
  width: 100%;
}

.download-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  font-size: 0.9375rem;
}

.download-meta-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-1);
  border-bottom: 1px solid var(--border);
}

.download-meta-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.download-meta dt {
  color: var(--muted);
}

.download-meta dd {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--text);
}

/* "Verify this fingerprint" sits as its own accordion below the download
   card rather than nested inside it — avoids a box-within-a-box. */
.download-verify {
  margin-top: var(--space-2);
}

@media (min-width: 768px) {
  .download-btn {
    width: auto;
  }

  .download-meta {
    flex-direction: row;
  }

  .download-meta-item {
    flex: 1;
    flex-direction: column;
    gap: var(--space-1);
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 0 var(--space-3);
  }

  .download-meta-item:first-child {
    padding-left: 0;
  }

  .download-meta-item:last-child {
    border-right: none;
    padding-right: 0;
  }
}

/* --------------------------------------------------------------------------
   Install — Three-step guide
   -------------------------------------------------------------------------- */
.install-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.install-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.install-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.install-step-body p {
  margin: 0 0 var(--space-2);
}

@media (min-width: 768px) {
  .install-step {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .install-step-body {
    flex: 1;
  }
}

/* --------------------------------------------------------------------------
   Install — Troubleshooting / updates note
   -------------------------------------------------------------------------- */
.help-pointer,
.updates-note {
  margin-top: var(--space-3);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Pricing — header offer + tiles
   .discord-tile (above) is reused standalone here, outside the trust-band
   grid it was built for, so it needs its own bottom spacing before the
   pricing-grid that follows.
   -------------------------------------------------------------------------- */
.pricing-header .discord-tile {
  margin-bottom: var(--space-6);
}

.tier-features {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.tier-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  color: var(--muted);
  font-size: 0.9375rem;
}

.tier-features .icon {
  margin-top: 0.25em;
}

/* "Save 17% vs monthly" badge on the Yearly tile */
.tier-save {
  margin: var(--space-1) 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green);
}

/* --------------------------------------------------------------------------
   Pricing — "Not a leader?" callout
   -------------------------------------------------------------------------- */
.callout {
  max-width: 60ch;
  margin: var(--space-4) auto 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Guide — index
   Each category is a heading + a .card styled as a hairline-separated list
   of article rows (same rhythm as .download-meta-item, applied to a card).
   Built articles render as <a class="guide-article-item"> with a trailing
   chevron; articles not yet shipped (sessions 6-7) render as inert
   <span class="guide-article-item is-soon"> — swap to a link + chevron
   once each article exists.
   -------------------------------------------------------------------------- */
.guide-category + .guide-category {
  margin-top: var(--space-8);
}

.guide-category .section-title {
  margin-bottom: var(--space-2);
}

.card.guide-article-list {
  padding: 0;
}

.guide-article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.guide-article-item:last-child {
  border-bottom: none;
}

.guide-article-item:hover,
.guide-article-item:focus-visible {
  color: var(--gold);
}

.guide-article-item .icon {
  flex-shrink: 0;
}

.guide-article-item.is-soon {
  color: var(--muted);
  font-weight: 400;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Guide — article template
   Breadcrumb, tip callouts, "Still stuck?" footer, prev/next nav. Shared
   across every guide article.
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
  font-size: 0.875rem;
  color: var(--muted);
}

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

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--gold);
}

.breadcrumb [aria-current] {
  color: var(--text);
}

.guide-article .screenshot {
  display: block;
  margin: var(--space-4) 0;
}

.callout-tip {
  margin: var(--space-4) 0;
  padding: var(--space-2) var(--space-3);
  max-width: 70ch;
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
}

.callout-tip p {
  margin: 0;
}

.callout-tip strong {
  color: var(--gold);
}

.still-stuck {
  margin-top: var(--space-8);
}

.still-stuck-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.article-nav a {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-width: 48%;
  color: var(--text);
  text-decoration: none;
}

.article-nav a:hover,
.article-nav a:focus-visible {
  color: var(--gold);
}

.article-nav-next {
  margin-left: auto;
  text-align: right;
}

.article-nav-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Changelog
   -------------------------------------------------------------------------- */
.release-card .btn {
  margin-top: var(--space-2);
}

.roadmap-list {
  list-style: disc;
  padding-left: var(--space-4);
  max-width: 60ch;
}

.roadmap-list li {
  margin-bottom: var(--space-1);
  color: var(--text);
}

.roadmap-list li:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Help Desk placeholder (/help/)
   Search input + filtered results list. No new card/button primitives
   needed — reuses .card, .btn, .discord-tile from components.css.
   -------------------------------------------------------------------------- */
.help-search-wrap {
  margin: var(--space-4) 0;
  position: relative;
}

.help-search-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

.help-search-input::placeholder {
  color: var(--muted);
}

.help-search-input:focus {
  border-color: var(--gold);
}

.help-results {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
}

.help-result {
  border-bottom: 1px solid var(--border);
}

.help-result:last-child {
  border-bottom: none;
}

.help-result a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.help-result a:hover,
.help-result a:focus-visible {
  color: var(--gold);
}

.help-result .icon {
  flex-shrink: 0;
  color: var(--muted);
}

.help-empty {
  margin: var(--space-3) 0 0;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Launch countdown — Home hero
   -------------------------------------------------------------------------- */
#launch-countdown {
  margin-bottom: var(--space-2);
}

.countdown-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 var(--space-1);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.countdown-clock {
  display: flex;
  gap: var(--space-2);
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3rem;
}

.countdown-unit span:first-child {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.countdown-unit-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
