@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..700&family=Work+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&family=Caveat:wght@700&display=swap');

:root{
  --bg: #efe6d3;
  --surface: #faf5e9;
  --surface-2: #f2e9d8;
  --text: #2b2016;
  --muted: #8a7458;
  --line: #ddd0b4;
  --moss: #56703c;
  --rust: #a8562e;
  --gold: #c2971e;
  --slate: #3f6274;
  --plum: #7a3a52;
  --radius: 3px;
  --max: 1120px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background:
    repeating-linear-gradient(95deg, rgba(86,54,20,0.05) 0px, rgba(86,54,20,0.05) 1px, transparent 1px, transparent 9px),
    repeating-linear-gradient(91deg, rgba(255,255,255,0.35) 0px, rgba(255,255,255,0.35) 1px, transparent 1px, transparent 15px),
    var(--bg);
  color: var(--text);
  font-family: 'Work Sans', sans-serif;
  line-height: 1.5;
}

a{ color: inherit; }

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

/* ---------- Header ---------- */
header.site{
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--line);
}
header.site .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark{
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 42px;
  letter-spacing: -0.09em;
  text-decoration: none;
  display: inline-block;
  transform: rotate(-2deg);
}
nav.site a{
  text-decoration: none;
  color: var(--muted);
  margin-left: 24px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
nav.site a:hover, nav.site a.active{ color: var(--text); }

/* ---------- Hero ---------- */
.hero{
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.hero .ring{
  position: absolute;
  right: 24px;
  top: 40px;
  width: 160px;
  height: 160px;
  opacity: 0.9;
}
.hero h1{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  max-width: 760px;
  margin: 0 0 20px;
  line-height: 1.12;
}
.hero p.lead{
  max-width: 520px;
  color: var(--muted);
  font-size: 17px;
}
.hero .meta{
  display: flex;
  gap: 28px;
  margin-top: 32px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Gallery ---------- */
section.gallery{ padding: 56px 0 80px; }
section.gallery h2{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 28px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--moss);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card.is-sold{ border-top-color: var(--rust); }
.card .thumb{
  aspect-ratio: 4/3;
  background: var(--surface-2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card .thumb img{ width: 100%; height: 100%; object-fit: cover; }
.card .thumb svg{ width: 60%; height: 60%; opacity: 0.5; }
.card .stamp{
  position: absolute;
  top: 14px;
  right: -34px;
  transform: rotate(35deg);
  background: var(--rust);
  color: var(--bg);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 3px 40px;
  text-transform: uppercase;
}
.card .body{ padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.card h3{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 4px;
}
.card .wood{ color: var(--muted); font-size: 13px; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.card .wood .dot{ width: 8px; height: 8px; border-radius: 50%; flex: none; }
.card .desc{ font-size: 14px; color: var(--text); opacity: 0.85; margin-bottom: 14px; flex: 1; }
.card .row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  margin-top: auto;
}
.card .price{ color: var(--text); font-size: 16px; }
.card .ask{
  margin-top: 14px;
  display: inline-block;
  text-align: center;
  background: transparent;
  border: 1px solid var(--species, var(--moss));
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
}
.card .ask:hover{ background: var(--species, var(--moss)); color: var(--bg); }

/* sold specifics */
.card.is-sold .sold-info{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  margin-top: auto;
}
.card.is-sold .sold-info .amt{ color: var(--rust); font-size: 16px; }

/* ---------- Empty state ---------- */
.empty{
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  padding: 32px 0;
}

/* ---------- Modal ---------- */
.modal-backdrop{
  position: fixed; inset: 0;
  background: rgba(15, 10, 6, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-backdrop.open{ display: flex; }
.modal{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 420px;
  width: 100%;
}
.modal h3{
  font-family: 'Fraunces', serif;
  margin: 0 0 4px;
  font-size: 20px;
}
.modal p.sub{ color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.field{ margin-bottom: 14px; }
.field label{ display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.field input, .field textarea{
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 12px;
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
}
.field textarea{ min-height: 90px; resize: vertical; }
.modal-actions{ display: flex; gap: 10px; margin-top: 18px; }
.btn-primary{
  background: var(--moss);
  border: none;
  color: var(--bg);
  padding: 11px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
}
.btn-ghost{
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 11px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
}
.hidden-field{ display: none !important; }
.form-note{ font-size: 12px; color: var(--muted); margin-top: 10px; }
.form-success{ display: none; color: var(--moss); font-size: 14px; margin-top: 10px; }

/* ---------- Footer ---------- */
footer.site{
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 13px;
}
footer.site .wrap{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 560px){
  header.site .wrap{ flex-direction: column; align-items: flex-start; gap: 10px; }
  nav.site a{ margin-left: 0; margin-right: 18px; }
  .hero .ring{ display: none; }
}
