/* GetFigure personaliser — "MAKE YOURSELF SMALL" lacquer-red campaign UI.
   Mobile-first. Palette sampled from the campaign key art. */

:root {
  --red: #B31212;
  --red-bright: #D1090B;
  --red-deep: #7B0301;
  --black: #0A0808;
  --black-2: #141010;
  --white: #FFFFFF;
  --smoke: rgba(255, 255, 255, 0.62);
  --hair: rgba(255, 255, 255, 0.14);
  --lacquer: radial-gradient(120% 90% at 26% 8%, #D1120E 0%, #B31212 34%, #8A0604 72%, #6E0201 100%);
  --radius: 4px;
  --pill: 999px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Full red takeover while the figurine is being sculpted. */
body[data-step="working"] { background: var(--red-deep); background-image: var(--lacquer); background-attachment: fixed; }

img { max-width: 100%; display: block; }
a { color: inherit; }

/* --- brand strip -------------------------------------------------------- */
/* Deliberately short. The campaign type earns its place as a band, not as a
   full-viewport hero — the uploader has to be visible the moment the page
   opens, at 390px and on desktop. */
.brandstrip {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  column-gap: 12px;
  padding: 12px 20px 13px;
  /* Full-bleed band, content aligned to the same 720px column as the stage. */
  padding-inline: max(20px, calc((100% - 720px) / 2));
  background: var(--red-deep);
  background-image: var(--lacquer);
  color: #0A0606;
}
.brandstrip::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.4);
}
.wordmark {
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
  color: rgba(10, 6, 6, 0.78);
  text-decoration: none;
}
.brand-type {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-family: Anton, "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(30px, 9.2vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #0A0606;
}
.brand-line {
  grid-column: 1 / -1;
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(10, 6, 6, 0.8);
}
.steps {
  /* Explicitly parked beside the wordmark — it is last in the DOM so that
     screen readers hear the brand and the promise first. */
  grid-row: 1;
  grid-column: 2;
  justify-self: end;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(10, 6, 6, 0.6);
}
/* The whole page goes red while sculpting — a red band on red reads as a seam. */
body[data-step="working"] .brandstrip { background: none; }
body[data-step="working"] .brandstrip::after { display: none; }

/* --- stage / steps ------------------------------------------------------ */
.stage {
  flex: 1 0 auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px 8px;
}
.step { animation: rise .35s ease both; }
body[data-step="working"] .stage { display: flex; align-items: center; }
body[data-step="working"] .step { width: 100%; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-bright);
}
.eyebrow.dark { color: rgba(0, 0, 0, 0.6); }

.step-title {
  margin: 0 0 10px;
  font-family: Anton, "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(34px, 10vw, 52px);
  line-height: 0.94;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.lede {
  margin: 0 0 22px;
  color: var(--smoke);
  font-size: 15px;
  max-width: 46ch;
}

/* --- dropzone ----------------------------------------------------------- */
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 26px 18px 24px;
  text-align: center;
  cursor: pointer;
  border: 1.5px dashed rgba(211, 32, 30, 0.55);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(179, 18, 18, 0.22) 0%, rgba(179, 18, 18, 0) 70%),
    var(--black-2);
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.drop:hover, .drop:focus-within { border-color: var(--red-bright); }
.drop.over { border-color: var(--red-bright); border-style: solid; transform: scale(1.01); }
.drop-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border-radius: var(--pill);
  background: var(--red);
  color: var(--white);
  box-shadow: 0 0 0 6px rgba(179, 18, 18, 0.16);
}
.drop-icon svg { width: 24px; height: 24px; }
.drop-title {
  font-family: Anton, "Arial Black", sans-serif;
  font-size: 22px;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.drop-sub { font-size: 13px; color: var(--smoke); }
.drop-formats {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.42);
}

/* Shown while a HEIC/AVIF is being decoded client-side. */
.convert {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--red-bright);
  text-align: center;
}

.tips {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}
.tips li { padding-left: 18px; position: relative; }
.tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--red-bright);
}
.tips em { color: rgba(255, 255, 255, 0.8); font-style: normal; font-weight: 600; }

/* --- photo preview ------------------------------------------------------ */
.preview {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 20px;
  padding: 12px;
  background: var(--black-2);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}
.preview img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(211, 9, 11, 0.5);
}
.preview-meta { display: grid; gap: 2px; min-width: 0; }
.preview-meta strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-meta span { font-size: 12px; color: var(--smoke); }
.link {
  justify-self: start;
  margin-top: 4px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--red-bright);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* --- style chips -------------------------------------------------------- */
/* Sit directly above the primary button. Every chip has a default already
   selected, so a shopper can ignore this block entirely and still get a
   sensible grid. */
.chips { display: grid; gap: 14px; margin-top: 22px; }
.chipset-label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}
.chiprow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.chip {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  gap: 1px;
  padding: 9px 8px 8px;
  text-align: center;
  cursor: pointer;
  border: 1.5px solid var(--hair);
  border-radius: var(--radius);
  background: var(--black-2);
  color: var(--white);
  font: inherit;
  transition: border-color .16s ease, background-color .16s ease;
}
.chip:hover { border-color: rgba(211, 9, 11, 0.7); }
.chip.on {
  border-color: var(--red-bright);
  background: linear-gradient(180deg, rgba(179, 18, 18, 0.3), rgba(179, 18, 18, 0.08));
}
.chip-name { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.chip-hint { font-size: 10.5px; line-height: 1.3; color: rgba(255, 255, 255, 0.45); }
.chip.on .chip-hint { color: rgba(255, 255, 255, 0.72); }

/* --- concept grid ------------------------------------------------------- */
.grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.card { position: relative; }
.card-btn {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  border: 1.5px solid var(--hair);
  border-radius: var(--radius);
  background: var(--black-2);
  color: inherit;
  font: inherit;
  transition: border-color .16s ease, transform .16s ease, box-shadow .2s ease;
}
.card-btn:disabled { cursor: default; }
.card.ready .card-btn:hover { border-color: rgba(211, 9, 11, 0.75); transform: translateY(-2px); }
.card.on .card-btn {
  border-color: var(--red-bright);
  box-shadow: 0 0 0 1.5px var(--red-bright), 0 14px 34px rgba(179, 18, 18, 0.3);
}

.card-art {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(179, 18, 18, 0.2) 0%, rgba(179, 18, 18, 0) 70%),
    #0F0C0C;
}
.card-art img { width: 100%; height: 100%; object-fit: cover; }

/* A sweep rather than a spinner: four spinners in a grid reads as chaos. */
.shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 28%,
    rgba(255, 255, 255, 0.07) 48%,
    rgba(255, 255, 255, 0) 68%
  );
  background-size: 260% 100%;
  animation: sweep 1.5s ease-in-out infinite;
}
@keyframes sweep { from { background-position: 160% 0; } to { background-position: -60% 0; } }

.card-x {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 34px;
  color: rgba(255, 255, 255, 0.28);
}
.card.dead .card-btn { border-style: dashed; opacity: .55; }

.card-meta { display: grid; gap: 1px; padding: 9px 10px 10px; }
.card-name {
  font-family: Anton, "Arial Black", sans-serif;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.card-blurb {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.45);
  /* Two lines max — a long failure message must not resize the tile. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tick {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--pill);
  background: var(--red-bright);
  color: var(--white);
  opacity: 0;
  transform: scale(.7);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}
.card-tick svg { width: 14px; height: 14px; }
.card.on .card-tick { opacity: 1; transform: none; }

.grid-note {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
  min-height: 1.4em;
}
#stepConcepts .fineprint { margin-top: 14px; }
#stepConcepts .fineprint .link { justify-self: center; margin: 0; font-size: 12.5px; }

/* --- buttons ------------------------------------------------------------ */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 17px 22px;
  border: 0;
  border-radius: var(--pill);
  background: var(--red);
  color: var(--white);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .12s ease, background-color .18s ease, opacity .18s ease;
}
.btn:hover { background: var(--red-bright); }
.btn:active { transform: translateY(1px); }
.btn.primary { box-shadow: 0 10px 30px rgba(179, 18, 18, 0.35); }
.btn.ghost {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--white); }
.btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.btn:disabled:hover { background: var(--red); }
.btn.ghost:disabled:hover { background: transparent; }

.fineprint {
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

/* --- working step ------------------------------------------------------- */
.working { color: #0A0606; }
.working-type {
  margin: 0 0 22px;
  font-family: Anton, "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(52px, 18vw, 110px);
  line-height: 0.88;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  color: #0A0606;
}
.meter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.meter-pct {
  font-family: Anton, "Arial Black", sans-serif;
  font-size: 46px;
  line-height: 1;
  color: #0A0606;
  font-variant-numeric: tabular-nums;
}
.meter-pct i { font-style: normal; font-size: 24px; opacity: .55; }
.meter-phase {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(10, 6, 6, 0.66);
  text-align: right;
}
.bar {
  height: 8px;
  background: rgba(10, 6, 6, 0.25);
  border-radius: var(--pill);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: #0A0606;
  border-radius: var(--pill);
  transition: width .6s cubic-bezier(.25, .8, .3, 1);
}
.working-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}
.working-photo {
  width: 84px;
  height: 84px;
  flex: none;
  object-fit: cover;
  border: 3px solid #0A0606;
  border-radius: 2px;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }
.working .lede { color: rgba(10, 6, 6, 0.78); margin: 0; font-size: 14px; }

/* --- result step -------------------------------------------------------- */
.plinth {
  position: relative;
  margin-bottom: 22px;
  padding: 0 0 42px;
  border-radius: var(--radius);
  background: var(--red-deep);
  background-image: var(--lacquer);
  overflow: hidden;
}
model-viewer {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 340px;
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: #0A0606;
}
.plinth-top {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  width: 44%;
  max-width: 190px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(60% 70% at 50% 26%, #241d1d 0%, #0A0606 60%, #000 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sizes {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sizes legend {
  padding: 0;
  margin-bottom: 10px;
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-bright);
}
.size {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 14px 6px 12px;
  text-align: center;
  cursor: pointer;
  border: 1.5px solid var(--hair);
  border-radius: var(--radius);
  background: var(--black-2);
  transition: border-color .16s ease, background-color .16s ease;
}
.size:hover { border-color: rgba(211, 9, 11, 0.7); }
/* Sold out in Shopify. Still shown, so the shopper can see the ladder of sizes. */
.size.out { opacity: 0.45; }
.size.selected {
  border-color: var(--red-bright);
  background: linear-gradient(180deg, rgba(179, 18, 18, 0.28), rgba(179, 18, 18, 0.08));
}
.size input { position: absolute; opacity: 0; pointer-events: none; }
.size-name {
  font-family: Anton, "Arial Black", sans-serif;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.size-h { font-size: 11px; color: var(--smoke); }
.size-price { margin-top: 4px; font-size: 15px; font-weight: 700; }

.actions { display: grid; gap: 10px; }
.actions .btn { margin-top: 18px; }
.actions .btn + .btn { margin-top: 0; }

/* --- footer ------------------------------------------------------------- */
.footer {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 20px 40px;
  text-align: center;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}
body[data-step="working"] .footer { color: rgba(10, 6, 6, 0.6); }
.footer p { margin: 6px 0 0; }
.footer .legal { max-width: 40ch; margin-inline: auto; }
.badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 12px;
  border-radius: var(--pill);
  border: 1px solid rgba(211, 9, 11, 0.55);
  color: #FF6B63;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
body[data-step="working"] .badge { border-color: rgba(10, 6, 6, 0.5); color: rgba(10, 6, 6, 0.75); }

/* --- larger screens ----------------------------------------------------- */
@media (min-width: 720px) {
  /* Desktop: the campaign type and the promise share one baseline, so the
     whole strip is ~86px and the uploader still opens above the fold. */
  .brandstrip {
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    padding-block: 12px 14px;
  }
  .wordmark { font-size: 16px; }
  .brand-type { grid-row: 2; grid-column: 1; margin: 4px 0 0; font-size: 26px; }
  .brand-line {
    grid-row: 2;
    grid-column: 2;
    align-self: baseline;
    margin: 0;
    font-size: 12.5px;
    white-space: nowrap;
  }
  .stage { padding-top: 24px; }
  .drop { padding: 40px 24px; }
  /* All four looks side by side — the choice is easier to make in one row. */
  .grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .card-name { font-size: 16px; }
  .chiprow { gap: 8px; }
  .chips { grid-template-columns: 1fr 1fr; gap: 18px; }
  model-viewer { height: 440px; }
  .plinth-top { height: 38px; bottom: 56px; }
  .actions { grid-template-columns: 1.4fr 1fr; align-items: center; }
  .actions .btn, .actions .btn + .btn { margin-top: 22px; }
  .working-type { font-size: 96px; }
  .meter-pct { font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
