:root {
  --paper: #f7f3ec;
  --paper-deep: #efe8dc;
  --ink: #1f1a17;
  --ink-soft: #5c524b;
  --line: #ddd3c5;
  --accent: #a9472a;
  --accent-ink: #ffffff;
  --sage: #55705f;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px / 1.55 var(--sans);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}

.narrow {
  max-width: 760px;
}

.section {
  padding-block: 48px;
}

.muted {
  color: var(--ink-soft);
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 56ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 50;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

main {
  flex: 1;
}

/* Header */

.announcement {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 0.82rem;
  padding: 7px 16px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 68px;
}

.logo {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
  margin: 0;
}

.logo span {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-left: 8px;
  color: var(--accent);
}

.logo-small {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.main-nav {
  display: flex;
  gap: 24px;
  flex: 1;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.header-icons {
  display: flex;
  gap: 14px;
  margin-left: auto;
}

.header-icons a {
  display: inline-flex;
  padding: 6px;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

.cart-count[hidden] {
  display: none;
}

/* Buttons and fields */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: 600 0.95rem var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.button-ghost {
  background: transparent;
  color: var(--ink);
}

.button-ghost:hover {
  color: var(--accent-ink);
}

.button-wide {
  width: 100%;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input,
select {
  font: inherit;
  color: inherit;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.field input,
.field select,
.inline-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: -4px 0 24px;
  font-size: 0.92rem;
}

.notice {
  background: #e4ede6;
  border: 1px solid #c5d6ca;
  color: #23412f;
  padding: 12px 16px;
  border-radius: 10px;
}

/* Home */

.hero {
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-block: 56px;
}

.hero-art {
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  justify-self: end;
}

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

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.card {
  display: grid;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgb(31 26 23 / 0.08);
}

.card-art {
  aspect-ratio: 1;
  width: 100%;
}

.card-body {
  display: grid;
  gap: 2px;
  padding: 16px 18px 20px;
}

.card-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.price {
  font-weight: 600;
  margin-top: 6px;
}

.price-large {
  font-size: 1.4rem;
  margin: 8px 0 20px;
}

.band {
  background: var(--ink);
  color: var(--paper);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-block: 44px;
}

.steps p {
  color: #cfc5b8;
  margin: 0;
}

.newsletter-section {
  display: grid;
  justify-items: center;
  text-align: center;
}

.newsletter-home {
  max-width: 520px;
  width: 100%;
}

.inline-field {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.inline-field input {
  flex: 1;
  min-width: 0;
}

/* Collection and product */

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.product-art {
  width: 100%;
  border-radius: var(--radius);
}

.variants {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.variants legend {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.pill input {
  position: absolute;
  opacity: 0;
}

.pill span {
  display: inline-block;
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  background: #fff;
}

.pill input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.pill input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.buy-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.quantity {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  flex: none;
}

.quantity input {
  width: 44px;
  text-align: center;
  border: 0;
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}

.quantity input::-webkit-inner-spin-button,
.quantity input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-step {
  width: 40px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink);
}

.quantity-small .qty-step {
  height: 36px;
  width: 34px;
}

.product-description {
  margin-top: 28px;
}

.notes {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notes li {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
}

/* Cart and checkout */

.cart-lines {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
}

.cart-line {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.line-art {
  width: 88px;
  border-radius: 10px;
}

.line-info {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.line-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.line-price {
  font-weight: 600;
}

.cart-summary {
  margin-left: auto;
  max-width: 360px;
}

.subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
}

.empty {
  padding: 32px 0;
}

.checkout {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.step-title {
  font-size: 1.15rem;
  margin-top: 28px;
}

.summary {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 24px 16px;
  position: sticky;
  top: 96px;
}

.summary-lines {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.summary-lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.attributes {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0 0 32px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

.attributes dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.account-form {
  max-width: 420px;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.6em;
}

.prose code {
  background: var(--paper-deep);
  padding: 1px 6px;
  border-radius: 6px;
}

.opt-out-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.opt-out-status {
  color: var(--sage);
  font-weight: 600;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-block: 40px 96px;
  background: var(--paper-deep);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.6fr;
  gap: 32px;
}

.footer-title {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.newsletter-home .footer-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

/* Toast and consent banner */

.toast {
  position: fixed;
  top: 84px;
  right: 16px;
  z-index: 30;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.2);
  max-width: calc(100% - 32px);
}

.toast[hidden],
.consent[hidden] {
  display: none;
}

.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  max-width: 880px;
  margin-inline: auto;
  display: flex;
  gap: 24px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 18px 48px rgb(31 26 23 / 0.18);
}

.consent h2 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.consent p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.consent-actions {
  display: flex;
  gap: 10px;
  flex: none;
}

/* Debug panel */

.debug-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 35;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: #2c3e50;
  color: #fff;
  font: 600 0.8rem var(--sans);
  cursor: pointer;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.2);
}

.debug-panel {
  position: fixed;
  left: 16px;
  bottom: 64px;
  z-index: 36;
  width: min(440px, 100% - 32px);
  max-height: min(70vh, 640px);
  overflow: auto;
  background: #16212c;
  color: #e6edf3;
  border-radius: 14px;
  padding: 14px 16px;
  font: 13px / 1.45 var(--sans);
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.35);
}

.debug-panel[hidden] {
  display: none;
}

.debug-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.debug-status {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 12px;
  margin: 0 0 8px;
}

.debug-status dt {
  color: #8fa3b5;
}

.debug-status dd {
  margin: 0;
}

.debug-label {
  margin: 10px 0 6px;
  color: #8fa3b5;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.debug-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.debug-chip {
  border: 1px solid #3a4d60;
  background: transparent;
  color: #e6edf3;
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  cursor: pointer;
}

.debug-chip[aria-pressed="true"] {
  background: #e6edf3;
  color: #16212c;
  border-color: #e6edf3;
}

.debug-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.debug-list .muted {
  color: #8fa3b5;
}

.debug-list details {
  background: #1f2d3a;
  border-radius: 8px;
  padding: 6px 10px;
}

.debug-list summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: baseline;
}

.debug-mode-badge {
  background: #f4a261;
  color: #16212c;
  border-radius: 4px;
  padding: 0 6px;
  font-weight: 700;
}

.debug-events {
  overflow-wrap: anywhere;
}

.debug-meta {
  grid-column: 2;
  color: #8fa3b5;
  font-size: 0.72rem;
}

.debug-list pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  margin: 8px 0 2px;
  max-height: 280px;
  overflow: auto;
}

/* Narrow screens */

@media (max-width: 900px) {
  .main-nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 8px;
  }

  .header-row {
    flex-wrap: wrap;
    gap: 12px 24px;
    padding-top: 10px;
  }

  .hero-grid,
  .product,
  .checkout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-art {
    justify-self: start;
    max-width: 320px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .summary {
    position: static;
  }
}

@media (max-width: 560px) {
  .section {
    padding-block: 32px;
  }

  .toast {
    top: auto;
    bottom: 72px;
    left: 16px;
    right: 16px;
    max-width: none;
    text-align: center;
  }

  .main-nav {
    font-size: 0.9rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .consent {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px;
  }

  .consent-actions .button {
    flex: 1;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .inline-field {
    flex-direction: column;
  }

  .cart-line {
    grid-template-columns: 64px 1fr;
  }

  .line-art {
    width: 64px;
  }

  .line-price {
    grid-column: 2;
  }

  .cart-summary {
    max-width: none;
  }

  .buy-row {
    flex-direction: column;
  }

  .quantity {
    align-self: flex-start;
  }
}
