/* $QR — scan to buy. Yellow/black industrial label system. */

:root {
  --ink: #0B0B0B;
  --ink-2: #141414;
  --ink-3: #1E1E1E;
  --line: #2A2A2A;
  --yellow: #FFD400;
  --yellow-deep: #E8BE00;
  --yellow-dim: #7A6400;
  --paper: #F2EFE6;
  --paper-2: #FFFFFF;
  --muted: #8C8C86;
  --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gut: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  /* One screen, no scrolling: tape / bar / content / footer. */
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  background-image:
    radial-gradient(120% 80% at 80% -10%, rgba(255, 212, 0, .09), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, transparent 1px 4px);
}

::selection { background: var(--yellow); color: var(--ink); }

/* ---------- hazard tape ---------- */
.tape {
  height: 12px;
  background: repeating-linear-gradient(-45deg,
    var(--yellow) 0 14px, var(--ink) 14px 28px);
  border-bottom: 1px solid var(--ink);
}
.footer .tape { border-bottom: 0; border-top: 1px solid var(--ink); }

/* ---------- top bar ---------- */
main { min-height: 0; overflow: hidden; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: clamp(10px, 1.7vh, 18px) var(--gut);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 26px; height: 20px; align-self: center;
  background:
    linear-gradient(var(--yellow), var(--yellow)) 0 0/2px 100% no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) 5px 0/1px 100% no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) 9px 0/3px 100% no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) 15px 0/1px 100% no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) 19px 0/2px 100% no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) 23px 0/3px 100% no-repeat;
}
.brand-name { font-weight: 900; letter-spacing: .04em; font-size: 20px; }
.brand-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  color: var(--muted); text-transform: uppercase;
}
.topnav { display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; }
.net { color: var(--muted); }
.net::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: var(--yellow); border-radius: 50%; vertical-align: 1px; }
.ghost-link {
  color: var(--ink); background: var(--yellow); text-decoration: none;
  padding: 7px 12px; font-weight: 700; transition: transform .15s ease, background .15s ease;
}
.ghost-link:hover { background: #fff; transform: translateY(-1px); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(20px, 4vw, 64px);
  padding: clamp(14px, 2.4vh, 48px) var(--gut);
  align-items: center;
  height: 100%; min-height: 0;
}
.hero-copy { min-width: 0; min-height: 0; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .26em;
  color: var(--yellow); margin: 0 0 clamp(10px, 1.8vh, 22px);
  display: flex; align-items: center; gap: 10px;
}
.dot { width: 7px; height: 7px; background: var(--yellow); border-radius: 50%; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.title {
  font-size: clamp(52px, min(14vw, 17vh), 172px);
  line-height: .82;
  letter-spacing: -.045em;
  font-weight: 900;
  margin: 0;
  color: var(--paper);
}
.title .dollar { color: var(--yellow); }

.hero-bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: clamp(22px, 6vh, 62px);
  margin: clamp(12px, 2.4vh, 26px) 0 clamp(14px, 2.6vh, 28px);
  overflow: hidden; width: 100%; min-width: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.hero-bars span {
  display: block; background: var(--yellow); height: 100%;
  transform-origin: bottom; transform: scaleY(0);
  animation: grow .5s cubic-bezier(.2,.8,.2,1) forwards;
}
.hero-bars span.dim { background: var(--yellow-dim); }
@keyframes grow { to { transform: scaleY(1); } }

.lede {
  max-width: 46ch; margin: 0 0 clamp(14px, 2.6vh, 30px);
  color: #C9C7BF; font-size: clamp(14px, 1.8vh, 17px);
}

.ca {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--line); background: var(--ink-2);
  padding: clamp(9px, 1.4vh, 12px) 12px clamp(9px, 1.4vh, 12px) 16px;
  margin-bottom: clamp(12px, 2.3vh, 26px);
}
.ca-label { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--muted); }
.ca-value {
  font-family: var(--mono); font-size: 12px; color: var(--paper);
  word-break: break-all; flex: 1 1 240px; min-width: 0;
}
.ca-copy {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; font-weight: 700;
  background: transparent; color: var(--yellow);
  border: 1px solid var(--yellow-dim); padding: 7px 11px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ca-copy:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

/* ---------- buttons ---------- */
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--sans); font-weight: 900; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
  padding: clamp(12px, 1.9vh, 17px) clamp(18px, 2vw, 26px);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--yellow); color: var(--ink); box-shadow: 5px 5px 0 var(--yellow-dim); }
.btn-primary:hover { background: #fff; box-shadow: 8px 8px 0 var(--yellow-deep); transform: translate(-1px, -2px); }
.btn-outline { background: transparent; color: var(--paper); border-color: #3A3A3A; }
.btn-outline:hover { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn-glyph {
  width: 16px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) 0 0/2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 4px 0/1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 7px 0/3px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 12px 0/1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 15px 0/1px 100% no-repeat;
}
.btn-x { font-family: var(--sans); font-weight: 900; font-size: 15px; line-height: 1; }

.hint {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  margin: clamp(10px, 1.8vh, 18px) 0 0; letter-spacing: .04em;
}

/* compact replacement for the old three-panel section */
.flow {
  display: flex; gap: clamp(14px, 2.4vw, 30px); flex-wrap: wrap;
  list-style: none; margin: clamp(12px, 2.2vh, 22px) 0 0; padding: 0;
  border-top: 1px solid var(--line); padding-top: clamp(10px, 1.8vh, 18px);
}
.flow li {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: #9C9A93;
}
.flow span { color: var(--yellow); margin-right: 7px; }

/* ---------- the label card ---------- */
.hero-label {
  position: relative; min-height: 0; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
}
.label-card {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 14px 14px 0 rgba(255, 212, 0, .18);
  min-height: 0;
  display: flex; flex-direction: column;
}
.label-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--ink); color: var(--yellow);
  padding: 13px 18px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .28em;
  flex: none;
}
.label-code { color: #7E7E76; letter-spacing: .2em; }

.label-body {
  padding: clamp(12px, 2vh, 30px);
  min-height: 0; flex: 1 1 auto;
  display: flex; flex-direction: column;
}

.qr-frame {
  position: relative;
  background: var(--yellow);
  border: 1px solid var(--ink);
  padding: clamp(10px, 1.8vh, 22px);
  min-height: 0; flex: 0 1 auto;
  width: 100%; aspect-ratio: 1; max-height: 100%; margin: auto;
  display: flex; align-items: center; justify-content: center;
}
/* square canvas shrinks to whichever of width/height runs out first */
.qr-frame canvas {
  display: block; width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  image-rendering: pixelated;
}
.qr-corners i {
  position: absolute; width: 14px; height: 14px; border: 2px solid var(--ink);
}
.qr-corners i:nth-child(1) { top: 7px; left: 7px; border-right: 0; border-bottom: 0; }
.qr-corners i:nth-child(2) { top: 7px; right: 7px; border-left: 0; border-bottom: 0; }
.qr-corners i:nth-child(3) { bottom: 7px; left: 7px; border-right: 0; border-top: 0; }
.qr-corners i:nth-child(4) { bottom: 7px; right: 7px; border-left: 0; border-top: 0; }

.label-meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: clamp(12px, 2vh, 22px) 0 0; border-top: 1px dashed rgba(11,11,11,.28);
  padding-top: clamp(10px, 1.6vh, 16px); gap: 8px; flex: none;
}
.label-meta div { min-width: 0; }
.label-meta dt {
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  color: #6E6B62; margin-bottom: 5px;
}
.label-meta dd { margin: 0; font-weight: 900; font-size: 14px; letter-spacing: .02em; }

.label-foot {
  border-top: 1px solid var(--ink);
  padding: clamp(9px, 1.4vh, 14px) 18px clamp(10px, 1.5vh, 16px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex: none;
}
.foot-bars { display: flex; align-items: flex-end; gap: 2px; height: clamp(20px, 3.4vh, 34px); flex: 1 1 0; min-width: 0; overflow: hidden; }
.foot-bars span { display: block; background: var(--ink); height: 100%; }
.foot-bars span.short { height: 74%; }
.serial { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: #4A4841; white-space: nowrap; }

.buy-strip {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: clamp(10px, 1.6vh, 16px); padding: clamp(11px, 1.7vh, 15px) 18px;
  flex: none;
  background: var(--yellow); color: var(--ink); text-decoration: none;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .2em;
  transition: background .15s ease, letter-spacing .2s ease;
}
.buy-strip:hover { background: #fff; letter-spacing: .26em; }
.buy-strip .arrow { transition: transform .2s ease; }
.buy-strip:hover .arrow { transform: translateX(5px); }

/* ---------- footer ---------- */
.footer { margin-top: 8px; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: clamp(10px, 1.6vh, 20px) var(--gut) clamp(12px, 1.8vh, 24px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--muted);
}
.fine { letter-spacing: .04em; text-transform: none; color: #6B6963; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--yellow); color: var(--ink);
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em;
  padding: 14px 20px; border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  max-width: calc(100vw - 32px); text-align: center; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 940px) and (min-height: 561px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(10px, 1.8vh, 20px);
  }
  /* stacked: the card takes every pixel the copy above it doesn't need */
  .hero-label { max-width: 520px; width: 100%; margin: 0 auto; height: 100%; min-height: 0; }
  .label-card { height: 100%; }
  .label-meta { display: none; }
  .lede, .flow, .hint { display: none; }
  .hero-bars { height: clamp(16px, 3.4vh, 30px); margin: clamp(8px, 1.5vh, 14px) 0 clamp(9px, 1.6vh, 16px); }
  .title { font-size: clamp(40px, min(15vw, 10vh), 92px); }
  .ca { margin-bottom: clamp(10px, 1.8vh, 18px); }
  /* one line, truncated — the copy button is the real interface here */
  .ca-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 120px; }
  .actions { gap: 10px; }
}

@media (max-width: 640px) {
  .buy-strip { letter-spacing: .12em; }
}

@media (max-width: 640px) and (max-height: 730px) {
  .label-foot { display: none; }
}

/* small phones: strip everything that isn't the code, the two buttons and the
   buy link, so the QR stays big enough to actually read */
@media (max-width: 500px), (max-width: 940px) and (max-height: 730px) {
  .eyebrow, .ca { display: none; }
  .title { font-size: clamp(34px, 9vh, 60px); }
  .hero-bars { height: 14px; margin: 8px 0 12px; }
  .actions { flex-wrap: nowrap; gap: 8px; }
  .actions .btn {
    flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap;
    font-size: 10.5px; letter-spacing: .06em; padding: 13px 8px; gap: 7px;
  }
  .btn-glyph { display: none; }
  .btn-primary { box-shadow: 3px 3px 0 var(--yellow-dim); }
  .label-head { padding: 9px 14px; font-size: 10px; letter-spacing: .18em; }
  .buy-strip { padding: 12px 14px; font-size: 11px; }
}

/* short screens: shed the optional copy before anything gets clipped */
@media (max-height: 760px) {
  .lede { display: none; }
}
@media (max-height: 660px) {
  .flow, .hint { display: none; }
}
@media (max-height: 560px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .hero-bars, .label-meta, .label-foot, .eyebrow, .lede, .flow, .hint { display: none; }
  .title { font-size: clamp(28px, 12vh, 68px); margin-bottom: 10px; }
  .hero-label { height: 100%; min-height: 0; max-width: none; }
  .label-card { height: 100%; }
  .ca { margin-bottom: 12px; padding: 7px 8px 7px 12px; }
  .ca-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 100px; }
  .actions .btn { padding: 11px 14px; font-size: 11px; }
  .label-head { padding: 8px 14px; }
  .buy-strip { padding: 10px 14px; font-size: 11px; }
}
@media (max-width: 560px) {
  .brand-sub, .fine { display: none; }
  .label-meta { grid-template-columns: repeat(3, auto); }
  .actions .btn { flex: 1 1 100%; justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .hero-bars span { transform: scaleY(1); }
}
