/* ============================================================
   PriceAm — shared styles (landing + legal pages)
   Pattern: App Store Style Landing · Style: Bento Box Grid
   Font: IBM Plex Sans · Brand: #16805A
   ============================================================ */

:root {
  /* Brand & semantic tokens (from the PriceAm app theme) */
  --brand: #16805A;
  --brand-dark: #116347;
  --brand-soft: #E7F2EC;
  --brand-ink: #FCFBF6;
  --ink: #1A1A1A;
  --muted: #626262;
  --faint: #A5A5A5;
  --line: #E8E8E8;
  --surface: #FFFFFF;
  --surface-2: #F0F0F0;
  --bg: #FBFBF9;
  --price-up: #C94B2A;
  --price-down: #3A8950;
  --amber: #C4902A;
  --gold: #E0A82E;

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.10);

  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.4em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* Accessibility */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--brand); color: var(--brand-ink); padding: 10px 16px;
  border-radius: 10px; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }
.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;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 251, 249, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 1.18rem; color: var(--ink); letter-spacing: -0.03em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 1rem;
  box-shadow: var(--shadow-sm);
}
.nav-links { display: none; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 0.95rem;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
  min-height: 44px;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px rgba(22,128,90,0.28); }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }

/* ── Store badges ───────────────────────────────────────── */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 13px;
  min-height: 56px; transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}
.badge:hover { text-decoration: none; transform: translateY(-2px); }
.badge svg { width: 26px; height: 26px; flex: none; }
.badge .b-top { font-size: 0.68rem; opacity: 0.85; letter-spacing: 0.02em; }
.badge .b-main { font-size: 1.06rem; font-weight: 600; line-height: 1.1; }
.badge.disabled { background: #2a2a2a; opacity: 0.55; cursor: not-allowed; position: relative; }
.badge.disabled:hover { transform: none; }
.badge .soon {
  position: absolute; top: -9px; right: -8px; background: var(--amber); color: #fff;
  font-size: 0.6rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: 0.03em;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 56px 0 28px; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(22,128,90,0.10), transparent 70%),
    radial-gradient(40% 40% at 85% 30%, rgba(224,168,46,0.10), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  font-size: 0.82rem; font-weight: 600; padding: 7px 15px; border-radius: 999px;
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--price-down); }
.hero p.lead { color: var(--muted); font-size: 1.12rem; max-width: 540px; margin: 0 auto 26px; }
.hero .store-badges { justify-content: center; }

/* ── Phone mockup (pure CSS, no images) ─────────────────── */
.phone {
  width: 270px; max-width: 78vw; margin: 44px auto 0; position: relative;
  border-radius: 42px; background: #0e0e0e; padding: 11px;
  box-shadow: var(--shadow-lg), 0 0 0 2px rgba(0,0,0,0.04);
}
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; background: #0e0e0e; border-radius: 0 0 16px 16px; z-index: 3;
}
.phone-screen {
  background: var(--bg); border-radius: 32px; overflow: hidden; height: 540px;
  display: flex; flex-direction: column;
}
.ps-top { padding: 30px 16px 10px; display: flex; align-items: center; justify-content: space-between; }
.ps-title { font-weight: 700; font-size: 1.05rem; }
.ps-icons { display: flex; gap: 8px; color: var(--muted); }
.ps-chips { display: flex; gap: 8px; padding: 4px 16px 12px; }
.ps-chip { flex: 1; background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #d4e7dd;
  border-radius: 12px; padding: 12px; font-size: 0.78rem; font-weight: 600; }
.ps-chip.alt { background: var(--surface); color: var(--ink); border-color: var(--line); }
.ps-section { padding: 6px 16px; display: flex; align-items: center; justify-content: space-between; }
.ps-section span { font-weight: 700; font-size: 0.85rem; }
.ps-section a { font-size: 0.72rem; color: var(--brand); }
.ps-list { padding: 4px 16px; display: flex; flex-direction: column; gap: 9px; }
.ps-row {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 12px; display: flex; align-items: center; gap: 11px;
}
.ps-thumb { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 1.1rem; }
.ps-meta { flex: 1; min-width: 0; }
.ps-name { font-weight: 600; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-sub { font-size: 0.7rem; color: var(--faint); }
.ps-price { font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.ps-delta { font-size: 0.68rem; font-weight: 700; }
.up { color: var(--price-up); } .down { color: var(--price-down); }
.ps-tabbar {
  margin-top: auto; background: var(--surface); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 12px 0 16px; color: var(--faint);
}
.ps-tabbar .active { color: var(--brand); }

/* ── Sections ───────────────────────────────────────────── */
section { padding: 64px 0; }
.section-head { max-width: 620px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .kicker { color: var(--brand); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* Feature bento grid */
.bento { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 36px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.feature:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow); border-color: #d8e6df; }
.feature .ico {
  width: 50px; height: 50px; border-radius: 14px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 18px;
}
.feature .ico svg { width: 26px; height: 26px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* How it works */
.how { background: var(--surface); border-block: 1px solid var(--line); }
.steps { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 30px; }
.step {
  display: flex; gap: 16px; padding: 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg);
}
.step .num {
  width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums;
}
.step h3 { margin: 2px 0 5px; font-size: 1.02rem; }
.step p { color: var(--muted); margin: 0; font-size: 0.92rem; }
.how-grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }

/* Testimonials */
.reviews { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 34px; }
.review {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.stars { display: inline-flex; gap: 2px; color: var(--gold); margin-bottom: 12px; }
.stars svg { width: 17px; height: 17px; }
.review p { font-size: 0.98rem; color: var(--ink); }
.reviewer { display: flex; align-items: center; gap: 11px; margin-top: 16px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; flex: none; }
.reviewer .who { font-weight: 600; font-size: 0.9rem; }
.reviewer .role { font-size: 0.78rem; color: var(--faint); }

/* Rating banner */
.rating-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px;
  margin-top: 12px; color: var(--muted); font-size: 0.92rem;
}
.rating-banner strong { color: var(--ink); }

/* Download CTA */
.cta {
  margin: 0 auto; max-width: var(--maxw);
}
.cta-card {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--brand-ink); border-radius: var(--radius-lg); padding: 48px 28px; text-align: center;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-card h2 { color: var(--brand-ink); }
.cta-card p { color: rgba(252,251,246,0.88); max-width: 520px; margin: 0 auto 24px; }
.cta-card .store-badges { justify-content: center; }
.cta-card .badge { background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.18); }
.cta-card .badge.disabled { background: rgba(0,0,0,0.18); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #cfcfcf; padding: 48px 0 28px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: var(--brand); }
.footer-about { color: #9a9a9a; font-size: 0.92rem; max-width: 320px; margin-top: 12px; }
.footer-col h4 { color: #fff; font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; color: #b9b9b9; padding: 5px 0; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #2e2e2e; margin-top: 36px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  color: #8a8a8a; font-size: 0.85rem;
}

/* ── Legal pages ────────────────────────────────────────── */
.legal-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 52px 0 36px; }
.legal-hero .updated { color: var(--faint); font-size: 0.88rem; }
.legal-body { padding: 44px 0 72px; }
.legal-body .container { max-width: 800px; }
.legal-body h2 { font-size: 1.32rem; margin-top: 38px; }
.legal-body h3 { font-size: 1.05rem; margin-top: 24px; color: var(--ink); }
.legal-body p, .legal-body li { color: #333; font-size: 1rem; }
.legal-body ul { padding-left: 22px; margin: 0 0 1rem; }
.legal-body li { margin-bottom: 8px; }
.legal-body .toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 30px;
}
.legal-body .toc strong { display: block; margin-bottom: 8px; font-size: 0.9rem; }
.legal-body .toc a { font-size: 0.92rem; display: inline-block; margin-right: 16px; }
.callout {
  background: var(--brand-soft); border: 1px solid #cfe6da; border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 18px 0;
}
.callout.warn { background: #FBF1E0; border-color: #ecd9b3; border-left-color: var(--amber); }
.callout p { margin: 0; font-size: 0.96rem; }
.back-home { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 18px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .hero { padding: 84px 0 40px; }
  .how-grid { grid-template-columns: 1.1fr 0.9fr; }
  .how-grid .phone { margin-top: 0; }
  .cta-card { padding: 64px 48px; }
}

/* ── Logo, image store badges, phone screenshots ────────── */
.brand-logo { width: 30px; height: 30px; border-radius: 8px; display: block; flex: none; }

.store-btn { display: inline-flex; position: relative; border-radius: 13px; line-height: 0;
  transition: transform 0.18s var(--ease); }
.store-btn:hover { text-decoration: none; transform: translateY(-2px); }
.store-btn img { height: 55px; width: auto; display: block; border-radius: 13px; }
.soon-wrap { cursor: default; }
.soon-wrap img { opacity: 0.55; }
.soon-wrap:hover { transform: none; }
.soon-tag {
  position: absolute; top: -10px; right: -8px; background: var(--amber); color: #fff;
  font-size: 0.62rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

.phone-shot { height: auto; filter: drop-shadow(0 26px 50px rgba(16,24,40,0.18)); }
.phone-hero { width: 300px; max-width: 72vw; margin: 30px auto 0; }
.phone-how  { width: 290px; max-width: 70vw; margin: 28px auto 0; justify-self: center; }

@media (min-width: 900px) {
  .how-grid .phone-how { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
