/* ---------- Tokens ---------- */
:root {
  --paper: #ece5d6;
  --surface: #f5efe2;
  --surface-2: #e4dbc8;
  --ink: #2a2019;
  --ink-soft: #4a3f33;
  --muted: #77695a;
  --accent: #a5642a;
  --accent-hover: #8f5522;
  --on-accent: #f7f1e6;
  --border: #d6cbb6;
  --border-strong: #c3b69d;
  --radius: 4px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
.brand-mark {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--on-accent);
  padding: 12px 18px;
  z-index: 200;
  border-radius: var(--radius);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
  background: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-accent:hover {
  background: var(--accent-hover);
}
.btn-ghost-light {
  border-color: rgba(247, 241, 230, 0.5);
  color: var(--on-accent);
}
.btn-ghost-light:hover {
  background: rgba(247, 241, 230, 0.12);
  border-color: var(--on-accent);
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow .rule {
  width: 34px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow-light {
  color: rgba(247, 241, 230, 0.82);
}

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 16px;
  text-wrap: balance;
}
.section-lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(236, 229, 214, 0.82);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-mark {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}
.main-nav {
  display: flex;
  gap: 32px;
}
.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}
.main-nav a:hover {
  color: var(--ink);
}
.main-nav a:hover::after {
  width: 100%;
}
.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.cart-button:hover {
  border-color: var(--ink);
  background: var(--surface);
}
.cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 100px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cart-count[data-empty="true"] {
  background: var(--surface-2);
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  color: var(--on-accent);
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(24, 18, 13, 0.86) 0%,
    rgba(24, 18, 13, 0.45) 42%,
    rgba(24, 18, 13, 0.12) 100%
  );
}
.hero-content {
  position: relative;
  padding-top: 100px;
  padding-bottom: 72px;
  max-width: 860px;
}
.hero-title {
  color: var(--on-accent);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  margin-bottom: 22px;
  text-wrap: balance;
}
.hero-lede {
  font-size: 1.15rem;
  color: rgba(247, 241, 230, 0.9);
  max-width: 54ch;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Values ---------- */
.values {
  background: var(--ink);
  color: var(--on-accent);
  padding: 56px 0;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.value-index {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.value h3 {
  color: var(--on-accent);
  font-size: 1.2rem;
  margin: 12px 0 8px;
}
.value p {
  color: rgba(247, 241, 230, 0.68);
  font-size: 0.95rem;
}

/* ---------- Collection ---------- */
.collection {
  padding: 88px 0;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-pill {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.filter-pill:hover {
  border-color: var(--border-strong);
}
.filter-pill.active {
  background: var(--ink);
  color: var(--on-accent);
  border-color: var(--ink);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 20px;
}
.product-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease);
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
}
.product-card:hover {
  transform: translateY(-4px);
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.product-card:hover .card-media img {
  transform: scale(1.04);
}
.card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(236, 229, 214, 0.9);
  color: var(--ink-soft);
  padding: 5px 10px;
  border-radius: 100px;
}
.card-body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 16px 4px 4px;
}
.card-name {
  font-size: 1.05rem;
  font-weight: 600;
}
.card-wood {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}
.card-price {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Craft ---------- */
.craft {
  background: var(--ink);
  color: var(--on-accent);
  padding: 96px 0;
}
.craft-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.craft-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(247, 241, 230, 0.12);
}
.craft-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.craft-copy .section-title {
  color: var(--on-accent);
}
.craft-copy p {
  color: rgba(247, 241, 230, 0.74);
  margin-bottom: 18px;
  max-width: 46ch;
}
.craft-copy .btn {
  margin-top: 8px;
}

/* ---------- Bespoke ---------- */
.bespoke {
  padding: 96px 0;
  text-align: center;
}
.bespoke-inner {
  max-width: 620px;
  margin: 0 auto;
}
.bespoke p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 16px 0 30px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand .brand-mark {
  font-size: 1.4rem;
}
.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 14px;
  max-width: 34ch;
}
.footer-col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
  transition: color 0.2s var(--ease);
}
.footer-col a:hover {
  color: var(--ink);
}
.footer-col address {
  font-style: normal;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}
.reg-no {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 14px;
}
.footer-base {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  padding-bottom: 30px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Modal / drawer shared ---------- */
.modal,
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
}
.modal[hidden],
.drawer[hidden] {
  display: none;
}
.modal {
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 10, 0.55);
  backdrop-filter: blur(2px);
  animation: fade 0.25s var(--ease);
}
.modal-panel {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: pop 0.3s var(--ease);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 100px;
  border: none;
  background: rgba(236, 229, 214, 0.9);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.modal-close:hover {
  background: var(--surface-2);
}

@keyframes fade {
  from { opacity: 0; }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
}
@keyframes slide {
  from { transform: translateX(100%); }
}

/* ---------- Product modal ---------- */
.product-modal-panel {
  max-width: 900px;
}
.product-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.product-modal-media {
  background: var(--surface);
}
.product-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}
.product-modal-body {
  padding: 40px 36px;
}
.pm-cat {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.pm-name {
  font-size: 1.9rem;
  margin-bottom: 8px;
}
.pm-price {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.pm-desc {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin-bottom: 22px;
}
.pm-specs {
  border-top: 1px solid var(--border);
  margin-bottom: 26px;
}
.pm-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.pm-specs dt {
  color: var(--muted);
}
.pm-specs dd {
  text-align: right;
  color: var(--ink);
}
.pm-buy {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty span {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
}
.qty-btn {
  width: 42px;
  height: 46px;
  border: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.qty-btn:hover {
  background: var(--surface-2);
}
.pm-buy .btn {
  flex: 1;
}
.pm-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Cart drawer ---------- */
.drawer {
  justify-content: flex-end;
}
.drawer-panel {
  position: relative;
  z-index: 2;
  background: var(--paper);
  width: 100%;
  max-width: 420px;
  height: 100%;
  display: flex;
  flex-direction: column;
  animation: slide 0.35s var(--ease);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.drawer-head h3 {
  font-size: 1.25rem;
}
.drawer-head .modal-close {
  position: static;
  background: none;
}
.drawer-head .modal-close:hover {
  background: var(--surface);
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px;
}
.cart-empty {
  color: var(--muted);
  text-align: center;
  padding: 48px 0;
}
.cart-line {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line img {
  width: 72px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
  flex-shrink: 0;
}
.cart-line-info {
  flex: 1;
  min-width: 0;
}
.cart-line-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.cart-line-wood {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.cart-line-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}
.cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.cart-qty button {
  width: 28px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink);
}
.cart-qty span {
  min-width: 26px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}
.cart-line-price {
  font-weight: 600;
  font-size: 0.9rem;
}
.cart-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 6px;
}
.cart-remove:hover {
  color: var(--accent);
}
.drawer-foot {
  border-top: 1px solid var(--border);
  padding: 20px 24px 26px;
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.drawer-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ---------- Checkout ---------- */
.checkout-panel {
  max-width: 560px;
  padding: 40px 36px;
}
.checkout-title {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.checkout-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 26px;
  max-width: 46ch;
}
fieldset {
  border: none;
  margin-bottom: 22px;
}
legend {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  padding: 0;
}
.field {
  margin-bottom: 14px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
input,
select {
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(165, 100, 42, 0.16);
}
input.invalid,
select.invalid {
  border-color: #b23b2e;
  box-shadow: 0 0 0 3px rgba(178, 59, 46, 0.14);
}
.btn-pay {
  margin-top: 8px;
  font-size: 1rem;
  padding: 15px 24px;
}
.checkout-secure {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 12px;
}

/* ---------- Confirm ---------- */
.confirm-panel {
  max-width: 440px;
  padding: 40px 34px 34px;
  text-align: center;
}
.confirm-badge {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 100px;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-panel h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  text-wrap: balance;
}
.confirm-panel p {
  color: var(--muted);
  margin-bottom: 26px;
}

/* ---------- Legal pages ---------- */
.legal {
  padding: 120px 0 88px;
}
.legal-inner {
  max-width: 720px;
  margin: 0 auto;
}
.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 10px;
}
.legal .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 1.3rem;
  margin: 36px 0 12px;
}
.legal p,
.legal li {
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.legal ul {
  padding-left: 22px;
  margin-bottom: 12px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 40px;
}
.back-link:hover {
  color: var(--accent-hover);
}

body.no-scroll {
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .product-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .craft-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .product-modal-grid {
    grid-template-columns: 1fr;
  }
  .product-modal-media img {
    min-height: 260px;
    max-height: 320px;
  }
}

@media (max-width: 620px) {
  .main-nav {
    display: none;
  }
  .hero {
    min-height: 76vh;
  }
  .collection,
  .craft,
  .bespoke {
    padding: 60px 0;
  }
  .product-grid,
  .values-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .checkout-panel,
  .product-modal-body {
    padding: 32px 22px;
  }
  .footer-base {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
