/* ============================================
   TOKENS
   ============================================ */
:root {
  --wall: #EFEAE0;
  --wall-panel: #FFFFFF;
  --ink: #1C1A16;
  --ink-soft: #55524A;
  --pigment: #A6432E;
  --pigment-dark: #7E2F1F;
  --sage: #495B44;
  --line: #D8D0C2;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

p { max-width: 62ch; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239, 234, 224, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.wordmark em {
  font-style: italic;
  color: var(--pigment);
}

nav.primary {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav.primary a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

nav.primary a:hover,
nav.primary a.active {
  color: var(--ink);
}

.auth-slot {
  display: flex;
  gap: 16px;
  align-items: center;
}

.auth-slot a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  cursor: pointer;
}

.auth-slot a:hover { color: var(--ink); }

.cart-btn {
  position: relative;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cart-btn:hover { background: var(--ink); color: var(--wall); }

.cart-count {
  display: inline-block;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: 0.2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* ============================================
   HERO
   ============================================ */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
  min-height: 78vh;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  padding-right: clamp(20px, 4vw, 56px);
}

.hero-eyebrow {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  max-width: 12ch;
}

.hero p.lede {
  margin-top: 22px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 42ch;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-figure {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #C8683F 0%, #8A3A2A 45%, #2F2A22 100%);
}

.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 45%),
    radial-gradient(circle at 75% 70%, rgba(0,0,0,0.25), transparent 50%);
}

.hero-figure .caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  color: #F6EFE4;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  z-index: 2;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--sans);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--pigment);
  color: #FBF3EA;
}
.btn-primary:hover { background: var(--pigment-dark); }

.btn-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--wall); }

.btn:active { transform: scale(0.98); }

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   SECTIONS / TYPE
   ============================================ */
section { padding: 88px 0; }
section.tight { padding: 56px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.section-head .note {
  color: var(--ink-soft);
  max-width: 40ch;
}

/* ============================================
   MASONRY GALLERY
   ============================================ */
.masonry {
  columns: 3 260px;
  column-gap: 22px;
}

.masonry .card {
  break-inside: avoid;
  margin-bottom: 22px;
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.art-frame {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.art-frame img,
.art-frame .swatch { width: 100%; display: block; }

.swatch {
  aspect-ratio: var(--ar, 4 / 5);
  background: var(--sw, #C9A46A);
}

.art-frame .sold-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--ink);
  color: var(--wall);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border-radius: 3px;
}

.card-meta {
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.card-meta h3 {
  font-size: 1.05rem;
  font-weight: 500;
}

.card-meta .price {
  color: var(--pigment-dark);
  font-family: var(--sans);
  font-size: 0.95rem;
  white-space: nowrap;
}

.card-meta .medium {
  color: var(--ink-soft);
  font-size: 0.85rem;
  display: block;
  margin-top: 2px;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-bar button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: var(--sans);
}

.filter-bar button.active,
.filter-bar button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ============================================
   ABOUT / SPLIT
   ============================================ */
.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.split .swatch-portrait {
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, #D9C4A0, #A6432E 70%, #3A2A22);
}

/* ============================================
   STRIP / PROCESS
   ============================================ */
.process-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.process-strip .item {
  border-top: 1px solid var(--ink);
  padding-top: 16px;
}

.process-strip h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.process-strip p { color: var(--ink-soft); font-size: 0.95rem; }

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  margin-top: 40px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

footer .cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

footer h4 {
  font-size: 0.82rem;
  text-transform: none;
  color: var(--ink-soft);
  margin-bottom: 12px;
  font-family: var(--sans);
  font-weight: 600;
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

footer a { text-decoration: none; font-size: 0.92rem; color: var(--ink-soft); }
footer a:hover { color: var(--ink); }

.legal-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 24px;
}

/* ============================================
   CART DRAWER
   ============================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 22, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 90;
}

.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: var(--wall-panel);
  z-index: 91;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,0.12);
}

.cart-drawer.open { transform: translateX(0); }

.cart-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.cart-drawer-head h3 { font-size: 1.3rem; }

.cart-drawer-head button {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--ink-soft);
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px;
}

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

.cart-item .thumb {
  width: 64px;
  height: 64px;
  border-radius: 2px;
}

.cart-item h4 { font-size: 0.95rem; font-weight: 500; margin-bottom: 4px; }
.cart-item .medium { font-size: 0.78rem; color: var(--ink-soft); }

.qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-row button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  background: none;
  cursor: pointer;
  border-radius: 4px;
}

.remove-link {
  background: none;
  border: none;
  color: var(--ink-soft);
  text-decoration: underline;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  justify-self: end;
}

.cart-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--ink-soft);
}

.cart-drawer-foot {
  padding: 22px 24px 28px;
  border-top: 1px solid var(--line);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.cart-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* ============================================
   PRODUCT MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,26,22,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 95;
  padding: 24px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--wall-panel);
  max-width: 900px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.modal .modal-img { min-height: 320px; }

.modal-body {
  padding: 36px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink-soft);
}

.modal-body h2 { font-size: 1.7rem; margin-bottom: 6px; }
.modal-body .medium { color: var(--ink-soft); margin-bottom: 18px; display: block; }
.modal-body .price { font-size: 1.3rem; color: var(--pigment-dark); font-family: var(--sans); margin-bottom: 20px; }
.modal-body .desc { color: var(--ink-soft); margin-bottom: 26px; }
.modal-body .specs { list-style: none; padding: 0; margin: 0 0 26px; font-size: 0.9rem; color: var(--ink-soft); }
.modal-body .specs li { padding: 6px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; }

/* ============================================
   FORMS (contact)
   ============================================ */
.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--wall-panel);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: 3px;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--pigment);
  outline-offset: 2px;
}

/* ============================================
   PAGE HERO (shop/about/contact/legal)
   ============================================ */
.page-hero {
  padding: 64px 0 24px;
  border-bottom: 1px solid var(--line);
}
.page-hero .kicker {
  color: var(--ink-soft);
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 16ch; }

.legal-page h2 { font-size: 1.3rem; margin: 40px 0 12px; }
.legal-page section { padding: 0; margin-bottom: 8px; }
.legal-page p, .legal-page li { color: var(--ink-soft); }
.todo-flag {
  background: #FBEFE9;
  border: 1px dashed var(--pigment);
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 0.88rem;
  margin: 14px 0 28px;
  color: var(--pigment-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-figure { order: -1; height: 46vh; }
  .split { grid-template-columns: 1fr; }
  .process-strip { grid-template-columns: 1fr; }
  .modal { grid-template-columns: 1fr; }
  .modal .modal-img { min-height: 220px; }
}

@media (max-width: 700px) {
  nav.primary { position: fixed; top: 64px; left: 0; right: 0; background: var(--wall); flex-direction: column; align-items: flex-start; padding: 24px var(--gutter); border-bottom: 1px solid var(--line); gap: 18px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: 0.2s ease; }
  nav.primary.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: block; }
  .masonry { columns: 2 200px; }
}

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