/* One Heart Farm Prints — gallery, not template. Restraint is the design. */

:root {
  --ink: #2a2a28;
  --muted: #8a8578;
  --paper: #faf9f6;
  --line: #e4e1d8;
  --accent: #4a5d3a;
  --red: #b00020;
  --amber: #9a6700;
  --green: #116329;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

header.site {
  padding: 2.5rem 1.5rem 1.5rem;
  text-align: center;
}
header.site h1 {
  font-weight: normal;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}
header.site h1 a { color: var(--ink); text-decoration: none; }
header.site p.tag {
  color: var(--muted);
  font-style: italic;
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
}
nav.site {
  text-align: center;
  padding: 0.5rem 0 1.5rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
nav.site a { color: var(--muted); text-decoration: none; margin: 0 1rem; }
nav.site a:hover, nav.site a[aria-current] { color: var(--ink); }

main { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* gallery grid — clean thumbnails, no watermark, let the work carry it */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem 1.5rem;
}
.grid a.card { text-decoration: none; color: var(--ink); }
.grid img {
  width: 100%;
  height: auto;
  display: block;
  background: #eee;
}
.grid .card h3 {
  font-weight: normal;
  font-size: 1rem;
  margin: 0.6rem 0 0;
}
.grid .card p {
  margin: 0;
  color: var(--muted);
  font-style: italic;
  font-size: 0.85rem;
}

.filters {
  font-family: var(--sans);
  font-size: 0.8rem;
  margin: 0 0 2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.filters input[type='search'] {
  font: inherit;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  background: white;
  min-width: 220px;
}

/* image detail */
.detail { display: grid; grid-template-columns: 3fr 2fr; gap: 3rem; align-items: start; }
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; } }
.detail img { width: 100%; height: auto; }
.detail h2 { font-weight: normal; font-size: 1.6rem; margin: 0 0 0.2rem; }
.detail .botanical { color: var(--muted); font-style: italic; margin: 0 0 1.2rem; }
.detail .story { font-size: 1.02rem; }
.detail .provenance { color: var(--muted); font-size: 0.88rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.5rem; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #000; }
.btn[disabled] { background: #bbb; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }

/* ---------------- editor ---------------- */
.editor-wrap { max-width: 1100px; margin: 0 auto; }
.editor-grid { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; }
@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } }

#editor-canvas {
  width: 100%;
  touch-action: none;      /* we handle pan/pinch ourselves */
  background: #141412;
  display: block;
  cursor: grab;
}
#editor-canvas.dragging { cursor: grabbing; }

.panel { font-family: var(--sans); font-size: 0.85rem; }
.panel h3 {
  font-family: var(--serif);
  font-weight: normal;
  font-size: 1.1rem;
  margin: 0 0 0.6rem;
}
.panel .group { margin-bottom: 1.4rem; }
.panel label { display: block; color: var(--muted); margin-bottom: 0.3rem; }
.panel select, .panel input[type='range'] { width: 100%; }
.panel select { font: inherit; padding: 0.4rem; border: 1px solid var(--line); background: white; }
.size-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.size-btns button {
  font: inherit;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
}
.size-btns button[aria-pressed='true'] { border-color: var(--ink); background: var(--ink); color: white; }
.toggle-row { display: flex; gap: 0.4rem; }
.toggle-row button { flex: 1; font: inherit; padding: 0.45rem; border: 1px solid var(--line); background: white; cursor: pointer; }

.dpi-meter { padding: 0.8rem; border: 1px solid var(--line); background: white; }
.dpi-meter .band { font-weight: 600; }
.dpi-meter .band.green { color: var(--green); }
.dpi-meter .band.amber { color: var(--amber); }
.dpi-meter .band.red { color: var(--red); }
.dpi-meter .hint { color: var(--muted); margin: 0.3rem 0 0; }

.price-line { font-family: var(--serif); font-size: 1.3rem; margin: 0.6rem 0; }

/* cart + misc */
table.cart { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.9rem; }
table.cart td { padding: 0.8rem 0.5rem; border-bottom: 1px solid var(--line); }
.notice { background: #fff; border: 1px solid var(--line); padding: 1rem 1.2rem; font-family: var(--sans); font-size: 0.9rem; }

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
footer.site form { margin: 1rem auto; max-width: 420px; display: flex; gap: 0.5rem; }
footer.site input[type='email'] {
  flex: 1;
  font: inherit;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
}
