:root {
  --ink: #1e211b;
  --ink-soft: #65695e;
  --paper: #fffdf7;
  --linen: #f3efe4;
  --clay: #9b5640;
  --clay-dark: #743b2a;
  --moss: #65745a;
  --ochre: #d6a43a;
  --line: rgba(30, 33, 27, 0.14);
  --shadow: 0 18px 48px rgba(30, 33, 27, 0.12);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.55;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-label {
  position: relative;
  display: grid;
  min-width: 64px;
  padding: 6px 9px;
  border-block: 2px solid var(--ink);
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand-label::before,
.brand-label::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.brand-label::before {
  left: 0;
}

.brand-label::after {
  right: 0;
}

.brand-label span:first-child {
  color: var(--clay-dark);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.brand-label span:last-child {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.nav-links {
  display: none;
  gap: 26px;
  color: var(--ink-soft);
  font-weight: 700;
}

.cart-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 13px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.9rem;
  font-weight: 800;
}

.cart-chip > span:last-child {
  display: grid;
  gap: 1px;
}

.cart-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}

.cart-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.cart-chip strong {
  color: var(--clay-dark);
  font-size: 0.84rem;
}

.hero {
  display: grid;
  min-height: calc(100vh - 75px);
  background: var(--paper);
}

.hero-media {
  min-height: 42vh;
  background:
    linear-gradient(rgba(30, 33, 27, 0.08), rgba(30, 33, 27, 0.08)),
    url("https://images.unsplash.com/photo-1610701596007-11502861dcfa?auto=format&fit=crop&w=1700&q=82")
      center / cover;
}

.hero-content {
  display: grid;
  align-content: center;
  max-width: 760px;
  padding: clamp(42px, 8vw, 90px) clamp(18px, 6vw, 78px);
}

.market-label,
.section-label {
  margin: 0 0 12px;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.03;
}

h1 {
  max-width: 690px;
  font-size: clamp(3rem, 8vw, 7.2rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h3 {
  font-size: 1.2rem;
}

.hero-content > p:not(.market-label) {
  max-width: 560px;
  margin: 22px 0 28px;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 19px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--clay);
  color: var(--paper);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--clay-dark);
}

.button-secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.button-full {
  width: 100%;
}

.feature-strip {
  display: grid;
  border-block: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
}

.feature-strip span {
  padding: 16px clamp(16px, 4vw, 34px);
  border-bottom: 1px solid rgba(255, 253, 247, 0.12);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section {
  padding: clamp(72px, 10vw, 120px) clamp(16px, 5vw, 72px);
}

.shop-layout {
  display: grid;
  gap: 30px;
}

.shop-sidebar {
  align-self: start;
}

.shop-sidebar h2 {
  max-width: 420px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.filter-button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.filter-button.is-active {
  border-color: var(--moss);
  background: var(--moss);
  color: var(--paper);
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.shop-toolbar p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
}

.shop-toolbar select,
.checkout-form input,
.checkout-form select {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.product-grid {
  display: grid;
  gap: 18px;
}

.product-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.product-image {
  min-height: 250px;
  background:
    radial-gradient(circle at 30% 20%, rgba(155, 86, 64, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(101, 116, 90, 0.14), rgba(214, 164, 58, 0.12)),
    var(--linen);
  background-position: center;
  background-size: cover;
}

.product-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.product-body p {
  margin: 0;
  color: var(--ink-soft);
}

.product-category {
  color: var(--moss);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.price {
  color: var(--clay-dark);
  font-weight: 900;
}

.add-button {
  justify-self: start;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid rgba(155, 86, 64, 0.24);
  border-radius: var(--radius);
  background: rgba(155, 86, 64, 0.08);
  color: var(--clay-dark);
  cursor: pointer;
  font-weight: 900;
}

.story-section,
.checkout-layout {
  display: grid;
  gap: 28px;
  border-top: 1px solid var(--line);
}

.story-section p,
.checkout-copy p,
.empty-cart,
.order-note {
  color: var(--ink-soft);
}

.checkout-panel,
.order-modal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.checkout-panel {
  padding: 22px;
}

.cart-items {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cart-line small {
  color: var(--ink-soft);
}

.quantity-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quantity-controls button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  font-weight: 900;
}

.cart-totals {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.cart-totals div,
.order-final {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.grand-total,
.order-final {
  font-size: 1.15rem;
}

.checkout-form {
  display: grid;
  gap: 14px;
}

.checkout-form label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 900;
}

.checkout-form input:focus,
.checkout-form select:focus {
  border-color: var(--clay);
  outline: 3px solid rgba(155, 86, 64, 0.16);
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px clamp(16px, 5vw, 72px);
  background: var(--ink);
  color: var(--paper);
}

.site-footer span {
  color: rgba(255, 253, 247, 0.68);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(30, 33, 27, 0.58);
}

.modal-backdrop.is-open {
  display: flex;
}

.order-modal {
  position: relative;
  width: min(100%, 540px);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 28px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--linen);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.order-meta {
  margin: 8px 0 18px;
  color: var(--ink-soft);
}

.order-lines {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.order-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.order-final {
  margin-top: 16px;
}

@media (min-width: 760px) {
  .nav-links {
    display: flex;
  }

  .hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  .hero-media {
    min-height: calc(100vh - 75px);
    order: 2;
  }

  .feature-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-strip span {
    border-right: 1px solid rgba(255, 253, 247, 0.12);
    border-bottom: 0;
  }

  .shop-layout,
  .story-section,
  .checkout-layout {
    grid-template-columns: minmax(260px, 0.35fr) minmax(0, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1120px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .brand span:last-child {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .shop-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
