/* ===== Tokens ===== */
:root {
  --berry: #853D50;
  --honey: #DFAD58;
  --cream: #F9F1E4;
  --orchard: #607A53;
  --wood: #49372F;
  --peach: #F1D4BE;
  --white: #FFFFFF;
  --font-display: Georgia, "Playfair Display", "Times New Roman", serif;
  --font-body: -apple-system, "Segoe UI", Inter, Arial, sans-serif;
  --measure: 68ch;
  --radius: 14px;
  --shadow-1: 0 8px 24px -10px rgba(73,55,47,.35);
  --shadow-2: 0 18px 44px -16px rgba(73,55,47,.45);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--wood);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--wood); margin: 0 0 .5em; line-height: 1.15; }
p { margin: 0 0 1em; }
a { color: var(--berry); text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(48px, 8vw, 96px) 0; position: relative; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }
.mt-0{margin-top:0}.mt-1{margin-top:12px}.mt-2{margin-top:24px}.mt-3{margin-top:48px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:12px}.mb-2{margin-bottom:24px}.mb-3{margin-bottom:48px}

/* ===== Grain overlay ===== */
.grain-overlay {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 2; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Icon ===== */
.icon { display: inline-block; vertical-align: middle; stroke: currentColor; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); border-bottom: 2px solid var(--wood); }
.site-header__inner { max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo__mark { width: 190px; height: 40px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--wood); padding: 8px; }
.nav-toggle .icon--close { display: none; }
.main-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.main-nav a { color: var(--wood); font-weight: 600; font-size: .95rem; position: relative; padding: 4px 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--berry); transition: width .25s ease; }
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; }
.main-nav a.is-active { color: var(--berry); }
.nav-cart { display: flex; align-items: center; gap: 6px; background: var(--berry); color: var(--white) !important; padding: 8px 14px; border-radius: 30px; }
.nav-cart::after { display: none; }
.cart-count { background: var(--honey); color: var(--wood); border-radius: 50%; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 0%{transform:scale(1)} 40%{transform:scale(1.35)} 100%{transform:scale(1)} }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .main-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 85vw);
    background: var(--wood); flex-direction: column; align-items: flex-start; gap: 18px;
    padding: 90px 28px 28px; transform: translateX(100%); visibility: hidden;
    transition: transform .3s ease, visibility .3s ease; z-index: 60;
  }
  .main-nav.is-open { transform: translateX(0); visibility: visible; }
  .main-nav a { color: var(--cream); min-height: 44px; display: flex; align-items: center; }
  .main-nav a.is-active { color: var(--honey); }
  body.nav-open .nav-toggle .icon--open { display: none; }
  body.nav-open .nav-toggle .icon--close { display: inline-block; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 30px; font-weight: 700; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer; min-height: 44px;
  position: relative; overflow: hidden; z-index: 0; transition: color .25s ease, transform .15s ease;
}
.btn::before { content: ""; position: absolute; inset: 0; left: -100%; width: 100%; background: var(--wood); transition: left .3s ease; z-index: -1; }
.btn:hover::before { left: 0; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--berry); color: var(--white); }
.btn--primary::before { background: var(--wood); }
.btn--secondary { background: var(--honey); color: var(--wood); }
.btn--secondary::before { background: var(--berry); }
.btn--secondary:hover { color: var(--white); }
.btn--outline { background: transparent; color: var(--berry); border-color: var(--berry); }
.btn--outline::before { background: var(--berry); }
.btn--outline:hover { color: var(--white); }
.btn--ghost-dark { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn--ghost-dark::before { background: var(--cream); }
.btn--ghost-dark:hover { color: var(--wood); }
.btn--sweep {}
.btn--sm { padding: 9px 18px; font-size: .85rem; min-height: 38px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease, clip-path .7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ===== Hero ===== */
.hero { position: relative; padding: clamp(60px,10vw,120px) 0 clamp(50px,8vw,90px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero__title { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -.02em; }
.hero__clip { display: inline-block; clip-path: inset(0 100% 0 0); animation: wipe 1.1s .2s cubic-bezier(.65,0,.35,1) forwards; }
@keyframes wipe { to { clip-path: inset(0 0% 0 0); } }
@media (prefers-reduced-motion: reduce) { .hero__clip { clip-path: inset(0 0 0 0); animation: none; } }
.hero__sub { font-size: 1.15rem; max-width: 480px; color: var(--wood); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.hero__art { position: relative; aspect-ratio: 1/1; }
.hero__thread { position: absolute; inset: 0; z-index: -1; opacity: .5; }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }

/* ===== Section index (magazine cover) ===== */
.section-index { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0; }
.section-index a { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; border: 1px solid var(--wood); border-radius: 30px; font-weight: 600; color: var(--wood); }
.section-index a span { color: var(--honey); font-family: var(--font-display); font-size: 1.1rem; }
.section-index a:hover { background: var(--wood); color: var(--cream); }

/* ===== Dividers / patterns ===== */
.thread-divider { width: 100%; height: 40px; display: block; }
.stitch-border { border-top: 2px dashed var(--honey); }
.weave-pattern { width: 100%; height: 60px; display: block; }

/* ===== Cards ===== */
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.card__media { aspect-ratio: 4/3; overflow: hidden; background: var(--peach); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.08); }
.card__body { padding: 18px 20px 22px; }
.card__cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--orchard); font-weight: 700; }
.card__title { font-size: 1.15rem; margin: 6px 0 8px; }
.card__price { font-weight: 700; color: var(--berry); font-size: 1.05rem; }

.product-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.product-strip .card { scroll-snap-align: start; }
@media (min-width: 720px) { .product-strip { grid-auto-flow: row; grid-auto-columns: unset; grid-template-columns: repeat(4,1fr); overflow: visible; } }

/* ===== Badge / seal ===== */
.seal { width: 92px; height: 92px; }

/* ===== Page hero (inner pages) ===== */
.page-hero { background: var(--peach); padding: 56px 0 44px; border-bottom: 3px solid var(--wood); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-hero p { max-width: 640px; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { font-size: .85rem; margin-bottom: 10px; }
.breadcrumbs a { color: var(--wood); opacity: .7; }
.breadcrumbs span { opacity: .5; margin: 0 6px; }

/* ===== Prose (legal text) ===== */
.prose { max-width: var(--measure); margin: 0 auto; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

.legal-toc { background: var(--white); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 30px; box-shadow: var(--shadow-1); }
.legal-toc h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.legal-toc ol { margin: 0; padding-left: 1.2em; columns: 2; }
@media (max-width: 600px) { .legal-toc ol { columns: 1; } }

/* ===== Notice ===== */
.notice { border-radius: 10px; padding: 14px 18px; margin: 20px 0; border-left: 4px solid var(--orchard); background: var(--peach); }
.notice--warning { border-color: var(--berry); }

/* ===== Forms ===== */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea {
  padding: 12px 14px; border: 2px solid var(--peach); border-radius: 8px; background: var(--white);
  font-family: inherit; font-size: 1rem; color: var(--wood); accent-color: var(--berry);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--berry); outline: none; }
.field-error { color: var(--berry); font-size: .82rem; min-height: 1.2em; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.4em; font-weight: 600; font-size: .9rem; }
.form-msg--ok { color: var(--orchard); }
.form-msg--error { color: var(--berry); }
.field-row { display: flex; gap: 10px; }
@media (max-width: 480px) { .field-row { flex-direction: column; } }

/* ===== FAQ ===== */
.faq { max-width: var(--measure); margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--peach); padding: 6px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 14px 4px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--berry); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 4px 16px; color: var(--wood); }

/* ===== Product detail ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
@media (max-width: 800px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail__gallery img { border-radius: var(--radius); box-shadow: var(--shadow-1); }
.product-detail__price { font-size: 1.8rem; color: var(--berry); font-weight: 700; margin: 6px 0; }
.product-detail__meta { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.product-detail__meta li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--peach); padding-bottom: 6px; }
.availability { font-weight: 700; padding: 4px 12px; border-radius: 20px; display: inline-block; font-size: .85rem; }
.availability--in_stock { background: var(--orchard); color: var(--white); }
.availability--sold_out { background: #ccc; color: var(--wood); }
.availability--seasonal, .availability--inquiry { background: var(--honey); color: var(--wood); }
.qty-input { width: 70px; }
.related-products { margin-top: 50px; }

/* ===== Cart / checkout ===== */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th, .cart-table td { padding: 12px 10px; border-bottom: 1px solid var(--peach); text-align: left; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cart-summary { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-1); max-width: 380px; margin-left: auto; }
.cart-summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0 0 16px; }
.cart-summary dt { color: var(--wood); opacity: .75; }
.cart-summary dd { margin: 0; font-weight: 700; text-align: right; }
.checkout-steps { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; font-weight: 700; }
.checkout-steps li { list-style: none; opacity: .5; }
.checkout-steps li.is-active { opacity: 1; color: var(--berry); }

/* ===== Contact layout ===== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info ul { list-style: none; padding: 0; display: grid; gap: 14px; }
.contact-info li { display: flex; align-items: center; gap: 10px; }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: var(--wood); color: var(--cream);
  padding: 18px 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  box-shadow: 0 -8px 30px rgba(0,0,0,.25);
}
.cookie-banner p { margin: 0; max-width: 560px; font-size: .9rem; color: var(--cream); }
.cookie-banner a { color: var(--honey); }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Footer ===== */
.site-footer { background: var(--wood); color: var(--cream); padding-top: 10px; }
.site-footer__inner { max-width: 1180px; margin: 0 auto; padding: 30px 20px 10px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 30px; }
@media (max-width: 860px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__inner { grid-template-columns: 1fr; } }
.footer-col h3 { color: var(--honey); font-size: 1rem; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--cream); opacity: .85; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.footer-tagline { font-style: italic; color: var(--honey); }
.footer-legal { font-size: .85rem; opacity: .8; }
.footer-contact { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .9rem; }
.site-footer__bottom { text-align: center; padding: 16px 0; font-size: .82rem; opacity: .7; border-top: 1px solid rgba(249,241,228,.15); margin-top: 20px; }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 100px 0; }
.error-page h1 { font-size: clamp(3rem, 10vw, 7rem); color: var(--berry); }

/* COMPONENTS: .container - centered max-width wrapper
COMPONENTS: .section - vertical page section padding
COMPONENTS: .grid / .grid--2/3/4 - responsive grid layouts
COMPONENTS: .reveal - scroll-reveal animation target (add .reveal-delay-1/2/3 to stagger)
COMPONENTS: .site-header / .main-nav / .nav-toggle / .nav-cart - header & nav
COMPONENTS: .btn / .btn--primary/secondary/outline/ghost-dark/sm - buttons with fill-sweep hover
COMPONENTS: .hero / .hero__grid/title/clip/sub/actions/art/thread - home hero
COMPONENTS: .section-index - numbered magazine-style section index links
COMPONENTS: .thread-divider / .weave-pattern / .stitch-border - decorative SVG dividers
COMPONENTS: .card / .card__media/body/cat/title/price - product/content card
COMPONENTS: .product-strip - horizontal scroll-snap card strip on mobile, grid on desktop
COMPONENTS: .seal - small decorative badge svg sizing
COMPONENTS: .page-hero - inner page header band
COMPONENTS: .breadcrumbs - breadcrumb trail
COMPONENTS: .prose - readable long-form legal/article text column
COMPONENTS: .legal-toc - table of contents box for legal pages
COMPONENTS: .notice / .notice--warning - callout box
COMPONENTS: .form-grid / .field / .field--full / .field-error / .hp-field / .form-msg - form layout and validation
COMPONENTS: .faq / .faq-item - details/summary accordion
COMPONENTS: .product-detail / .product-detail__gallery/price/meta - product page layout
COMPONENTS: .availability / .availability--in_stock/sold_out/seasonal/inquiry - stock status pill
COMPONENTS: .cart-table / .cart-summary - cart & checkout tables/summary
COMPONENTS: .checkout-steps - step indicator list
COMPONENTS: .contact-layout / .contact-info - contact page split layout
COMPONENTS: .cookie-banner - fixed cookie consent banner
COMPONENTS: .site-footer / .footer-col/links/newsletter - site footer
COMPONENTS: .error-page - 404 page layout
*/

/* ===== Logo ===== */
.logo { display: inline-block; }

/* ===== Newsletter ===== */
.footer-newsletter { display: flex; flex-direction: column; gap: 14px; }
.newsletter-form { display: flex; gap: 10px; }
@media (max-width: 560px) { .newsletter-form { flex-direction: column; } }

/* ===== Utilities ===== */
.order-2 { order: 2; }

/* wg-contrast-autofix */
section.section.container nav.section-index a span { color: #111111 !important; }
