*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0; }.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.eyebrow { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-muted); }
.title-art { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight); }
.muted { color: var(--ink-muted); }
.soft { color: var(--ink-soft); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.logo { font-family: var(--font-display); font-size: 26px; text-decoration: none; letter-spacing: 0.01em; white-space: nowrap; }
.logo .amp { font-style: italic; color: var(--accent); }
.logo { display: inline-flex; align-items: center; }
.logo-mark { width: 64px; height: auto; display: block; }
.logo-mark-lg { width: 120px; }.nav { display: flex; gap: 28px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.nav a { text-decoration: none; color: var(--ink-soft); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 12px; padding-bottom: 8px; }
  .logo { font-size: 22px; }
  .logo-mark { width: 52px; }
  .nav { gap: 14px; font-size: 12px; letter-spacing: 0.08em; }
}

/* Motif band — the Madhubani-style divider */
.motif { display: block; width: 100%; height: 2px; margin: 0; background: var(--gold-line); }
.motif-section { margin: 56px 0; }
/* The gold line above the footer sits clear of the last section (e.g. the commissions card) */
body > .motif { margin-top: 72px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: var(--radius); font: 500 15px/1 var(--font-body); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(0.92); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--accent-tint); }
.btn-link { color: var(--accent-text); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.btn svg { width: 18px; height: 18px; }

/* Artwork image: mounted like a print. In wire mode the photo is replaced by a crossed placeholder box. */
.art { position: relative; background: var(--mat); padding: 10px; border: 1px solid var(--line); }
.art .img { position: relative; background: var(--placeholder); aspect-ratio: 4 / 5; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art.contain img { object-fit: contain; background: var(--placeholder); }/* Badges */
.badge { display: inline-block; font-size: 12px; line-height: 1; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.badge-available { background: var(--badge-available-bg); color: var(--badge-available-ink); }
.badge-sold { background: var(--badge-sold-bg); color: var(--badge-sold-ink); }
.badge-made-to-order { background: var(--badge-order-bg); color: var(--badge-order-ink); }
.badge-draft { background: transparent; color: var(--ink-muted); border: 1px dashed var(--ink-muted); }

/* Artwork card grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px 28px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr 1fr; gap: 28px 14px; } .card .meta-row { flex-direction: column; align-items: flex-start; gap: 6px; } }
.card { text-decoration: none; display: block; }
.card .art { transition: transform 0.2s ease; }
.card:hover .art { transform: translateY(-3px); }
.card h3 { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight); font-size: 19px; margin-top: 14px; }
.card .meta { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.card .meta-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
@media (max-width: 640px) { .card .meta-row { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* Section headings */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }

/* Footer */
.site-footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--line); }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 40px; font-size: 14px; }
.site-footer a { text-decoration: none; color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent-text); }
.site-footer ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; color: var(--ink-muted); font-size: 12px; }
@media (max-width: 640px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 13px; letter-spacing: 0.04em; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font: 16px var(--font-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; width: 100%;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field textarea { min-height: 140px; resize: vertical; }

/* ---------- Magic: sparkles & gentle motion (styled mode only) ---------- */
.spark-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.spark { position: absolute; width: var(--s, 14px); height: var(--s, 14px); margin: calc(var(--s, 14px) / -2) 0 0 calc(var(--s, 14px) / -2);
  background: var(--c, var(--spark-1));
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: spark-fall var(--d, 900ms) ease-out forwards; }
@keyframes spark-fall {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.2) rotate(0deg); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, 24px)) scale(1) rotate(120deg); }
}

/* Ambient twinkles drifting behind the hero */
.twinkle-field { position: relative; }
.twinkle { position: absolute; width: var(--s, 12px); height: var(--s, 12px); background: var(--c, var(--spark-1)); opacity: 0; pointer-events: none;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* Paintings: calm hover only (soft lift and shadow, no glint or sparkle) */
:root[data-mode="styled"] .card .art, :root[data-mode="styled"] .col-card .art { transition: transform 0.25s ease, box-shadow 0.25s ease; }
:root[data-mode="styled"] .card:hover .art,
:root[data-mode="styled"] .col-card:hover .art { box-shadow: 0 12px 24px -16px rgba(31, 26, 23, 0.28); }

/* Primary button shimmer */
:root[data-mode="styled"] .btn-primary { position: relative; overflow: hidden; }
:root[data-mode="styled"] .btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); animation: btn-shine 4.5s ease-in-out 1.5s infinite;
}
@keyframes btn-shine { 0%, 70% { left: -60%; } 100% { left: 140%; } }

/* Soft reveal as sections scroll into view */
.js-magic[data-mode="styled"] .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: var(--rd, 0ms); }
.js-magic[data-mode="styled"] .reveal.in { opacity: 1; transform: none; }

/* Logo sways a little when touched */
:root[data-mode="styled"] .logo:hover .logo-mark { animation: logo-wiggle 0.7s ease; }
@keyframes logo-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg) scale(1.04); } 60% { transform: rotate(4deg) scale(1.04); } }@media (prefers-reduced-motion: reduce) {
  .spark-layer, .twinkle { display: none; }
  .btn-primary::after { display: none; }
  .logo:hover .logo-mark { animation: none !important; }
  .js-magic .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (max-width: 640px) {
  }

/* Enquiry fallbacks under the order button */
.alt-enquiry { margin: 4px 0 0; font-size: 13px; color: var(--ink-muted); }
.alt-enquiry a, .alt-enquiry .copy-email { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.alt-enquiry .copy-email { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
@media (max-width: 640px) { .alt-enquiry { font-size: 12px; } }

.site-footer .fine a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
