/*
 * tillpay.ca landing page (Phase B). Colours: the FACE SCHEMA §4 tokens plus
 * the proposed --accent-maple (decorative only, never text, never a state).
 * The hero's raster layers carry their own colours (the town and the leaf are
 * crops of the concept-04 scenery; the counter is the L4 counter of
 * BLENDER_ASSETS.md, drawn by tools/make-counter.py); every CSS colour here is
 * a token.
 * No web fonts, no gradients. Motion lives in landing.js and moves transform
 * only; this file sets the static picture, which is also the reduced-motion
 * picture.
 */
:root {
  --paper: #f4ead7;
  --lift: #fbf6ec;
  --ink: #231910;
  --dusk: #241c16;
  --till-replay: #f7f1e3;
  --till-open: #62584c;
  --till-expired: #6e6458;
  --till-detected: #6b3e00;
  --till-paid: #0b5328;
  --till-amount-present: #1a120c;
  --accent-maple: #c43a1e;
  --max: 76rem;
  --gutter: max(1rem, calc((100vw - var(--max)) / 2));
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.5 ui-serif, Georgia, Cambria, 'Times New Roman', serif;
  scroll-behavior: auto;
  overflow-x: hidden;
}

body { margin: 0; overflow-x: hidden; }
a { color: var(--ink); text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
img { display: block; }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.8rem;
  background: var(--lift);
  border: 2px solid var(--ink);
  font-weight: 700;
}
.skip:focus { top: 1rem; z-index: 50; }

/* Ribbon: the honest line, always first. */
.ribbon {
  margin: 0;
  padding: 0.4rem 1rem;
  background: var(--dusk);
  color: var(--till-replay);
  font: 600 0.85rem/1.3 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-align: center;
}

/* Header and nav: exactly four items. The list wraps when the row is
   wider than the screen, so a phone shows every link inside the viewport.
   A wide window still fits the same one-row cluster. */
.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1rem;
}
.brand img { height: 44px; width: auto; }
.site-nav { max-width: 100%; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 clamp(0.35rem, 0.2rem + 1.1vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 600 clamp(0.68rem, 0.52rem + 0.75vw, 1rem)/1.2 ui-sans-serif, system-ui, sans-serif;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--ink); }

/* Buttons. */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.25rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--lift);
  color: var(--ink);
  font: 700 1.05rem/1.2 ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn.primary { background: var(--till-paid); border-color: var(--till-paid); color: var(--lift); box-shadow: 3px 3px 0 var(--ink); }

/* Sections. */
main > section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1rem;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5rem; }
h2 { font-size: 2.25rem; }
.lede { font-size: 1.15rem; max-width: 40rem; }
.label {
  display: inline-block;
  margin: 0.25rem 0;
  padding: 0.1rem 0.5rem;
  border: 2px solid var(--ink);
  font: 700 0.9rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.03em;
}

/* Hero: the copy on paper, the scene bleeding off the right edge, as in the
   concept frame. */
.hero {
  position: relative;
  max-width: none;
  display: grid;
  gap: 1.25rem;
  padding: 1rem 0 0;
  overflow: hidden;
}
.hero-copy { padding: 0.5rem 1rem 0; }
.hero h1 { margin: 0 0 1rem; }
.hero-word { width: min(100%, 24rem); height: auto; }
.hero-line { font-size: 1.3rem; max-width: 30rem; margin: 0 0 1.5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-note { margin: 1.25rem 0 0; font-size: 0.95rem; }

/* The stage: a fixed-aspect box; every layer is absolutely placed, so the
   transforms the script applies never move layout (CLS 0). Back to front:
   town (hillside houses, lighthouse, harbour, boat), counter with a leaf,
   the two till screens in generic frames, two leaves in front. */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 375 / 400;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}
.layer { position: absolute; inset: 0; will-change: transform; pointer-events: none; }
.town {
  position: absolute;
  right: -3%;
  bottom: 28%;
  width: 90%;
}
.town img { width: 100%; height: auto; }
/* The counter layer is transparent above the counter's back edge (a fifth of
   the image from its top), so its box rises above the old cut line and the
   image is anchored at the bottom: the back edge lands at 34% / 40% / 38% of
   the stage, over the town's straight bottom edge. */
.counter {
  position: absolute;
  left: 0;
  right: -2%;
  bottom: 0;
  height: 42.5%;
}
.counter img { width: 100%; height: 100%; object-fit: cover; object-position: left bottom; }
.stage .plate {
  position: absolute;
  left: 3%;
  bottom: 4%;
  margin: 0;
  padding: 0.25rem 0.6rem;
  background: var(--lift);
  border: 1px solid var(--ink);
  font: 600 0.8rem/1.3 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.04em;
}

/* Generic frames: an unbranded tablet and phone. No camera, no button, no
   mark. The screens are the pack's own till shots. */
.slab {
  position: absolute;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--dusk);
  padding: 2.6%;
  box-shadow: 0 18px 22px -14px var(--ink);
}
.slab .screen {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--paper);
  border-radius: 6px;
}
.tablet .screen { aspect-ratio: 834 / 1194; }
.phone .screen { aspect-ratio: 390 / 844; }
.slab .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.stage .tablet { left: 6%; bottom: 23%; width: 42%; }
.stage .phone {
  left: 52%;
  bottom: 19%;
  width: 19%;
  border-radius: 16px;
  padding: 3.5%;
  transform: rotate(6deg);
}
.leaf { position: absolute; width: 9%; }
.leaf img { width: 100%; height: auto; }
.leaf.a { left: 5%; top: 7%; transform: rotate(-16deg); }
.leaf.b { left: 84%; bottom: 7%; width: 7%; transform: rotate(38deg) scaleX(-1); }
.leaf.c { left: 42%; bottom: 20%; width: 6.5%; transform: rotate(104deg); }

/* How it works: four cut-paper panels under a dotted thread (concept 03). */
.steps {
  display: grid;
  gap: 2.25rem 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.step { position: relative; }
.step .n {
  display: block;
  font: 800 3rem/1 ui-serif, Georgia, Cambria, 'Times New Roman', serif;
  color: var(--till-paid);
}
.step h3 { font-size: 1.4rem; margin: 0.35rem 0 0.25rem; }
.step > p { margin: 0 0 0.25rem; max-width: 22rem; }
.mini {
  position: relative;
  height: 12rem;
  margin: 1.5rem 1.25rem 1.25rem 0;
  background: var(--lift);
  border: 1px solid var(--ink);
}
/* The paper stack under each panel: a warm grey sheet, then a dark green one,
   both torn-edged, painted behind the panel (negative z-index). */
.mini::before, .mini::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}
.mini::after {
  background: var(--till-expired);
  transform: translate(8px, 9px) rotate(1deg);
  clip-path: polygon(0 3%, 12% 0, 30% 4%, 48% 0, 64% 4%, 82% 0, 100% 4%, 98% 40%, 100% 72%, 98% 100%, 80% 96%, 62% 100%, 44% 96%, 26% 100%, 8% 96%, 0 100%, 2% 60%, 0 30%);
}
.mini::before {
  z-index: -2;
  background: var(--till-paid);
  transform: translate(17px, 19px) rotate(-1.6deg);
  clip-path: polygon(0 6%, 9% 0, 23% 5%, 38% 0, 52% 6%, 66% 1%, 80% 6%, 93% 0, 100% 7%, 97% 30%, 100% 55%, 96% 78%, 100% 100%, 85% 95%, 70% 100%, 55% 94%, 40% 100%, 25% 95%, 10% 100%, 0 93%, 3% 70%, 0 45%, 4% 22%);
}
.mini .slab { position: absolute; box-shadow: 4px 4px 0 var(--till-expired); }
.mini .tablet { left: 12%; top: 8%; width: 40%; padding: 2%; }
.mini .phone { left: 56%; top: 30%; width: 22%; border-radius: 16px; padding: 3%; transform: rotate(6deg); }
.mini .phone-up { left: 34%; top: 5%; width: 30%; transform: none; }
.mini .phone .screen { background: var(--dusk); }
.mini .screen { display: grid; place-content: center; text-align: center; gap: 0.2rem; }
.mini .state { font: 800 0.95rem/1.2 ui-serif, Georgia, serif; color: var(--till-paid); }
.mini .amount { font: 800 1.15rem/1.1 ui-serif, Georgia, serif; color: var(--till-amount-present); }
.mini .qr { width: 78%; margin: 0 auto; }
.finder {
  position: absolute;
  inset: 24% 10%;
  background: var(--lift);
}
.finder img { width: 100%; height: 100%; object-fit: contain; }
.finder::before, .finder::after,
.finder-bottom::before, .finder-bottom::after {
  content: "";
  position: absolute;
  width: 18%;
  height: 10%;
  border: 3px solid var(--till-replay);
}
.finder::before { left: -8%; top: -8%; border-right: 0; border-bottom: 0; }
.finder::after { right: -8%; top: -8%; border-left: 0; border-bottom: 0; }
.finder-bottom { position: absolute; inset: 24% 10%; }
.finder-bottom::before { left: -8%; bottom: -8%; border-right: 0; border-top: 0; }
.finder-bottom::after { right: -8%; bottom: -8%; border-left: 0; border-top: 0; }
.mini .sheet {
  position: absolute;
  left: 8%;
  top: 10%;
  width: 84%;
  padding: 0.6rem 0.75rem;
  background: var(--lift);
  border: 1px solid var(--ink);
  box-shadow: 5px 5px 0 var(--till-expired);
  font-size: 0.85rem;
}
.mini .sheet p { margin: 0.1rem 0; }
.mini .sheet .ok { color: var(--till-paid); font-weight: 700; }
.mini .sheet img { position: absolute; right: 0.5rem; top: 0.5rem; width: 2.2rem; }

/* Demo, verify, built. */
.two { display: grid; gap: 1.5rem; }
.card {
  padding: 1.5rem;
  background: var(--lift);
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 var(--paper), 9px 9px 0 var(--ink);
}
.card h2 { font-size: 1.7rem; }
.about {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--till-paid);
  background: var(--paper);
}
.built-grid { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.built-mark { width: 4rem; height: 4rem; border: 1px solid var(--ink); }
.links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.source-note { margin: 0.75rem 0 2rem; padding: 0.5rem 0.75rem; border-left: 4px solid var(--till-paid); background: var(--lift); font-size: 0.95rem; }
.disclosure { font-size: 0.95rem; }

/* Footer: the dusk band. */
.site-foot {
  margin-top: 2rem;
  padding: 2rem 1rem 2.5rem;
  background: var(--dusk);
  color: var(--till-replay);
}
.site-foot > div { max-width: var(--max); margin: 0 auto; }
.site-foot a { color: var(--till-replay); }
.site-foot :focus-visible { outline-color: var(--till-replay); }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0.75rem 0; padding: 0; list-style: none; }
.site-foot .mark { font-weight: 700; }
.site-foot .small { font-size: 0.9rem; margin: 0.5rem 0 0; }
.foot-houses { display: block; width: 100%; height: auto; max-width: 40rem; margin: 0 0 1rem; }

/* Tablets and up. */
@media (min-width: 48rem) {
  .hero-copy { padding: 1rem var(--gutter) 0; }
  .hero-word { width: min(100%, 28rem); }
  .stage { aspect-ratio: 768 / 520; }
  .town { width: 64%; right: -2%; bottom: 30%; }
  .counter { height: 50%; }
  .stage .tablet { left: 5%; bottom: 24%; width: 30%; }
  .stage .phone { left: 34%; bottom: 20%; width: 13%; }
  .leaf.a { left: 6%; top: 10%; width: 7%; }
  .leaf.b { left: 88%; bottom: 8%; width: 5%; }
  .leaf.c { left: 44%; bottom: 20%; width: 4.5%; }
  .steps { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr 1fr; }
}

/* Laptops: copy left, the scene right, bleeding off the viewport edge. */
@media (min-width: 64rem) {
  .hero {
    grid-template-columns: minmax(0, 36rem) minmax(0, 1fr);
    align-items: center;
    column-gap: 1rem;
    padding-top: 0;
  }
  .hero-copy { padding: 2rem 0 2rem var(--gutter); }
  .hero-word { width: min(100%, 34rem); }
  .hero-line { font-size: 1.4rem; max-width: 32rem; }
  .stage { aspect-ratio: 1200 / 860; }
  .town { width: 58%; right: -3%; bottom: 32%; }
  .counter { height: 48%; }
  .stage .tablet { left: 3%; bottom: 25%; width: 30%; }
  .stage .phone { left: 32%; bottom: 20%; width: 13%; }
  .leaf.a { left: 4%; top: 9%; width: 7%; }
  .leaf.b { left: 86%; bottom: 9%; width: 5%; }
  .leaf.c { left: 48%; bottom: 22%; width: 4.5%; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .step::after {
    content: "";
    position: absolute;
    top: 1.4rem;
    left: 3rem;
    right: -1.5rem;
    border-top: 3px dotted var(--till-paid);
  }
  .step:last-child::after { content: none; }
  .step > p { min-height: 7.5rem; }
}

/* Reduced motion: the picture above is the whole picture. The script does
   not run, so nothing here needs turning off; this block makes it explicit. */
@media (prefers-reduced-motion: reduce) {
  .layer, .slab, .leaf { transition: none; }
}

/* QoL pass (2026-10), QoL note 2: devnet is a small quiet tag, not a band
   or a box. The tag sits in the header beside the mark. */
.net-tag {
  margin: 0 auto 0 0;
  font: 500 0.8rem/1.2 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.02em;
  color: var(--till-open);
}

.hero-note .label,
.card .label {
  padding: 0;
  border: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--till-open);
}

.stage .plate {
  border: 0;
  font-weight: 500;
  font-size: 0.75rem;
}
