/* FastReceipt dev animatic — grey-box scrollytelling.
   Five scenes on one pinned stage; placeholder art is DELIBERATELY drawn as
   dashed grey blocking so nobody mistakes it for final style. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --backdrop: #171412;
  --paper: #f6f2e9;
  --ink: #2b2723;
  --ink-muted: #948b7d;
  --accent: #e07b1f;
  --verified: #1e9e5a;
  --gb: #6f675e;          /* grey-box placeholder stroke */
}

body {
  background:
    radial-gradient(120vw 80vh at 50% -10%, #241f1b 0%, var(--backdrop) 55%),
    var(--backdrop);
  color: var(--paper);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  overflow-x: hidden;
}

.dev-tag {
  position: fixed; top: 12px; right: 12px; z-index: 60;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase;
  color: #6b625a; border: 1px solid #3a332e; border-radius: 3px;
  padding: 3px 7px; background: rgba(23,20,18,.7);
}
.dev-tag a { color: var(--accent); text-decoration: none; }

/* ── stage ─────────────────────────────────────────────────────────────── */
.scroll-track { height: 700vh; position: relative; }
.stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }

.layer {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* grey-box svg art */
.gb { width: min(440px, 86vw); height: auto; display: block; }
.gb-box  { fill: none; stroke: var(--gb); stroke-width: 2.5; stroke-dasharray: 7 5; }
.gb-slot { fill: #0c0a09; stroke: var(--gb); stroke-width: 2; }
.gb-limb { fill: none; stroke: var(--gb); stroke-width: 2.5; stroke-dasharray: 7 5; stroke-linecap: round; }
.gb-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  letter-spacing: .14em; fill: #57504a;
}

/* marker: the POS printer mouth — the receipt's birthplace (JS measures it) */
.marker {
  position: absolute; width: 2px; height: 2px;
  left: 76%; top: 63%;               /* over the gb-slot in the checkout svg */
}

/* ── the hero receipt ──────────────────────────────────────────────────── */
.hero-receipt { z-index: 5; }
.hr-inner {
  width: min(340px, 78vw);
  background: linear-gradient(90deg, #ece6d8 0%, var(--paper) 8%, var(--paper) 92%, #ece6d8 100%);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; line-height: 1.6;
  padding: 18px 18px 14px;
  box-shadow: 0 10px 50px rgba(0,0,0,.55);
}
.hr-line { margin: .3em 0; }
.hr-center { text-align: center; }
.hr-brand { font-weight: 600; letter-spacing: .3em; }
.hr-meta { font-size: 10px; letter-spacing: .14em; color: var(--ink-muted); }
.hr-div { border-bottom: 1.5px dashed rgba(43,39,35,.4); margin: .8em 0; }
.hr-row { display: flex; align-items: baseline; gap: .6ch; white-space: nowrap; }
.hr-row i { flex: 1; border-bottom: 1.5px dotted rgba(43,39,35,.45); transform: translateY(-3px); }
.hr-sale { color: var(--accent); }
.hr-muted { color: var(--ink-muted); }
.hr-total { font-weight: 600; font-size: 14px; }
.hr-check { color: var(--verified); font-style: normal; }
.hr-verified { color: var(--verified); font-size: 9px; letter-spacing: .2em; }

/* ── the phone ─────────────────────────────────────────────────────────── */
#phone { z-index: 10; }
.phone-body {
  width: min(230px, 56vw); aspect-ratio: 9 / 18.5;
  border: 2.5px dashed var(--gb); border-radius: 28px;
  padding: 10px; background: rgba(23,20,18,.35);
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 18px; overflow: hidden; }

/* camera mode: a transparent window — the real receipt shows through it */
.screen-cam { position: absolute; inset: 0; }
.vf { position: absolute; width: 26px; height: 26px; border: 3px solid var(--accent); }
.vf-tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.vf-tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.vf-bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.vf-br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.scan-sweep {
  position: absolute; left: 0; right: 0; top: -20%; height: 18%;
  background: linear-gradient(rgba(224,123,31,0), rgba(224,123,31,.4), rgba(224,123,31,0));
  opacity: 0;
}

/* app mode: placeholder UI */
.screen-app {
  position: absolute; inset: 0; background: #f2ede2; padding: 12px; opacity: 0;
  display: flex; flex-direction: column; gap: 9px;
}
.ui-bar { height: 22px; border-radius: 5px; background: var(--ink); opacity: .85; }
.ui-row { height: 13px; border-radius: 4px; background: rgba(43,39,35,.18); }
.ui-row.w60 { width: 60%; }
.ui-chip {
  align-self: flex-start; font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  color: #fff; background: var(--verified); border-radius: 3px; padding: 2px 7px;
}
.ui-label {
  margin-top: auto; font-family: 'IBM Plex Mono', monospace; font-size: 9px;
  letter-spacing: .1em; color: #a49a8a; text-align: center;
}

/* ── S5 bubble ─────────────────────────────────────────────────────────── */
#charCalm { z-index: 4; }
.bubble {
  position: absolute; top: 2%; left: 62%;
  transform-origin: 20% 100%;
}
.bubble-body {
  display: inline-block; font-size: 30px; font-weight: 700; color: var(--ink);
  background: var(--paper); border-radius: 50%;
  padding: 22px 26px; box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.bubble-body b { color: var(--verified); }
.bubble-dot { position: absolute; background: var(--paper); border-radius: 50%; }
.bd1 { width: 14px; height: 14px; left: 4px; bottom: -14px; }
.bd2 { width: 8px; height: 8px; left: -8px; bottom: -30px; }

/* ── panels ────────────────────────────────────────────────────────────── */
.panel {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: min(330px, 84vw); z-index: 20;
}
.panel-l { left: clamp(16px, 6vw, 90px); }
.panel-r { right: clamp(16px, 6vw, 90px); }
.p-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  letter-spacing: .2em; color: var(--accent); margin-bottom: .9em;
}
.panel h2 { font-size: clamp(22px, 3.2vw, 30px); line-height: 1.2; letter-spacing: -.01em; margin-bottom: .55em; }
.panel h2 em { color: var(--accent); font-style: normal; }
.panel p { font-size: 15px; line-height: 1.6; color: #cfc7ba; }
.cta {
  display: inline-block; margin-top: 1.3em; font-weight: 600;
  color: var(--backdrop); background: var(--paper);
  padding: 12px 26px; border-radius: 5px; text-decoration: none;
}
.cta:hover { background: var(--accent); color: #fff; }

/* ── tear-off footer ───────────────────────────────────────────────────── */
.tear { padding-top: 10vh; }
.tear-paper {
  width: min(440px, 93vw); margin: 0 auto; text-align: center;
  background: var(--paper); color: var(--ink);
  font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  padding: 34px 26px 22px;
}
.logo { width: 190px; max-width: 70%; margin-bottom: 1em; }
.tear-paper p { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
.barcode {
  height: 48px; margin: 1.4em auto .5em; width: 78%;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 11px,
    var(--ink) 11px 15px, transparent 15px 17px, var(--ink) 17px 18px, transparent 18px 24px,
    var(--ink) 24px 26px, transparent 26px 29px);
}
.tear-meta { font-size: 10px; letter-spacing: .16em; margin-top: .5em; }
.tear-meta.muted { color: var(--ink-muted); }
.tear-edge {
  height: 16px; width: min(440px, 93vw); margin: 0 auto 12vh;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 30%, 96% 100%, 92% 30%, 88% 100%, 84% 30%, 80% 100%, 76% 30%, 72% 100%, 68% 30%, 64% 100%, 60% 30%, 56% 100%, 52% 30%, 48% 100%, 44% 30%, 40% 100%, 36% 30%, 32% 100%, 28% 30%, 24% 100%, 20% 30%, 16% 100%, 12% 30%, 8% 100%, 4% 30%, 0 100%);
}

/* ── mobile: panels dock to the bottom ─────────────────────────────────── */
@media (max-width: 760px) {
  .panel, .panel-l, .panel-r {
    left: 16px; right: 16px; width: auto; top: auto; bottom: 18px;
    transform: none;
    background: rgba(23,20,18,.82); border: 1px solid #322c27;
    border-radius: 10px; padding: 14px 16px;
  }
  .layer { top: 42%; }
}

/* ── static storyboard: no-JS / reduced-motion / before build ──────────── */
body.static .scroll-track { height: auto; }
body.static .stage { position: static; height: auto; overflow: visible; }
body.static .layer, body.static .panel {
  position: static; transform: none !important; opacity: 1 !important;
  margin: 44px auto; display: block;
}
body.static .panel { max-width: 560px; }
body.static .screen-app { opacity: 1; position: static; margin-top: 8px; min-height: 300px; }
body.static .bubble { position: static; display: inline-block; margin: 12px 0 0 40%; }
