:root {
  --bg: #faf7f2;
  --ink: #2a2520;
  --muted: #5f564c;
  --line: #e4dbcd;
  --brass: #7a5a2c;
  --card: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brass); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.btn { display: inline-block; font: 600 15px/1 var(--sans); padding: 14px 22px; border-radius: 999px; border: 1.5px solid var(--ink); cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn.small { padding: 9px 14px; font-size: 13px; }
:focus-visible { outline: 3px solid #2b6cff; outline-offset: 2px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; align-items: center; gap: 28px; padding-top: 58px; padding-bottom: 14px; }
.logo { font: 600 1.45rem var(--serif); color: var(--ink); text-decoration: none; }
.logo em { color: var(--brass); }
nav { display: flex; gap: 22px; margin-left: auto; }
nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
nav a:hover { text-decoration: underline; }
.cart { padding: 10px 16px; font-size: 14px; }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: var(--brass); font-weight: 700; margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-img { border-radius: 24px; box-shadow: 0 30px 60px -30px rgba(60, 40, 20, .45); }

.section { padding-top: 56px; padding-bottom: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 18px; display: flex; flex-direction: column; }
.product-card img { border-radius: 12px; margin-bottom: 14px; }
.product-card h3 { margin-bottom: 2px; }
.price { color: var(--muted); margin: 0 0 14px; }
.product-card .btn { margin-top: auto; align-self: flex-start; padding: 11px 18px; font-size: 14px; }

.band { background: #efe7da; padding: 52px 0; margin-top: 16px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card { background: var(--card); border-radius: 16px; padding: 24px; border: 1px solid var(--line); }
.feature-card p { margin: 0; color: var(--muted); }

.story { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.story p { color: var(--muted); }
.newsletter { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.newsletter label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.newsletter .row { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter input { flex: 1 1 180px; font: inherit; padding: 12px 14px; border-radius: 999px; border: 1.5px solid #b9ad9c; background: #fff; color: var(--ink); }
.ok { color: #1d6b38; font-weight: 600; margin: 10px 0 0; }

.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 120px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.credit a { font-weight: 700; }

/* Demo control panel. The box itself lets clicks through (only its children catch them), and it stays
   below the widget's promo card and intro (z-index 2147483100+) so it can never hide them. */
.panel { position: fixed; top: 124px; right: 12px; z-index: 2147483050; width: 340px; max-width: calc(100vw - 24px); font: 14px/1.4 var(--sans); pointer-events: none; }
.panel > * { pointer-events: auto; }
.panel-toggle { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 0; background: #1f1b2e; color: #fff; font: 700 14px var(--sans); cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.panel-body { margin-top: 8px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); max-height: calc(100vh - 140px); overflow: auto; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; min-width: 0; }
.field label { font-weight: 600; font-size: 13px; }
.field input, .field select { font: inherit; padding: 8px 10px; border: 1.5px solid #b9ad9c; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-weight: 500; }
.check input { width: 18px; height: 18px; }
.status { margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.snippet { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.snippet-head { display: flex; align-items: center; justify-content: space-between; }
.snippet h2 { font: 700 14px var(--sans); margin: 0; }
.snippet pre { margin: 8px 0 0; background: #1f1b2e; color: #f3eefc; border-radius: 10px; padding: 12px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; }

@media (max-width: 900px) {
  .hero, .story { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  nav { display: none; }
  .header-inner { justify-content: space-between; padding-top: 74px; }
  .grid { gap: 12px; }
  .product-card { padding: 10px 10px 14px; }
  .product-card .btn { padding: 10px 12px; font-size: 13px; }
  .panel { top: 40%; right: 0; width: auto; }
  .panel-toggle { border-radius: 999px 0 0 999px; padding: 10px 12px; }
  .panel-toggle .long { display: none; }
  .panel-body { position: fixed; top: 70px; left: 12px; right: 12px; max-height: calc(100vh - 90px); }
}
