:root {
  --bg: #0d0b09;
  --bg-panel: #16130f;
  --border: #2a241c;
  --text: #ece6da;
  --text-dim: #a89f8f;
  --accent: #c98a3a;
  --accent-hover: #e0a34f;
  --danger: #b5453a;
  --success: #4d8b5c;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ─── Header / footer ────────────────────────────────────────────── */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 30;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.brand { display: flex; align-items: center; -webkit-tap-highlight-color: transparent; }
.brand img { height: 44px; width: 44px; border-radius: 8px; display: block; }
.site-header nav a { margin-left: 24px; color: var(--text-dim); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.site-header nav a:hover { color: var(--text); }

.page-home .site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: transparent;
  border-bottom-color: transparent;
}
.page-home .site-header:not(.scrolled) nav a,
.page-home .site-header:not(.scrolled) .brand {
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.page-home .site-header:not(.scrolled) .brand img {
  filter: drop-shadow(0 1px 5px rgba(0,0,0,0.55));
}
.page-home .site-header.scrolled {
  background: rgba(13,11,9,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}

.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 24px 32px; }
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.footer-copyright { color: var(--text-dim); font-size: 13px; justify-self: start; }
.social-links-footer { justify-self: center; }
.social-links-footer { display: flex; gap: 10px; margin-top: 4px; }
.social-links-footer a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-dim);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.social-links-footer a:hover { color: var(--bg); border-color: var(--accent); background: var(--accent); }
.social-links-footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.footer-credit { font-size: 13px; color: var(--text-dim); justify-self: end; }

@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; }
  .footer-copyright, .footer-credit { justify-self: center; }
}

main { max-width: 1080px; margin: 0 auto; padding: 0 32px 64px; flex: 1 0 auto; width: 100%; }

/* ─── Flash messages ─────────────────────────────────────────────── */

.flash-stack { max-width: 1080px; margin: 16px auto 0; padding: 0 32px; }
.flash { padding: 10px 16px; border-radius: 6px; margin-bottom: 8px; font-size: 14px; }
.flash-success { background: rgba(77,139,92,0.15); color: var(--success); border: 1px solid var(--success); }
.flash-error { background: rgba(181,69,58,0.15); color: var(--danger); border: 1px solid var(--danger); }

/* ─── Hero ────────────────────────────────────────────────────────── */

.hero-full {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  background: var(--bg);
}
.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px clamp(32px, 5vw, 88px) 96px;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.hero-kicker::before { content: ''; width: 26px; height: 1px; background: var(--accent); flex: none; }
.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(32px, 3.6vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  max-width: 14ch;
}
.hero-copy h1 em { font-style: italic; color: var(--accent); }
.hero-copy p { color: var(--text-dim); font-size: 16px; max-width: 42ch; margin: 0; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 28px; }

.hero-scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}
.hero-scroll-cue svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-scroll-cue svg { animation: hero-bob 1.8s ease-in-out infinite; }
}
@keyframes hero-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.hero-media {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: #0b0906;
  border-left: 1px solid var(--border);
}
.hero-viewer, .hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,9,6,0) 62%, rgba(11,9,6,0.5) 100%);
  pointer-events: none;
}

.hero-loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; text-align: center; color: var(--text-dim); font-size: 12px; transition: opacity 0.4s ease; }
.hero-loader.hidden { opacity: 0; pointer-events: none; }
#loader-ring { width: 28px; height: 28px; margin: 0 auto 8px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-hint { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 12px; color: var(--text-dim); letter-spacing: 0.06em; transition: opacity 1s ease; }
.hero-hint.hidden { opacity: 0; }

@media (max-width: 900px) {
  .hero-full { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 152px 20px 48px; order: 1; }
  .hero-copy h1 { max-width: none; }
  .hero-copy p { max-width: none; }
  .hero-scroll-cue { display: none; }
  .hero-media { order: 2; height: 60vh; border-left: none; border-top: 1px solid var(--border); }
}

.btn { display: inline-block; padding: 10px 20px; background: var(--accent); color: #14110c; font-weight: 600; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; }
.btn:hover { background: var(--accent-hover); color: #14110c; }
.btn-ghost { display: inline-block; padding: 10px 20px; background: transparent; color: var(--text-dim); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-ghost.small, .btn-danger.small { padding: 4px 10px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; border: none; border-radius: 6px; cursor: pointer; padding: 10px 20px; font-size: 14px; }

.btn:focus-visible, .btn-ghost:focus-visible, .site-header nav a:focus-visible, .hero-copy a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ─── About / services ───────────────────────────────────────────── */

.about, .services, .recent { margin-bottom: 56px; }
.about { margin-top: 64px; }
.about h2, .services h2, .recent h2, .page-head h1, .piece-info h1 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 26px;
  margin-bottom: 16px;
}
.about p { color: var(--text-dim); max-width: 640px; }

.services-grid { display: flex; flex-direction: column; gap: 16px; }
.service-card { display: flex; flex-direction: row; align-items: center; text-align: left; gap: 24px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; padding: 24px 28px; transition: border-color 0.2s ease; }
.service-card:hover { border-color: var(--accent); }
.service-medallion {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}
.service-card:hover .service-medallion { border-color: var(--accent); }
.service-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.service-card p { margin: 0; color: var(--text-dim); font-size: 13px; max-width: 640px; }

@media (max-width: 560px) {
  .service-card { flex-direction: column; text-align: center; padding: 24px 20px; }
}

/* ─── Service detail / pricing ───────────────────────────────────── */

.tier-block { margin-top: 40px; }
.tier-block:first-of-type { margin-top: 24px; }
.tier-heading { font-size: 20px; margin: 0 0 6px; color: var(--accent); }
.tier-note { color: var(--text-dim); font-size: 13px; margin: 0 0 12px; max-width: 560px; }
.pricing-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: 8px; }
.pricing-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--bg-panel); padding: 16px 20px; }
.pricing-row-main h3 { margin: 0 0 4px; font-size: 15px; }
.pricing-row-main p { margin: 0; color: var(--text-dim); font-size: 13px; max-width: 480px; }
.pricing-row-price { color: var(--accent); font-weight: 600; font-size: 14px; white-space: nowrap; }
.service-note { color: var(--text-dim); font-size: 13px; margin-top: 16px; max-width: 560px; }

@media (max-width: 560px) {
  .pricing-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ─── Piece grid ──────────────────────────────────────────────────── */

.piece-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.piece-card { display: block; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.piece-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.piece-card-label { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 13px; color: var(--text); }
.tag-3d { background: var(--accent); color: #14110c; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
.tag-category { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 8px; }

.empty-state { color: var(--text-dim); }

/* ─── Gallery filter ──────────────────────────────────────────────── */

.category-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.category-description { color: var(--text-dim); font-size: 14px; margin: 0 0 24px; }
.category-filter a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 13px; color: var(--text-dim); }
.category-filter a.active, .category-filter a:hover { color: var(--text); border-color: var(--accent); }

/* ─── Contact ─────────────────────────────────────────────────────── */

.contact-box { max-width: 480px; }
.contact-box p { color: var(--text-dim); font-size: 15px; }
.contact-example { font-style: italic; color: var(--text); font-size: 16px; }
.contact-socials.social-links-footer { justify-self: unset; margin-top: 20px; }

/* ─── Awards ──────────────────────────────────────────────────────── */

.award-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 32px; }
.award-tag { padding: 7px 16px; border: 1px solid var(--accent); border-radius: 20px; color: var(--accent); font-size: 13px; font-weight: 600; }
.award-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.award-photo { margin: 0; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.award-photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.award-photo figcaption { padding: 12px 14px; font-size: 13px; color: var(--text-dim); }

/* ─── Piece detail ────────────────────────────────────────────────── */

.crumb { display: inline-block; margin: 24px 0; font-size: 13px; color: var(--text-dim); }
.piece-detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.piece-media { position: relative; background: #0b0906; border-radius: 10px; overflow: hidden; min-height: 420px; }
.piece-viewer { position: absolute; inset: 0; width: 100%; height: 100%; }
.piece-photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.piece-info h1 { font-size: 26px; margin: 0 0 12px; }
.piece-info p { color: var(--text-dim); }
.panel-btn { position: absolute; z-index: 4; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: rgba(13,11,9,0.7); color: var(--text); cursor: pointer; font-size: 16px; }
#zoom-in { bottom: 16px; right: 56px; }
#zoom-out { bottom: 16px; right: 16px; }

@media (max-width: 720px) {
  .piece-detail { grid-template-columns: 1fr; }
  .piece-media { min-height: 320px; }
}

/* ─── Admin ───────────────────────────────────────────────────────── */

.admin-login { max-width: 320px; margin: 64px auto; text-align: center; }
.admin-login form { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.admin-login input { padding: 10px 12px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }

.admin-bar { display: flex; justify-content: space-between; align-items: center; margin: 32px 0 24px; }
.admin-bar div { display: flex; gap: 8px; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; vertical-align: middle; }
.admin-table form { margin: 0; }
.admin-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; display: block; }

.piece-form { display: flex; flex-direction: column; gap: 6px; max-width: 480px; }
.piece-form label { font-size: 13px; color: var(--text-dim); margin-top: 12px; }
.piece-form input[type="text"], .piece-form select, .piece-form textarea, .piece-form input[type="file"] {
  padding: 9px 10px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 14px;
}
.piece-form fieldset { border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; margin-top: 12px; }
.piece-form .radio, .piece-form .checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); margin-right: 16px; }
.piece-form button { margin-top: 20px; align-self: flex-start; }
.field-hint { margin: 6px 0 0; font-size: 12px; color: var(--text-dim); }

.current-media { display: flex; align-items: center; gap: 12px; margin: 20px 0; padding: 12px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; }
.current-media img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; }
.current-media span { font-size: 13px; color: var(--text-dim); }

.admin-actions { display: flex; gap: 8px; align-items: center; }
