/* ===== Design tokens ===== */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #211d18;
  --ink-soft: #6b6459;
  --line: #e7e0d5;
  --brand: #2f5d50;      /* deep forest green */
  --brand-dark: #244a40;
  --accent: #c9603f;     /* warm terracotta */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(33,29,24,.05), 0 8px 24px rgba(33,29,24,.06);
  --max: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; line-height: 1.1; letter-spacing: -0.01em; }

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

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

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

.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;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .74rem;
  font-weight: 600; color: var(--brand); margin-bottom: 14px;
}
.eyebrow-light { color: #cfe3db; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .95rem; border: none; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; transition: transform .12s ease, background .2s ease, color .2s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 16px; font-size: .85rem; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { color: var(--brand); }

/* ===== Announcement ===== */
.announcement {
  background: var(--ink); color: #f3ede2; text-align: center;
  font-size: .82rem; padding: 9px 16px; letter-spacing: .01em;
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,242,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.35rem; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { color: var(--brand); font-size: 1.2rem; }
.main-nav { display: none; gap: 28px; font-size: .92rem; font-weight: 500; }
.main-nav a { color: var(--ink-soft); transition: color .2s ease; }
.main-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-btn {
  background: none; border: none; cursor: pointer; font: inherit; font-weight: 600;
  font-size: .9rem; display: inline-flex; align-items: center; gap: 7px; color: var(--ink);
}
.cart-count {
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ===== Hero ===== */
.hero { padding: 56px 0 40px; }
.hero-inner { display: grid; gap: 40px; align-items: center; }
.hero-copy h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); font-weight: 600; margin-bottom: 18px; text-wrap: balance; }
.hero-sub { color: var(--ink-soft); font-size: 1.08rem; max-width: 34ch; margin-bottom: 26px; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 34px; }
.hero-stats { list-style: none; display: flex; gap: 30px; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 700; }
.hero-stats span { font-size: .82rem; color: var(--ink-soft); }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }

/* ===== Trust strip ===== */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 26px 20px; }
.trust-item { display: flex; align-items: center; gap: 12px; font-size: .92rem; font-weight: 500; }
.trust-icon {
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: #eaf1ee; color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}

/* ===== Section head ===== */
.collection { padding: 64px 0; }
.section-head { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-end; margin-bottom: 34px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 600; }
.section-sub { color: var(--ink-soft); margin-top: 8px; }

/* ===== Filter chips ===== */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); transition: all .18s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ===== Product grid ===== */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { position: relative; background: #f1ece3; aspect-ratio: 1 / 1; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 12px; left: 12px; font-size: .72rem; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; letter-spacing: .02em;
}
.badge-grade { background: var(--brand); color: #fff; }
.badge-b { background: #d9a441; color: #3a2c05; }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1.1rem; font-weight: 600; }
.card-meta { font-size: .82rem; color: var(--ink-soft); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price-now { font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 700; }
.price-was { font-size: .85rem; color: var(--ink-soft); text-decoration: line-through; }
.btn-add { background: #eaf1ee; color: var(--brand); padding: 9px 18px; font-size: .85rem; }
.btn-add:hover { background: var(--brand); color: #fff; }

/* ===== How it works ===== */
.how { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 64px 0; }
.steps { list-style: none; display: grid; gap: 28px; grid-template-columns: 1fr; margin-top: 8px; }
.steps li { position: relative; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; background: #eaf1ee; color: var(--brand); font-family: 'Fraunces', serif;
  font-weight: 700; font-size: 1.1rem; margin-bottom: 14px;
}
.steps h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 6px; }
.steps p { color: var(--ink-soft); }

/* ===== Grading ===== */
.grading { padding: 64px 0; }
.grading-inner { display: grid; gap: 32px; }
.grading-copy h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 600; }
.grade-cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
.grade-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.grade-card h3 { font-size: 1.15rem; font-weight: 600; margin: 12px 0 6px; }
.grade-card p { color: var(--ink-soft); font-size: .92rem; }
.grade-tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--brand); color: #fff; letter-spacing: .02em; }
.grade-tag-b { background: #d9a441; color: #3a2c05; }
.grade-tag-c { background: var(--accent); color: #fff; }

/* ===== Sell CTA ===== */
.sell { background: var(--brand); color: #f3ede2; padding: 66px 0; }
.sell-copy { max-width: 620px; }
.sell h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 600; color: #fff; margin-bottom: 12px; }
.sell p { color: #cfe3db; margin-bottom: 22px; }
.sell-form { display: flex; flex-wrap: wrap; gap: 12px; }
.sell-form input {
  flex: 1 1 240px; padding: 13px 16px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .95rem; background: #fff; color: var(--ink);
}
.sell-form input:focus-visible { outline: 3px solid rgba(255,255,255,.5); }

/* ===== Newsletter ===== */
.newsletter { padding: 60px 0; }
.newsletter-inner { display: grid; gap: 22px; align-items: center; }
.news-form { display: flex; flex-wrap: wrap; gap: 12px; }
.news-form input {
  flex: 1 1 240px; padding: 13px 16px; border-radius: 999px; border: 1px solid var(--line);
  font: inherit; font-size: .95rem; background: var(--surface); color: var(--ink);
}
.news-form input:focus-visible { outline: 3px solid rgba(47,93,80,.35); }
.form-note { min-height: 1.2em; margin-top: 12px; font-size: .88rem; font-weight: 600; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: #d8d1c5; padding: 52px 0 30px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: .9rem; color: #a9a294; max-width: 24ch; }
.site-footer h4 { font-family: 'Inter', sans-serif; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin-bottom: 14px; }
.site-footer nav a { display: block; font-size: .9rem; color: #a9a294; padding: 5px 0; transition: color .2s ease; }
.site-footer nav a:hover { color: #fff; }
.footer-base {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  border-top: 1px solid #3a352d; margin-top: 40px; padding-top: 22px; font-size: .82rem; color: #8a8478;
}

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .grade-cards { grid-template-columns: repeat(3, 1fr); }
  .newsletter-inner { grid-template-columns: 1fr auto; }
  .footer-base { flex-wrap: nowrap; }
}
@media (min-width: 860px) {
  .main-nav { display: flex; }
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .grading-inner { grid-template-columns: 1fr 2fr; align-items: start; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

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