/* ==========================================================================
   PriceDropGuard — Design System
   Display: Space Grotesk · Body: Source Serif 4
   Palette: cool paper, deep ink, receipt-green, alert-coral
   ========================================================================== */

:root {
  --paper: #f4f6f2;
  --paper-deep: #e8ece4;
  --ink: #14231d;
  --ink-soft: #3c4a43;
  --refund: #2f6f4e;
  --refund-deep: #1f5138;
  --alert: #ff5a36;
  --alert-deep: #d43f1e;
  --line: #c7d1c3;
  --line-soft: #d9e0d5;
  --white: #fffdf9;

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --max-w: 1120px;
  --radius: 3px;
  --dur: 220ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { max-width: 62ch; margin: 0 0 1.1em; }
p.wide { max-width: 74ch; }

a { color: var(--refund-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--alert-deep); }

:focus-visible {
  outline: 2px solid var(--alert);
  outline-offset: 3px;
}

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

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

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

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 200;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---- Perforated divider (receipt tear) ---- */
.tear {
  border: none;
  border-top: 1.5px dashed var(--line);
  margin: 0;
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 246, 242, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.05rem;
  color: var(--ink); text-decoration: none;
}
.brand img { width: 26px; height: 26px; }
.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink-soft); text-decoration: none;
  font-family: var(--font-display); font-size: 0.94rem;
}
.nav-links a:hover { color: var(--refund-deep); }
.nav-cta {
  background: var(--ink); color: var(--paper) !important;
  padding: 9px 18px; border-radius: var(--radius);
  font-weight: 600;
}
.nav-cta:hover { background: var(--refund-deep); }
.nav-toggle { display: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  padding: 13px 24px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--refund-deep); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { border-color: var(--refund-deep); color: var(--refund-deep); }
.btn-alert { background: var(--alert); color: var(--white); }
.btn-alert:hover { background: var(--alert-deep); }
.btn-block { width: 100%; justify-content: center; }

/* ---- Hero ---- */
.hero {
  padding: 72px 0 56px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.eyebrow-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.hero-ctas { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-note {
  margin-top: 18px; font-size: 0.9rem; color: var(--ink-soft);
}

/* ---- Scan demo card (signature interactive element) ---- */
.scan-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  position: relative;
  overflow: hidden;
}
.scan-card__label {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display); font-size: 0.82rem;
  color: var(--ink-soft); margin-bottom: 14px;
}
.scan-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--refund); display: inline-block; margin-right: 6px;
  animation: pulse 1.8s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.scan-product { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
.scan-shop { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 18px; }

.scan-line {
  position: relative;
  height: 2px;
  background: var(--line-soft);
  margin: 6px 0 20px;
  overflow: hidden;
  border-radius: 2px;
}
.scan-line::after {
  content: "";
  position: absolute; top: 0; left: -30%;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--refund), transparent);
  animation: sweep 2.4s linear infinite;
}
@keyframes sweep {
  0% { left: -30%; }
  100% { left: 100%; }
}

.scan-rows { border-top: 1px dashed var(--line); padding-top: 16px; }
.scan-row {
  display: flex; justify-content: space-between;
  font-family: var(--font-display); font-size: 0.95rem;
  padding: 7px 0;
}
.scan-row span:first-child { color: var(--ink-soft); }
.scan-row .old-price { text-decoration: line-through; color: var(--ink-soft); }
.scan-row .new-price { color: var(--refund-deep); font-weight: 700; }
.scan-diff {
  margin-top: 14px; padding: 14px 16px;
  background: var(--paper-deep); border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: baseline;
  border-left: 3px solid var(--refund);
}
.scan-diff .amount {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  color: var(--refund-deep);
  font-variant-numeric: tabular-nums;
}
.scan-diff .caption { font-size: 0.85rem; color: var(--ink-soft); }

/* ---- Section rhythm ---- */
.section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-kicker {
  font-family: var(--font-display); font-size: 0.85rem;
  color: var(--refund-deep); margin-bottom: 10px;
}

/* ---- Ledger steps (real sequence -> numbered) ---- */
.ledger {
  border-top: 1px solid var(--line);
}
.ledger-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.ledger-row:last-child { border-bottom: 1px solid var(--line); }
.ledger-num {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  color: var(--line);
  font-variant-numeric: tabular-nums;
}
.ledger-row h3 { margin-bottom: 6px; }
.ledger-row p { margin: 0; color: var(--ink-soft); }

/* ---- Calculator ---- */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.calc-field { margin-bottom: 22px; }
.calc-field label {
  display: flex; justify-content: space-between;
  font-family: var(--font-display); font-size: 0.9rem;
  margin-bottom: 8px; color: var(--ink-soft);
}
.calc-field output { color: var(--ink); font-weight: 700; }
input[type="range"] {
  width: 100%; accent-color: var(--refund-deep);
}
.calc-result {
  background: var(--paper-deep); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; justify-content: center;
  border-left: 3px solid var(--alert);
}
.calc-result .figure {
  font-family: var(--font-display); font-weight: 700;
  font-size: 2.6rem; color: var(--refund-deep);
  font-variant-numeric: tabular-nums;
}
.calc-result .sub { color: var(--ink-soft); font-size: 0.92rem; margin-top: 6px; }
.calc-result .fine { font-size: 0.78rem; color: var(--ink-soft); margin-top: 18px; }

/* ---- Feature ledger (table-like rows) ---- */
.feat-table { border-top: 1px solid var(--line); }
.feat-row {
  display: grid; grid-template-columns: 1.1fr 2fr;
  gap: 24px; padding: 20px 0;
  border-bottom: 1px dashed var(--line-soft);
  align-items: baseline;
}
.feat-row:last-child { border-bottom: 1px solid var(--line); }
.feat-row dt { font-family: var(--font-display); font-weight: 600; }
.feat-row dd { margin: 0; color: var(--ink-soft); }

/* ---- Pricing (receipt style cards) ---- */
.pricing-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.receipt {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 30px 26px;
}
.receipt-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 18px; margin-bottom: 18px;
}
.receipt-price {
  font-family: var(--font-display); font-weight: 700; font-size: 2.1rem;
}
.receipt-price small { font-family: var(--font-body); font-weight: 400; font-size: 0.95rem; color: var(--ink-soft); }
.receipt-tag {
  font-family: var(--font-display); font-size: 0.78rem;
  padding: 4px 10px; border-radius: 20px;
  background: var(--paper-deep); color: var(--ink-soft);
}
.receipt ul { list-style: none; padding: 0; margin: 0 0 24px; }
.receipt li {
  display: flex; gap: 10px; padding: 8px 0;
  color: var(--ink-soft); font-size: 0.96rem;
}
.receipt li::before { content: "—"; color: var(--refund-deep); flex-shrink: 0; }
.receipt.is-featured { border-color: var(--refund-deep); border-width: 2px; position: relative; }

/* ---- FAQ accordion ---- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px dashed var(--line-soft); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none;
  cursor: pointer; padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--font-display); font-size: 1.02rem; color: var(--ink);
}
.faq-q .plus {
  font-size: 1.3rem; color: var(--refund-deep);
  transition: transform var(--dur) var(--ease);
  flex-shrink: 0;
}
.faq-item[open] .faq-q .plus { transform: rotate(45deg); }
.faq-a { margin: 0 0 22px; color: var(--ink-soft); max-width: 68ch; }

/* ---- CTA band ---- */
.cta-band {
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius);
  padding: 52px 40px;
  display: flex; justify-content: space-between; align-items: center; gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--paper); margin-bottom: 6px; }
.cta-band p { color: #c7d1c3; margin: 0; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 30px;
  margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px; margin-bottom: 36px;
}
.footer-grid h4 {
  font-family: var(--font-display); font-size: 0.85rem;
  color: var(--ink-soft); margin: 0 0 12px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink); text-decoration: none; font-size: 0.94rem; }
.footer-grid a:hover { color: var(--refund-deep); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--ink-soft);
}

/* ---- Legal / content pages ---- */
.legal {
  padding: 56px 0 80px;
}
.legal h1 { margin-bottom: 6px; }
.legal .updated { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 40px; }
.legal h2 {
  font-size: 1.3rem; margin-top: 2.4em;
  border-top: 1px solid var(--line); padding-top: 0.9em;
}
.legal h3 { font-size: 1.05rem; margin-top: 1.6em; }
.legal ul, .legal ol { max-width: 70ch; color: var(--ink-soft); }
.legal li { margin-bottom: 0.4em; }
.legal table { width: 100%; border-collapse: collapse; margin: 1.4em 0; max-width: 74ch; }
.legal th, .legal td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft); font-size: 0.94rem;
}
.legal th { font-family: var(--font-display); color: var(--ink-soft); font-weight: 600; }

/* ---- 404 ---- */
.error-page {
  min-height: 60vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 0;
}
.error-code {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.5rem, 12vw, 7rem);
  color: var(--line); line-height: 1; margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

/* ---- Cookie consent ---- */
.consent-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px;
  max-width: 560px; margin: 0 auto;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px; z-index: 300;
  box-shadow: 0 8px 30px rgba(20, 35, 29, 0.14);
  transform: translateY(140%);
  transition: transform var(--dur) var(--ease);
}
.consent-banner.is-visible { transform: translateY(0); }
.consent-banner p { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 16px; }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-actions .btn { padding: 10px 16px; font-size: 0.9rem; }

/* ---- Skip / a11y helpers already above ---- */

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feat-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex; background: none; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 8px 10px; cursor: pointer;
  }
  body.nav-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px; gap: 16px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; text-align: left; }
}
