/* The Wand Atelier site pages: the landing page and the checkout. They share
   the workshop's colours (base.css) and add a quieter, candle-lit look. */

:root {
  --ink: #0f0c0a;
  --gold: #d4b06a;
  --gold-dim: #8c7243;
  --parchment: #efe5d2;
  --hairline: rgba(212, 176, 106, 0.22);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; }
html, body.site { height: auto; min-height: 100%; }
body.site { display: block; background: var(--ink); font-size: 15px; line-height: 1.55; }
.site main { display: block; }
.site a { color: inherit; }

.wordmark { font: 600 22px/1 var(--serif); letter-spacing: 0.04em; }
.wordmark.small { font-size: 16px; }

/* ---- top bar ---- */

.site-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(15, 12, 10, 0.92), rgba(15, 12, 10, 0.72));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.site-nav { display: flex; gap: 22px; margin-right: auto; }
.site-nav a { color: var(--label); font-size: 14px; text-decoration: none; letter-spacing: 0.02em; }
.site-nav a:hover { color: var(--gold); }
.site-bar .account { height: 34px; }

/* ---- buttons that are links ---- */

a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  color: var(--parchment);
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
a.button:hover { border-color: var(--gold); color: var(--gold); }
a.button.primary {
  border-color: var(--gold);
  background: linear-gradient(180deg, #e2c27f, #c79d4f);
  color: #1d150a;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(212, 176, 106, 0.22);
}
a.button.primary:hover { filter: brightness(1.06); color: #1d150a; }
.card-actions a.button { height: 34px; padding: 0 16px; font-size: 13px; }

/* ---- hero ---- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(88vh, 860px);
  overflow: hidden;
  isolation: isolate;
}

.hero #scene, .hero #hero-wand { position: absolute; display: block; }
.hero #scene { inset: 0; width: 100%; height: 100%; z-index: -3; }
.hero #hero-wand {
  top: 8%;
  left: 42%;
  width: 57%;  /* a canvas needs a width: left and right alone keep its own size */
  height: 84%;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero #hero-wand.ready { opacity: 1; }

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(12, 9, 7, 0.92) 0%, rgba(12, 9, 7, 0.75) 32%, rgba(12, 9, 7, 0.15) 62%, rgba(12, 9, 7, 0.35) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(15, 12, 10, 0) 26%);
}
.hero::after {  /* film grain over everything */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--grain);
  opacity: 0.08;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-left: clamp(16px, 7vw, 120px);
  padding: 72px 0 96px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 22px;
  color: var(--parchment);
  font: 500 clamp(38px, 5.2vw, 66px)/1.05 var(--serif);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}
.hero h1 em { color: var(--gold); font-style: italic; }
.lede { margin: 0 0 30px; color: var(--label); font-size: 17px; line-height: 1.65; max-width: 540px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta.center { justify-content: center; margin-top: 36px; }
.hero-note { margin: 20px 0 0; color: var(--muted); font-size: 13px; letter-spacing: 0.02em; }

/* a faint chevron down to the signature wands, easy to miss on purpose */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  display: grid;
  place-items: center;
  color: var(--gold-dim);
  opacity: 0.55;
  transition: opacity 0.2s, color 0.2s;
  animation: cue 3.2s ease-in-out infinite;
}
.scroll-cue:hover, .scroll-cue:focus-visible { opacity: 1; color: var(--gold); }
.scroll-cue svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue { animation: none; } }

/* ---- bands (page sections) ---- */

.band {
  position: relative;
  padding: 92px clamp(16px, 6vw, 96px);
  border-top: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(212, 176, 106, 0.06), transparent 70%),
    var(--ink);
}
.band-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.band h2 { margin: 0; color: var(--parchment); font: 500 clamp(30px, 3.4vw, 42px)/1.15 var(--serif); }
.band-lede { margin: 14px auto 0; color: var(--muted); max-width: 560px; }

.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.steps-row li {
  position: relative;
  padding: 34px 30px 30px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 245, 225, 0.035), rgba(255, 245, 225, 0.01));
}
.steps-row svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.steps-row .num {
  position: absolute;
  top: 26px;
  right: 28px;
  color: var(--gold-dim);
  font: italic 500 28px/1 var(--serif);
}
.steps-row h3, .craft-row h3 { margin: 18px 0 10px; color: var(--parchment); font: 500 22px/1.2 var(--serif); }
.steps-row p, .craft-row p { margin: 0; color: var(--label); font-size: 14.5px; }

/* ---- wand cards ---- */

.wand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
}
.wand-grid .empty, .order-list .empty { grid-column: 1 / -1; margin: 12px 0; color: var(--muted); text-align: center; }

.wand-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: #17120f;
  transition: border-color 0.25s, transform 0.25s;
}
.wand-card:hover { border-color: rgba(212, 176, 106, 0.5); transform: translateY(-2px); }
.wand-card .pic {
  position: relative;
  aspect-ratio: 56 / 26;
  background: radial-gradient(ellipse at 50% 45%, #2a211b, #1c1713 70%);
}
.wand-card .pic img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s; }
.wand-card .pic img.in { opacity: 1; }
.wand-card.loading .pic::after {  /* a candle-flicker while the picture is drawn */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(212, 176, 106, 0.08) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.wand-card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 9px;
  border-radius: 10px;
  background: rgba(15, 12, 10, 0.8);
  color: var(--gold);
  font-size: 11.5px;
}
.wand-card h3 { margin: 16px 18px 6px; color: var(--parchment); font: 500 20px/1.2 var(--serif); }
.wand-card p { flex: 1; margin: 0 18px 14px; color: var(--label); font-size: 13.5px; }
.wand-card .card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }

/* ---- orders ---- */

.order-list { display: grid; gap: 12px; max-width: 980px; margin: 0 auto; }
.order-row {
  display: grid;
  grid-template-columns: 132px 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 12px 20px 12px 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: #17120f;
}
.order-row .pic { aspect-ratio: 56 / 26; overflow: hidden; border-radius: 8px; background: #1c1713; }
.order-row img { display: block; width: 100%; height: 100%; object-fit: cover; }
.order-row h3 { margin: 0 0 2px; color: var(--parchment); font: 500 18px/1.2 var(--serif); }
.order-row p { margin: 0; color: var(--muted); font-size: 13px; }
.order-row .total { color: var(--parchment); font: 500 17px/1 var(--serif); }
.order-status {
  padding: 4px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--gold);
  font-size: 12px;
  white-space: nowrap;
}
.order-status.paid, .order-status.shipped { color: #9fd3a8; border-color: rgba(159, 211, 168, 0.35); }
.order-status.cancelled { color: var(--muted); }

/* ---- three ways ---- */

.craft-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  max-width: 1120px;
  margin: 0 auto;
}
.craft-row article { padding-top: 22px; border-top: 1px solid var(--gold-dim); }

/* ---- footer ---- */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 30px clamp(16px, 6vw, 96px);
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
}
.site-foot nav { display: flex; gap: 18px; margin-left: auto; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--gold); }

/* ================================================================ checkout */

.checkout { max-width: 1180px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 40px) 80px; }
.checkout > h1 { margin: 0 0 6px; color: var(--parchment); font: 500 40px/1.1 var(--serif); }
.checkout > .sub { margin: 0 0 30px; color: var(--muted); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }

.co-card {
  margin-bottom: 20px;
  padding: 24px 26px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: #17120f;
}
.co-card h2 { margin: 0 0 4px; color: var(--parchment); font: 500 22px/1.2 var(--serif); }
.co-card .hint { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }

.co-design { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: center; }
.co-design .pic { aspect-ratio: 56 / 26; overflow: hidden; border-radius: 10px; background: #1c1713; }
.co-design img { display: block; width: 100%; height: 100%; object-fit: cover; }
.co-design h2 { font-size: 26px; }
.co-design p { margin: 4px 0 12px; color: var(--label); }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 20px; }
.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  height: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1b1612;
  text-align: left;
  white-space: normal;
}
.choice .choice-name { color: var(--parchment); font: 500 16px/1.2 var(--serif); }
.choice .price { color: var(--gold); font-size: 13px; }
.choice .about { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.choice.on { border-color: var(--gold); background: rgba(212, 176, 106, 0.09); box-shadow: inset 0 0 0 1px var(--gold); }
.choice:hover { border-color: var(--gold-dim); }
.choice:disabled { opacity: 0.4; cursor: not-allowed; }
.choice:disabled:hover { border-color: var(--line); }
.ways { margin-bottom: 0; }
.ways .choice { padding: 18px 20px; }
.ways .choice-name { font-size: 19px; }
#lights { grid-template-columns: repeat(2, minmax(0, 1fr)); }  /* four lights, two by two */
@media (max-width: 560px) { #lights { grid-template-columns: 1fr; } }

.co-label { display: block; margin: 0 0 10px; color: var(--label); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }

.co-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.check { display: flex; align-items: flex-start; gap: 10px; color: var(--label); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); }
.check small { display: block; color: var(--muted); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.qty button { width: 36px; height: 36px; padding: 0; border: 0; background: transparent; font-size: 18px; }
.qty output { min-width: 34px; color: var(--parchment); text-align: center; font: 500 16px/1 var(--serif); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.checkout .field input { height: 40px; font-size: 14.5px; }
.checkout .field input[aria-invalid="true"] { border-color: var(--warn); }

.pay-note {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px dashed var(--gold-dim);
  border-radius: 10px;
  color: var(--label);
  font-size: 14px;
}
.pay-note svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 1.5; }

.co-summary {
  position: sticky;
  top: 86px;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: linear-gradient(180deg, #1d1712, #16110e);
}
.co-summary h2 { margin: 0 0 16px; color: var(--parchment); font: 500 22px/1.2 var(--serif); }
.lines { margin: 0; padding: 0; list-style: none; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--label); font-size: 14px; }
.lines li span:last-child { color: var(--parchment); white-space: nowrap; }
.lines .sep { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.lines .grand { padding-top: 14px; border-top: 1px solid var(--gold-dim); color: var(--parchment); font: 500 20px/1.2 var(--serif); }
.lines .grand span:last-child { color: var(--gold); }
.lines .free { color: #9fd3a8 !important; }
.co-summary .primary.wide { height: 46px; margin-top: 18px; font-size: 15px; }
.co-summary .small { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; text-align: center; }
.co-summary .form-error { margin: 10px 0 0; }
.co-summary.busy .lines { opacity: 0.55; transition: opacity 0.2s; }

.co-empty, .co-done { max-width: 640px; margin: 40px auto; padding: 40px; border: 1px solid var(--hairline); border-radius: 16px; background: #17120f; text-align: center; }
.co-empty h2, .co-done h2 { margin: 0 0 10px; color: var(--parchment); font: 500 30px/1.2 var(--serif); }
.co-empty p, .co-done p { color: var(--label); }
.co-done .number { color: var(--gold); font: 500 24px/1.3 var(--serif); letter-spacing: 0.04em; }
.co-done .pic { max-width: 420px; margin: 18px auto; overflow: hidden; border-radius: 10px; }
.co-done img { display: block; width: 100%; }

@media (max-width: 920px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .co-summary { position: static; }
  .co-design { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .hero #hero-wand { left: 0; width: 100%; opacity: 0.45; }
  .hero #hero-wand.ready { opacity: 0.45; }
  .order-row { grid-template-columns: 96px 1fr; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* six signature wands: three across, two rows */
#signature-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); max-width: 1180px; }
