/*
  Qpears storefront skeleton
  --------------------------
  1. Tokens     :root
  2. Reset      body, images, links
  3. Layout     .wrap, header, footer, grids
  4. Components .btn, .product, forms
  5. Pages      hero, shop, contact
  6. Responsive media queries

  Content lives in the HTML pages.
  Shared chrome lives in js/layout.js.
  Products and Square URL live in js/config.js.
*/

:root {
  --bg: #f4f1eb;
  --surface: #fffcf7;
  --ink: #1a1c18;
  --muted: #6a6e64;
  --accent: #3d5330;
  --accent-soft: #e7eee0;
  --line: #ddd6c8;
  --gold: #c4a35a;
  --shadow: 0 20px 40px rgba(26, 28, 24, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Figtree", sans-serif;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; }
.wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.announce {
  background: var(--ink);
  color: #f4f1eb;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 241, 235, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand img {
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
nav {
  display: flex;
  justify-content: center;
  gap: 28px;
}
nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}
nav a:hover,
nav a[aria-current="page"] { color: var(--ink); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  margin: 3px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 2px;
  padding: 12px 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--ink);
}
.btn-ghost:hover { background: var(--accent-soft); }
.btn-small { padding: 10px 14px; font-size: 0.85rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 72vh;
  overflow: hidden;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0;
  padding-right: 48px;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
h1, h2, h3 { font-family: "Cormorant Garamond", serif; letter-spacing: -0.03em; font-weight: 600; }
h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.92;
  margin: 16px 0 18px;
}
.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 34rem;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-panel {
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  padding: 48px;
  border-left: 1px solid var(--line);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.hero-panel figure {
  margin: 0;
  width: 100%;
  max-width: 360px;
  text-align: center;
  overflow: hidden;
}
.hero-panel img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: min(360px, 50vh);
  margin: 0 auto 16px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.hero-panel figcaption { color: var(--muted); font-size: 0.92rem; }

.section { padding: 80px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.section-head p { margin: 0; color: var(--muted); max-width: 28rem; }
.section-head h2 { margin: 0 0 6px; font-size: 2.2rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.product-art {
  height: 240px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.product-art img { width: 180px; height: 180px; object-fit: contain; }
.art-gold,
.art-leaf,
.art-cream,
.art-coral { background: #fff; }
.product-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product h3 { margin: 0; font-size: 1.35rem; }
.product p { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1; }
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.price { font-weight: 700; }
.product .btn { width: 100%; margin-top: 10px; }

.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust article {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}
.trust article:last-child { border-right: 0; }
.trust h3 { margin: 0 0 8px; font-size: 1.4rem; }
.trust p { margin: 0; color: var(--muted); }

.story {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.story-panel {
  background: var(--ink);
  color: var(--bg);
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px;
}
.story-panel-art {
  background: #fff;
  padding: 12px;
  border: 1px solid var(--line);
}
.story-panel-art img { width: 100%; height: auto; }
.sticker-sheet {
  margin: 28px 0 0;
  background: #fff;
  border: 1px solid var(--line);
  padding: 16px;
}
.sticker-sheet img { width: 100%; height: auto; display: block; }
.story-panel strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  font-weight: 600;
}
.story-copy h2 { font-size: 2.4rem; margin-top: 0; }

.page-hero { padding: 64px 0 8px; }
.page-hero h1 { margin-bottom: 12px; }
.prose { max-width: 42rem; color: var(--muted); }
.prose code, .contact-card code {
  background: var(--accent-soft);
  padding: 1px 6px;
  font-size: 0.9em;
}

.shop-bar {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 12px 0 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.contact-card, .contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
}
.contact-card a { color: var(--accent); font-weight: 700; }
.contact-form label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 14px 0 6px;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
}
.contact-form textarea { min-height: 120px; resize: vertical; }

.site-footer {
  background: var(--ink);
  color: #d7d3c8;
  padding: 48px 0 24px;
  margin-top: 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-footer h2 {
  color: #fff;
  margin: 0 0 8px;
  font-size: 1.8rem;
}
.site-footer h3 {
  color: #fff;
  font-family: "Figtree", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  font-size: 0.82rem;
}

@media (max-width: 960px) {
  .hero, .story, .contact-grid, .trust, .footer-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 48px 0; padding-right: 0; }
  .hero-panel { border-left: 0; border-top: 1px solid var(--line); }
  .grid { grid-template-columns: 1fr 1fr; }
  .trust article { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 16px 24px 20px;
    gap: 12px;
  }
  body.nav-open nav { display: flex; }
  .header-inner { grid-template-columns: 1fr auto auto; position: relative; }
}
@media (max-width: 560px) {
  .wrap { width: min(1180px, calc(100% - 32px)); }
  .grid { grid-template-columns: 1fr; }
  .legal { flex-direction: column; }
}
