/* Receiptbook - design tokens
   palette off the approved art: orange field, cream receipt paper, verified green, ink black.
   type: Archivo Black (stamp-weight display) + Courier Prime (receipt-printer mono).
   spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48px. radius: 6px. motion: one timed class-toggle. */

@font-face {
  font-family: "Archivo Black";
  src: url("assets/fonts/archivo-black-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("assets/fonts/courier-prime-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("assets/fonts/courier-prime-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #e8823c;
  --bg-deep: #d66f2c;
  --paper: #f5e7c4;
  --paper-shade: #e9d5a0;
  --ink: #201406;
  --green: #2ecc71;
  --green-dark: #1e9c57;
  --ring: #c15a26;
  --note: #faf1d8;
  --note-shadow: rgba(32, 20, 6, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Courier Prime", ui-monospace, monospace;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 24px 24px;
  gap: 8px;
}

/* header */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 2px solid var(--ink);
  display: block;
  object-fit: cover;
}

.brand-name {
  font-family: "Archivo Black", system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-ticker {
  font-size: 12px;
  opacity: 0.75;
}

.bar-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ca-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: "Courier Prime", monospace;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink);
  max-width: 260px;
}

.ca-label {
  font-weight: 700;
  opacity: 0.6;
}

.ca-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-link {
  width: 36px;
  height: 36px;
  display: block;
}
.icon-link svg { width: 100%; height: 100%; }

/* stage */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  max-width: 720px;
  margin-top: 4px;
}

.hero h1 {
  font-family: "Archivo Black", system-ui, sans-serif;
  font-size: clamp(24px, 3.6vw, 38px);
  line-height: 1.12;
  margin: 0 0 10px;
  color: var(--ink);
}

.hero .sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.85;
}

/* the wall */
.wall-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.wall {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 720px;
  padding-bottom: 34px;
}

.receipt {
  background: var(--paper);
  padding: 10px 10px 16px;
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 92%,
    91.7% 100%, 83.3% 92%, 75% 100%, 66.7% 92%,
    58.3% 100%, 50% 92%, 41.7% 100%, 33.3% 92%,
    25% 100%, 16.7% 92%, 8.3% 100%, 0% 92%
  );
  box-shadow: 0 3px 0 rgba(32, 20, 6, 0.12);
}

.barcode {
  height: 16px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--ink) 0px, var(--ink) 1.5px,
    transparent 1.5px, transparent 3.5px,
    var(--ink) 3.5px, var(--ink) 4.3px,
    transparent 4.3px, transparent 6.5px,
    var(--ink) 6.5px, var(--ink) 9px,
    transparent 9px, transparent 10.5px
  );
  margin-bottom: 6px;
}

.line {
  height: 3px;
  background: var(--ink);
  opacity: 0.7;
  margin-bottom: 4px;
  border-radius: 2px;
}
.line.l1 { width: 72%; }
.line.l2 { width: 46%; margin-bottom: 8px; }

.tx-line {
  font-size: 8.5px;
  letter-spacing: 0.02em;
  margin: 2px 0 8px;
  color: var(--ink);
  opacity: 0.85;
  word-break: break-all;
}

.stamp {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--ring);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.stamp svg { width: 15px; height: 15px; }

/* the sad note, tucked corner, breaks the grid geometry on purpose */
.note {
  position: absolute;
  right: -6px;
  bottom: -20px;
  width: 30%;
  aspect-ratio: 1 / 1;
  max-width: 150px;
  background: var(--note);
  border: none;
  border-radius: 2px;
  transform: rotate(7deg);
  box-shadow: 0 8px 16px var(--note-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.note-face { width: 55%; height: 55%; }
.note-check {
  display: none;
  width: 30%;
  height: 30%;
  padding: 12px;
  background: var(--green);
  border: 3px solid var(--ring);
  border-radius: 50%;
  box-sizing: content-box;
}

.note.verified {
  animation: stamp-pop 0.32s ease-out;
}
.note.verified .note-face { display: none; }
.note.verified .note-check { display: block; }

@keyframes stamp-pop {
  0% { transform: rotate(7deg) scale(0.85); }
  55% { transform: rotate(7deg) scale(1.12); }
  100% { transform: rotate(7deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .note.verified { animation: none; }
}

.caption {
  margin: 0;
  font-size: 13px;
  text-align: center;
  min-height: 18px;
}

.meta-row {
  margin: 0;
  font-size: 11px;
  opacity: 0.75;
  display: flex;
  gap: 8px;
}
.dot { opacity: 0.6; }

/* footer chrome */
.chrome {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
  font-size: 12px;
}

.chrome-line b { font-weight: 700; }

.buy-btn {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: "Archivo Black", system-ui, sans-serif;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 6px;
  border: 2px solid var(--ink);
}
.buy-btn:hover { background: var(--paper); color: var(--ink); }

/* responsive */
@media (max-width: 720px) {
  .wall { grid-template-columns: repeat(2, 1fr); padding-bottom: 76px; }
  .note { width: 40%; max-width: 120px; right: -2px; bottom: -18px; }
  .wall-wrap { gap: 16px; }
  .page { padding: 14px 16px 20px; justify-content: flex-start; }
}

@media (max-width: 400px) {
  .wall { gap: 10px; }
  .tx-line { font-size: 7.5px; }
}
