/* ===== SAPU SQUAD — daylight paper x hi-vis x thermal receipt ===== */
/* No glass. No glow. Hard shadows, solid borders, paper and tape. */
:root {
  --page: #f2ecdd;     /* warm paper page */
  --paper: #fdfaf1;    /* receipt / chip paper */
  --ink: #1c1813;
  --dim: #75705f;
  --hivis: #ff5f00;    /* safety orange */
  --tape: #ffd400;     /* hazard yellow */
  --sky: #cdeef7;      /* daylight tint behind the planet */
  --rule: #d8d0bb;     /* dashed receipt rules */
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  overflow-x: hidden;
}
/* print grain over everything */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2147483647; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2"/></filter><rect width="140" height="140" filter="url(%23n)"/></svg>');
}
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: .5px; }

/* ===== hero ===== */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 540px; overflow: hidden;
  background: radial-gradient(ellipse 90% 65% at 50% 38%, var(--sky) 0%, #e3ecdf 55%, var(--page) 100%);
}
#globe { position: absolute; inset: 0; }
#globe canvas { outline: none; }

.hero-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 18px 0;
  pointer-events: none;
}
.logo {
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 44px);
  line-height: .92;
  color: var(--ink);
  text-shadow: 4px 4px 0 var(--hivis);
  transform: rotate(-2deg);
}
.tag-demo {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; line-height: 1.35;
  text-align: right; color: var(--ink);
  background: var(--tape); border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 6px 10px; transform: rotate(1.5deg);
}

.hero-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 0 14px max(18px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.tap-hint { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); }
.stats { display: flex; gap: 10px; width: 100%; max-width: 560px; }
.stat {
  flex: 1; text-align: center; padding: 10px 6px 11px;
  background: var(--paper); border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(28, 24, 19, .9);
}
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(19px, 5.5vw, 32px); color: var(--hivis); line-height: 1.1; }
.stat span { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.scroll-cue {
  pointer-events: auto; text-decoration: none;
  font-family: var(--font-display); font-size: 14px; letter-spacing: 1px;
  color: #fff; background: var(--hivis);
  border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  padding: 11px 20px 10px; transform: rotate(-1deg);
  transition: transform .1s ease, box-shadow .1s ease;
}
.scroll-cue:hover { transform: rotate(-1deg) translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.scroll-cue:active { transform: rotate(-1deg) translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

/* ===== hazard ticker ===== */
.ticker {
  overflow: hidden; background: var(--tape); padding: 10px 0;
  border-top: 8px solid; border-bottom: 8px solid;
  border-image: repeating-linear-gradient(-45deg, var(--ink) 0 10px, var(--tape) 10px 20px) 8;
}
.ticker-track {
  display: inline-flex; gap: 0; white-space: nowrap;
  animation: slide 26s linear infinite;
  font-family: var(--font-display); font-size: 15px; color: var(--ink);
}
.ticker-track span { display: inline-block; }
.ticker-track span::after { content: "✕"; margin: 0 22px; color: var(--hivis); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== receipts ===== */
main { max-width: 1060px; margin: 0 auto; padding: 56px 16px 24px; }
.receipts h2, .cta h2 { font-size: clamp(30px, 6.5vw, 48px); color: var(--ink); }
.receipts h2 mark { background: linear-gradient(0deg, var(--tape) 0 42%, transparent 42%); color: var(--ink); padding: 0 6px; }
.sub { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--dim); margin: 10px 0 24px; }
.cards {
  display: flex; gap: 20px; overflow-x: auto; padding: 6px 2px 26px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.cards::-webkit-scrollbar { height: 8px; }
.cards::-webkit-scrollbar-thumb { background: #c9c0a8; }
.loading { font-family: var(--font-mono); font-weight: 700; color: var(--dim); }

/* --- the receipt --- */
.card {
  position: relative; flex: 0 0 262px; scroll-snap-align: start;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-mono);
  border: 1px solid #e3dcc6;
  box-shadow: 6px 6px 0 rgba(28, 24, 19, .9);
  transform: rotate(-.6deg);
  margin-bottom: 12px;
  cursor: pointer;
}
.card:nth-child(even) { transform: rotate(.7deg); }
.card:hover { transform: rotate(0) translateY(-3px); }
/* perforated sawtooth bottom */
.card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px;
  background:
    linear-gradient(135deg, var(--paper) 50%, transparent 50%) 0 0 / 14px 10px repeat-x,
    linear-gradient(-135deg, var(--paper) 50%, transparent 50%) 7px 0 / 14px 10px repeat-x;
}
.card.flash { outline: 4px solid var(--hivis); outline-offset: 3px; }

.r-head {
  text-align: center; padding: 12px 12px 8px;
  font-weight: 700; font-size: 14px; letter-spacing: 2px;
}
.r-head span { display: block; font-size: 9.5px; letter-spacing: 3px; color: var(--dim); margin-top: 2px; }

.ba { display: grid; grid-template-columns: 1fr 1fr; height: 128px; border-top: 2px dashed var(--rule); border-bottom: 2px dashed var(--rule); }
.ba > div { position: relative; overflow: hidden; }
.ba img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9) contrast(1.05); }
.ba .ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #ece5d2 0 8px, #e2dac4 8px 16px);
  color: #9a927c; font-size: 9px; font-weight: 700; letter-spacing: 1px;
}
.ba .b { border-right: 2px dashed var(--rule); }
.ba .tag {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 700; letter-spacing: 2px; padding: 2px 7px;
  background: var(--ink); color: var(--paper);
}

.r-rows { padding: 10px 14px 4px; font-size: 12px; }
.r-rows > div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.r-rows dt { color: var(--dim); font-weight: 400; white-space: nowrap; }
.r-rows dt::after { content: " ·············"; letter-spacing: -1px; color: var(--rule); }
.r-rows dd { font-weight: 700; text-align: right; }
.r-total { border-top: 2px dashed var(--rule); margin-top: 6px; padding-top: 7px !important; font-size: 15px; }
.r-total dd { color: var(--hivis); }

.r-note { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 8px 10px 2px; }
.barcode {
  height: 30px; margin: 10px 18px 4px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 11px, var(--ink) 11px 14px, transparent 14px 17px);
}
.r-id { text-align: center; font-size: 9px; letter-spacing: 2px; color: var(--dim); padding-bottom: 14px; }

.stamp {
  position: absolute; top: 148px; left: 50%; z-index: 1;
  transform: translateX(-50%) rotate(-11deg);
  font-family: var(--font-display); font-size: 20px; letter-spacing: 2px;
  color: var(--hivis); border: 3px solid var(--hivis); padding: 2px 10px;
  opacity: .9; mix-blend-mode: multiply;
}
.stamp-ok { color: #1a7a3a; border-color: #1a7a3a; }

/* ===== how ===== */
.how { display: grid; gap: 12px; margin: 48px 0; }
.how-step {
  display: flex; align-items: center; gap: 16px;
  background: var(--paper); border: 2px solid var(--ink); padding: 16px 18px;
  box-shadow: 4px 4px 0 rgba(28, 24, 19, .9);
}
.how-step span { font-family: var(--font-display); font-size: 24px; color: var(--hivis); }
.how-step b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 14px; letter-spacing: 1px; color: var(--ink); margin-bottom: 2px; }
.how-step p { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--dim); }
@media (min-width: 720px) { .how { grid-template-columns: 1fr 1fr 1fr; } }

/* ===== cta / footer ===== */
.cta { text-align: center; padding: 10px 0 48px; }
.socials { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.btn {
  text-decoration: none; display: inline-block;
  font-family: var(--font-display); font-size: 14px; letter-spacing: 1px;
  color: var(--ink); background: var(--tape);
  border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  padding: 13px 22px 12px;
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn:nth-child(1) { transform: rotate(-1.2deg); }
.btn:nth-child(2) { transform: rotate(.8deg); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn-soon { background: transparent; color: var(--dim); border: 2px dashed #b5ad98; box-shadow: none; transform: rotate(-.5deg); cursor: default; }
.btn-soon:hover { transform: rotate(-.5deg); box-shadow: none; }
footer { text-align: center; padding: 20px 16px 38px; }
footer p { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; color: var(--dim); }

/* ===== zoom buttons ===== */
.zoomctl {
  position: absolute; right: 14px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 3;
  display: flex; flex-direction: column; gap: 8px;
}
@media (max-width: 640px) {
  .zoomctl { bottom: auto; top: 44%; right: 10px; }
}
.zoomctl button {
  width: 42px; height: 42px; font-family: var(--font-display); font-size: 20px;
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease;
}
.zoomctl button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.zoomctl button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ===== globe pin tooltip ===== */
.scene-tooltip { pointer-events: none; }
.tip {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  padding: 8px 10px; max-width: 220px;
}
.tip span { display: block; font-size: 9px; letter-spacing: 1.5px; color: var(--dim); margin-top: 6px; }
.tip-ba { display: flex; gap: 4px; margin-top: 6px; }
.tip-ba img { width: 96px; height: 60px; object-fit: cover; display: block; }
.tip-ph {
  width: 96px; height: 60px; display: grid; place-items: center; font-style: normal;
  font-size: 8px; letter-spacing: 1px; color: #9a927c;
  background: repeating-linear-gradient(45deg, #ece5d2 0 8px, #e2dac4 8px 16px);
}

/* ===== post lightbox ===== */
body.post-open { overflow: hidden; }
.post-overlay[hidden] { display: none; }
.post-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(28, 24, 19, .72);
  display: grid; place-items: center; padding: 18px;
  overflow-y: auto;
}
.post-paper {
  position: relative; width: min(420px, 100%); max-height: calc(100vh - 36px); overflow-y: auto;
  background: var(--paper); color: var(--ink); font-family: var(--font-mono);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .85); transform: rotate(-.4deg);
  padding-bottom: 4px;
}
.post-close {
  position: sticky; top: 8px; float: right; margin: 8px 10px 0 0; z-index: 2;
  width: 34px; height: 34px; font-family: var(--font-mono); font-weight: 700; font-size: 15px;
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink); cursor: pointer;
}
.post-stamp { top: 110px; font-size: 26px; }
.post-media { border-top: 2px dashed var(--rule); border-bottom: 2px dashed var(--rule); }
.post-media .pm { position: relative; }
.post-media .pm + .pm { border-top: 2px dashed var(--rule); }
.post-media img { width: 100%; max-height: 300px; object-fit: cover; display: block; filter: saturate(.9) contrast(1.05); }
.post-media .ph {
  height: 170px; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #ece5d2 0 8px, #e2dac4 8px 16px);
  color: #9a927c; font-size: 10px; font-weight: 700; letter-spacing: 2px;
}
.post-media .tag {
  position: absolute; bottom: 8px; left: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; padding: 3px 8px;
  background: var(--ink); color: var(--paper);
}
.post-clips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 0; }
.post-clips a { font-size: 11px; font-weight: 700; color: var(--hivis); }
.post-actions { display: grid; place-items: center; padding: 8px 14px 2px; }
.post-link {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 1px;
  background: var(--tape); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
  padding: 9px 16px 8px; max-width: 100%; overflow-wrap: anywhere;
}
.post-link:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}
