:root {
  --bg: #0b0d13;
  --bg-2: #10131b;
  --surface: #151925;
  --line: rgba(232, 222, 200, 0.12);
  --text: #ece6d8;
  --muted: #a39b8a;
  --gold: #c9a45c;
  --gold-soft: rgba(201, 164, 92, 0.16);
  --gold-dim: #8c7340;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--gold-dim); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #111; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0.01em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.eyebrow { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

/* prototype banner */
.proto { background: #1a1408; border-bottom: 1px solid rgba(201, 164, 92, 0.35); color: #e3cf9f; font-size: 0.82rem; text-align: center; padding: 8px var(--gutter); }

/* header */
.site-header { position: sticky; top: 0; z-index: 30; background: linear-gradient(to bottom, rgba(11,13,19,0.92), rgba(11,13,19,0.72)); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 20px; }
.brand { font-family: var(--serif); font-size: 1.2rem; letter-spacing: 0.08em; text-decoration: none; }
.brand b { color: var(--gold); font-weight: 500; }
nav ul { display: flex; gap: clamp(14px, 3vw, 34px); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav a { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }

/* hero */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(11,13,19,0.96) 4%, rgba(11,13,19,0.55) 38%, rgba(11,13,19,0.05) 70%), linear-gradient(to right, rgba(11,13,19,0.55), transparent 55%); }
.hero-inner { padding: 0 var(--gutter) clamp(40px, 8vh, 96px); max-width: var(--max); margin: 0 auto; width: 100%; }
.hero h1 { max-width: 14ch; text-shadow: 0 2px 30px rgba(0,0,0,0.6); }
.hero p.lead { max-width: 52ch; font-size: clamp(1rem, 1.7vw, 1.2rem); color: #d9d1bf; }
.btn { display: inline-block; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; padding: 14px 26px; border: 1px solid var(--gold); color: var(--gold); background: transparent; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease); font-family: var(--sans); }
.btn:hover { background: var(--gold); color: #12100a; }
.btn.solid { background: var(--gold); color: #12100a; }
.btn.solid:hover { background: #dcb972; }
.btn.ghost { border-color: var(--line); color: var(--text); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

section.block { padding: clamp(56px, 9vw, 112px) 0; }
section.block.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: clamp(28px, 5vw, 56px); }

/* featured pieces on home */
.feature { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; margin-bottom: clamp(48px, 8vw, 104px); }
.feature:nth-child(even) { grid-template-columns: 1fr 1.35fr; }
.feature:nth-child(even) .feature-img { order: 2; }
.feature-img { display: block; position: relative; overflow: hidden; background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,0.55); }
.feature-img picture { display: block; }
.feature-img img { width: 100%; height: auto; transition: transform 1.2s var(--ease); }
.feature-img:hover img { transform: scale(1.025); }
.feature-img.tall { max-width: 460px; margin-inline: auto; }

/* gallery grid */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; align-items: center; }
.chip { font: inherit; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 16px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; border-radius: 999px; }
.chip[aria-pressed="true"] { color: #12100a; background: var(--gold); border-color: var(--gold); }
.chip:hover { border-color: var(--gold-dim); color: var(--text); }
.filters .label { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.card { position: relative; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); transition: transform .5s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-4px); border-color: var(--gold-dim); }
.card[hidden] { display: none; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0a0c11; }
.card-media picture { display: block; width: 100%; height: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-hover { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px; background: linear-gradient(to top, rgba(8,9,14,0.94), rgba(8,9,14,0.0) 70%); opacity: 0; transition: opacity .35s var(--ease); font-size: 0.9rem; color: #e3dccb; }
.card:hover .card-hover, .card:focus-within .card-hover { opacity: 1; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.2rem; }
.card-body .meta { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.card-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 12px; }
.card-actions .btn { padding: 10px 16px; font-size: 0.7rem; }
.empty { color: var(--muted); padding: 24px 0; }

/* artwork page */
.art-hero { padding: clamp(24px, 4vw, 48px) 0 0; }
.stage { position: relative; background: #07080c; border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0,0,0,0.6); }
.stage button.open { all: unset; cursor: zoom-in; display: block; width: 100%; }
.stage img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; margin: 0 auto; background: #07080c; }
.stage .zoom-hint { position: absolute; right: 14px; bottom: 14px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; background: rgba(8,9,14,0.75); padding: 8px 12px; border: 1px solid var(--line); pointer-events: none; }
.variant-switch { display: inline-flex; gap: 8px; margin: 16px 0 0; }
.art-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 5vw, 72px); padding: clamp(32px, 5vw, 64px) 0; }
.scripture { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.scripture li { border-left: 2px solid var(--gold-dim); padding-left: 16px; }
.scripture b { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; color: var(--gold); display: block; }
.note-box { border: 1px solid var(--line); background: var(--surface); padding: 16px 18px; font-size: 0.92rem; color: #d3cbb9; }
.note-box.warn { border-color: rgba(201, 164, 92, 0.45); background: #19150b; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }
.num { font-variant-numeric: tabular-nums; }
.ok { color: #9ec79a; } .low { color: #e7b36a; } .bad { color: #e08a7a; }

/* license cards */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.tier { position: relative; border: 1px solid var(--line); background: var(--surface); padding: 22px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.tier:has(input:checked) { border-color: var(--gold); background: #1b1810; box-shadow: 0 0 0 1px var(--gold) inset; }
.tier:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
.tier.disabled { opacity: 0.5; cursor: not-allowed; }
.tier .price { font-family: var(--serif); font-size: 2rem; color: var(--gold); }
.tier .price small { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-family: var(--sans); margin-left: 6px; }
.tier ul { margin: 0; padding-left: 18px; color: #cfc7b5; font-size: 0.88rem; }
.rights { font-size: 0.82rem; color: #bdb5a3; display: grid; gap: 4px; margin-top: 6px; }
.rights span b { color: var(--text); font-weight: 500; }

/* mockups */
.mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 20px; }
.mock { margin: 0; background: var(--surface); border: 1px solid var(--line); }
.mock img { width: 100%; height: auto; }
.mock figcaption { padding: 12px 16px 16px; font-size: 0.84rem; color: var(--muted); }
.badge { display: inline-block; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; border: 1px solid var(--gold-dim); color: var(--gold); padding: 2px 8px; margin-right: 8px; }
.formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.fmt { background: var(--surface); border: 1px solid var(--line); padding: 10px; font-size: 0.8rem; color: var(--muted); }
.fmt img { width: 100%; height: 150px; object-fit: contain; background: #07080c; margin-bottom: 8px; }
.fmt b { color: var(--text); font-weight: 500; }

/* steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; border-top: 1px solid var(--gold-dim); padding-top: 16px; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--serif); font-size: 2rem; color: var(--gold); display: block; margin-bottom: 4px; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.callout { border-left: 3px solid var(--gold); background: var(--surface); padding: 16px 20px; margin: 20px 0; }

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 0.86rem; background: var(--bg-2); }
footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }

/* viewer + modal */
.viewer { position: fixed; inset: 0; z-index: 80; background: rgba(4,5,8,0.97); display: none; flex-direction: column; }
.viewer.on { display: flex; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); gap: 12px; color: var(--muted); font-size: 0.82rem; }
.viewer-bar .t { color: var(--text); font-family: var(--serif); font-size: 1.05rem; }
.viewer-stage { position: relative; flex: 1; overflow: auto; display: grid; place-items: center; padding: 0 12px 20px; }
.viewer-stage img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; cursor: zoom-in; }
.viewer-stage.zoomed { place-items: start; }
.viewer-stage.zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.vbtn { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 8px 14px; cursor: pointer; font: inherit; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.vbtn:hover { border-color: var(--gold); color: var(--gold); }

.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(4,5,8,0.82); display: none; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.modal-back.on { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--gold-dim); max-width: 640px; width: 100%; padding: clamp(20px, 4vw, 36px); max-height: 94vh; overflow: auto; }
.modal h2 { font-size: 1.6rem; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input[type=text], .field input[type=email] { background: #0d1017; border: 1px solid var(--line); color: var(--text); padding: 12px; font: inherit; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; margin-bottom: 14px; }
.testbadge { background: #2a1f08; border: 1px solid #8c7340; color: #f0d79b; padding: 8px 12px; font-size: 0.8rem; margin-bottom: 16px; }
pre.payload { background: #0a0c11; border: 1px solid var(--line); padding: 14px; overflow: auto; font-size: 0.74rem; color: #c9d2e0; max-height: 240px; }
.sim-steps { margin: 0 0 16px; padding-left: 1.2em; font-size: 0.9rem; }
.sim-steps li { margin-bottom: 6px; }

@media (max-width: 860px) {
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-img { order: 0; }
  .art-head { grid-template-columns: 1fr; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; padding-block: 10px; gap: 4px; }
  nav ul { gap: 14px; }
  .hero { min-height: 82vh; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* anchors clear the sticky header */
section[id], [id="license"], [id="mockups"], [id="formats"] { scroll-margin-top: 84px; }
@media (max-width: 700px) {
  .proto { font-size: 0.7rem; padding: 6px 12px; line-height: 1.35; }
  .site-header { position: static; }
  .site-header .wrap { padding-block: 8px; gap: 2px; }
  .brand { font-size: 1rem; }
  nav ul { gap: 16px; flex-wrap: nowrap; }
  nav a { font-size: 0.68rem; letter-spacing: 0.1em; }
  .stage .zoom-hint { font-size: 0.6rem; padding: 4px 8px; right: 8px; bottom: 8px; letter-spacing: 0.1em; }
  .btn { padding: 12px 18px; }
  th, td { padding: 8px 6px; }
}

/* ---------- store: cart, checkout, downloads ---------- */
.store-main { min-height: 60vh; padding: clamp(36px, 7vh, 80px) 0; }
.wrap.narrow { max-width: 860px; }
.center { text-align: center; }
.cart-lines, .dl-lines, .partners { list-style: none; margin: 24px 0; padding: 0; }
.cart-line, .dl-line { display: grid; grid-template-columns: 96px 1fr auto auto; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.dl-line { grid-template-columns: 120px 1fr auto; }
.cart-line img, .dl-line img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; border: 1px solid var(--line); }
.cart-line .num { font-family: var(--serif); font-size: 1.15rem; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 0.82rem; text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.link-btn:hover { color: var(--gold); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 8px; font-size: 0.9rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.cart-total strong { font-family: var(--serif); font-size: 1.8rem; letter-spacing: 0; text-transform: none; color: var(--text); }
#cart.empty .cart-total, #cart.empty .cart-form, #cart.empty .cart-lines { display: none; }
#cart:not(.empty) .cart-empty-msg { display: none; }
#cart.busy { opacity: 0.85; }
.cart-form { margin-top: 18px; }
.cart-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cart-form .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cart-form label { font-size: 0.86rem; }
.cart-form input[type=email], .cart-form input:not([type]), .cart-form input[type=text] {
  background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: 12px 14px; font: inherit; border-radius: 2px; }
.cart-form input:focus { border-color: var(--gold); outline: none; }
.cart-form .check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 0.9rem; }
.cart-form .check input { margin-top: 5px; accent-color: var(--gold); }
.pay { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin: 22px 0 10px; }
.pay-card { min-width: 220px; padding: 15px 26px; }
#paypal-wrap { display: flex; align-items: center; gap: 14px; }
#paypal-wrap[hidden] { display: none; }
#paypal-buttons { min-width: 220px; }
.cart-msg { min-height: 1.6em; color: var(--gold); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.note-box.ok { border-color: rgba(120, 180, 120, 0.5); background: rgba(120, 180, 120, 0.08); margin-bottom: 26px; }
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.partner { background: var(--surface); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; }
.partner h3 { margin-bottom: 6px; }
.partner .btn { margin-top: auto; align-self: flex-start; }
.spinner { width: 34px; height: 34px; margin: 24px auto; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .cart-form .grid2 { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 72px 1fr auto; }
  .cart-line .link-btn { grid-column: 2; justify-self: start; }
  .dl-line { grid-template-columns: 84px 1fr; }
  .dl-line .act { grid-column: 1 / -1; }
  .dl-line .act .btn { width: 100%; text-align: center; }
  .pay-card, #paypal-wrap, #paypal-buttons { width: 100%; }
  #paypal-wrap { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.promo-row { display: flex; gap: 10px; }
.promo-row input { flex: 1; text-transform: uppercase; letter-spacing: 0.08em; }
.cart-total.discount { padding-top: 4px; }
.cart-total.discount strong { font-size: 1.2rem; color: var(--gold); }
.cart-total.discount em { font-style: normal; color: var(--gold); letter-spacing: 0.08em; }
#pay-free[hidden], #pay-paid[hidden] { display: none; }

.cart-form select, .cart-form textarea { background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: 12px 14px; font: inherit; border-radius: 2px; }
.cart-form textarea { resize: vertical; min-height: 140px; }
.cart-form select:focus, .cart-form textarea:focus { border-color: var(--gold); outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.canvas-guide { margin-top: 34px; }
.canvas-guide h3 { margin-bottom: 8px; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.canvas-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 0.9rem; }
.canvas-table th, .canvas-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.canvas-table thead th { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.canvas-table td.ok { color: #9fd49f; } .canvas-table td.warn { color: var(--gold); } .canvas-table td.no { color: #d79a9a; }
.pill { display: inline-block; margin-left: 6px; padding: 1px 7px; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 1px; }
@media (max-width: 640px) {
  .canvas-table thead { display: none; }
  .canvas-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .canvas-table td { border: 0; padding: 3px 0; }
  .canvas-table td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .canvas-table td:nth-child(2) { grid-column: 1 / -1; color: var(--muted); }
  .canvas-table td:nth-child(3)::before { content: "Personal: "; color: var(--muted); }
  .canvas-table td:nth-child(4)::before { content: "Large/Church: "; color: var(--muted); }
}
