/* ---------- Fonts (bundled locally) ---------- */
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("fonts/BarlowCondensed-Medium.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/BarlowCondensed-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/BarlowCondensed-Bold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 900; font-display: swap; src: url("fonts/BarlowCondensed-Black.woff2") format("woff2"); }
@font-face { font-family: "Special Elite"; font-weight: 400; font-display: swap; src: url("fonts/SpecialElite-Regular.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 400; font-display: swap; src: url("fonts/CourierPrime-Regular.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 700; font-display: swap; src: url("fonts/CourierPrime-Bold.woff2") format("woff2"); }

:root {
  --bg: #0f131a;
  --bg-2: #151b25;
  --card: #18202c;
  --line: #2a3445;
  --text: #e9e4d8;
  --muted: #9aa3b2;
  --cream: #efe5cc;
  --red: #d2402e;
  --red-dark: #a8291c;
  --gold: #e3c77a;
  --radius: 16px;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --type: "Special Elite", "Courier New", monospace;
  --mono: "Courier Prime", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(210, 64, 46, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(227, 199, 122, .07), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
button, input { font: inherit; color: inherit; }
a { color: var(--gold); }

/* ---------- Caution tape ---------- */
.tape {
  overflow: hidden; white-space: nowrap;
  background: repeating-linear-gradient(-45deg, #e3c77a 0 14px, #d8b960 14px 28px);
  color: #15120a; font: 700 13px/26px var(--cond); letter-spacing: .18em;
  border-bottom: 2px solid #000;
}
.tape span { display: inline-block; padding-left: 100%; animation: tape 38s linear infinite; }
@keyframes tape { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .tape span { animation: none; padding-left: 12px; } }


/* ---------- Landing ---------- */
.hero { max-width: 620px; margin: 0 auto; padding: 28px 18px 10px; text-align: center; }
.brand { margin: 0 0 8px; font: 700 15px/1 var(--cond); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.hero h1 { margin: 0; font: 900 clamp(38px, 11vw, 64px)/.95 var(--cond); text-transform: uppercase; color: var(--cream); }
.hero h1 span { color: var(--red); display: block; }
.lede { margin: 14px auto 18px; max-width: 30em; color: #c9c3b6; font-size: 17px; }
.associate-note { margin: -4px auto 16px; display: inline-block; padding: 8px 14px; border-radius: 10px; background: rgba(210,64,46,.15); border: 1px solid rgba(210,64,46,.5); color: #f3c3b9; font: 600 16px var(--cond); letter-spacing: .04em; }
.big-cta { font-size: 24px; padding: 18px 34px; border-radius: 14px; width: min(100%, 360px); }
.sample { display: block; margin: 24px auto 0; width: min(78%, 340px); height: auto; border-radius: 6px; transform: rotate(-1.5deg); box-shadow: 0 24px 50px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.5); }

/* ---------- Maker layout ---------- */
.maker { max-width: 620px; margin: 0 auto; padding: 18px 12px 30px; display: grid; gap: 14px; }
.maker[hidden] { display: none; }
@media (min-width: 1020px) {
  .maker { max-width: 1160px; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); align-items: start; }
  #step-photos { grid-column: 1; grid-row: 1; }
  #step-charge { grid-column: 1; grid-row: 2; }
  #step-poster { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 12px; }
}
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 40%), var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.card h2 { margin: 0 0 12px; display: flex; align-items: center; gap: 10px; font: 900 24px/1 var(--cond); text-transform: uppercase; letter-spacing: .03em; color: var(--cream); }
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font: 900 18px/1 var(--cond); }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.hint.small { font-size: 13px; }
.fine { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.fine.warn { color: #f0b9a8; font-weight: 600; }

/* ---------- Photo slots ---------- */
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot { display: grid; gap: 8px; align-content: start; }
.slot-label { margin: 0; font: 900 20px/1 var(--cond); text-transform: uppercase; letter-spacing: .06em; color: var(--cream); }
.crop { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: repeating-linear-gradient(0deg, #2a313b 0 22px, #323a45 22px 23px); border: 2px solid #3a465a; touch-action: none; }
.crop canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.crop.has-photo { border-color: var(--gold); }
.crop-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #8a94a5; font: 700 15px var(--cond); letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.crop.has-photo .crop-empty { display: none; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pick label { position: relative; overflow: hidden; text-align: center; }
.pick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.zoom { display: flex; align-items: center; gap: 8px; font: 700 13px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.zoom[hidden] { display: none; }
.zoom input { flex: 1; min-width: 0; accent-color: var(--red); height: 30px; }
.slot-msg { margin: 0; min-height: 0; font-size: 13px; color: #f0b9a8; }
.slot-msg:empty { display: none; }
.name-field { display: grid; gap: 4px; }
.name-field span, .field span, .field-label { font: 700 12px var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.name-field input, .field input, .field select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid #344055; background: var(--bg-2);
  font: 700 18px var(--cond); letter-spacing: .06em; color: var(--cream); outline: none; text-transform: uppercase; -webkit-appearance: none; appearance: none;
}
.field input { text-transform: none; font: 17px var(--type); letter-spacing: 0; }
.field select { font: 700 18px var(--cond); text-transform: 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% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.name-field input:focus, .field input:focus, .field select:focus { border-color: var(--gold); }
.both { margin-top: 14px; padding: 12px; border-radius: 12px; border: 1px dashed #3a465a; }
.both p { margin: 0 0 8px; font-size: 14px; color: #c9c3b6; }
.both .slot-msg { margin-top: 8px; }

.together { margin-top: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); padding: 10px 12px; }
.together summary { cursor: pointer; font: 700 16px var(--cond); letter-spacing: .04em; color: var(--cream); }
.together summary em { color: var(--gold); font-style: normal; }
.switch { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 15px; }
.switch input { width: 22px; height: 22px; accent-color: var(--red); }
.stage-box { margin-top: 10px; display: grid; gap: 8px; }
.stage-box[hidden] { display: none; }
#stage { width: 100%; height: auto; display: block; border-radius: 8px; touch-action: none; cursor: grab; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg-btn { border: 0; background: transparent; padding: 9px; border-radius: 8px; cursor: pointer; font: 700 15px/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.seg-btn[aria-pressed="true"] { background: var(--cream); color: #12161d; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row.center { justify-content: center; }
.progress { margin-top: 10px; }
.progress[hidden] { display: none; }
.progress-bar { height: 8px; background: #263043; border-radius: 99px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--red)); transition: width .25s; }
.progress-text { margin: 6px 0 0; font-size: 13px; color: var(--gold); }

/* ---------- Charge ---------- */
.field-label { margin: 6px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip { border: 1px solid #3a465a; background: var(--bg-2); border-radius: 99px; padding: 10px 16px; cursor: pointer; font: 700 17px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; }
.chip[aria-checked="true"] { background: var(--cream); color: #12161d; border-color: var(--cream); }
.charges { display: grid; gap: 6px; margin-bottom: 12px; }
.charge-opt { text-align: left; border: 1px solid #3a465a; background: var(--bg-2); border-radius: 10px; padding: 12px 14px; cursor: pointer; font: 700 17px/1.15 var(--cond); letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.charge-opt[aria-checked="true"] { border-color: var(--red); background: rgba(210,64,46,.16); color: #fff; box-shadow: inset 4px 0 0 var(--red); }
.fields { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.field { display: grid; gap: 4px; }

/* ---------- Poster ---------- */
.poster-frame { display: grid; place-items: center; padding: 12px; border-radius: 12px; background: repeating-linear-gradient(45deg, #121821 0 10px, #141b25 10px 20px); }
#poster { display: block; width: 100%; max-width: 420px; height: auto; border-radius: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.55); }
.actions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.actions #download { grid-column: span 4; }
.actions #share { grid-column: span 2; }
.actions #newcase, .actions #reset { grid-column: span 3; }
.primary-dl { font-size: 24px; padding: 18px 16px; border-radius: 14px; }
.primary-dl::before { content: "\2193  "; }
.center-text { text-align: center; }
.dl-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: 2fr 1fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(15,19,26,.94); border-top: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.dl-bar[hidden] { display: none; }
.dl-bar .primary-dl { font-size: 20px; padding: 14px; }
@media (min-width: 1020px) { .dl-bar { display: none !important; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; border-radius: 12px; padding: 14px 16px; text-align: center;
  background: var(--red); color: #fff; font: 700 18px/1.1 var(--cond); letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 2px 0 var(--red-dark), 0 8px 20px rgba(210,64,46,.18); transition: transform .08s, filter .15s; -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 11px 8px; font-size: 15px; border-radius: 10px; }
.btn.ghost { background: transparent; border: 1px solid #3a465a; box-shadow: none; color: var(--text); }
.btn.alt { background: var(--cream); color: #12161d; box-shadow: 0 2px 0 #b8ab8a; }

/* ---------- Footer, sheet, toast ---------- */
.site-foot { max-width: 620px; margin: 0 auto; padding: 10px 18px 40px; color: var(--muted); font-size: 13.5px; text-align: center; }
.site-foot p { margin: 8px 0; }
.site-foot .tiny { font-size: 12px; opacity: .8; }
.sheet { position: fixed; inset: 0; background: rgba(5,7,10,.97); z-index: 20; display: grid; place-items: center; padding: 16px; overflow: auto; }
.sheet[hidden] { display: none; }
.sheet-inner { max-width: 420px; width: 100%; text-align: center; }
.sheet-title { margin: 0; font: 900 30px var(--cond); text-transform: uppercase; color: var(--cream); }
.sheet-text { margin: 4px 0 12px; color: #c9c3b6; }
#sheet-img { width: 100%; max-height: 66vh; object-fit: contain; border-radius: 4px; -webkit-touch-callout: default; user-select: auto; margin-bottom: 12px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--cream); color: #12161d; padding: 12px 18px; border-radius: 12px; font: 700 16px var(--cond); letter-spacing: .04em; box-shadow: 0 12px 30px rgba(0,0,0,.4); transition: .25s; max-width: calc(100vw - 30px); text-align: center; z-index: 30; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1019px) { body { padding-bottom: 86px; } }
