:root {
  --green: #1f3d2b;
  --leaf: #2f6b45;
  --cream: #f6f1e7;
  --paper: #fffdf8;
  --ink: #1d1b16;
  --muted: #6b6457;
  --line: #e5ddcd;
  --cinnamon: #b5652b;
  --gold: #d4a24c;
  --radius: 18px;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 80px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.55; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cinnamon); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.demo-bar { background: var(--green); color: var(--cream); text-align: center; font-size: 13px; padding: 8px 16px; }

.header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 5vw, 64px); background: rgba(246, 241, 231, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 24px; color: var(--green); }
.brand em { color: var(--leaf); }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--green); }
.cart-button { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--green); }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--cinnamon); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }

.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: center; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 38, 27, .82), rgba(20, 38, 27, .35) 55%, transparent); }
.hero-copy { position: relative; z-index: 1; max-width: 620px; padding: 64px clamp(16px, 6vw, 88px); color: var(--cream); }
.hero-copy .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(40px, 6vw, 72px); }
.hero p { font-size: clamp(17px, 2vw, 20px); color: #e8e2d4; margin: 18px 0 28px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 14px 26px; background: var(--green); color: var(--cream); font-weight: 700; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.button:hover { background: var(--leaf); transform: translateY(-1px); }
.button-light { background: var(--cream); color: var(--green); }
.button-light:hover { background: #fff; }
.button[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.perks div { background: var(--paper); padding: 22px clamp(16px, 4vw, 40px); display: grid; gap: 2px; }
.perks span { color: var(--muted); font-size: 14px; }

.shop { padding: 80px clamp(16px, 5vw, 64px); }
.shop-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; }
.shop h2, .story h2, .faq h2 { font-size: clamp(32px, 4vw, 48px); color: var(--green); }
.search { display: flex; align-items: center; gap: 10px; min-width: min(340px, 100%); padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; width: 100%; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 9px 18px; font-weight: 500; color: var(--muted); }
.chip[aria-selected="true"] { background: var(--green); border-color: var(--green); color: var(--cream); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(31, 61, 43, .12); }
.card-media { position: relative; display: block; width: 100%; border: 0; padding: 0; background: none; aspect-ratio: 1; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.badge { position: absolute; top: 12px; left: 12px; background: var(--cinnamon); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.card-body h3 { font-size: 21px; }
.card-meta { color: var(--muted); font-size: 14px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.price { font-weight: 700; color: var(--green); font-size: 18px; }
.add { border: 0; border-radius: 999px; padding: 10px 16px; background: var(--green); color: var(--cream); font-weight: 700; font-size: 14px; }
.add:hover { background: var(--leaf); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.story { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; padding: 80px clamp(16px, 5vw, 64px); background: var(--green); color: var(--cream); }
.story h2 { color: var(--cream); }
.story .eyebrow { color: var(--gold); }
.story p { color: #d8d2c3; font-size: 18px; max-width: 560px; }
.story ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.story li { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid rgba(246, 241, 231, .2); padding-bottom: 14px; color: #d8d2c3; }
.story li strong { font-family: var(--serif); font-weight: 400; font-size: 40px; color: var(--gold); }

.faq { max-width: 820px; margin: 0 auto; padding: 80px 16px; }
.faq h2 { margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 28px clamp(16px, 5vw, 64px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer a { color: var(--green); font-weight: 700; }

/* Dialogs */
.modal { border: 0; border-radius: 24px; padding: 0; width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.modal::backdrop { background: rgba(20, 24, 18, .55); backdrop-filter: blur(3px); }
.modal-close { position: absolute; top: 12px; right: 14px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 253, 248, .9); font-size: 24px; line-height: 1; color: var(--ink); }
.pm-body { display: grid; grid-template-columns: 1fr 1fr; }
.pm-body img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.pm-info { padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.pm-info h2 { font-size: 34px; color: var(--green); }
.pm-info .price { font-size: 24px; }
.pm-info ul { margin: 0; padding-left: 20px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 38px; height: 38px; border: 0; background: none; font-size: 18px; color: var(--green); }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }
.pm-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: auto; }

.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(20, 24, 18, .5); }
.drawer { position: fixed; top: 0; right: 0; z-index: 41; display: flex; flex-direction: column; width: min(420px, 100vw); height: 100%; background: var(--paper); box-shadow: -20px 0 60px rgba(0, 0, 0, .2); transform: translateX(100%); transition: transform .3s ease; }
.drawer.open { transform: none; }
.drawer-head { position: relative; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 28px; color: var(--green); }
.drawer-items { flex: 1; overflow-y: auto; padding: 8px 24px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.line h3 { font-family: var(--sans); font-size: 15px; font-weight: 700; }
.line .qty button { width: 30px; height: 30px; }
.remove { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; padding: 0; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.totals { display: grid; gap: 6px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 18px; font-weight: 700; color: var(--green); border-top: 1px solid var(--line); padding-top: 8px; }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 0; }

.checkout-modal { width: min(620px, calc(100vw - 32px)); }
.checkout-modal > div { padding: 32px; }
.checkout-modal h2 { font-size: 32px; color: var(--green); }
.note { color: var(--muted); font-size: 14px; margin: 8px 0 20px; }
.checkout-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkout-form .wide { grid-column: 1 / -1; }
.checkout-form label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
.checkout-form input:not([type="radio"]) { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.checkout-form input[aria-invalid="true"] { border-color: #b3261e; }
.checkout-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: grid; gap: 8px; }
.checkout-form legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.checkout-form .radio { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.form-error { color: #b3261e; font-size: 14px; margin: 0; }
.success { text-align: center; display: grid; gap: 14px; justify-items: center; }
.success .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; font-size: 32px; }

.toast { position: fixed; left: 50%; top: 88px; z-index: 60; transform: translate(-50%, -200%); opacity: 0; background: var(--green); color: var(--cream); padding: 12px 20px; border-radius: 999px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); transition: transform .3s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 760px) {
  .nav { display: none; }
  .perks { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .pm-body { grid-template-columns: 1fr; }
  .pm-body img { aspect-ratio: 4 / 3; max-height: 38vh; }
  .pm-info { padding: 24px; }
  .checkout-form { grid-template-columns: 1fr; }
  .checkout-modal > div { padding: 24px; }
}

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