:root {
  --bg: #f7f4ef;
  --bg-2: #efeae1;
  --ink: #201d18;
  --muted: #6f6a60;
  --line: #e2dbce;
  --accent: #a8622e;        /* warm Karoo terracotta */
  --accent-ink: #8a4f24;
  --card: #ffffff;
  --sold: #b23c2e;
  --maxw: 1240px;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 18px 40px -18px rgba(30, 25, 18, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --bg-2: #1b1814;
    --ink: #efe9de;
    --muted: #a49d8f;
    --line: #2c2822;
    --accent: #d08a4e;
    --accent-ink: #e0a066;
    --card: #1d1a16;
    --shadow: 0 20px 45px -18px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Sticky header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand span { color: var(--accent); }
.topnav { display: flex; gap: 26px; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; }
.topnav a { color: var(--muted); text-decoration: none; transition: color .2s; }
.topnav a:hover { color: var(--ink); }
@media (max-width: 640px) { .topnav { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero .bg {
  position: absolute; inset: 0;
  background-size: cover;
  /* Mobile-first: a PORTRAIT painting fills a tall phone hero without heavy cropping */
  background-image: url('images/tusker-portrait.jpg');
  background-position: center;
  transform: scale(1.03);
}
/* Desktop / wide screens: use the wide panoramic painting */
@media (min-width: 700px) {
  .hero .bg {
    background-image: url('images/wild-dogs-dusk.jpg');
    background-position: center 38%;
  }
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,8,6,.28) 0%, rgba(10,8,6,.12) 40%, rgba(10,8,6,.82) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-bottom: 58px; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.72rem;
  margin: 0 0 14px; color: rgba(255,255,255,.85);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.02;
  margin: 0 0 16px;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
}
.hero p.lead {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  max-width: 34ch; margin: 0 0 28px; color: rgba(255,255,255,.92);
}
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; text-align: center;
  padding: 13px 26px;
  border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
  text-decoration: none; cursor: pointer;
  font-size: 0.9rem; letter-spacing: 0.06em;
  border-radius: 2px; transition: transform .15s, background .2s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.light { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.6); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.block { width: 100%; }
.btn.disabled { opacity: .4; pointer-events: none; }

/* ---------- Section furniture ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 8px;
}
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Filters ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 40px;
}
.chip {
  border: 1px solid var(--line); background: var(--bg-2);
  color: var(--muted); padding: 8px 18px; border-radius: 999px;
  font-size: 0.82rem; letter-spacing: 0.04em; cursor: pointer;
  transition: all .18s;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .n { opacity: .6; font-size: 0.72rem; margin-left: 4px; }

/* ---------- Masonry gallery ---------- */
.gallery { columns: 3 320px; column-gap: 26px; }
.piece {
  break-inside: avoid; margin: 0 0 26px; cursor: pointer;
  position: relative; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .25s ease;
}
.piece:hover { transform: translateY(-4px); }
.piece img { width: 100%; height: auto; }
.piece .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 16px 14px; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(10,8,6,.82));
  opacity: 0; transform: translateY(8px); transition: all .25s ease;
}
.piece:hover .cap { opacity: 1; transform: none; }
.piece .cap .t { font-family: var(--serif); font-size: 1.25rem; line-height: 1.15; }
.piece .cap .d { font-size: 0.82rem; opacity: .85; }
.ribbon {
  position: absolute; top: 14px; left: -32px; transform: rotate(-45deg);
  background: var(--sold); color: #fff; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 42px;
  font-weight: 600; z-index: 2;
}
.piece.hidden { display: none; }

/* ---------- About ---------- */
.about { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about .wrap {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 54px; align-items: center;
}
.portrait-frame {
  position: relative; padding: 14px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: rotate(-1.4deg);
}
.portrait-frame::after {
  content: ""; position: absolute; inset: 14px; border: 1px solid var(--line); pointer-events: none;
}
.portrait-frame img { width: 100%; height: auto; display: block; }
.about h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 6px; }
.about .kicker { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; color: var(--accent); margin: 0 0 14px; }
.about p.bio { font-size: 1.08rem; color: var(--ink); }
.about .sign { font-family: var(--serif); font-size: 1.6rem; margin-top: 10px; color: var(--muted); }
@media (max-width: 780px) {
  .about .wrap { grid-template-columns: 1fr; gap: 30px; }
  .portrait-frame { max-width: 340px; margin: 0 auto; transform: none; }
}

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact .prose { max-width: 620px; margin: 0 auto; }
.contact p { font-size: 1.12rem; }
.contact a.mail { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- Footer ---------- */
footer.site { padding: 40px 0 56px; text-align: center; color: var(--muted); font-size: 0.84rem; border-top: 1px solid var(--line); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(12,10,8,.9); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox .box {
  background: var(--bg); max-width: 1080px; width: 100%; max-height: 92vh; overflow: auto;
  display: grid; grid-template-columns: 1.5fr 1fr; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.lightbox .imgwrap { background: #0d0b09; display: flex; align-items: center; justify-content: center; }
.lightbox .imgwrap img { width: 100%; height: 100%; max-height: 92vh; object-fit: contain; }
.lightbox .info { padding: 40px 38px; }
.lightbox .info .cat { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.7rem; color: var(--accent); }
.lightbox .info h3 { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; margin: 8px 0 4px; }
.lightbox .info .sub { color: var(--muted); margin-bottom: 18px; }
.lightbox .info .desc { color: var(--ink); margin-bottom: 22px; }
.lightbox .info .price { font-size: 1.35rem; margin-bottom: 18px; }
.lightbox .info .price.sold { color: var(--sold); }

.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35);
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-prev { left: 18px; } .lb-next { right: 18px; }
.lb-close {
  position: absolute; top: 20px; right: 24px; color: #fff; font-size: 2.2rem;
  background: none; border: none; cursor: pointer; line-height: 1;
}
@media (max-width: 760px) {
  .lightbox .box { grid-template-columns: 1fr; }
  .lightbox .imgwrap img { max-height: 46vh; }
  .lb-btn { width: 42px; height: 42px; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
