/* TOQUIA Cinematic — Scene 02 · Punto de venta híbrido (in development).
   Warm beige room, dark devices on a soft floor, emerald accents on the screens.
   The static composition (no motion / reduced motion) shows the finished state: a sale
   registered, devices in sync. Motion only adds the story on top. */

.pos-layout { display: grid; gap: var(--space-lg); align-items: center; width: 100%; }
@media (min-width: 960px) {
  .pos-layout { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-lg); }
}
.pos-copy .lead { max-width: 30rem; }

/* ── Stage ─────────────────────────────────────────── */
.pos-stage {
  aspect-ratio: 16 / 11;
  perspective: 1800px;
  perspective-origin: 50% 20%;
}
.pos-rig {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-10deg);
}
/* Warm floor light: a single radial gradient, no blur filter */
.pos-floor {
  position: absolute;
  left: -6%; right: -6%; bottom: -4%;
  height: 46%;
  background: radial-gradient(ellipse 50% 45% at 48% 55%, rgba(60,44,20,.26), rgba(60,44,20,.08) 55%, transparent 75%);
  transform: rotateX(78deg) translateZ(-30px);
  transform-origin: 50% 100%;
}
.pos-sync {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible;
}
.pos-sync path {
  fill: none;
  stroke: var(--tq-emerald);
  stroke-width: .5;
  stroke-linecap: round;
  stroke-dasharray: 1.2 2.4;
  opacity: .5;
  vector-effect: non-scaling-stroke;
}
.pos-sync path { stroke-width: 2px; }

/* ── Devices (charcoal hardware, soft warm shadows) ── */
.pos-dev { position: absolute; transform-style: preserve-3d; }
.pos-screen {
  container-type: inline-size;
  position: relative;
  overflow: hidden;
  height: 100%;
  border-radius: 10px;
  background: #161a17;
  color: var(--tq-beige);
  font-weight: 400;
  line-height: 1.25;
}
.pos-laptop { left: 6%; top: 2%; width: 68%; }
.pos-lid {
  aspect-ratio: 16 / 10.4;
  padding: 1.6%;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(160deg, #2a2f2b, var(--tq-charcoal) 60%);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 40px 60px -36px rgba(40,28,10,.65);
}
.pos-base {
  height: 4%;
  min-height: 8px;
  margin: 0 -7%;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(#3a3f3b, #1b1f1c);
  box-shadow: 0 26px 40px -18px rgba(40,28,10,.55);
}
.pos-tablet {
  right: 0; bottom: 6%;
  width: 36%;
  aspect-ratio: 4 / 3;
  padding: 1.6%;
  border-radius: 18px;
  background: linear-gradient(160deg, #2c312d, var(--tq-charcoal) 65%);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 40px 60px -30px rgba(40,28,10,.7);
  transform: translateZ(70px) rotateY(-6deg);
}
.pos-phone {
  left: 3%; bottom: 2%;
  width: 15%;
  aspect-ratio: 9 / 19;
  padding: .9%;
  border-radius: 20px;
  background: linear-gradient(160deg, #2c312d, var(--tq-charcoal) 65%);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 40px 50px -26px rgba(40,28,10,.75);
  transform: translateZ(110px) rotateY(8deg);
}
.pos-phone .pos-screen { border-radius: 16px; padding: 30% 9% 9%; }

/* ── Laptop UI ─────────────────────────────────────── */
.pos-bar {
  display: flex; align-items: center; gap: 2cqi;
  padding: 1.6cqi 2.2cqi;
  font-size: 1.9cqi;
  border-bottom: 1px solid rgba(242,235,221,.07);
}
.pos-bar b { font-weight: 600; }
.pos-user { margin-left: auto; color: #A9A59D; }
.pos-net {
  display: inline-flex; align-items: center; gap: .8cqi;
  padding: .45cqi 1.3cqi; border-radius: 99px;
  font-size: 1.6cqi; font-weight: 600;
  background: rgba(79,174,138,.14); color: var(--tq-emerald-glow);
  transition: background .3s, color .3s;
}
.pos-net::before { content: ""; width: 1cqi; height: 1cqi; border-radius: 50%; background: currentColor; }
.pos-net[data-state="offline"] { background: rgba(197,164,109,.16); color: var(--tq-gold); }
.pos-main { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.8cqi; padding: 2cqi; height: calc(100% - 6cqi); }
.pos-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 1.2cqi; }
.pos-grid li {
  display: flex; flex-direction: column; gap: .5cqi;
  padding: 1.4cqi;
  border-radius: 1.2cqi;
  background: #20261f;
  background: #1f2521;
  border: 1px solid rgba(242,235,221,.05);
  font-size: 1.65cqi;
  transition: background .25s, border-color .25s, transform .25s var(--ease-out);
}
.pos-grid li b { font-weight: 500; }
.pos-grid li::before { content: ""; width: 3.2cqi; height: 3.2cqi; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(242,235,221,.5), rgba(197,164,109,.25)); margin-bottom: auto; }
.pos-grid li:nth-child(3n+2)::before { background: radial-gradient(circle at 35% 30%, rgba(79,174,138,.6), rgba(20,92,70,.4)); }
.pos-grid li span { color: #A9A59D; font-size: 1.5cqi; }
.pos-grid li.is-tap { background: rgba(20,92,70,.85); border-color: rgba(79,174,138,.6); transform: scale(.95); }
.pos-ticket {
  display: flex; flex-direction: column; gap: 1cqi;
  padding: 1.6cqi;
  border-radius: 1.4cqi;
  background: #1c211d;
  font-size: 1.7cqi;
}
.pos-ticket-head { color: #A9A59D; font-size: 1.5cqi; letter-spacing: .08em; text-transform: uppercase; }
.pos-lines { display: grid; gap: .9cqi; }
.pos-lines li { display: flex; justify-content: space-between; }
.pos-lines li b { font-weight: 500; }
.pos-total { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; padding-top: 1.2cqi; border-top: 1px dashed rgba(242,235,221,.14); }
.pos-total b { font-size: 3cqi; font-weight: 650; font-variant-numeric: tabular-nums; }
.pos-pay, .pos-done {
  display: grid; place-items: center;
  padding: 1.3cqi; border-radius: 1.2cqi;
  font-weight: 600; font-size: 1.8cqi;
}
.pos-pay { background: var(--tq-emerald); color: var(--tq-cream); transition: transform .2s, background .2s; }
.pos-pay.is-press { transform: scale(.95); background: #1b7a5c; }
.pos-done { display: none; background: rgba(197,164,109,.16); color: var(--tq-gold); }
/* Static composition: finished state */
html:not(.motion) .pos-done, .pos-stage:not(.is-live) .pos-done { display: grid; }
html:not(.motion) .pos-pay, .pos-stage:not(.is-live) .pos-pay { display: none; }

/* ── Tablet UI ─────────────────────────────────────── */
.pos-tablet .pos-bar { font-size: 3.6cqi; padding: 3cqi 4cqi; }
.pos-type { margin-left: auto; color: var(--tq-gold); font-weight: 600; }
.pos-types { display: flex; gap: 2cqi; padding: 3cqi 4cqi 0; font-size: 3.1cqi; }
.pos-types li { padding: 1cqi 2.6cqi; border-radius: 99px; color: #A9A59D; border: 1px solid rgba(242,235,221,.1); transition: background .3s, color .3s, border-color .3s; }
.pos-types li.is-on { background: var(--tq-beige); color: var(--tq-charcoal); border-color: transparent; }
.pos-cat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4cqi; padding: 3.4cqi 4cqi; }
.pos-cat li {
  display: grid; align-content: end; gap: .6cqi;
  aspect-ratio: 1.45;
  padding: 2.4cqi;
  border-radius: 2.4cqi;
  background: linear-gradient(160deg, #24302a, #1d2420);
  font-size: 3.3cqi;
  transition: opacity .25s, transform .35s var(--ease-out);
}
.pos-cat li small { font-size: 2.6cqi; color: var(--tq-gold); font-weight: 600; }
.pos-cat li.is-out { opacity: .55; }
.pos-cat.is-swap li { opacity: 0; transform: translateY(6%); }

/* ── Phone UI ──────────────────────────────────────── */
.pos-kpi-label { font-size: 9cqi; color: #A9A59D; }
.pos-kpi { font-size: 26cqi; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pos-bars { display: flex; align-items: flex-end; gap: 5cqi; height: 46cqi; margin: 8cqi 0; }
.pos-bars i { flex: 1; height: calc(var(--h) * 100%); border-radius: 3cqi 3cqi 1cqi 1cqi; background: rgba(79,174,138,.35); transform-origin: bottom; }
.pos-bars i:last-child { background: var(--tq-emerald-glow); }
.pos-synced { font-size: 8cqi; color: var(--tq-emerald-glow); line-height: 1.3; }

/* ── Captions (shared look with the Wallet scene) ──── */
.stage-captions { display: none; }
.is-animated .stage-captions {
  display: block;
  position: absolute;
  left: 50%; bottom: -2.5rem;
  translate: -50% 0;
  width: min(94%, 36rem);
  text-align: center;
  font-size: var(--fs-small);
}
.is-animated .stage-captions li {
  position: absolute; inset: auto 0 0;
  width: fit-content; margin-inline: auto;
  padding: .55em 1.15em;
  border-radius: 99px;
  background: var(--tq-charcoal);
  color: var(--tq-beige);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out);
}
.is-animated .stage-captions li.is-on { opacity: 1; transform: none; }
.pos-stage .stage-caption { position: absolute; right: 0; top: -1.6rem; font-size: .72rem; color: var(--ink-muted); }
@media (min-width: 960px) { .pos-stage .stage-caption { top: 2%; } }

/* ── Roadmap: compact chips (what is being built / what is planned) ── */
.pos-roadmap { display: grid; gap: .6rem; margin-top: calc(var(--space-lg) + 1.5rem); padding-top: var(--space-sm); border-top: 1px solid var(--line); }
.pos-roadmap-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .45rem; font-size: var(--fs-small); }
.pos-roadmap-row > span:not(.pos-roadmap-title) { padding: .3em .8em; border-radius: 99px; background: var(--tq-cream); border: 1px solid var(--line); }
.pos-roadmap-row.is-plan > span:not(.pos-roadmap-title) { background: transparent; border-style: dashed; border-color: rgba(122,92,42,.4); color: var(--ink-muted); }
.pos-roadmap-title { display: inline-flex; align-items: center; gap: .5rem; min-width: 8.5rem; font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tq-gold-ink); }
.pos-roadmap .dot { width: 8px; height: 8px; border-radius: 50%; }
.pos-roadmap .dot-dev { background: var(--tq-emerald); box-shadow: 0 0 0 4px rgba(20,92,70,.14); }
.pos-roadmap .dot-plan { border: 1.5px dashed var(--tq-gold-ink); }
.pos-roadmap-note { font-size: var(--fs-small); color: var(--ink-muted); }
@media (max-width: 767px) { .pos-roadmap-title { width: 100%; } }

/* ── Mobile ────────────────────────────────────────── */
@media (max-width: 959px) {
  .pos-stage { aspect-ratio: 1 / .92; max-width: 640px; margin-inline: auto; }
  .pos-rig { transform: rotateX(10deg) rotateY(-8deg); }
  .pos-laptop { left: 2%; top: 0; width: 88%; }
  .pos-tablet { right: 0; bottom: 10%; width: 54%; }
  .pos-phone { left: 8%; bottom: 3%; width: 21%; }
  .pos-sync { display: none; }
}
@media (max-width: 767px) {
  #punto-de-venta .lead { font-size: var(--fs-body); }
  .is-animated .stage-captions { bottom: -3rem; }
}

/* Mid tier: lighter shadows (cheaper to composite while scrubbing) */
[data-tier="mid"] .pos-lid, [data-tier="mid"] .pos-tablet, [data-tier="mid"] .pos-phone { box-shadow: 0 24px 30px -24px rgba(40,28,10,.6); }
@media (max-width: 959px) {
  .pos-stage { width: min(100%, calc((100svh - 470px) / .92)); }
}
@media (max-width: 360px) { .is-animated .stage-captions { font-size: .74rem; width: 100%; } }
