/* Price Mirror — marketing site design system
   Palette mirrors the extension popup (src/index.css, src/App.css) so the
   site and the product feel like one thing. */

:root {
  color-scheme: light;
  --bg-top: #fbf4ea;
  --bg-bottom: #f5ebde;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #fffdfa;
  --border-soft: rgba(34, 39, 53, 0.08);
  --border-strong: rgba(34, 39, 53, 0.14);

  --text-strong: #222735;
  --text-muted: #7d7972;
  --text-faint: #a89f92;

  --accent-1: #ff951a;
  --accent-2: #f37d08;
  --accent-hover: #ef7b0b;
  --accent-contrast: #fff;

  --success: #16934f;
  --success-bg: rgba(22, 147, 79, 0.1);
  --warning: #b6853c;
  --warning-bg: rgba(182, 133, 57, 0.1);
  --danger: #cb4f42;
  --danger-bg: rgba(203, 79, 66, 0.1);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 24px 48px -28px rgba(34, 39, 53, 0.4);
  --shadow-soft: 0 10px 30px -18px rgba(34, 39, 53, 0.25);

  --max-width: 1120px;
  --font-sans: Aptos, 'Trebuchet MS', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-strong);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.6), transparent 40%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

ul, ol {
  color: var(--text-muted);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  color: var(--accent-contrast);
  background: linear-gradient(180deg, var(--accent-1) 0%, var(--accent-2) 100%);
  box-shadow: 0 14px 30px -14px rgba(243, 125, 8, 0.65);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--accent-1) 0%, var(--accent-hover) 100%);
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--text-strong);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.btn-block {
  width: 100%;
}

.btn[aria-disabled='true'] {
  cursor: default;
}

.btn-note {
  display: block;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(251, 244, 234, 0.82);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-strong);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  cursor: pointer;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current='page'] {
  color: var(--text-strong);
  border-bottom-color: var(--accent-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(243, 125, 8, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  color: var(--text-strong);
}

.hero .lede {
  font-size: 1.08rem;
  max-width: 46ch;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hero-stat strong {
  display: block;
  font-size: 1.4rem;
  color: var(--text-strong);
}

.hero-stat span {
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Popup mock (hero visual) ---------- */

.popup-mock {
  background: var(--surface-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  padding: 20px;
  max-width: 380px;
  margin: 0 auto;
}

.popup-mock-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 14px;
}

.popup-mock-header img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.popup-mock-header strong {
  font-size: 0.9rem;
}

.popup-mock-header span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-faint);
}

.popup-product {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(239, 230, 218, 0.55);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
}

.popup-product-swatch {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffe3bd 0%, #ffd0a0 100%);
  flex-shrink: 0;
}

.popup-product-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 2px;
}

.popup-product-price {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin: 0;
}

.popup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-soft);
  margin-bottom: 8px;
}

.popup-row-store {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.store-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}

.popup-row-price {
  font-size: 0.85rem;
  font-weight: 700;
}

.tag-best {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-bg);
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 8px;
}

/* ---------- Sections ---------- */

section {
  padding: 56px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--text-strong);
}

.section-tight .section-head {
  margin-bottom: 28px;
}

/* ---------- Cards & grids ---------- */

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(243, 125, 8, 0.12);
  margin-bottom: 16px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-2);
}

.card h3 {
  font-size: 1.05rem;
  color: var(--text-strong);
}

.card p:last-child {
  margin-bottom: 0;
}

/* ---------- Retailer strip ---------- */

.retailer-strip {
  padding: 28px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.retailer-strip .container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.retailer-strip-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.retailer-pill {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-strong);
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  padding: 7px 16px;
  border-radius: 999px;
}

/* ---------- Steps ---------- */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  position: relative;
  padding-top: 8px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-1) 0%, var(--accent-2) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.step h3 {
  font-size: 1rem;
  color: var(--text-strong);
}

/* ---------- CTA banner ---------- */

.cta-banner {
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 48px;
  text-align: center;
}

.cta-banner h2 {
  color: var(--text-strong);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-banner p {
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Page header (inner pages) ---------- */

.page-header {
  padding: 48px 0 8px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--text-strong);
}

.page-header .lede {
  max-width: 56ch;
  margin: 0 auto;
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 4px 22px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 600;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent-2);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item p {
  padding-bottom: 18px;
  margin: 0;
}

/* ---------- Legal / long-form content ---------- */

.prose {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  box-shadow: var(--shadow-soft);
}

.prose h2 {
  font-size: 1.25rem;
  color: var(--text-strong);
  margin-top: 1.6em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.05rem;
  color: var(--text-strong);
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose .updated {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-faint);
  background: rgba(239, 230, 218, 0.7);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-strong);
}

/* ---------- Support page ---------- */

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.contact-card {
  text-align: center;
}

.contact-card .card-icon {
  margin-left: auto;
  margin-right: auto;
}

.contact-card h3 {
  margin-bottom: 4px;
}

.contact-email {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-2);
  margin: 10px 0 18px;
}

.troubleshoot-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.troubleshoot-item h4 {
  font-size: 0.95rem;
  color: var(--text-strong);
  margin: 0 0 4px;
}

.troubleshoot-item p {
  margin: 0;
  font-size: 0.92rem;
}

/* ---------- Changelog ---------- */

.changelog-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.changelog-entry {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px 26px;
}

.changelog-entry .version-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.version-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-2);
  background: rgba(243, 125, 8, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
}

.changelog-date {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.changelog-entry ul {
  margin: 8px 0 0;
  padding-left: 1.1em;
}

.changelog-entry li {
  margin-bottom: 4px;
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: rgba(241, 231, 216, 0.6);
  padding: 48px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .brand {
  margin-bottom: 12px;
}

.footer-brand p {
  max-width: 32ch;
  font-size: 0.88rem;
}

.footer-col h4 {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--accent-2);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero .lede {
    max-width: none;
  }

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

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

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    inset: 64px 16px auto 16px;
    background: var(--surface-solid);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .main-nav a {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .header-actions .btn-primary {
    padding: 10px 18px;
    font-size: 0.85rem;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .steps {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .prose {
    padding: 28px 22px;
  }

  .cta-banner {
    padding: 32px 24px;
  }
}
