/* ==========================================================================================
   BarcoderX website: homepage layer. Author: P4 Software.
   Hero and proof stage, engine rail with the three delivery forms, and the preview-equals-print band.
   Tokens only: every colour, space, radius and type size comes from /brand/tokens.css through site.css.
   Light theme only. Mobile first. Breakpoints: 40rem (640), 48rem (768), 56rem (896), 64rem (1024).
   ========================================================================================== */

/* Presale strip: one calm line above the hero that says the presale is open and links to the reservation page. It is a tinted band with a
   hairline, not a coloured alert, so it reads as information and does not compete with the headline. No clock or date: the offer is stated in
   the present tense. The text and the link wrap together on a phone; the link keeps the 44px touch target from .link. */
.presale-bar { background: var(--bx-green-50); border-bottom: var(--hair); }
.presale-bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bx-space-1) var(--bx-space-4); padding-block: var(--bx-space-2); }
.presale-bar p { max-width: none; font-size: var(--bx-text-sm); line-height: var(--bx-leading-snug); color: var(--bx-ink); }
.presale-bar .link { color: var(--bx-green-700); }

/* ============================== HERO ============================== */
.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5.5rem) clamp(2rem, 1.5rem + 3vw, 4rem); }
.hero-top { display: grid; gap: var(--bx-space-6); }
.hero-kicker { max-width: none; }
/* Display size: a full-container headline, fluid from a 360px phone to 1280px+, two lines at every width. */
.hero h1 { font-size: clamp(2.5rem, 0.9rem + 7.6vw, 7rem); line-height: 0.98; letter-spacing: -0.045em; max-width: none; }
.hero-sub { display: grid; gap: var(--bx-space-6); }
.hero .lede { max-width: 50ch; }
.hero-act { display: grid; gap: var(--bx-space-4); justify-items: start; align-content: start; }
.hero-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bx-space-2) var(--bx-space-3); font-size: var(--bx-text-sm); color: var(--bx-text-muted); max-width: none; }
@media (min-width: 64rem) {
  .hero-sub { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--bx-space-16); align-items: start; margin-top: var(--bx-space-4); }
  .hero-act { padding-top: var(--bx-space-1); }
}

/* Price line: the starting price in one line under the "at a glance" row, so a visitor deciding whether this is in budget does not have to
   open the pricing page first. The bold part is the number; the sentence and the link wrap on a phone. */
.price-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--bx-space-4); max-width: none; padding-block: var(--bx-space-2); border-top: var(--hair); font-size: var(--bx-text-sm); color: var(--bx-text-muted); }
.price-line strong { color: var(--bx-ink); font: 650 var(--bx-text-lg)/1.3 var(--bx-font-display); letter-spacing: -0.01em; }

/* Restrained motion, CSS only, runs once. Reduced-motion users get the final state (site.css switches animation off).
   The headline, intro and buttons only slide (transform) and are never transparent: a browser does not count an element with
   opacity 0 as painted, so a fade-in made the animated text, not the first paint, the Largest Contentful Paint candidate, up to a
   second late on some runs. The proof stage below them may still fade, because it is not what the visitor reads first. */
.hero-top > * { animation: slide 800ms var(--bx-ease) both; }
.hero-top > :nth-child(2) { animation-delay: 80ms; }
.hero-top > :nth-child(3) { animation-delay: 200ms; }
.stage { animation: rise 900ms var(--bx-ease) 320ms both; }
@keyframes slide { from { transform: translateY(14px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
/* The scan bar moves with transform, which the browser can run off the main thread; animating "top" re-laid-out the label on every
   frame. The moving element is as tall as the label and carries the bar on its bottom edge, so a percentage translate is enough:
   it starts with the bar at the top (the element lifted by its own height, plus the bar's 3px) and ends with it at the bottom. */
@keyframes scan { 0% { transform: translateY(calc(-100% + 3px)); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } }

/* ---- Proof stage: a light workbench holding one source, one layout and three outputs ---- */
.stage { margin: var(--bx-space-12) 0 0; }
.stage-in { --cut: 30px; --cut-edge: var(--bx-gray-300); --cut-fill: var(--bx-gray-100); }
.stage-in > .stage-body { display: grid; gap: var(--bx-space-8); padding: var(--bx-space-5); background-image: radial-gradient(circle, var(--bx-gray-300) 1px, transparent 1.4px); background-size: 16px 16px; }
.stage-col { display: grid; gap: var(--bx-space-3); align-content: start; min-width: 0; position: relative; }
.stage-h { font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bx-gray-700); max-width: none; }
.stage-h b { color: var(--bx-green-600); font-weight: 600; margin-right: var(--bx-space-2); }
.stage .code pre { font-size: 0.78rem; line-height: 1.7; }
@media (max-width: 39.999rem) { .stage .code pre { font-size: 0.72rem; } }
/* Three stage columns share a narrow container between 1024 and 1152px: step the type down a notch so the sample does not scroll. */
@media (min-width: 64rem) and (max-width: 71.999rem) { .stage .code pre { font-size: 0.72rem; } }
.hero-label { position: relative; width: min(100%, 15.5rem); margin-inline: auto; }
/* The scan overlay covers the label's inside (1px edge, 6px ink strip) and is clipped to the same cut corner. It is a sibling of
   .lbl-wrap, which carries the drop shadow: nothing animated lives inside the filtered element, so the shadow is drawn once. */
.scan-clip { position: absolute; inset: 7px 1px 1px 1px; overflow: hidden; pointer-events: none; clip-path: polygon(0 0, calc(100% - 15.4px) 0, 100% 15.4px, 100% 100%, 0 100%); }
.hero .lbl .cut-in { position: relative; overflow: hidden; aspect-ratio: 2 / 3; grid-template-rows: auto auto auto 1fr auto auto auto; }
.l-big { align-self: center; font: 800 2.1rem/1 var(--bx-font-sans); letter-spacing: -0.04em; }
.l-big small { display: block; margin-top: var(--bx-space-2); font: 500 0.6rem/1.3 var(--bx-font-mono); letter-spacing: 0.1em; color: var(--bx-gray-600); }
.l-scan { position: absolute; inset: 0; opacity: 0; will-change: transform; animation: scan 2.4s var(--bx-ease) 1s 1 both; pointer-events: none; }
.l-scan::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--bx-green-500); box-shadow: 0 0 18px 5px color-mix(in srgb, var(--bx-green-500) 32%, transparent); }

.outs { display: grid; gap: var(--bx-space-3); position: relative; }
.out { position: relative; display: grid; gap: var(--bx-space-2); padding: var(--bx-space-3) var(--bx-space-4) var(--bx-space-4); background: var(--bx-surface); border: 1px solid var(--bx-border-strong); min-width: 0; }
.out-h { display: flex; align-items: center; gap: var(--bx-space-2); font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bx-green-600); max-width: none; }
.out-fmt { color: var(--bx-ink); }
/* Ready tick: lime fill with an ink edge and the 45-degree cut; it pops in once the scan has passed. */
.tick { margin-left: auto; width: 0.8rem; height: 0.8rem; background: var(--bx-lime-500); border: 2px solid var(--bx-ink); clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%); animation: pop 450ms var(--bx-ease) 2.3s both; }
.out:nth-child(2) .tick { animation-delay: 2.5s; }
.out:nth-child(3) .tick { animation-delay: 2.7s; }
.out-img img { width: 100%; max-width: 13rem; height: auto; image-rendering: pixelated; border: 1px solid var(--bx-gray-300); }
.out-pdf { display: flex; align-items: center; gap: var(--bx-space-3); font-size: var(--bx-text-sm); color: var(--bx-text-muted); }
.out-pdf .pg { flex: none; width: 2rem; height: 2.6rem; border: 1px solid var(--bx-border-strong); background: repeating-linear-gradient(180deg, transparent 0 5px, var(--bx-gray-300) 5px 6px) 50% 8px / 64% 70% no-repeat; }
.out-zpl { margin: 0; overflow-x: auto; font: 400 0.72rem/1.65 var(--bx-font-mono); color: var(--bx-gray-700); }
.out-zpl .k { color: var(--bx-green-600); } .out-zpl .c { color: var(--bx-gray-600); }
@media (min-width: 64rem) {
  .stage-in > .stage-body { grid-template-columns: minmax(0, 5fr) 15.5rem minmax(0, 4.2fr); gap: var(--bx-space-10); align-items: start; padding: var(--bx-space-8); }
  /* Connectors in ink: a stub from the label into a spine, and ticks from the spine to each output. */
  .stage-lbl::after { content: ""; position: absolute; left: 100%; top: 50%; width: var(--bx-space-10); height: 2px; background: var(--bx-ink); }
  .outs::before { content: ""; position: absolute; left: calc(var(--bx-space-5) * -1); top: 2.1rem; bottom: 2.1rem; width: 2px; background: var(--bx-ink); }
  .out::before { content: ""; position: absolute; left: calc(var(--bx-space-5) * -1); top: 2.1rem; width: var(--bx-space-5); height: 2px; background: var(--bx-ink); }
  .stage-lbl::after { width: calc(var(--bx-space-10) - var(--bx-space-5)); }
}

/* Tablet: source and label side by side, the three outputs in a row beneath. */
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .stage-in > .stage-body { grid-template-columns: minmax(0, 1fr) 15.5rem; align-items: start; padding: var(--bx-space-6); }
  .stage-out { grid-column: 1 / -1; }
  .outs { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}
/* ============================== ENGINE: rail + three ways ============================== */
.rail { --cut: 22px; --cut-edge: var(--bx-ink); --cut-fill: var(--bx-ink); color: var(--bx-white); }
.rail .cut-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--bx-space-1) var(--bx-space-8); padding: var(--bx-space-4) calc(var(--cut) + var(--bx-space-4)) var(--bx-space-4) var(--bx-space-6); font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.rail-name { color: var(--bx-lime-500); font-weight: 600; letter-spacing: 0.14em; }
.rail-flow { color: var(--bx-gray-100); }
.rail-flow i { color: var(--bx-lime-500); font-style: normal; padding-inline: var(--bx-space-1); }

.ways { display: grid; gap: 0; }
/* Flex column so the "details" links sit on one baseline across the three columns whatever the copy length (Spanish included). */
.ways > li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--bx-space-3); padding: var(--bx-space-8) 0 var(--bx-space-8); border-top: var(--rule); min-width: 0; }
.ways > li:first-child { border-top: 0; }
.ways p:not(.way-tag) { color: var(--bx-text-muted); }
.way-tag { font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bx-green-600); }
.port { display: none; }
.facts-list { display: grid; gap: var(--bx-space-2); margin-block: var(--bx-space-2); }
.facts-list li { display: flex; gap: var(--bx-space-3); font: 500 var(--bx-text-sm)/1.45 var(--bx-font-mono); color: var(--bx-gray-700); }
.facts-list li::before { content: ""; flex: none; width: 0.5rem; height: 2px; margin-top: 0.7em; background: var(--bx-ink); }
.ways .link { margin-top: auto; }
.ways .facts-list { margin-bottom: var(--bx-space-2); }
@media (min-width: 56rem) {
  .ways { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--bx-space-10); }
  .ways > li { border-top: 0; padding-top: 0; }
  /* A drop line from the rail into each column, ending in the single lime accent of this screen (a fill with an ink edge). */
  .port { display: block; position: relative; width: 2px; height: 2.25rem; margin-left: var(--bx-space-6); background: var(--bx-ink); }
  .port::after { content: ""; position: absolute; left: -7px; bottom: -4px; width: 16px; height: 16px; background: var(--bx-lime-500); border: 2px solid var(--bx-ink); clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%); }
  .ways > li { padding-top: 0; }
  .ways > li > .way-tag { margin-top: var(--bx-space-6); }
}

.agent-strip { --cut: 22px; --cut-edge: var(--bx-gray-300); margin-top: var(--bx-space-4); }
.agent-strip .cut-in { display: grid; gap: var(--bx-space-5); align-items: center; padding: var(--bx-space-6); padding-right: calc(var(--cut) + var(--bx-space-4)); }
.agent-strip p:not(.way-tag) { color: var(--bx-text-muted); max-width: 52ch; }
.agent-meta { display: grid; gap: var(--bx-space-2); justify-items: start; }
.agent-meta .chips { margin: 0; }
@media (min-width: 56rem) {
  .agent-strip .cut-in { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) auto; gap: var(--bx-space-10); }
  .agent-meta { justify-items: end; }
}
/* ============================== PREVIEW = PRINT (ink band) ============================== */
.proof .sec-head h2 { color: var(--bx-white); }
.trio { display: grid; gap: var(--bx-space-4); }
.tri { margin: 0; display: grid; gap: var(--bx-space-3); align-content: start; min-width: 0; }
.tri-head { display: flex; gap: var(--bx-space-3); align-items: baseline; font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bx-gray-400); max-width: none; }
.tri-head b { color: var(--bx-lime-500); font-weight: 600; }
.tri-head i { margin-left: auto; font-style: normal; color: var(--bx-white); }
.tri figcaption { font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); color: var(--bx-gray-400); }
.eq { display: grid; place-items: center; font: 600 2rem/1 var(--bx-font-mono); color: var(--bx-lime-500); padding-block: var(--bx-space-1); }

/* Panel 01: the label drawn in vector. One unit (--u) equals one dot of the 164 x 112 bitmap crop, so panels 01 and 02 line up. */
.vlabel { container-type: inline-size; position: relative; aspect-ratio: 164 / 112; background: var(--bx-white); color: var(--bx-ink); overflow: hidden; --u: calc(100cqw / 164); }
.v-strip, .v-rule { position: absolute; background: var(--bx-ink); }
.v-strip { left: 0; right: 0; top: 0; height: calc(var(--u) * 3); }
.v-rule { left: calc(var(--u) * 8); top: calc(var(--u) * 56); width: calc(var(--u) * 148); height: calc(var(--u) * 2); }
.v-t { position: absolute; left: calc(var(--u) * 8); top: calc(var(--u) * var(--y, 0)); white-space: nowrap; line-height: 1.1; }
.v-small { --y: 7; font: 700 calc(var(--u) * 7)/1 var(--bx-font-mono); letter-spacing: 0.04em; }
.v-head { --y: 14.5; left: calc(var(--u) * 7); font: 800 calc(var(--u) * 11.2)/1.1 var(--bx-font-sans); letter-spacing: -0.02em; }
.v-body { font: 400 calc(var(--u) * 8.4)/1.1 var(--bx-font-sans); }
.v-hr { --y: 99.5; left: calc(var(--u) * 9); font: 500 calc(var(--u) * 7.4)/1 var(--bx-font-mono); }
.v-bars { position: absolute; left: calc(var(--u) * 8); top: calc(var(--u) * 63); width: calc(var(--u) * 148); height: calc(var(--u) * 34); }

/* Panel 02: the real 1bpp pixels, enlarged without smoothing, plus an 8x loupe on a handful of dots. */
.bitmap { position: relative; line-height: 0; background: var(--bx-white); }
.bitmap img { width: 100%; height: auto; image-rendering: pixelated; }
/* The loupe shows an 11 x 11 dot window of the crop at 8x. The green frame on the bitmap marks the same window (centre 14, 22). */
.loupe-mark { position: absolute; left: 5.18%; top: 14.73%; width: 6.71%; aspect-ratio: 1; outline: 2px solid var(--bx-green-500); }
.loupe { position: absolute; right: 0; top: calc(100% + var(--bx-space-3)); width: 5.5rem; aspect-ratio: 1; background: var(--bx-white) url("/assets/label-1bpp.png") no-repeat -68px -132px / 1312px 896px; image-rendering: pixelated; border: 3px solid var(--bx-white); }
.tri:has(.bitmap) figcaption { min-height: 6.5rem; max-width: calc(100% - 6.75rem); }
.loupe b { position: absolute; left: 0; bottom: 0; padding: 2px 6px; background: var(--bx-ink); color: var(--bx-lime-500); font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); }

/* Panel 03: the printer commands. */
.zpl { background: var(--bx-green-800); border: 1px solid var(--bx-gray-700); overflow: auto; color: var(--bx-gray-100); min-height: 14rem; }
.zpl pre { margin: 0; padding: var(--bx-space-4); font: 400 0.78rem/1.65 var(--bx-font-mono); }
.zpl .k { color: var(--bx-lime-500); } .zpl .n { color: var(--bx-green-200); } .zpl .s { color: var(--bx-lime-200); } .zpl .c { color: var(--bx-gray-400); }
/* Stacked on tablets: cap the column so the three panels do not blow the label up to 680px wide (the text on it would
   be 40px type). Left-aligned, like every other block on the page. */
@media (min-width: 40rem) and (max-width: 63.999rem) { .trio { max-width: 32rem; } }
@media (min-width: 64rem) {
  .trio { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 0 var(--bx-space-4); align-items: start; }
  .eq { align-self: start; margin-top: 2.25rem; }
}
.proof .cap { margin-top: var(--bx-space-2); }
.gate { display: flex; gap: var(--bx-space-4); margin-top: var(--bx-space-12); padding: var(--bx-space-5) var(--bx-space-6); border: 1px solid var(--bx-gray-700); }
.gate p { max-width: 54ch; color: var(--bx-gray-100); }
.gate strong { color: var(--bx-white); }
.gate-mark { flex: none; width: 1rem; height: 1rem; margin-top: 0.4em; background: var(--bx-lime-500); clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%); }
.proof-note { margin-top: var(--bx-space-4); color: var(--bx-gray-400); max-width: 54ch; }
