/* PricePinner marketing site — all visual design lives here (structure in HTML,
   behaviour in app.js). Tokens mirror UI_APP_SPECIFICATION.md so the site
   matches the app. Illustrations: Open Peeps (CC0), from designs/Flat_Assets. */

:root {
  --blue: #0286ff;
  --blue-dark: #0068c9;
  --blue-tint: #e3f1ff;
  --orange: #ff7a00;
  --orange-tint: #ffefdf;
  --green: #0cc56b;
  --green-tint: #e0f9ec;
  --ink: #0b0f19;
  --ink-soft: #374151;
  --muted: #6b7280;
  --paper: #f6f8fa;
  --card: #ffffff;
  --line: #e5e9f0;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(11, 15, 25, 0.08);
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex; align-items: center; gap: 20px;
  min-height: 64px; position: relative;
}

.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.15rem; color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 12px; border-radius: 10px;
  color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
}
.nav a:hover { background: var(--blue-tint); color: var(--blue-dark); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--blue-dark); background: var(--blue-tint); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; padding: 8px 12px; font-size: 1.1rem; cursor: pointer;
}

.header-login {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.header-login input {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font: inherit; font-size: 0.9rem; width: 170px;
  background: var(--paper);
}
.header-login input:focus { outline: 2px solid var(--blue); border-color: transparent; }

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

.btn {
  display: inline-block; border: 0; cursor: pointer;
  border-radius: 12px; padding: 10px 20px;
  font: inherit; font-weight: 700; font-size: 0.95rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(2, 134, 255, 0.35); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }

.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 6px 16px rgba(255, 122, 0, 0.3); }
.btn-orange:hover { color: #fff; }

.btn-ghost { background: transparent; color: var(--blue-dark); border: 1.5px solid var(--blue); }
.btn-ghost:hover { background: var(--blue-tint); }

.btn-big { padding: 14px 28px; font-size: 1.05rem; border-radius: 14px; }

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

.hero { overflow: hidden; }
.hero .container {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 18px;
}
.hero h1 em { font-style: normal; color: var(--blue); }

.hero .lede { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 28px; max-width: 34em; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 0.9rem; }

/* Illustration blob: black line-art peep on a soft colored disc */
.peep-scene {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  min-height: 380px;
}
.peep-scene::before {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(340px, 80%); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, var(--blue-tint), #cfe7ff);
}
.peep-scene.tint-orange::before { background: radial-gradient(circle at 30% 25%, var(--orange-tint), #ffe0bd); }
.peep-scene.tint-green::before { background: radial-gradient(circle at 30% 25%, var(--green-tint), #c2f2da); }
.peep-scene img { position: relative; max-height: 420px; width: auto; }

/* Floating price-tag chips around the hero peep */
.chip {
  position: absolute; z-index: 2;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px;
  font-weight: 700; font-size: 0.9rem;
  box-shadow: var(--shadow);
}
.chip .pin { color: var(--orange); }
.chip-1 { top: 6%; left: 0; }
.chip-2 { top: 34%; right: -2%; }
.chip-3 { bottom: 10%; left: 4%; color: var(--green); }

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

.section { padding: 64px 0; }
.section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.02em; margin: 0 0 10px; }
.section-head p { color: var(--ink-soft); margin: 0; }

.kicker {
  display: inline-block; margin-bottom: 12px;
  background: var(--orange-tint); color: var(--orange);
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 12px;
}

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

.grid { display: grid; gap: 24px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

.card .peep-thumb {
  height: 150px; display: flex; align-items: flex-end; justify-content: center;
  margin: -8px 0 18px; position: relative;
}
.card .peep-thumb::before {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--blue-tint);
}
.card.tint-orange .peep-thumb::before { background: var(--orange-tint); }
.card.tint-green .peep-thumb::before { background: var(--green-tint); }
.card .peep-thumb img { position: relative; max-height: 100%; width: auto; }

.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 0.9rem;
  margin-bottom: 10px;
}

/* ---------- Split feature rows ---------- */

.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center; padding: 40px 0;
}
.split.rev .split-art { order: -1; }
.split h3 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 10px; }
.split p { color: var(--ink-soft); }
.split ul { color: var(--ink-soft); padding-left: 20px; }
.split li { margin: 6px 0; }

.split-art { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 280px; }
.split-art::before {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 240px; height: 240px; border-radius: 50%; background: var(--blue-tint);
}
.split-art.tint-orange::before { background: var(--orange-tint); }
.split-art.tint-green::before { background: var(--green-tint); }
.split-art img { position: relative; max-height: 300px; width: auto; }

/* Wide unDraw scenes: no disc, let the scene own the space */
.split-art.plain::before { content: none; }
.split-art.plain img { max-height: 320px; max-width: 100%; }

/* Standalone scene on prose pages */
.scene-figure { margin: 28px 0 8px; text-align: center; }
.scene-figure img { max-width: 360px; width: 100%; }

/* ---------- Stats strip ---------- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat b { display: block; font-size: 2rem; color: var(--blue); letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.95rem; }

/* ---------- Community / quotes ---------- */

.quote { display: flex; gap: 16px; align-items: flex-start; }
.quote .avatar {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--blue-tint); overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.quote:nth-child(2) .avatar { background: var(--orange-tint); }
.quote:nth-child(3) .avatar { background: var(--green-tint); }
.quote .avatar img { height: 58px; width: auto; }
.quote blockquote { margin: 0; font-size: 0.97rem; color: var(--ink-soft); }
.quote cite { display: block; margin-top: 6px; font-style: normal; font-weight: 700; color: var(--ink); font-size: 0.9rem; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(120deg, var(--blue), #4ca9ff);
  color: #fff; border-radius: calc(var(--radius) + 6px);
  padding: 48px; text-align: center;
  box-shadow: 0 16px 40px rgba(2, 134, 255, 0.35);
}
.cta-band h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.02em; }
.cta-band p { margin: 0 0 24px; opacity: 0.9; }
.cta-band .btn-primary { background: #fff; color: var(--blue-dark); box-shadow: none; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.15); }

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

.page-hero { padding: 56px 0 8px; }
.page-hero .container { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -0.03em; margin: 0 0 12px; }
.page-hero .lede { font-size: 1.1rem; color: var(--ink-soft); margin: 0; max-width: 36em; }
.page-hero .peep-scene { min-height: 260px; }
.page-hero .peep-scene::before { width: min(240px, 80%); }
.page-hero .peep-scene img { max-height: 280px; }

/* ---------- Prose (legal & FAQ) ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; letter-spacing: -0.01em; margin-top: 36px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose .updated { color: var(--muted); font-size: 0.9rem; }

details.faq-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 4px 20px; margin: 12px 0;
}
details.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 12px 0;
  list-style: none; position: relative; padding-right: 28px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 8px;
  font-size: 1.3rem; color: var(--blue);
}
details.faq-item[open] summary::after { content: "–"; }
details.faq-item p { color: var(--ink-soft); margin-top: 0; }

/* ---------- Score scale (how-to-play) ---------- */

.score-scale { display: grid; gap: 10px; }
.score-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 18px; font-size: 0.95rem;
}
.score-row b { color: var(--green); font-size: 1.05rem; }
.score-row.mid b { color: var(--orange); }
.score-row.low b { color: var(--muted); }

/* ---------- Mini gallery strips ---------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.gallery figure {
  margin: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 14px 14px; text-align: center;
}
.gallery img { height: 110px; width: 100%; object-fit: contain; }
.gallery figcaption { margin-top: 10px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }

/* ---------- Photo blocks (Pixabay imagery on the story pages) ---------- */

.photo-hero {
  width: 100%; max-height: 300px; object-fit: cover;
  border-radius: 18px; border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgb(16 30 54 / 0.12);
}
.photo-figure { margin: 28px 0 8px; }
.photo-figure img {
  width: 100%; max-height: 340px; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--line);
}
.photo-figure figcaption { margin-top: 10px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); text-align: center; }

/* ---------- Store badges ---------- */

.store-badges { display: flex; gap: 14px; flex-wrap: wrap; }
.badge-link {
  display: inline-flex; flex-direction: column; justify-content: center;
  background: var(--ink); color: #fff; border-radius: 12px;
  padding: 10px 22px; line-height: 1.25; min-width: 170px;
}
.badge-link:hover { text-decoration: none; background: #1f2733; color: #fff; }
.badge-link small { font-size: 0.7rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.06em; }
.badge-link strong { font-size: 1.05rem; }

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

.site-footer {
  margin-top: 64px; background: var(--ink); color: #cbd5e1;
  padding: 56px 0 32px; font-size: 0.92rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px; }
.site-footer a { color: #cbd5e1; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.footer-brand img { width: 24px; height: 24px; }
.footer-note { border-top: 1px solid #1f2733; margin-top: 40px; padding-top: 20px; color: #6b7280; font-size: 0.85rem; }

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

@media (max-width: 900px) {
  .hero .container, .page-hero .container { grid-template-columns: 1fr; }
  .hero .peep-scene { min-height: 300px; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 20px; }
  .split.rev .split-art { order: 0; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-login { display: none; }
}

@media (max-width: 620px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav {
    display: none;
    position: absolute; top: 64px; left: -24px; right: -24px;
    background: var(--card); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 12px 24px 18px;
  }
  .nav.open { display: flex; }
  .grid.cols-3, .grid.cols-4, .grid.cols-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 24px; }
}
