:root {
  --bg: #05070f;
  --panel: rgba(16, 20, 38, 0.72);
  --line: rgba(160, 175, 230, 0.16);
  --text: #e9ecf8;
  --muted: #9aa3c4;
  --accent: #f3c77a;
  --accent-ink: #1a1306;
  --error: #ff7a8a;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, sans-serif;
  min-height: 100vh;
}
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }

a { color: inherit; }
h1, h2, h3, .brand { font-family: Fraunces, Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1160px; margin: 0 auto; padding: 22px 20px;
}
.brand { text-decoration: none; font-size: 1.25rem; }
.brand span { color: var(--accent); }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.site-header nav a:hover { color: var(--text); }

main { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Header stays on screen so the basket is always reachable. */
.site-header {
  position: sticky; top: 0; z-index: 30; max-width: none;
  padding: 16px max(20px, calc((100% - 1120px) / 2));
  transition: background .25s, box-shadow .25s;
}
.site-header.scrolled {
  background: rgba(5,7,15,.82); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.hero { margin-top: -70px !important; }
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: -80px; padding: 170px 20px 140px; min-height: 86vh;
  display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: -4%; z-index: -2;
  background: url("images/dwarfmini-09.jpg") center / cover no-repeat;
  animation: drift 40s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5,7,15,.92) 0%, rgba(5,7,15,.55) 55%, rgba(5,7,15,.25) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-inner { max-width: 1160px; width: 100%; margin: 0 auto; }
.hero-inner > * { max-width: 640px; }
.hero-inner > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-inner > :nth-child(2) { animation-delay: .12s; }
.hero-inner > :nth-child(3) { animation-delay: .24s; }
.hero-inner > :nth-child(4) { animation-delay: .36s; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero h1 { text-shadow: 0 2px 30px rgba(0,0,0,.6); }
.hero .lede { color: #c3c9e0; }

@keyframes drift {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.12) translate(-2%, 1.5%); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .hero-inner > * { animation: none; }
}
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; font-weight: 600; margin: 0 0 14px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); line-height: 1.04; margin: 0 0 22px; }
.lede { color: var(--muted); font-size: 1.1rem; margin: 0 0 32px; }

.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: 600 1rem Inter, sans-serif; text-decoration: none;
  padding: 13px 26px; border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(243, 199, 122, .25); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

.section { padding: 40px 0 80px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.section-head h2 { font-size: 2rem; margin: 0; }
.section-head p { color: var(--muted); margin: 0; }

.collection {
  display: flex; flex-direction: column-reverse; margin-bottom: 40px;
  background: var(--panel); border: 1px solid rgba(243, 199, 122, .45); border-radius: var(--radius);
  overflow: hidden; backdrop-filter: blur(6px);
}
/* Every photo in the collection, shown whole (no cropping), in staggered columns. */
.collection-strip { columns: 5 150px; column-gap: 8px; padding: 0 16px 16px; }
.collection-strip > * {
  width: 100%; height: auto; display: block; margin-bottom: 8px; break-inside: avoid;
  border-radius: 6px; background: #000; cursor: zoom-in;
}
.collection-body { padding: 26px 28px 20px; display: flex; flex-direction: column; justify-content: center; }
.collection-body .eyebrow { margin-bottom: 6px; }
.collection-body h3 { font-size: 1.7rem; margin: 0 0 6px; }
.collection-body p { color: var(--muted); margin: 0; }
.collection-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 18px; }
.collection-price { font-size: 1.6rem; font-weight: 600; color: var(--accent); }
.collection-save { color: var(--muted); font-size: .9rem; }

/* Staggered columns so each card is exactly as tall as its photo needs. */
.grid { columns: 420px 3; column-gap: 30px; }
.grid .card { break-inside: avoid; margin-bottom: 30px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  backdrop-filter: blur(6px);
}
/* Whole photo, never cropped: each image keeps its own shape. */
.card .art { width: 100%; height: auto; display: block; background: #000; }
.card canvas.art { aspect-ratio: 4 / 3; object-fit: cover; }
.art-btn { display: block; width: 100%; position: relative; padding: 0; border: 0; background: #000; cursor: zoom-in; }
.art-btn::after {
  content: "View full size"; position: absolute; right: 10px; bottom: 10px;
  font: 600 .78rem Inter, sans-serif; color: var(--text);
  background: rgba(5,7,15,.75); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px;
  opacity: 0; transition: opacity .15s;
}
.art-btn:hover::after, .art-btn:focus-visible::after { opacity: 1; }
.art-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; color: var(--text);
}
.lightbox::backdrop { background: rgba(2,3,8,.94); }
.lightbox-inner { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 56px 16px 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 6px; box-shadow: 0 10px 60px rgba(0,0,0,.7); }
.lightbox-caption { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.lightbox-caption h3 { margin: 0; font-size: 1.3rem; }
.lightbox-close {
  position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(16,20,38,.8); color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(16,20,38,.8); color: var(--text); font-size: 1.4rem; cursor: pointer;
}
.lightbox-nav.prev { left: 14px; }
.lightbox-nav.next { right: 14px; }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.25rem; }
.card .sub { color: var(--accent); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.card p { color: var(--muted); margin: 0; font-size: .93rem; flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.card-foot .price { font-weight: 600; }
.card-foot button { padding: 8px 16px; font-size: .9rem; }

.order form, .confirmation {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; backdrop-filter: blur(6px);
}
.form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
legend { font-family: Fraunces, serif; font-size: 1.2rem; font-weight: 600; margin-bottom: 6px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 500; color: var(--muted); }
.optional { font-weight: 400; opacity: .7; }
input, select, textarea {
  font: inherit; color: var(--text);
  background: rgba(5, 7, 15, .7); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; width: 100%;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }

.summary { display: flex; gap: 16px; align-items: center; margin-top: 8px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.summary canvas { width: 80px; height: 60px; border-radius: 4px; flex: none; }
.summary-title { font-family: Fraunces, serif; font-weight: 600; font-size: 1.1rem; }
.summary-meta { color: var(--muted); font-size: .85rem; }
.summary-total { font-size: 1.4rem; font-weight: 600; color: var(--accent); margin-top: 4px; }

.form-error { color: var(--error); margin: 20px 0 0; }
#submit { margin-top: 24px; }

.confirmation h3 { font-size: 1.6rem; margin: 0 0 10px; color: var(--accent); }
.confirmation p { color: var(--muted); }
.confirmation strong { color: var(--text); }

/* ---------- Basket ---------- */
.site-header nav { align-items: center; }
.basket-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 500 .95rem Inter, sans-serif; color: var(--text);
  background: rgba(16,20,38,.7); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
}
.basket-btn:hover { border-color: var(--accent); }
.basket-btn.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }
.basket-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: .78rem; font-weight: 700;
}
.basket-count[hidden] { display: none; }

.preorder-note {
  margin: -8px 0 26px; padding: 14px 18px; border-radius: 12px;
  background: rgba(243,199,122,.08); border: 1px solid rgba(243,199,122,.3); color: var(--muted); font-size: .95rem;
}
.preorder-note strong { color: var(--accent); }

.btn-block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.4rem; line-height: 1;
  border: 1px solid var(--line); background: transparent; color: var(--text);
}

.drawer-backdrop { position: fixed; inset: 0; background: rgba(2,3,8,.6); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(420px, 100vw);
  background: #0b0e1c; border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.7,.2,1); visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.4rem; }
.drawer .lines { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer .lines:empty { display: none; }
.drawer .empty-basket { padding: 20px; flex: 1; }
.drawer-foot { padding: 18px 20px 22px; border-top: 1px solid var(--line); }

.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; background: #000; display: block; }
.line-thumb-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; overflow: hidden; }
.line-thumb-stack > * { width: 100%; height: 100%; object-fit: cover; min-width: 0; }
.line-title { font-weight: 600; }
.line-sub { color: var(--muted); font-size: .85rem; }
.line-price { font-weight: 600; }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty button {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 1rem; line-height: 1;
}
.qty button:disabled { opacity: .4; cursor: not-allowed; }
.qty span { min-width: 18px; text-align: center; }
.qty .remove { width: auto; border: 0; color: var(--muted); font-size: .82rem; text-decoration: underline; padding: 0 4px; }
.empty-basket { color: var(--muted); margin: 6px 0; }
.empty-basket[hidden] { display: none; }
.lines-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.lines-total strong { font-size: 1.4rem; color: var(--accent); }
.fine { color: var(--muted); font-size: .85rem; margin: 4px 0 14px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 50; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  background: #141a30; border: 1px solid rgba(243,199,122,.45); border-radius: 12px; padding: 12px 14px 12px 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); transition: transform .25s ease; font-size: .92rem;
}
.toast.show { transform: translate(-50%, 0); }
.toast button { background: none; border: 0; color: var(--accent); font: 600 .9rem Inter, sans-serif; cursor: pointer; white-space: nowrap; }
.card-foot .btn { white-space: nowrap; }

.site-footer { max-width: 1160px; margin: 0 auto; padding: 30px 20px 50px; display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.site-footer p { margin: 0; }

@media (max-width: 760px) {
  .hero { padding: 130px 16px 80px; min-height: 78vh; }
  .hero-bg { background-position: 65% center; }
  .form-cols { grid-template-columns: 1fr; }
  .collection-strip { columns: 3 90px; padding: 0 12px 12px; }
  .collection-body { padding: 20px 16px; }
  .order form, .confirmation { padding: 20px 16px; }
  .site-header nav { gap: 16px; }
}
