:root {
  --cream: #f8f3ea;
  --paper: #fffdf9;
  --sand: #ede1d0;
  --ink: #1f1b17;
  --muted: #6c6155;
  --terracotta: #b85a3a;
  --terracotta-deep: #8f4327;
  --sage: #6c7f60;
  --gold: #d99b58;
  --line: rgba(31, 27, 23, 0.12);
  --shadow: 0 18px 40px -24px rgba(31, 27, 23, 0.45);
  --radius: 22px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(217, 155, 88, 0.16), transparent 60%),
    radial-gradient(900px 500px at 92% 4%, rgba(108, 127, 96, 0.12), transparent 55%),
    var(--cream);
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terracotta); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0 0 0.45em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.08rem; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.1rem; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--cream); padding: 10px 16px; z-index: 20;
}
.skip:focus { left: 12px; top: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.site-head {
  display: flex; align-items: center; gap: 28px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 243, 234, 0.86);
  backdrop-filter: blur(14px) saturate(1.2);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-family: var(--serif); font-size: 1.28rem; letter-spacing: -0.01em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--terracotta), var(--terracotta-deep));
  color: #fdf7ee; font-weight: 700; font-size: 1.1rem;
  box-shadow: 0 6px 14px -8px rgba(143, 67, 39, 0.9);
}
.brand small { display: block; font-family: var(--sans); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 1px; }
.site-head nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.site-head nav a {
  text-decoration: none; font-size: 13.5px; letter-spacing: 0.03em;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color 0.2s, color 0.2s;
}
.site-head nav a:hover { border-color: var(--terracotta); color: var(--ink); }
.site-head nav a[aria-current="page"] { color: var(--terracotta); border-color: var(--terracotta); }
.cart-link {
  text-decoration: none; font-size: 13.5px; border: 1px solid var(--ink);
  border-radius: 999px; padding: 9px 16px; transition: background 0.2s, color 0.2s;
}
.cart-link:hover { background: var(--ink); color: var(--cream); }
.cart-count { font-variant-numeric: tabular-nums; font-weight: 700; }

main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px) 72px; }

.hero {
  display: grid; grid-template-columns: 1.02fr 0.98fr; gap: clamp(24px, 5vw, 64px);
  align-items: center; padding: clamp(36px, 6vw, 76px) 0 clamp(28px, 4vw, 52px);
}
.kicker {
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 10.5px; font-weight: 700;
  color: var(--terracotta); margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.kicker::before { content: ""; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 52ch; }
.hero h1 { margin-bottom: 0.35em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.hero-perks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-perks li {
  font-size: 12px; letter-spacing: 0.02em; color: var(--muted);
  border: 1px solid var(--line); background: rgba(255, 253, 249, 0.7);
  padding: 6px 12px; border-radius: 999px;
}
.hero-art { position: relative; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); }
.hero-art img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-art::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to top, rgba(20, 16, 12, 0.45), transparent);
  pointer-events: none;
}
.hero-badge {
  position: absolute; left: 18px; bottom: 18px; z-index: 1;
  display: flex; flex-direction: column; gap: 1px;
  background: rgba(253, 247, 238, 0.9); backdrop-filter: blur(8px);
  color: var(--ink); padding: 9px 15px; border-radius: 14px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.hero-badge span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--cream);
  border-radius: 999px; padding: 13px 24px; font-weight: 600; text-decoration: none;
  cursor: pointer; font: inherit; font-size: 14.5px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn:hover { background: var(--terracotta); border-color: var(--terracotta); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(143, 67, 39, 0.9); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--sand); color: var(--ink); }
.btn.small { padding: 9px 15px; font-size: 13px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }

.band { padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--line); }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.band-head h2 { margin: 0; }
.band-head a { font-size: 13.5px; color: var(--terracotta); text-decoration: none; }
.band-head a:hover { text-decoration: underline; }

.cat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.cat {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 18px; text-decoration: none; background: var(--sand);
  box-shadow: 0 1px 0 var(--line);
}
.cat img, .cat-fallback { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cat-fallback { display: grid; place-items: center; padding: 28px; color: var(--sage); }
.cat::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 16, 12, 0.62), rgba(20, 16, 12, 0) 55%);
}
.cat:hover img { transform: scale(1.05); }
.cat:hover { color: inherit; }
.cat-label {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  color: #fdf7ee;
}
.cat-label span { font-family: var(--serif); font-size: 1.18rem; }
.cat-label small { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }

.page-head { padding: clamp(32px, 6vw, 68px) 0 26px; }
.page-head.narrow { max-width: 420px; margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px;
  text-decoration: none; font-size: 13px; background: var(--paper);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--terracotta); color: var(--terracotta); }
.chip.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: clamp(14px, 3vw, 26px); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(184, 90, 58, 0.35); }
.card-art { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--sand); color: var(--terracotta); }
.card-art .art-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-art .art-img { transform: scale(1.04); }
.card-art .motif { width: 100%; height: 100%; padding: 26px; }
.card-art.leaf, .card-art.coaster { color: var(--sage); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.05rem; }
.card-body h3 a { text-decoration: none; }
.card-body .btn { margin-top: auto; align-self: flex-start; }
.price { font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.price.big { font-size: 1.6rem; }
.stock { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--sage); font-weight: 700; }
.stock.none { color: var(--terracotta); }
.card .stock {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  background: rgba(253, 247, 238, 0.92); backdrop-filter: blur(6px);
  color: var(--ink); padding: 4px 10px; border-radius: 999px;
}
.card .stock.none { color: var(--terracotta); }
.card.sold-out { opacity: 0.78; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.product { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 64px); padding: clamp(24px, 5vw, 56px) 0; align-items: start; }
.product-art { background: var(--sand); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); color: var(--terracotta); }
.product-art .art-img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.product-art .motif { padding: clamp(28px, 6vw, 64px); }
.product-body p { max-width: 46ch; }
.buy { display: flex; gap: 12px; align-items: end; margin: 20px 0; }
.buy label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.buy input {
  width: 88px; padding: 11px 12px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
}

.story, .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.story-art, .about-art { margin: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.story-art img, .about-art img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.about-art figcaption { padding: 12px 16px; font-size: 12.5px; color: var(--muted); background: var(--paper); }
.steps { display: grid; gap: 14px; padding-left: 0; list-style: none; counter-reset: step; margin: 18px 0 0; }
.steps li { position: relative; padding-left: 44px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
  font-family: var(--serif); font-size: 14px; color: var(--terracotta);
}

.cart-page { max-width: 760px; }
.cart-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.cart-row {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-name a { font-weight: 600; }
.cart-name small { display: block; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; font-size: 16px; line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}
.qty-control button:hover { border-color: var(--terracotta); color: var(--terracotta); }
.cart-line { font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.cart-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.order-total { display: flex; justify-content: space-between; gap: 20px; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 14px; }

.checkout { max-width: 640px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.form input, .form textarea, .form select {
  font: inherit; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(184, 90, 58, 0.16);
}
.summary { margin: 6px 0 0; }
.form-error { background: #f9e6df; border: 1px solid #d9a292; color: #6d2a17; padding: 10px 12px; border-radius: 12px; }
.notice { background: #e8efdf; border: 1px solid #b6c6a5; padding: 10px 12px; border-radius: 12px; }
.order-card { max-width: 640px; border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: var(--paper); box-shadow: var(--shadow); }
.order-items { list-style: none; margin: 0 0 12px; padding: 0; }
.order-items li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.prose { max-width: 62ch; }

.site-foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding: 40px clamp(16px, 4vw, 48px) 56px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.site-foot strong { color: var(--ink); font-family: var(--serif); font-size: 1.15rem; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

.empty { padding: 48px 0; text-align: center; color: var(--muted); }

.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--paper); }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.qty-input { width: 68px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--paper); color: var(--ink); }
.status { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 999px; background: var(--sand); color: var(--muted); }
.status-new { background: #fde8df; color: #8c3b20; }
.status-packing { background: #fdf0d2; color: #7a5a10; }
.status-collected, .status-posted { background: #e5efdb; color: #3f5a2c; }
.status-cancelled { background: #eee; color: #777; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.grid-form .wide { grid-column: 1 / -1; }
.grid-form button { grid-column: 1 / -1; justify-self: start; }

@media (max-width: 860px) {
  .hero, .product, .story, .about-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .site-head { flex-wrap: wrap; gap: 12px; }
  .site-head nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .site-foot { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-label span { font-size: 1rem; }
  .cart-row { grid-template-columns: 1fr auto; grid-template-areas: "name qty" "line remove"; row-gap: 8px; }
  .cart-name { grid-area: name; }
  .qty-control { grid-area: qty; }
  .cart-line { grid-area: line; text-align: left; }
  .cart-row .linkish { grid-area: remove; justify-self: end; }
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #16120f;
    --paper: #1f1a16;
    --sand: #2a231d;
    --ink: #f3ece2;
    --muted: #b6a998;
    --line: rgba(243, 236, 226, 0.15);
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  }
  body {
    background:
      radial-gradient(1200px 600px at 12% -8%, rgba(184, 90, 58, 0.18), transparent 60%),
      radial-gradient(900px 500px at 92% 4%, rgba(108, 127, 96, 0.14), transparent 55%),
      var(--cream);
  }
  .site-head { background: rgba(22, 18, 15, 0.88); }
  .hero-perks li { background: rgba(31, 26, 22, 0.7); }
  .btn { background: var(--ink); color: var(--cream); }
  .btn.ghost { background: transparent; color: var(--ink); }
  .form input, .form textarea, .form select, .qty-input, .chip, .qty-control button { background: var(--paper); color: var(--ink); }
  .card .stock, .hero-badge { background: rgba(31, 26, 22, 0.88); color: var(--ink); }
  .form-error { background: #3a2119; border-color: #6d3a2a; color: #f0c3b4; }
  .notice { background: #26301f; border-color: #435438; }
  .status-collected, .status-posted { background: #26301f; color: #b9cfa5; }
  .status-new { background: #3a2119; color: #f0b9a4; }
  .status-packing { background: #35301c; color: #e6cf9a; }
}
