/* ===== design tokens =====
   reference: dollar-store toy-soldier blister backing card, real print/packaging object
   card stock: kraft tan + black ink + one red spot color (print palette)
   the Solana teal->purple gradient lives ONLY in the molded plastic (figure photo, logo,
   well rims) - never smeared across the print chrome itself
   type: Archivo Black (packaging brand face) / Barlow Condensed (small print body)
         / IBM Plex Mono (barcode, SKU, CA - real case, monospace)
   spacing scale: 4 8 12 16 24 32 48 64
   corner radius: 0-3px everywhere except the die-cut blister wells (a real object shape)
   motion idiom: one rubber-stamp thud on the empty wells (REQUISITIONS DENIED)
*/

@font-face {
  font-family: 'Archivo Black';
  src: url('assets/fonts/archivo-black-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('assets/fonts/barlow-condensed-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('assets/fonts/barlow-condensed-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('assets/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('assets/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --kraft: #cba876;
  --kraft-dark: #b08f5e;
  --kraft-well: #a9895a;
  --ink: #1c1710;
  --ink-soft: #3a2f20;
  --red: #b8202f;
  --teal: #14f195;
  --purple: #9945ff;
  --paper-edge: #e4d3ab;
  --backdrop: #211c17;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--backdrop);
  color: var(--ink);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 12px 40px;
}

.card {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: var(--kraft);
  border: 1px solid var(--kraft-dark);
  box-shadow: 10px 10px 0 rgba(0,0,0,0.35);
  overflow: hidden;
}

.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0px, transparent 1px, transparent 2px, rgba(0,0,0,0.05) 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.04) 0px, transparent 1px, transparent 3px, rgba(0,0,0,0.04) 4px);
}

/* ===== brand strip ===== */
.brand-strip {
  background: #05050a;
  padding: 10px 16px;
  display: flex;
  justify-content: center;
  border-bottom: 3px solid var(--ink);
}
.brand-logo {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}

/* ===== main pack area ===== */
.pack {
  padding: 20px 20px 28px;
}

.blister-row {
  display: flex;
  gap: 14px;
  padding: 16px 12px 22px;
  background: var(--kraft-well);
  border: 2px dashed rgba(28,23,16,0.35);
  border-radius: 4px;
  transform: rotate(-0.3deg);
}

.well {
  flex: 1;
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 50% / 38%;
  background: radial-gradient(circle at 32% 22%, rgba(255,255,255,0.55), rgba(220,230,235,0.12) 45%, rgba(180,195,200,0.08) 100%);
  border: 2px solid rgba(20,15,10,0.5);
  box-shadow:
    inset 0 0 0 6px rgba(255,255,255,0.15),
    inset 0 10px 26px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.well-shine {
  position: absolute;
  top: 4%;
  left: 14%;
  width: 34%;
  height: 22%;
  background: linear-gradient(120deg, rgba(255,255,255,0.65), rgba(255,255,255,0));
  border-radius: 50%;
  transform: rotate(-18deg);
  pointer-events: none;
}

.well-photo {
  width: 92%;
  height: 92%;
  object-fit: cover;
  border-radius: 50% / 38%;
}

.well-tag {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.5);
  padding: 1px 6px;
  border-radius: 2px;
}

.well--empty {
  cursor: pointer;
  border: 2px dashed rgba(20,15,10,0.4);
  background: radial-gradient(circle at 32% 22%, rgba(255,255,255,0.35), rgba(200,210,215,0.05) 60%);
  font: inherit;
  color: inherit;
  padding: 0;
  flex-direction: column;
}

.well--empty:hover .well-empty-label { opacity: 0.9; }
.well--empty:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.well-empty-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  opacity: 0.6;
  text-align: center;
  padding: 0 8px;
}

.stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: 'Archivo Black', sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--red);
  border: 3px solid var(--red);
  padding: 4px 10px;
  border-radius: 3px;
  transform: translate(-50%, -50%) rotate(-11deg) scale(1.6);
  opacity: 0;
  background: rgba(255,255,255,0.65);
  pointer-events: none;
}
.stamp.show {
  animation: stamp-thud 0.42s cubic-bezier(.2,1.4,.4,1) forwards;
}
@keyframes stamp-thud {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(-11deg) scale(1.9); }
  60%  { opacity: 1; transform: translate(-50%, -50%) rotate(-11deg) scale(0.92); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-11deg) scale(1); }
}

/* ===== info block ===== */
.info-block {
  margin-top: 22px;
  transform: rotate(0.2deg);
}

.product-name {
  position: relative;
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1;
  margin: 0 0 6px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.product-name::before,
.product-name::after {
  content: 'SOLDER';
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}
.product-name::before { color: #29c7c9; transform: translate(1.5px, 1px); mix-blend-mode: multiply; }
.product-name::after  { color: #d13d6b; transform: translate(-1.5px, -1px); mix-blend-mode: multiply; }

.ticker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.4);
  padding: 3px 8px;
  border: 1px solid rgba(28,23,16,0.35);
  border-radius: 2px;
}

.tagline {
  margin: 0 0 18px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--ink-soft);
  max-width: 46ch;
}

.contents-panel {
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(28,23,16,0.35);
  border-radius: 3px;
  padding: 14px 16px 16px;
}

.panel-head {
  margin: 0 0 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.contents-list {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-size: 17px;
  line-height: 1.65;
}
.contents-list .qty {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  margin-right: 8px;
}

.req-counter {
  margin: 10px 0 2px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.req-flavor {
  min-height: 1.4em;
  margin: 0;
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
}

/* ===== fine print / footer ===== */
.fine-print {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed rgba(28,23,16,0.4);
  transform: rotate(-0.15deg);
}

.warning-line {
  margin: 0 0 16px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 6px 10px;
  background: rgba(184,32,47,0.06);
}

.scan-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}
.barcode {
  width: 100px;
  height: 40px;
  background: rgba(255,255,255,0.55);
  padding: 4px 6px;
}
.sku {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft);
}

.ca-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(28,23,16,0.5);
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 2px;
  position: relative;
}
.ca-box:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.ca-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.ca-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  word-break: break-all;
  text-align: left;
}
.ca-copied {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--teal);
  opacity: 0;
  transition: opacity 0.2s;
}
.ca-copied.show { opacity: 1; }

.qc-line {
  margin: 10px 0 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft);
}

.legal-links {
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
}
.legal-links a {
  color: var(--ink);
  text-decoration: underline;
}
.legal-links a:hover { color: var(--red); }

@media (max-width: 460px) {
  body { padding: 10px 8px 20px; }
  .brand-strip { padding: 6px 12px; }
  .brand-logo { max-width: 220px; }
  .pack { padding: 12px 14px 16px; }
  .blister-row { flex-direction: row; gap: 6px; padding: 8px 6px 10px; }
  .well { aspect-ratio: 3 / 3.1; }
  .well-tag, .well-empty-label { font-size: 9px; }
  .stamp { font-size: 12px; padding: 3px 7px; }
  .info-block { margin-top: 12px; }
  .product-name { font-size: 28px; gap: 8px; margin-bottom: 4px; }
  .tagline { font-size: 15px; margin-bottom: 10px; }
  .contents-panel { padding: 10px 12px 12px; }
  .contents-list { font-size: 14px; line-height: 1.45; margin-bottom: 6px; }
  .req-counter { margin: 6px 0 2px; }
  .fine-print { margin-top: 12px; padding-top: 10px; }
  .warning-line { font-size: 10px; padding: 5px 8px; margin-bottom: 10px; }
  .scan-row { margin-bottom: 10px; }
  .qc-line { margin: 8px 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .stamp.show { animation: none; opacity: 1; transform: translate(-50%, -50%) rotate(-11deg) scale(1); }
  * { transition: none !important; }
}
