/* =====================================================================
   Copper Vault Templates — main stylesheet
   Single stylesheet, mobile-first, no external dependencies.
   Keep selectors flat and reusable. BEM-ish naming where it helps.
   ===================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

/* ---------- Tokens ---------- */
:root {
  --copper: #B87333;
  --copper-dark: #9A5B26;
  --copper-light: #D4A574;
  --bg: #FAF7F4;
  --bg-warm: #F2EBE0;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #5C5C5C;
  --border: #E8E2D8;
  --border-strong: #C9BEA7;
  --positive: #4F7942;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji",
               sans-serif;
  --container: 1120px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(26,26,26,.04), 0 1px 3px rgba(26,26,26,.06);
  --shadow-md: 0 4px 12px rgba(26,26,26,.06), 0 2px 4px rgba(26,26,26,.04);
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  color: var(--copper-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
}
a:hover { color: var(--copper); }
:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 2px;
  border-radius: 3px;
}
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; top: -100px; left: 12px;
  background: var(--copper); color: #fff; padding: 12px 20px;
  z-index: 999; text-decoration: none; font-weight: 600; border-radius: var(--radius);
  transition: top .15s;
}
.skip:focus { top: 12px; color: #fff; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 48px; } }
.reading { max-width: 680px; margin: 0 auto; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 .5em; color: var(--text); }
h1 { font-size: clamp(1.875rem, 2vw + 1rem, 2.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1vw + 1rem, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li { margin: 0 0 0.5em; }
small { color: var(--text-muted); font-size: .875em; }
.lead { font-size: 1.125rem; color: var(--text-muted); }
.eyebrow {
  display: inline-block;
  color: var(--copper-dark); background: var(--bg-warm);
  padding: 4px 12px; border-radius: 999px;
  font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 16px;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 244, .92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px; max-width: var(--container); margin: 0 auto;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; letter-spacing: -0.01em;
  text-decoration: none; font-size: 1.0625rem;
}
.nav-brand:hover { color: var(--text); }
.nav-brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.nav-links { display: none; gap: 24px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 8px 0; }
.nav-links a:hover { color: var(--copper-dark); }
.nav-cta { margin-left: auto; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { margin-left: 0; }
}
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px; min-width: 44px; min-height: 44px;
}
@media (min-width: 900px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-mobile {
  display: none;
  border-top: 1px solid var(--border); padding: 16px 24px;
  background: var(--bg);
}
.nav-mobile[data-open="true"] { display: block; }
.nav-mobile ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-mobile li { margin: 0; }
.nav-mobile a {
  display: block; padding: 14px 12px; border-radius: var(--radius);
  color: var(--text); font-weight: 500; text-decoration: none;
}
.nav-mobile a:hover, .nav-mobile a:focus-visible { background: var(--bg-warm); color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--radius); font-weight: 600;
  text-decoration: none; line-height: 1.1; border: 1px solid transparent;
  min-height: 48px; font-size: 1rem; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--copper); color: #fff; border-color: var(--copper); }
.btn-primary:hover { background: var(--copper-dark); border-color: var(--copper-dark); color: #fff; }
.btn-secondary {
  background: transparent; color: var(--copper-dark); border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-warm); color: var(--copper-dark); }
.btn-sm { padding: 10px 16px; min-height: 40px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn .ext-mark { width: 14px; height: 14px; opacity: .85; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 32px; }
.hero h1 { max-width: 22ch; margin-bottom: 16px; }
.hero-sub { max-width: 56ch; color: var(--text-muted); font-size: 1.125rem; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 768px) { .hero { padding: 88px 0 56px; } }

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section-lg { padding: 56px 0; }
@media (min-width: 768px) {
  .section { padding: 64px 0; }
  .section-lg { padding: 88px 0; }
}
.section-head { margin-bottom: 32px; max-width: 720px; }
.section-head h2 { margin-bottom: 8px; }
.section-head p { color: var(--text-muted); margin: 0; font-size: 1.0625rem; }

/* ---------- Trust bar ---------- */
.trust-bar {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
  padding: 20px; background: var(--bg-warm); border-radius: var(--radius-lg);
  border: 1px solid var(--border); margin: 0 0 48px;
}
@media (min-width: 768px) { .trust-bar { grid-template-columns: repeat(4, 1fr); padding: 24px; } }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.trust-mark { width: 22px; height: 22px; flex-shrink: 0; color: var(--copper); }

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card-grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .card-grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Product card ---------- */
.product-card {
  display: flex; flex-direction: column; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.product-card-image {
  aspect-ratio: 4/3; background: var(--bg-warm);
  overflow: hidden; border-bottom: 1px solid var(--border);
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card-title {
  font-size: 1.0625rem; font-weight: 600; line-height: 1.3;
  color: var(--text); margin: 0;
}
.product-card-desc { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.product-card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: auto; padding-top: 12px;
}
.product-card-tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--bg-warm); color: var(--text-muted);
  font-size: .78rem; font-weight: 500;
}
.product-card-price {
  margin-left: auto; font-weight: 700; color: var(--copper-dark);
  font-size: 1rem;
}
.product-card-price.free { color: var(--positive); }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { font-size: .875rem; color: var(--text-muted); padding: 20px 0 4px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 8px; color: var(--border-strong); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--copper-dark); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; }

/* ---------- Product page hero ---------- */
.product-hero { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 8px 0 32px; align-items: start; }
@media (min-width: 900px) { .product-hero { grid-template-columns: 5fr 4fr; gap: 48px; padding: 24px 0 48px; } }
.product-hero-image {
  aspect-ratio: 4/3; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg-warm);
}
.product-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.product-hero-info h1 { margin-bottom: 12px; }
.product-hero-info .lead { margin-bottom: 20px; }
.product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.price-pill {
  display: inline-flex; align-items: center; padding: 6px 14px;
  background: var(--copper); color: #fff; border-radius: 999px;
  font-weight: 700; font-size: 1.0625rem;
}
.price-pill.free { background: var(--positive); }
.product-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 12px; }
.product-disclosure {
  font-size: .85rem; color: var(--text-muted);
  margin: 8px 0 0;
}

/* ---------- Split columns (Who it's for / not for) ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: 32px; padding: 32px 0; border-top: 1px solid var(--border); }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.split h2 { font-size: 1.25rem; margin-bottom: 12px; }
.split ul { list-style: none; padding: 0; margin: 0; }
.split li { padding-left: 24px; position: relative; margin-bottom: 10px; font-size: 0.975rem; }
.split li::before {
  content: ""; position: absolute; left: 4px; top: 9px;
  width: 8px; height: 8px; border-radius: 50%;
}
.split--positive li::before { background: var(--positive); }
.split--negative li::before { background: var(--copper-dark); }

/* ---------- FAQ ---------- */
.faq { padding: 32px 0; border-top: 1px solid var(--border); }
.faq h2 { margin-bottom: 16px; }
.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq details:last-of-type { border-bottom: 0; }
.faq summary {
  font-weight: 600; cursor: pointer; padding: 8px 0;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--copper); transition: transform .2s; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 8px 0 0; color: var(--text-muted); }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: linear-gradient(135deg, var(--copper) 0%, var(--copper-dark) 100%);
  color: #fff; padding: 48px 28px; border-radius: var(--radius-lg);
  margin: 40px 0; position: relative; overflow: hidden;
}
.cta-strip-inner { max-width: var(--container); margin: 0 auto; display: grid; gap: 20px; }
@media (min-width: 768px) { .cta-strip-inner { grid-template-columns: 2fr 1fr; align-items: center; gap: 32px; padding: 0 20px; } }
.cta-strip h2 { color: #fff; margin: 0; }
.cta-strip p { color: rgba(255,255,255,.92); margin: 0; }
.cta-strip .btn { background: #fff; color: var(--copper-dark); border-color: #fff; }
.cta-strip .btn:hover { background: var(--bg); color: var(--copper-dark); }

/* ---------- Filters / sort ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px;
  align-items: center; padding: 16px; background: var(--bg-warm);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.filters label { font-size: .875rem; color: var(--text-muted); font-weight: 500; }
.filters select {
  padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: #fff; min-height: 42px; min-width: 180px;
}
.filters-spacer { flex: 1; }

/* ---------- Categories ---------- */
.category-row { padding: 24px 0; border-top: 1px solid var(--border); }
.category-row h2 { font-size: 1.5rem; margin-bottom: 16px; }
.category-row .card-grid { margin-top: 16px; }

/* ---------- Tags / chips ---------- */
.chip {
  display: inline-block; padding: 3px 12px; background: var(--bg-warm);
  border-radius: 999px; font-size: .85rem; color: var(--text-muted);
  font-weight: 500;
}
.chip-solid { background: var(--copper); color: #fff; }

/* ---------- Notices ---------- */
.notice {
  background: var(--bg-warm); border: 1px solid var(--border); border-left: 4px solid var(--copper);
  border-radius: var(--radius); padding: 16px 20px; font-size: 0.95rem;
  color: var(--text); margin: 24px 0;
}
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--text); }

/* ---------- Footer ---------- */
.footer { background: var(--bg-warm); border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; } }
.footer h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text); margin-bottom: 12px; font-weight: 700; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 0 0 8px; }
.footer a { color: var(--text); text-decoration: none; font-size: .95rem; }
.footer a:hover { color: var(--copper-dark); text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.0625rem; margin-bottom: 12px; }
.footer-about { font-size: .9rem; color: var(--text-muted); max-width: 36ch; }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: .85rem; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
}
.footer-disclaimer { font-size: .78rem; color: var(--text-muted); max-width: 64ch; line-height: 1.55; }

/* ---------- Utility ---------- */
.text-muted { color: var(--text-muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.hide { display: none; }
.hidden-desktop { display: block; }
@media (min-width: 768px) {
  .hidden-desktop { display: none; }
  .hidden-mobile { display: block; }
}
.hidden-mobile { display: none; }
.flex { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

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

/* ---------- Print ---------- */
@media print {
  .nav, .footer, .cta-strip { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
  .product-hero-image, .product-card-image { display: none; }
}
