:root {
  --bg: #0e0c0a;
  --bg2: #161311;
  --panel: #1b1815;
  --ink: #f3ead9;
  --ink-dim: #c9bdaa;
  --gold: #c9a15a;
  --gold-soft: #8d7648;
  --line: #332d26;
  --available: #7fae7a;
  --sold: #b06a5a;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

:root[data-theme="light"] {
  --bg: #f5efe3;
  --bg2: #ede4d2;
  --panel: #fffdf8;
  --ink: #241f18;
  --ink-dim: #5c5140;
  --gold: #96723a;
  --gold-soft: #7a5c2c;
  --line: #ddd0b6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}
::selection { background: var(--gold); color: #1b1815; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 6vw; }

/* ---------- NAV ---------- */
header.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 5vw;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--serif); font-size: 20px; letter-spacing: .06em; line-height: 1.05; text-decoration: none; }
.brand b { font-weight: 600; display: block; }
.brand span { font-size: 10px; letter-spacing: .35em; color: var(--gold); text-transform: uppercase; margin-top: 3px; display: block; }
nav.links { display: flex; align-items: center; gap: 26px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
nav.links a { text-decoration: none; color: var(--ink-dim); transition: color .25s; }
nav.links a:hover { color: var(--gold); }
.theme-toggle, .menu-toggle {
  background: none; border: 1px solid var(--line); color: var(--ink);
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.menu-toggle { display: none; }
@media (max-width: 780px) {
  nav.links.desktop { display: none; }
  .menu-toggle { display: flex; }
}
.mobile-menu {
  display: none; flex-direction: column; gap: 0; background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 16px 6vw; text-decoration: none; color: var(--ink-dim);
  border-top: 1px solid var(--line); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 110px 6vw 70px; overflow: hidden;
  background: radial-gradient(circle at 50% 20%, var(--bg2), var(--bg) 70%);
}
#hero3d { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#hero3d canvas { display: block; width: 100% !important; height: 100% !important; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0%, transparent 35%, var(--bg) 82%);
}
.hero-content { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--gold); letter-spacing: .35em; font-size: 11px; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-family: var(--serif); font-size: clamp(36px, 6vw, 64px); font-weight: 600; margin: 0 0 18px; letter-spacing: .01em; text-shadow: 0 2px 30px rgba(0,0,0,.5); }
.hero p { color: var(--ink-dim); max-width: 560px; margin: 0 auto 34px; font-size: 16px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.scroll-cue { margin: 56px auto 0; width: 22px; height: 36px; border: 1px solid var(--gold-soft); border-radius: 12px; position: relative; }
.scroll-cue span {
  position: absolute; top: 6px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: var(--gold); border-radius: 2px; animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(10px); opacity: 0; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
  border-radius: 2px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--gold); transition: all .25s;
}
.btn-primary { background: var(--gold); color: #1b1815; }
.btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn-ghost { color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #0b1a0f; }
.btn-whatsapp:hover { background: #1fb959; border-color: #1fb959; }

/* ---------- SECTION HEADINGS ---------- */
.section { padding: 90px 6vw; border-top: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .eyebrow { color: var(--gold); letter-spacing: .35em; font-size: 11px; text-transform: uppercase; margin-bottom: 14px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); font-weight: 600; margin: 0 0 12px; }
.section-head p { color: var(--ink-dim); line-height: 1.7; }

/* ---------- GALLERY ---------- */
.tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 44px; flex-wrap: wrap; }
.tab-btn {
  background: none; border: 1px solid var(--line); color: var(--ink-dim);
  padding: 10px 26px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; border-radius: 2px;
  transition: all .25s;
}
.tab-btn.active, .tab-btn:hover { border-color: var(--gold); color: var(--gold); }
.tab-count { opacity: .7; font-size: 11px; margin-left: 6px; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px;
}
.art-card {
  background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  transition: transform .3s ease, border-color .3s ease; cursor: pointer;
}
.art-card:hover { transform: translateY(-4px); border-color: var(--gold-soft); }
.art-card figure { margin: 0; aspect-ratio: 4/5; overflow: hidden; background: var(--bg2); position: relative; }
.art-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.art-card:hover img { transform: scale(1.06); }
.view-hint {
  position: absolute; inset: auto 0 0 0; padding: 10px 0; text-align: center;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  opacity: 0; transform: translateY(6px); transition: all .25s ease;
}
.art-card:hover .view-hint { opacity: 1; transform: translateY(0); }
.badge {
  position: absolute; top: 12px; left: 12px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 2px; background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(4px);
}
.badge.available { color: var(--gold); border: 1px solid var(--gold-soft); }
.badge.sold { color: var(--sold); border: 1px solid var(--sold); }
.art-card figcaption { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.art-card .title { font-family: var(--serif); font-size: 15px; }
.art-card .enquire { font-size: 11px; color: var(--gold); text-decoration: none; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.art-card .enquire:hover { text-decoration: underline; }
button.enquire.price-btn {
  background: none; border: none; padding: 0; font-family: inherit; cursor: pointer;
}
button.enquire.price-btn.revealed { color: var(--ink); font-weight: 600; }
#apPriceBtn.revealed { background: none; border: 1px solid var(--gold); color: var(--gold); }

/* ---------- ABOUT ---------- */
.about-wrap { max-width: 760px; margin: 0 auto; text-align: center; }
.about-wrap p { color: var(--ink-dim); line-height: 1.9; font-size: 16px; margin-bottom: 20px; }
.about-wrap p:first-of-type { color: var(--ink); font-size: 19px; font-family: var(--serif); }
.about-signoff { margin-top: 36px; font-family: var(--serif); font-style: italic; color: var(--gold); }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; max-width: 980px; margin: 0 auto; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.contact-info h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 16px; }
.contact-info p { color: var(--ink-dim); line-height: 1.8; margin-bottom: 28px; }
.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-size: 14px; padding: 12px 16px; border: 1px solid var(--line); transition: border-color .25s; }
.contact-link:hover { border-color: var(--gold); color: var(--gold); }

.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 8px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 12px 14px; font-family: inherit; font-size: 14px; border-radius: 2px;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--gold); }
.form-field textarea { min-height: 110px; resize: vertical; }
#form-status { margin-top: 14px; font-size: 13px; min-height: 18px; }
#form-status.ok { color: var(--available); }
#form-status.err { color: var(--sold); }

/* ---------- FOOTER ---------- */
footer { padding: 40px 6vw; text-align: center; border-top: 1px solid var(--line); color: var(--ink-dim); font-size: 12px; }
footer a { color: var(--gold); text-decoration: none; }

/* ---------- FLOATING WHATSAPP ---------- */
.fab-whatsapp {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #0b1a0f;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); font-size: 26px;
}

/* ---------- ARTWORK PAGE (full-screen) ---------- */
.artwork-page {
  position: fixed; inset: 0; z-index: 500; background: var(--bg); color: var(--ink);
  overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(16px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.artwork-page.open {
  visibility: visible; opacity: 1; transform: translateY(0);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear 0s;
}
.ap-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 20px 5vw; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.ap-back {
  background: none; border: 1px solid var(--line); color: var(--ink); padding: 10px 18px;
  border-radius: 2px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px;
}
.ap-back:hover { border-color: var(--gold); color: var(--gold); }
.ap-close { background: none; border: none; color: var(--ink); font-size: 30px; line-height: 1; }
.ap-close:hover { color: var(--gold); }
.ap-content {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center;
  max-width: 1180px; margin: 0 auto; padding: 60px 6vw 100px; perspective: 1200px;
}
@media (max-width: 860px) { .ap-content { grid-template-columns: 1fr; padding: 40px 6vw 80px; gap: 32px; } }
.ap-image-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  max-height: 78vh; background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  transition: transform .15s ease-out; transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.ap-image-wrap img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 78vh; object-fit: contain;
  transition: transform .3s ease; cursor: zoom-in;
}
.ap-image-wrap.zoomed img { cursor: zoom-out; }
@media (max-width: 860px) {
  .ap-image-wrap, .ap-image-wrap img { max-height: 50vh; }
}
.ap-zoom-controls { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.ap-zoom-controls button {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--ink); font-size: 18px; line-height: 1; backdrop-filter: blur(4px);
}
.ap-zoom-controls button:hover { border-color: var(--gold); color: var(--gold); }
.ap-info .badge { position: static; display: inline-block; margin-bottom: 16px; }
.ap-info h2 { font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); margin: 0 0 10px; }
.ap-meta { color: var(--ink-dim); margin-bottom: 28px; }
.ap-info .btn { margin: 0 10px 12px 0; }
