/* Ejemplos: one small looping «mini screen» per thing we set up, in the hero's hand of cards and in the cards of
   «Ejemplos». Each is ONE quiet piece of interface (a search and its answer, a chart, a chain of steps, tools joined
   to a centre, a board, a real-looking web page...) in white, floating on the card's green light, with almost no
   words. David, 2026-12-01: the first scenes (a bar's WhatsApp, a gestoría's papers) were too busy and too «de
   barrio»; the second try read «muy Claude» (little status pills with a dot, typewriter labels, cute sentences),
   so these are plain, neutral and professional, after the idea of lienzzo.com's cards but NOT a copy of them.
   Scenes are sized in cqw so they scale with their card. ejemplos.js plays each one while it is on screen
   ([data-at] appears at that ms of the loop, data-until hides it, data-type types it out); without JS, or with
   reduced motion, they show their last frame. In the hero, where they sit inside a <button>, everything is a span. */

.stage {
  --ui: #ffffff; --ui-2: #f3f4f3; --ui-3: #e9ebea; --ink: #121513; --ink-2: #5f6661; --ink-3: #9ca29e; --line: #e6e8e7;
  --g: #2b9a4b; --g-2: #8bd89a; --g-soft: #e6f5e9; --g-deep: #1d6b35;
  position: relative; display: block; aspect-ratio: 4 / 3; max-width: 100%; container-type: inline-size; overflow: hidden;
}
.stage * { box-sizing: border-box; }
.stage :where(span, b, i, small) { display: block; }
.sc { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 2.6cqw; padding: 9cqw 9cqw; font-size: 4cqw; line-height: 1.3; color: var(--ink); letter-spacing: -0.005em; transition: opacity 0.6s; }
.stage.out .sc { opacity: 0; }
.stage.out .v-site { opacity: 1; } /* it scrolls on its own clock: no fade between loops */
.stage .i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* the white piece of interface, and the grey bars that stand for text */
.ui { position: relative; width: 100%; background: var(--ui); border-radius: 2.6cqw; padding: 4cqw; box-shadow: 0 5cqw 10cqw -5cqw rgba(0, 0, 0, 0.65); }
.sk { height: 1.5cqw; border-radius: 1cqw; background: var(--ui-3); }

/* timeline: with JS, [data-at] items wait for their moment; without JS they all show */
.anim [data-at] { opacity: 0; transform: translateY(1cqw); transition: opacity 0.5s ease, transform 0.5s ease; }
.anim [data-at].on { opacity: 1; transform: none; }
.anim .fx-fade[data-at] { transform: none; }
.anim .fx-pop[data-at] { transform: scale(0.92); }
.anim .fx-rise[data-at] { transform: scaleY(0); transform-origin: center bottom; transition-duration: 0.8s; transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
.anim .fx-slide[data-at] { transform: translateX(-60%); transition-duration: 0.8s; transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
.anim .fx-pop[data-at].on, .anim .fx-rise[data-at].on, .anim .fx-slide[data-at].on { transform: none; }
.ghost { visibility: hidden; display: inline !important; }
.caret { display: inline-block !important; width: 0.07em; height: 1em; background: var(--g); vertical-align: -0.12em; margin-right: -0.07em; animation: ej-blink 0.9s steps(1) infinite; }
/* «Pausar animaciones» also stops the loops that are plain CSS */
.ej-paused .stage * { animation: none !important; }
@keyframes ej-blink { 50% { opacity: 0; } }

/* ---------- ask: a search over the company's documents ---------- */
.v-ask .q { display: flex; align-items: center; gap: 2.4cqw; padding: 3.2cqw 4cqw; border-radius: 3cqw; background: var(--ui); box-shadow: 0 5cqw 10cqw -5cqw rgba(0, 0, 0, 0.65); }
.v-ask .q .i { flex: none; width: 1.2em; height: 1.2em; color: var(--g); }
.v-ask .q > span { flex: 1; }
.v-ask .ui { display: grid; gap: 1.8cqw; }
.v-ask .ui b { font-weight: 600; }
.v-ask .ui .sk:nth-of-type(2) { width: 80%; }
.v-ask .doc { display: flex !important; align-items: center; gap: 2cqw; margin-top: 1cqw; padding-top: 2.4cqw; border-top: 1px solid var(--line); font-size: 0.72em; color: var(--ink-2); }
.v-ask .doc .i { width: 1.3em; height: 1.3em; color: var(--ink-3); }

/* ---------- chat: a customer asks for a time and gets one ---------- */
.v-chat .ui { display: flex; flex-direction: column; gap: 2.4cqw; padding: 4cqw; }
.v-chat .in, .v-chat .out { max-width: 80%; padding: 0.55em 0.85em; border-radius: 2.4cqw; font-size: 0.86em; }
.v-chat .in { align-self: flex-start; background: var(--ui-2); }
.v-chat .out { align-self: flex-end; background: var(--ink); color: #fff; }
.v-chat .slots { align-self: flex-end; display: grid; grid-template-columns: repeat(3, auto); gap: 1.4cqw; }
.v-chat .slots > span { grid-row: 1; font-size: 0.78em; font-variant-numeric: tabular-nums; padding: 0.45em 0.8em; border-radius: 1.6cqw; border: 1px solid var(--line); background: var(--ui); text-align: center; }
.v-chat .slots > :nth-child(1) { grid-column: 1; }
.v-chat .slots > :nth-child(2), .v-chat .slots .pk { grid-column: 2; }
.v-chat .slots > :nth-child(3) { grid-column: 3; }
.v-chat .slots .pk { background: var(--g); border-color: var(--g); color: #fff; }

/* ---------- chart: sales over the months ---------- */
.v-chart .hd { display: flex; align-items: flex-end; justify-content: space-between; }
.v-chart .hd small { font-size: 0.72em; color: var(--ink-2); margin-bottom: 0.4em; }
.v-chart .hd b { font-weight: 650; font-size: 1.5em; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.v-chart .hd em { font-style: normal; font-size: 0.72em; font-weight: 600; color: var(--g-deep); background: var(--g-soft); border-radius: 1cqw; padding: 0.2em 0.5em; }
.v-chart .bars { display: flex; align-items: flex-end; gap: 2cqw; height: 24cqw; margin-top: 3.4cqw; }
.v-chart .bars i { flex: 1; height: calc(var(--h) * 1%); border-radius: 0.8cqw 0.8cqw 0 0; background: var(--ui-3); }
.v-chart .bars i.hi { background: var(--g); }
.v-chart .axis { display: flex !important; justify-content: space-between; margin-top: 1.6cqw; padding-top: 1.6cqw; border-top: 1px solid var(--line); font-size: 0.6em; color: var(--ink-3); }

/* ---------- flow: one order goes through its steps by itself ---------- */
.v-flow .ui { padding: 3cqw 4cqw; }
.v-flow .rail { position: absolute; left: calc(4cqw + 3.25cqw - 0.2cqw); top: 7cqw; bottom: 7cqw; width: 0.4cqw; background: var(--line); }
.v-flow .rail i { height: 100%; background: var(--g); transform-origin: top; }
.anim .v-flow .rail i[data-at] { opacity: 1; transform: scaleY(0); transition: transform 4.2s linear; }
.anim .v-flow .rail i[data-at].on { transform: scaleY(1); }
.v-flow .step { position: relative; display: grid; grid-template-columns: 6.5cqw minmax(0, 1fr) auto; gap: 3cqw; align-items: center; padding: 1.9cqw 0; }
.v-flow .ic { width: 6.5cqw; height: 6.5cqw; border-radius: 1.8cqw; display: grid !important; place-items: center; background: var(--ui-2); color: var(--ink-2); box-shadow: 0 0 0 1cqw var(--ui); transition: background 0.5s, color 0.5s; }
.v-flow .ic .i { width: 55%; height: 55%; }
.v-flow .step:has(.ok.on) .ic { background: var(--g-soft); color: var(--g-deep); }
.v-flow .step b { font-size: 0.86em; font-weight: 550; }
.v-flow .ok { color: var(--g); }
.v-flow .ok .i { width: 1.1em; height: 1.1em; stroke-width: 2.2; }

/* ---------- hub: the tools a company already uses, joined to one centre ---------- */
.v-hub { display: block; padding: 0; }
.v-hub .core { position: absolute; left: 50%; top: 50%; width: 19cqw; height: 19cqw; margin: -9.5cqw 0 0 -9.5cqw; border-radius: 5cqw; display: grid !important; place-items: center; background: var(--ui); color: var(--g); box-shadow: 0 0 0 2cqw rgba(255, 255, 255, 0.08), 0 0 14cqw rgba(140, 230, 150, 0.45); z-index: 2; }
.v-hub .core .i { width: 8cqw; height: 8cqw; }
.v-hub .ray { position: absolute; left: 50%; top: 50%; width: 27cqw; height: 0.3cqw; margin-top: -0.15cqw; transform-origin: 0 50%; transform: rotate(var(--a)); background: linear-gradient(to right, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.12)); }
.v-hub .ray i { position: absolute; top: 50%; width: 1.3cqw; height: 1.3cqw; margin-top: -0.65cqw; border-radius: 50%; background: #fff; animation: ej-pulse 3s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes ej-pulse { 0% { left: 90%; opacity: 0; } 20%, 80% { opacity: 0.9; } 100% { left: 10%; opacity: 0; } }
.v-hub .sat { position: absolute; left: calc(50% + cos(var(--a)) * 27cqw - 6cqw); top: calc(50% + sin(var(--a)) * 27cqw - 6cqw); width: 12cqw; height: 12cqw; border-radius: 3.4cqw; display: grid !important; place-items: center; background: var(--ui); color: var(--ink); box-shadow: 0 3cqw 6cqw -3cqw rgba(0, 0, 0, 0.6); z-index: 1; }
.v-hub .sat .i { width: 48%; height: 48%; }

/* ---------- doc: a supplier's invoice, read and written down as a row ---------- */
.v-doc { flex-direction: row; align-items: center; gap: 5cqw; }
.v-doc .paper { position: relative; flex: 0 0 38%; aspect-ratio: 3 / 4; background: var(--ui); border-radius: 1.4cqw; padding: 3.6cqw 3.2cqw; transform: rotate(-3deg); display: flex !important; flex-direction: column; gap: 1.8cqw; overflow: hidden; box-shadow: 0 5cqw 10cqw -5cqw rgba(0, 0, 0, 0.65); }
.v-doc .paper b { font-size: 0.62em; font-weight: 650; letter-spacing: 0.08em; }
.v-doc .paper .sk { height: 1.2cqw; }
.v-doc .paper .f { position: relative; display: flex; justify-content: space-between; font-size: 0.5em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.v-doc .paper .f::after { content: ''; position: absolute; inset: -0.35em -0.5em; border-radius: 0.6cqw; background: rgba(43, 154, 75, 0.14); opacity: 0; transition: opacity 0.4s; }
.v-doc .paper .f.on::after { opacity: 1; }
.anim .v-doc .paper .f[data-at] { opacity: 1; transform: none; }
.v-doc .paper .tot { margin-top: auto; font-weight: 650; color: var(--ink); }
.v-doc .scan { position: absolute; left: 0; right: 0; top: 0; height: 12%; background: linear-gradient(to bottom, transparent, rgba(43, 154, 75, 0.22)); border-bottom: 0.4cqw solid var(--g); animation: ej-scan 2.4s ease-in-out infinite alternate; }
@keyframes ej-scan { to { top: 88%; } }
.v-doc .ui { flex: 1; padding: 0; overflow: hidden; font-size: 0.6em; }
.v-doc .row { display: grid !important; grid-template-columns: 1.5fr 1fr; border-bottom: 1px solid var(--line); }
.v-doc .row > span { padding: 0.8em 1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.v-doc .row > span:last-child { text-align: right; }
.v-doc .row.h { color: var(--ink-3); font-weight: 550; }
.v-doc .row.new { background: var(--g-soft); }
.v-doc .row:last-child { border-bottom: 0; }

/* ---------- board: a deal moves to «won» ---------- */
.v-board .ui { padding: 3.4cqw; }
.v-board .hd { margin-bottom: 2.6cqw; font-size: 0.86em; font-weight: 650; }
.v-board .cols { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.8cqw; }
.v-board .col { display: flex !important; flex-direction: column; gap: 1.6cqw; min-height: 30cqw; padding: 1.8cqw; border-radius: 1.8cqw; background: var(--ui-2); }
.v-board .col > small { font-size: 0.58em; font-weight: 600; color: var(--ink-2); }
.v-board .deal { padding: 1.8cqw; border-radius: 1.2cqw; background: var(--ui); box-shadow: 0 0.3cqw 1cqw rgba(0, 0, 0, 0.07); display: grid !important; gap: 1.2cqw; }
.v-board .deal .sk { height: 1.1cqw; }
.v-board .deal .sk + .sk { width: 60%; }
.v-board .deal.won { box-shadow: inset 0.6cqw 0 0 var(--g), 0 1cqw 3cqw -1cqw rgba(43, 154, 75, 0.5); }

/* ---------- site: a real-looking web page that scrolls by itself ---------- */
.v-site .ui { padding: 0; overflow: hidden; }
.v-site .bar { display: flex !important; align-items: center; gap: 1cqw; padding: 1.8cqw 2.4cqw; background: var(--ui-2); border-bottom: 1px solid var(--line); }
.v-site .bar i { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: #d4d8d5; }
.v-site .win { position: relative; height: 46cqw; overflow: hidden; }
.v-site .page { position: absolute; left: 0; right: 0; top: 0; animation: ej-scroll 11s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
@keyframes ej-scroll { 0%, 22% { transform: none; } 50%, 72% { transform: translateY(calc(46cqw - 100%)); } 100% { transform: none; } }
.v-site .nav { display: flex; align-items: center; gap: 2.6cqw; padding: 2.4cqw 3.6cqw; font-size: 0.58em; color: var(--ink-2); }
.v-site .nav b { margin-right: auto; font-size: 1.3em; font-weight: 700; letter-spacing: 0.1em; color: var(--ink); }
.v-site .nav em { font-style: normal; color: #fff; background: var(--ink); border-radius: 99em; padding: 0.35em 1em; }
/* a furniture shop: a pale first screen with one drawn armchair, and three products below */
.v-site .top { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2cqw; height: 37cqw; padding: 0 4cqw 0 4.6cqw; background: #edf1e8; }
.v-site .top b { font-size: 1.5em; font-weight: 650; line-height: 1.05; letter-spacing: -0.03em; }
.v-site .top em { display: inline-block; margin-top: 3cqw; font-style: normal; font-size: 0.6em; font-weight: 600; color: #fff; background: var(--g); border-radius: 99em; padding: 0.55em 1.2em; }
.v-site .art { display: block; width: 100%; height: auto; }
.v-site .more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4cqw; padding: 4cqw 3.6cqw; font-size: 0.6em; }
.v-site .more i { display: grid; place-items: center; aspect-ratio: 1; padding: 2cqw; border-radius: 1.4cqw; background: #f3f4f1; margin-bottom: 1.4cqw; }
.v-site .more b { font-weight: 600; }
.v-site .more small { font-size: 1em; color: var(--ink-2); }

/* ---------- stars: the Google rating, and every review answered ---------- */
.v-stars .ui { display: grid; gap: 2.6cqw; padding: 4cqw; }
.v-stars .sum { display: flex !important; align-items: center; gap: 2.6cqw; padding-bottom: 2.6cqw; border-bottom: 1px solid var(--line); }
.v-stars .sum b { font-size: 1.9em; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.v-stars .st { display: inline !important; color: #f2b01e; letter-spacing: 0.08em; }
.v-stars .sum small { font-size: 0.68em; color: var(--ink-2); }
.v-stars .rev { display: grid !important; grid-template-columns: 6.6cqw minmax(0, 1fr); gap: 1.2cqw 2.4cqw; align-items: center; font-size: 0.8em; }
.v-stars .rev > i { grid-row: span 2; width: 6.6cqw; height: 6.6cqw; border-radius: 50%; background: var(--ui-3); }
.v-stars .rev .sk { width: 85%; }
.v-stars .rev .sk + .sk { width: 60%; }
.v-stars .ok { grid-column: 2; display: flex !important; align-items: center; gap: 0.4em; font-size: 0.82em; font-weight: 550; color: var(--g-deep); }
.v-stars .ok .i { width: 1.1em; height: 1.1em; stroke-width: 2.2; }
