/* Process story page (/es/como-trabajamos). Loaded after atelier-pages.css, on that page only; every value is a token.
   The default CSS is the FINAL state of every scene: reduced motion and no-JS read the page as is.
   proceso.js builds the scenes up from nothing (transform / opacity only, plus SVG stroke draws). */

/* ---------- hero art: seven pattern pieces ---------- */
.pr-piece { stroke: var(--c-on-dark); stroke-width: 1.5; stroke-linejoin: round; fill: var(--c-dominant); }
.pr-piece[data-piece="3"] { fill: var(--c-dominant-2); }
.pr-piece[data-piece="4"], .pr-piece[data-piece="5"] { fill: var(--c-dominant-3); }
.pr-piece[data-piece="6"] { fill: var(--c-accent); stroke: var(--c-accent-ink); }
.pr-piece[data-piece="7"] { fill: var(--c-thread); }
.pr-seams path { stroke: var(--c-thread-light); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 6 5; }
.pr-buttons circle { fill: var(--c-accent); stroke: var(--c-accent-ink); stroke-width: 1.5; }

/* ---------- progress rail ---------- */
.prail {
  position: fixed; left: 50%; bottom: var(--sp-2); z-index: calc(var(--z-nav) - 1);
  display: flex; align-items: center; gap: var(--sp-2); padding: 0.3rem 1rem 0.3rem 0.4rem; max-width: calc(100% - 2 * var(--sp-2));
  background: var(--c-bg); border-radius: 999px; box-shadow: 0 0 0 var(--border) var(--c-text), 0 14px 24px -14px var(--c-shadow);
  opacity: 0; visibility: hidden; transform: translate(-50%, 1rem);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}
.prail.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.prail ol { display: flex; gap: 0.2rem; }
.prail a {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; text-decoration: none;
  font-size: var(--fs--1); font-weight: 600; color: var(--c-text); box-shadow: inset 0 0 0 var(--border) var(--c-muted);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.prail a:hover { color: var(--c-thread); box-shadow: inset 0 0 0 var(--border) var(--c-thread); }
.prail a[aria-current="step"] { background: var(--c-dominant); color: var(--c-accent); box-shadow: none; }
.prail a:focus-visible { outline: 2px solid var(--c-thread); outline-offset: 2px; }
.prail__now { font-size: var(--fs--1); color: var(--c-text); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- scenes ---------- */
.pstory { position: relative; }
.scene {
  position: relative; display: grid; align-items: center; min-height: 100svh;
  padding: calc(var(--nav-h) + var(--sp-2)) 0 var(--sp-3); background: var(--c-bg);
}
.scene--tint { background: var(--c-surface); }
.scene__inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sp-4); align-items: center; }
.scene__copy { grid-column: 1 / span 5; display: grid; gap: var(--sp-2); justify-items: start; align-content: center; min-width: 0; }
.scene__step { display: flex; align-items: center; gap: var(--sp-2); }
.scene__n {
  display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--c-dominant); color: var(--c-accent); font-weight: 600; box-shadow: 0 0 0 4px var(--c-bg), 0 0 0 5.5px var(--c-accent);
}
.scene--tint .scene__n { box-shadow: 0 0 0 4px var(--c-surface), 0 0 0 5.5px var(--c-accent); }
.scene__step .label::before { display: none; }
.scene__h {
  font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance;
  font-size: clamp(1.8rem, 2.9vw, 2.8rem);
}
.scene__h em { font-style: italic; font-weight: 400; color: var(--c-thread); }
.scene__p { color: var(--c-text); line-height: 1.5; max-width: 46ch; text-wrap: pretty; }
.scene__pts { display: grid; gap: 0.5rem; max-width: 46ch; }
.scene__pts li { position: relative; padding-left: var(--sp-3); font-size: var(--fs--1); line-height: 1.45; color: var(--c-text); }
.scene__pts li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.9rem; border-top: var(--stitch) dashed var(--c-thread); }
.scene__pts a { text-underline-offset: 0.25em; text-decoration-color: var(--c-thread); }

/* the stage: a cutting table with a chalk grid */
.stage {
  grid-column: 6 / -1; position: relative; min-width: 0; min-height: 24rem; display: grid; align-content: center; gap: var(--sp-2);
  padding: var(--sp-3); background-color: var(--c-on-dark); border: var(--stitch) dashed var(--c-muted); border-radius: 18px;
  background-image:
    linear-gradient(var(--c-chalk) 1px, transparent 1px), linear-gradient(90deg, var(--c-chalk) 1px, transparent 1px);
  background-size: 32px 32px; box-shadow: 0 28px 44px -28px var(--c-shadow); color: var(--c-text); overflow: hidden;
}
.q-tag { font-size: 0.78rem; font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--c-thread); }
.stitch-v { display: block; width: 0; height: 1.5rem; margin-left: 2rem; border-left: var(--stitch) dashed var(--c-thread); transform-origin: top; }
.paybtn {
  display: inline-flex; align-items: center; gap: 0.5em; padding: 0.75em 1.3em; border-radius: 999px; font-weight: 600; width: fit-content;
  background: var(--c-accent); color: var(--c-accent-ink); box-shadow: 0 0 0 var(--stitch) var(--c-accent), inset 0 0 0 4px var(--c-accent), inset 0 0 0 5.5px var(--c-accent-ink);
}

/* 1 quote */
.q-idea { display: grid; gap: 0.35rem; padding: var(--sp-2) var(--sp-3); background: var(--c-bg); border-radius: var(--radius-m); box-shadow: 0 0 0 var(--border) var(--c-text); }
.q-text { font-family: var(--font-display); font-size: var(--fs-1); line-height: 1.2; }
.q-break { display: grid; gap: 0.4rem; }
.q-break ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.q-break li { display: inline-flex; align-items: center; gap: 0.5em; padding: 0.3em 0.9em; border-radius: 999px; background: var(--c-bg); box-shadow: inset 0 0 0 var(--border) var(--c-muted); font-size: var(--fs--1); }
.q-break li i { width: 0.7rem; height: 0.7rem; border-radius: 2px; background: var(--c-dominant); }

/* 2 branch + meeting */
.branch { width: 100%; height: auto; overflow: visible; }
.br-path { fill: none; stroke: var(--c-thread); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 8 7; }
.br-pill rect { fill: var(--c-bg); stroke: var(--c-muted); stroke-width: 1.5; }
.br-pill text, .br-meet text { font-family: var(--font-body); font-size: 19px; font-weight: 500; fill: var(--c-text); }
.br-meet rect { fill: var(--c-dominant); stroke: var(--c-accent); stroke-width: 2.5; }
.br-meet text { fill: var(--c-accent); font-size: 22px; font-weight: 600; }
.meet-list { display: grid; gap: 0.5rem; }
.mrow { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.9rem; background: var(--c-bg); border-radius: var(--radius-m); box-shadow: inset 0 0 0 var(--border) var(--c-muted); font-size: var(--fs--1); }
.mrow__ck { position: relative; flex: none; width: 1.3rem; height: 1.3rem; border-radius: 4px; background: var(--c-dominant); }
.mrow__ck::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--c-accent); font-size: 0.8rem; font-weight: 700; }

/* 3 confirmed quote */
.cq { display: grid; gap: 0.6rem; padding: var(--sp-2) var(--sp-3); background: var(--c-bg); border-radius: var(--radius-m); box-shadow: 0 0 0 var(--border) var(--c-text); }
.cq ul { display: grid; gap: 0.5rem; }
.cq li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 1.4rem; align-items: center; gap: var(--sp-1); font-size: var(--fs--1); }
.cq li i { height: 0.5rem; border-radius: 3px; background: var(--c-line); }
.cq li em { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--c-dominant); }
.cq li em::after { content: "✓"; color: var(--c-accent); font-size: 0.75rem; font-style: normal; font-weight: 700; }
.payrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.started { display: inline-flex; gap: 0.5em; padding: 0.55em 1.1em; border-radius: 999px; background: var(--c-dominant); color: var(--c-accent); font-weight: 600; font-size: var(--fs--1); }
.bal { display: grid; gap: 0.4rem; }
.bal__bar { display: flex; height: 1rem; border-radius: 999px; overflow: hidden; box-shadow: 0 0 0 var(--border) var(--c-text); background: var(--c-bg); }
.bal__used { flex: 0 0 68%; background: var(--c-dominant); transform-origin: left; }
.bal__left { flex: 1; background: repeating-linear-gradient(135deg, var(--c-thread) 0 3px, transparent 3px 8px); }
.bal__cap { font-size: var(--fs--1); color: var(--c-text); }

/* 4 dashboard */
.stage--dash { padding: var(--sp-2); }
.dash { background: var(--c-bg); border-radius: var(--radius-m); box-shadow: 0 0 0 var(--border) var(--c-text); overflow: hidden; }
.dash__bar { display: flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0.9rem; background: var(--c-dominant); color: var(--c-on-dark); font-size: var(--fs--1); font-weight: 500; }
.dash__bar i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c-accent); }
.dash__bar span { margin-left: 0.6rem; }
.dash__body { display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem; gap: var(--sp-2); padding: var(--sp-2); }
.dash__main, .dash__side { display: grid; gap: 0.5rem; align-content: start; min-width: 0; }
.dash__main .q-tag:not(:first-child) { margin-top: 0.6rem; }
.gantt { display: grid; gap: 0.55rem; }
.gantt li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 1.3rem; align-items: center; gap: 0.5rem; font-size: var(--fs--1); }
.gantt__track { height: 0.6rem; border-radius: 3px; background: var(--c-line); overflow: hidden; }
.gantt__track b { display: block; height: 100%; width: 100%; background: var(--c-thread); transform-origin: left; }
.gantt li:nth-child(3) b { width: 55%; }
.gantt li:nth-child(4) b { width: 0; }
.gantt li em { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--c-dominant); color: var(--c-accent); font-size: 0.75rem; font-style: normal; font-weight: 700; }
.gantt li:nth-child(n+3) em { visibility: hidden; }
.reports { display: grid; gap: 0.4rem; }
.reports li { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.7rem; border-radius: 6px; background: var(--c-surface); font-size: var(--fs--1); }
.reports li span:first-child { color: var(--c-thread); }
.notif { display: grid; gap: 0.4rem; }
.nchip { position: relative; padding: 0.45rem 0.7rem; border-radius: 999px; font-size: 0.85rem; line-height: 1.2; box-shadow: inset 0 0 0 var(--border) var(--c-muted); }
.nchip span:first-child { position: relative; z-index: 1; }
.nchip__on { position: absolute; inset: 0; border-radius: 999px; background: rgba(224, 177, 60, 0.35); box-shadow: inset 0 0 0 2px var(--c-thread); opacity: 0; }
.nchip:last-child .nchip__on { opacity: 1; }

/* 5 delivery */
.blocks { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(2, 4.8rem); gap: var(--sp-1); }
.blk { display: grid; align-content: center; justify-items: start; gap: 0.15rem; padding: 0 var(--sp-2); min-width: 0; border-radius: var(--radius-m); background: var(--c-bg); border: var(--stitch) dashed var(--c-thread); font-size: var(--fs--1); font-weight: 500; }
.blk b { font-family: var(--font-display); font-size: var(--fs-1); line-height: 1; color: var(--c-thread); }
.blk--mvp { grid-row: 1 / span 2; background: var(--c-dominant); border: var(--stitch) solid var(--c-accent); color: var(--c-on-dark); }
.blk--mvp b { color: var(--c-accent); font-size: var(--fs-1); }
.blk--mvp small { color: var(--c-on-dark-soft); font-size: 0.8rem; }
.blk--wide { grid-column: 2 / span 2; }
.spans { display: grid; gap: 0.7rem; padding-top: 0.5rem; }
.spans li { display: grid; gap: 0.25rem; font-size: var(--fs--1); }
.spans__track { height: 0.6rem; }
.spans__bar { display: block; height: 100%; border-radius: 3px; background: var(--c-dominant); transform-origin: left; }
.spans__bar--1 { width: 14%; }
.spans__bar--2 { width: 32%; background: var(--c-dominant-3); }
.spans__bar--3 { width: 100%; background: repeating-linear-gradient(90deg, var(--c-thread) 0 calc(25% - 3px), transparent calc(25% - 3px) 25%); }

/* 6 support: warranty vs credits */
.stage--support { gap: var(--sp-2); }
.sline { display: grid; gap: 0.4rem; }
.sline__track { display: flex; height: 0.7rem; border-radius: 4px; overflow: hidden; background: var(--c-line); }
.sline__a, .sline__b { display: block; height: 100%; transform-origin: left; }
.sline__a { flex: 0 0 50%; background: var(--c-dominant); }
.sline__b { flex: 1; background: repeating-linear-gradient(90deg, var(--c-thread) 0 10px, transparent 10px 16px); }
.sline__lbl { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.5rem; white-space: nowrap; font-size: 0.74rem; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--c-text-soft); }
.sline__mid { color: var(--c-dominant); font-weight: 600; text-align: center; }
.sline__lbl > span:last-child { text-align: right; }
.scard { display: grid; gap: 0.45rem; padding: var(--sp-2) var(--sp-3); background: var(--c-bg); border-radius: var(--radius-m); box-shadow: 0 0 0 var(--border) var(--c-text); }
.scard--credits { box-shadow: none; border: var(--stitch) dashed var(--c-thread); }
.scard__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; }
.scard__chip { padding: 0.15em 0.85em; border-radius: 999px; background: var(--c-dominant); color: var(--c-accent); font-size: var(--fs--1); font-weight: 600; }
.scard--credits .scard__chip { background: var(--c-accent); color: var(--c-accent-ink); }
.scard__sub { font-size: var(--fs--1); font-weight: 600; color: var(--c-thread); }
.scard__p { font-size: var(--fs--1); line-height: 1.45; }
.scard__n { font-size: 0.82rem; line-height: 1.4; color: var(--c-text-soft); }

/* closing CTA row */
.pcta__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.pcta__link { color: var(--c-on-dark); }

/* ---------- narrow and short screens: stacked scenes, no pins ---------- */
@media (max-width: 960px), (max-height: 679px) {
  .scene { min-height: 0; padding: var(--sp-5) 0; }
  .scene__inner { grid-template-columns: 1fr; row-gap: var(--sp-4); }
  .scene__copy, .stage { grid-column: 1 / -1; }
  .stage { min-height: 0; }
  .scene__h { font-size: clamp(1.7rem, 6vw, 2.4rem); }
}
@media (max-width: 960px) { .scene:first-of-type { padding-top: var(--sp-5); } }
@media (max-width: 560px) {
  .stage { padding: var(--sp-2); }
  .cq li { grid-template-columns: 7.5rem minmax(0, 1fr) 1.4rem; }
  .dash__body { grid-template-columns: 1fr; }
  .gantt li { grid-template-columns: 5.6rem minmax(0, 1fr) 1.3rem; }
  .notif { grid-template-columns: 1fr; }
  .blocks { grid-template-rows: repeat(2, 4.4rem); }
  .blk b, .blk--mvp b { font-size: var(--fs-0); }
  .blk { padding: 0 0.4rem; font-size: 0.66rem; letter-spacing: -0.01em; }
  .prail { gap: 0.4rem; padding-right: 0.7rem; }
  .prail a { width: 1.7rem; height: 1.7rem; font-size: 0.8rem; }
  .prail ol { gap: 0.1rem; }
}

/* The H1 is the long keyword phrase: a smaller display size than the short headings. */
.phero__title--long { font-size: clamp(1.9rem, 3.5vw, 3.3rem); line-height: 1.08; }

/* ---------- phones (<= 767px): compact vertical rhythm; builds play once on enter (proceso.js) ---------- */
@media (max-width: 767px) {
  .scene, .scene:first-of-type { padding: 1.75rem 0; }
  .scene__inner { row-gap: var(--sp-2); }
  .scene__copy { gap: 0.6rem; }
  .scene__pts { gap: 0.3rem; }
  .scene__pts li { font-size: 0.85rem; line-height: 1.35; padding-left: var(--sp-2); }
  .scene__pts li::before { width: 0.6rem; top: 0.72em; }
  .scene__p { font-size: 0.95rem; line-height: 1.45; }
  .stage { gap: 0.6rem; padding: var(--sp-2); }
  .stage--dash { padding: 0.6rem; }
  .q-idea, .cq { padding: 0.7rem var(--sp-2); }
  .dash__body { padding: 0.7rem; gap: 0.6rem; }
  .gantt { gap: 0.4rem; }
  .dash__main .q-tag:not(:first-child) { margin-top: 0.2rem; }
  .spans { gap: 0.5rem; padding-top: 0.2rem; }
  .scard { padding: 0.75rem var(--sp-2); }
  .notif { display: flex; flex-wrap: wrap; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .prail { transition: none; }
}

/* hero: the steps link first, the quote link beside it */
.phero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
