/* =========================================================
   Gingertech — hoja de estilos
   Tokens de marca extraídos del logotipo
   ========================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("/assets/fonts/bricolage-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Color */
  --red: #FF1A00;        /* cinta principal */
  --ember: #FF4A10;      /* punto medio del degradado */
  --amber: #FF9A1F;      /* cinta clara */
  --mist: #E5EBEB;       /* gris de marca */
  --slate: #4C6971;      /* texto secundario */
  --ink: #000000;        /* wordmark */
  --paper: #FFFFFF;
  --fire: linear-gradient(90deg, var(--amber), var(--ember) 55%, var(--red));

  /* Tipografía — escala clásica 14/18/21/24/36/48/72 */
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1.125rem;
  --fs-md: 1.3125rem;
  --fs-lg: 1.5rem;
  --fs-xl: clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem);
  --fs-2xl: clamp(2.25rem, 1.4rem + 2.8vw, 3rem);
  --fs-hero: clamp(2.75rem, 1.2rem + 5.4vw, 4.5rem);

  /* Layout */
  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space-section: clamp(4.5rem, 3rem + 7vw, 9rem);
  --radius-panel: 22px;
  --radius-control: 12px;
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
[id], input, textarea { scroll-margin-top: 6rem; }
h1, h2, h3, p, ul, ol, fieldset, legend { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .75rem 1rem; border-radius: var(--radius-control);
}
.skip-link:focus { top: 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .75rem 1.5rem;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: var(--fs-base); line-height: 1.1;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-fire { background: var(--red); color: var(--paper); }
.btn-fire:hover { background: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--red); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-small { min-height: 2.5rem; padding: .5rem 1.1rem; font-size: 1rem; }
.btn[disabled] { opacity: .55; cursor: progress; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--mist); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand img { width: auto; height: 2.6rem; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav > a:not(.btn) { text-decoration: none; font-weight: 600; font-size: 1rem; }
.nav > a:not(.btn):hover { color: var(--red); }

.nav-toggle { display: none; }

@media (max-width: 52rem) {
  .nav-toggle {
    display: inline-grid; place-items: center;
    width: 2.75rem; height: 2.75rem; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius-control);
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 1.4rem; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .25s, background-color .25s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.5rem; background: var(--paper);
    border-bottom: 1px solid var(--mist);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav.is-static { position: static; display: flex; padding: 0; border: 0; background: none; }
  .nav.is-static > .btn { margin-top: 0; min-height: 2.5rem; font-size: 1rem; }
  .nav > a:not(.btn) { padding: .9rem 0; font-size: var(--fs-md); border-bottom: 1px solid var(--mist); }
  .nav > .btn { margin-top: 1rem; min-height: 3.25rem; font-size: var(--fs-base); }
}

/* ---------- Portada: la respuesta automática frente a la pregunta ---------- */
/* Dos voces: la máquina habla en monoespaciada, pequeña y gris, dentro de una franja gris;
   las personas hablan en blanco, con la tipografía de marca y a gran tamaño. */
.qa {
  min-height: calc(100svh - 4.5rem);
  display: grid; grid-template-rows: auto 1fr;
  overflow: hidden;
}

.qa-who { font-size: var(--fs-sm); font-weight: 600; color: var(--slate); margin-bottom: .6rem; }

/* La voz de la máquina */
.qa-machine { background: var(--mist); padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3rem); }
.qa-machine-inner { display: grid; gap: 1.25rem; }

.qa-turn-you { display: grid; justify-items: end; }
.qa-prompt {
  max-width: min(100%, 30rem); min-height: 2.9rem; padding: .75rem 1.1rem;
  border-radius: 18px 18px 4px 18px; background: var(--paper);
  font-weight: 600; font-size: var(--fs-base); line-height: 1.35;
}

.qa-answer { position: relative; }
.qa-answer-text {
  max-width: 70ch;
  font-family: var(--mono); font-size: clamp(.8125rem, .75rem + .25vw, .9375rem); line-height: 1.65;
  color: #3d5359; white-space: pre-line;
  opacity: .35; transition: opacity .5s ease .3s;
  text-wrap: pretty;
}
.qa-ghost { visibility: hidden; }

.qa-caret {
  display: none; width: .55em; height: 1.1em; margin-left: 2px;
  vertical-align: text-bottom; background: currentColor;
}
.is-typing .qa-caret[data-qa-caret-prompt],
.is-streaming .qa-caret[data-qa-caret-answer] { display: inline-block; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* El tachado: las dos cintas del logotipo cruzan la respuesta de borde a borde de la pantalla */
.qa-strike {
  position: absolute; top: -8%; bottom: -8%;
  left: calc(50% - 50vw); width: 100vw;
  pointer-events: none;
}
.qa-strike svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* La voz de las personas */
.qa-human { padding-block: clamp(2rem, 4.5vw, 3.75rem) clamp(2.5rem, 5vw, 4.5rem); align-self: center; }
.qa-who-human { color: var(--red); transition: opacity .4s ease; }
.qa-question {
  font-size: min(clamp(2.75rem, 1rem + 4.8vw, 5.75rem), 11svh); line-height: .96; letter-spacing: -.045em;
  max-width: 15ch; margin-bottom: 2rem;
  transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.qa-rest {
  display: grid; gap: 1.75rem; max-width: 34rem;
  transition: opacity .5s cubic-bezier(.16, 1, .3, 1) .08s, transform .5s cubic-bezier(.16, 1, .3, 1) .08s;
}
.qa-claim { font-size: var(--fs-md); font-weight: 750; line-height: 1.3; letter-spacing: -.01em; max-width: 30ch; margin-bottom: .6rem; }
.qa-lead { color: var(--slate); max-width: 44ch; }

/* Escritorio: la pregunta manda a la izquierda; el resto la acompaña a la derecha */
@media (min-width: 60rem) {
  .qa-human { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(2rem, 5vw, 5rem); align-items: start; }
  .qa-who-human { grid-column: 1 / -1; }
  .qa-question { margin-bottom: 0; }
  .qa-rest { padding-top: .6rem; }
}
/* Pantallas bajas de escritorio: la franja de la máquina cede espacio */
@media (min-width: 52rem) and (max-height: 820px) {
  .qa-machine { padding-block: 1.25rem 1.75rem; }
  .qa-machine-inner { gap: .5rem; }
  .qa-answer-text { line-height: 1.5; }
  .qa-human { padding-block: 1.75rem 2rem; }
}
.qa .actions { align-items: center; gap: .75rem 1.5rem; flex-wrap: wrap; }
.qa-replay {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 2.75rem; padding: .45rem 1rem; border: 1px solid #cfd8d8; border-radius: 999px;
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(4px); cursor: pointer;
  font-weight: 700; font-size: .95rem; color: var(--slate);
  text-decoration: none; transition: all .2s ease;
}
.qa-replay:hover { color: var(--red); border-color: var(--red); background: var(--paper); }
.qa-replay-icon { display: inline-block; font-size: 1.1em; line-height: 1; transition: transform .3s ease; }
.qa-replay:hover .qa-replay-icon { transform: rotate(90deg); }
html:not(.js) [data-qa-next] { display: none; }
.qa-replay[aria-disabled="true"] { opacity: .45; cursor: wait; }

/* Estados de la animación: solo con JavaScript; sin él se ve directamente el resultado final */
.js [data-qa]:not(.is-struck) .qa-answer-text { opacity: 1; }
.js [data-qa] .qa-strike svg { clip-path: inset(0 100% 0 0); transition: clip-path .75s cubic-bezier(.4, 0, .2, 1); }
.js [data-qa].is-struck .qa-strike svg { clip-path: inset(0 0 0 0); }
.js [data-qa].is-struck .qa-strike-a { transition-delay: .18s; }
.js [data-qa]:not(.is-asked) .qa-question { opacity: 0; transform: translateY(.15em); }
.js [data-qa]:not(.is-asked) .qa-rest { opacity: 0; transform: translateY(.15em); }
.js [data-qa]:not(.has-asked) .qa-who-human { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .qa-answer-text, .qa-question, .qa-who-human, .qa-rest, .js [data-qa] .qa-strike svg { transition: none !important; }
  .qa-caret { animation: none !important; }
}

@media (max-width: 52rem) {
  .qa { min-height: 0; }
  .qa-question { max-width: 14ch; }
}

/* Cita en las páginas secundarias (404) */
.hero-quote {
  font-size: var(--fs-xl); font-weight: 300; font-stretch: 90%;
  color: var(--slate); letter-spacing: -0.01em; margin-bottom: 1rem;
}
@keyframes say { from { opacity: 0; transform: translateY(.4em); } to { opacity: 1; transform: none; } }

/* ---------- Secciones ---------- */
.section { padding-block: var(--space-section); }
.section-mist { background: var(--mist); }

.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1rem clamp(2rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head h2 { font-size: var(--fs-2xl); }
.section-head p { font-size: var(--fs-md); color: var(--slate); max-width: 38ch; }
@media (max-width: 52rem) { .section-head { grid-template-columns: 1fr; } }

/* ---------- Manifiesto: el tachado de la portada, convertido en sistema ---------- */
.manifesto-title { font-size: var(--fs-2xl); max-width: 14ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.mlist { list-style: none; border-top: 3px solid var(--ink); }
.mline {
  --mfs: clamp(1.75rem, .9rem + 2.6vw, 3.25rem);
  display: grid; gap: .35rem;
  padding-block: clamp(1.75rem, 3.5vw, 3rem); border-bottom: 1px solid #d5dddd;
}
.mline-no { font-size: var(--mfs); font-weight: 300; font-stretch: 85%; line-height: 1.1; letter-spacing: -.02em; color: #5c7479; }
.mline-no s { text-decoration: none; }
/* Una cinta del logotipo cruza cada frase; su inclinación alterna, como en el trenzado */
.mline-strike { position: relative; display: inline-block; }
.mline-strike::after {
  content: ""; position: absolute; inset: -.05em -.3em;
  background: linear-gradient(90deg, var(--amber), var(--red) 70%);
  clip-path: polygon(0 62%, 100% 20%, 100% 58%, 0 100%);
  transform-origin: left center;
  transition: transform .8s cubic-bezier(.4, 0, .2, 1) 2.4s;
}
.mline:nth-child(even) .mline-strike::after {
  background: linear-gradient(90deg, var(--red) 30%, var(--ember));
  clip-path: polygon(0 20%, 100% 62%, 100% 100%, 0 58%);
}
.mline-yes {
  margin-left: clamp(0rem, 22vw - 3rem, 18rem);
  font-size: var(--mfs); font-weight: 800; line-height: 1.05; letter-spacing: -.035em;
  transition: opacity .6s ease 3.2s, transform .6s cubic-bezier(.16, 1, .3, 1) 3.2s;
}
.js .mline:not(.is-in) .mline-strike::after { transform: scaleX(0); }
.js .mline:not(.is-in) .mline-yes { opacity: 0; transform: translateY(.3em); }


/* ---------- Servicios: para cuando… ---------- */
.svc-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px solid var(--ink); }
.svc { display: flex; flex-direction: column; padding: 2rem clamp(1rem, 2.5vw, 2.25rem) 0; border-left: 1px solid #c3cdcd; }
.svc:first-child { border-left: 0; padding-left: 0; }
.svc:last-child { padding-right: 0; }
.svc-name { font-size: var(--fs-base); font-weight: 700; letter-spacing: 0; color: #c21300; margin-bottom: 1rem; }
.svc-when { font-size: var(--fs-xl); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; margin-bottom: 1.25rem; text-wrap: balance; }
.svc-desc { color: #2c3d42; margin-bottom: 1.75rem; max-width: 40ch; }
.svc-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.svc-tags li { font-size: var(--fs-sm); font-weight: 600; padding: .35rem .8rem; border-radius: 999px; background: var(--paper); }
@media (max-width: 60rem) {
  .svc-list { grid-template-columns: 1fr; }
  .svc, .svc:first-child, .svc:last-child { padding: 2rem 0; border-left: 0; border-bottom: 1px solid #c3cdcd; }
}

/* ---------- Stack: la caja de herramientas ---------- */
/* Banda negra: cada logo con su color original; los logos negros, en su versión blanca */
.stack { background: var(--ink); color: var(--paper); padding-block: clamp(3rem, 6vw, 5rem); overflow: hidden; }
.stack-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.stack-title { font-size: clamp(1.5rem, 1rem + 1.8vw, 2.5rem); line-height: 1.1; letter-spacing: -.025em; max-width: 26ch; }
.stack-rail { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.stack-track { display: flex; width: max-content; }
.stack-list { list-style: none; display: flex; align-items: center; gap: clamp(2.75rem, 4.5vw, 4.25rem); padding-right: clamp(2.75rem, 4.5vw, 4.25rem); }
.tool {
  display: inline-flex; align-items: center; gap: .7rem; flex: none;
  font-size: 1.125rem; font-weight: 600; color: #dbe4e5; white-space: nowrap;
}
.tool svg { width: 2.25rem; height: 2.25rem; fill: var(--brand, currentColor); flex: none; }
.tool-glyph { display: inline-grid; place-items: center; min-width: 2.25rem; height: 2.25rem; font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: #8fa0a3; }
.js .stack-track.is-moving { animation: stack-run var(--dur, 60s) linear infinite; }
@keyframes stack-run { to { transform: translateX(-50%); } }
/* Sin JavaScript o con movimiento reducido: todas las herramientas a la vista, sin moverse */
html:not(.js) .stack-rail, .stack.is-static .stack-rail { -webkit-mask-image: none; mask-image: none; }
html:not(.js) .stack-track, .stack.is-static .stack-track { width: auto; padding-inline: var(--gutter); max-width: var(--wrap); margin-inline: auto; }
html:not(.js) .stack-list, .stack.is-static .stack-list { flex-wrap: wrap; gap: 1.75rem 3rem; }

/* ---------- Método: el trenzado ---------- */
.braid-section { overflow: hidden; }
.braid-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 2rem; margin-bottom: 2.5rem; font-size: var(--fs-sm); font-weight: 600; }
.braid-key::before { content: ""; display: inline-block; width: 2rem; height: .7rem; margin-right: .55rem; vertical-align: -.05em; border-radius: 2px; }
.braid-key-need::before { background: var(--red); }
.braid-key-tech::before { background: linear-gradient(90deg, var(--amber), var(--ember)); }

.braid { --braid-w: 17rem; --gap: 2.5rem; --m: 3.25rem; position: relative; }
.braid-svg { position: absolute; top: 0; left: 50%; width: var(--braid-w); height: 100%; transform: translateX(-50%); overflow: visible; }
.strand { fill: none; stroke-width: 56; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.strand-need { stroke: var(--red); }
.strand-tech { stroke: url(#braid-tech); }

.knots { list-style: none; display: grid; grid-template-rows: repeat(5, minmax(14rem, 1fr)); }
.knot {
  position: relative; display: grid; align-content: center;
  width: calc(50% - var(--braid-w) / 2 - var(--gap));
  transition: opacity .5s ease;
}
.knot:nth-child(odd) { justify-self: start; text-align: right; }
.knot:nth-child(even) { justify-self: end; }
.knot h3 { font-size: var(--fs-xl); margin-bottom: .5rem; }
.knot p { color: var(--slate); max-width: 34ch; }
.knot:nth-child(odd) p { margin-left: auto; }
.knot-n {
  position: absolute; top: 50%; width: var(--m); height: var(--m);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-weight: 800; font-size: var(--fs-md);
  box-shadow: 0 0 0 5px var(--paper);
  transform: translateY(-50%);
  transition: transform .4s cubic-bezier(.3, 1.5, .5, 1), opacity .3s ease;
}
.knot:nth-child(odd) .knot-n { right: calc(-1 * (var(--gap) + var(--braid-w) / 2 + var(--m) / 2)); }
.knot:nth-child(even) .knot-n { left: calc(-1 * (var(--gap) + var(--braid-w) / 2 + var(--m) / 2)); }
.js [data-braid] .knot:not(.is-on) { opacity: .25; }
.js [data-braid] .knot:not(.is-on) .knot-n { opacity: 0; transform: translateY(-50%) scale(.5); }

@media (max-width: 52rem) {
  .braid { --braid-w: 4.5rem; --gap: 1.75rem; --m: 2.5rem; }
  .braid-legend { justify-content: flex-start; }
  .braid-svg { left: 0; transform: none; }
  .strand { stroke-width: 18; }
  .knots { grid-template-rows: repeat(5, minmax(12rem, 1fr)); }
  .knot, .knot:nth-child(odd), .knot:nth-child(even) {
    justify-self: end; text-align: left;
    width: calc(100% - var(--braid-w) - var(--gap));
  }
  .knot:nth-child(odd) p { margin-left: 0; }
  .knot:nth-child(odd) .knot-n, .knot:nth-child(even) .knot-n {
    right: auto; left: calc(-1 * (var(--gap) + var(--braid-w) / 2 + var(--m) / 2));
  }
  .knot h3 { font-size: var(--fs-lg); }
}

/* ---------- Proyectos: pruébalo tú ---------- */
.todo {
  padding: 0 .2em; border-radius: 4px; background: #fff1cc; color: #6b4a00;
  outline: 2px dashed #e0a21b; outline-offset: 1px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.case-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  margin-bottom: clamp(2rem, 3.5vw, 2.75rem);
}
html:not(.js) .case-tabs { display: none; }
.case-tab {
  min-height: 4.25rem;
  padding: .75rem 1rem;
  border: 1.5px solid #c8d3d3;
  border-radius: 14px;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .85rem;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .03);
}
.case-tab:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}
.case-tab[aria-selected="true"] {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.case-tab-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(0, 0, 0, .04);
  padding: 3px;
  flex-shrink: 0;
  transition: background .15s ease;
}
.case-tab[aria-selected="true"] .case-tab-logo {
  background: #ffffff;
}
.case-tab-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  overflow: hidden;
}
.case-tab-name {
  font-weight: 750;
  font-size: .9375rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-tab-tag {
  font-family: var(--mono);
  font-size: .7188rem;
  color: var(--slate);
  letter-spacing: .02em;
}
.case-tab[aria-selected="true"] .case-tab-tag {
  color: #94a3b8;
}
@media (max-width: 58rem) {
  .case-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
  }
  .case-tab { flex: 0 0 16rem; }
}

.case { display: flex; flex-direction: column; gap: 1.75rem; }
.case[hidden] { display: none; }
html:not(.js) .case + .case { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid #c3cdcd; }

.case-story-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}
@media (max-width: 48rem) {
  .case-story-top {
    flex-direction: column;
    align-items: flex-start;
    gap: .85rem;
    margin-bottom: 1.5rem;
  }
  .case-actions {
    width: 100%;
    margin-top: .15rem;
  }
  .case-actions .btn {
    width: 100%;
    justify-content: center;
    padding-block: .65rem;
  }
}
.case-kind {
  font-weight: 700;
  color: #c21300;
  margin-bottom: .25rem;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.case-name {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

/* Secuencia narrativa editorial (Story Strip) */
.story-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #f7f9f9;
  border: 1px solid #dbe2e2;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .025);
}
.story-step {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.25rem 1.35rem;
  border-right: 1px solid #e4ebeb;
  position: relative;
  background: transparent;
  transition: background .2s ease;
}
.story-step:last-child {
  border-right: none;
  background: rgba(194, 19, 0, .03);
}
.story-step-head {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.story-step-num {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--ink);
  padding: .15rem .45rem;
  border-radius: 4px;
}
.story-step:last-child .story-step-num {
  background: #c21300;
}
.story-step-label {
  font-family: var(--mono);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #475569;
  font-weight: 750;
}
.story-step-body {
  margin: 0;
  font-size: .875rem;
  line-height: 1.5;
  color: #1e293b;
}
@media (max-width: 60rem) {
  .story-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story-step:nth-child(2) { border-right: none; }
  .story-step:nth-child(1),
  .story-step:nth-child(2) { border-bottom: 1px solid #e4ebeb; }
}
@media (max-width: 36rem) {
  .story-strip { grid-template-columns: 1fr; }
  .story-step { border-right: none; border-bottom: 1px solid #e4ebeb; }
  .story-step:last-child { border-bottom: none; }
}

/* Callout de impacto */
.case-impact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1.25rem;
  background: #ffffff;
  border: 1px solid #d4dede;
  border-radius: 12px;
  font-size: .9375rem;
  color: #1e293b;
}
.case-impact-tag {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #c21300;
  background: rgba(194, 19, 0, .08);
  padding: .25rem .6rem;
  border-radius: 6px;
  flex-shrink: 0;
}
.case-impact strong {
  color: var(--ink);
  font-weight: 800;
}

/* Ventana de navegador estirada y realista */
.frame-visor {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 25px 65px -15px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  height: 48rem;
  width: 100%;
  transition: max-width .35s cubic-bezier(0.16, 1, 0.3, 1), border-radius .3s ease, box-shadow .3s ease;
}
.frame-visor.is-mobile {
  max-width: 25rem;
  height: 48rem;
  margin-inline: auto;
  border: 12px solid #0f172a;
  border-radius: 44px;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, .7);
}
.visor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  height: 2.85rem;
  padding: 0 1rem;
  background: #eaeeee;
  border-bottom: 1px solid #d2dcdd;
  flex-shrink: 0;
  user-select: none;
}
.browser-dots {
  display: flex;
  align-items: center;
  gap: .45rem;
  width: 4rem;
}
.browser-dots .dot {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  display: inline-block;
}
.browser-dots .dot-close { background: #ff5f57; border: 1px solid #e0443e; }
.browser-dots .dot-min { background: #febc2e; border: 1px solid #d89e24; }
.browser-dots .dot-max { background: #28c840; border: 1px solid #1aab29; }

.browser-omnibar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: #ffffff;
  padding: .3rem 1.25rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: .8125rem;
  color: #334155;
  border: 1px solid #d2dcdd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
  max-width: 28rem;
  width: 100%;
}
.browser-lock {
  font-size: .75rem;
  opacity: .7;
}
.browser-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.browser-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  justify-content: flex-end;
  width: 6rem;
}
.visor-toggle {
  display: inline-flex;
  background: #d9e2e2;
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}
.visor-toggle button {
  background: transparent;
  border: 0;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: .8125rem;
  cursor: pointer;
  line-height: 1;
  transition: all .15s ease;
}
.visor-toggle button.is-active,
.visor-toggle button[aria-pressed="true"] {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.browser-ext {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: .9375rem;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: background .15s ease;
}
.browser-ext:hover {
  background: #d9e2e2;
}
.visor-frame {
  width: 100%;
  flex: 1 1 auto;
  border: 0;
  background: #ffffff;
  display: block;
}
@media (max-width: 48rem) {
  .frame-visor {
    height: clamp(26rem, 64vh, 34rem);
    border-radius: 18px;
    box-shadow: 0 14px 40px -10px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
  }
  .frame-visor.is-mobile {
    border: 0;
    max-width: 100%;
    height: clamp(26rem, 64vh, 34rem);
    border-radius: 18px;
  }
  .visor-bar {
    height: 3rem;
    padding: 0 .65rem;
    gap: .5rem;
    background: #f1f5f5;
    border-bottom: 1px solid #dbe2e2;
  }
  .browser-dots {
    display: none;
  }
  .visor-toggle {
    display: none;
  }
  .browser-omnibar {
    max-width: none;
    flex: 1 1 auto;
    padding: .38rem .85rem;
    border-radius: 999px;
    font-size: .75rem;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    border-color: #d7e0e0;
  }
  .browser-actions {
    width: auto;
    gap: .25rem;
  }
  .browser-ext {
    font-size: .95rem;
    padding: .4rem .6rem;
    border-radius: 8px;
    background: #e2e8e8;
  }
}

/* Consola interactiva YOUNIVERS */
.visor-clinical {
  flex: 1 1 auto;
  background: #090d14;
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  font-family: var(--sans);
  overflow-y: auto;
}
.clinical-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #1e293b;
}
.clinical-doctor {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.clinical-avatar {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.clinical-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--mono);
  font-size: .75rem;
  color: #34d399;
  background: rgba(16, 185, 129, .12);
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, .3);
}
.clinical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
  margin-block: 1.5rem;
}
.clinical-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1.25rem;
}
.clinical-card-title {
  font-size: .8125rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
}
.clinical-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.clinical-pill {
  background: #1e293b;
  border: 1px solid #334155;
  padding: .4rem .8rem;
  border-radius: 8px;
  font-size: .8125rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: all .15s ease;
}
.clinical-pill:hover,
.clinical-pill.is-active {
  background: #047857;
  border-color: #10b981;
  color: #fff;
  font-weight: 600;
}
.clinical-log {
  background: #0b1118;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: .85rem 1rem;
  font-family: var(--mono);
  font-size: .8125rem;
  color: #94a3b8;
  line-height: 1.5;
}
.clinical-log strong {
  color: #34d399;
}
.clinical-actions {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.demo { position: relative; height: 27rem; overflow: hidden; font-size: .9375rem; line-height: 1.4; }
.frame-phone .demo { height: 100%; }
.demo button { cursor: pointer; font: inherit; }
@container (max-width: 34rem) { .frame-browser .demo { height: auto; min-height: 27rem; } }

/* Demo 1: tienda online, cálida y con tipografía serif */
.demo-shop { --s-bg: #f3ede4; --s-ink: #2b2118; --s-acc: #1f6f5c; --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; background: var(--s-bg); color: var(--s-ink); }
.shop-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem; border-bottom: 1px solid rgba(43, 33, 24, .12); }
.shop-logo { font-family: var(--serif); font-style: italic; font-size: 1.45rem; }
.shop-cart { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .5rem .4rem .9rem; border: 1px solid var(--s-ink); border-radius: 999px; background: transparent; color: var(--s-ink); font-size: .875rem; font-weight: 600; }
.shop-count { display: inline-grid; place-items: center; min-width: 1.45rem; height: 1.45rem; border-radius: 999px; background: var(--s-acc); color: #fff; font-size: .75rem; }
.shop-count.is-bump { animation: pop .3s ease-out; }
@keyframes pop { 50% { transform: scale(1.35); } }
.shop-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: 1.25rem; }
.shop-item { display: grid; gap: .3rem; }
.shop-img { display: block; aspect-ratio: 4 / 4.4; border-radius: 10px; margin-bottom: .35rem; }
.shop-img-1 { background: radial-gradient(circle at 50% 60%, #c8643b 0 24%, transparent 25%), radial-gradient(circle at 72% 58%, transparent 0 9%, #c8643b 10% 13%, transparent 14%), #e9dccb; }
.shop-img-2 { background: linear-gradient(160deg, transparent 0 40%, rgba(0, 0, 0, .06) 40% 42%, transparent 42%), repeating-linear-gradient(90deg, #b9c6b0 0 10px, #a8b79e 10px 20px); }
.shop-img-3 { background: radial-gradient(ellipse 6% 9% at 50% 26%, #ffb547 0 60%, transparent 62%), linear-gradient(#f7f1e8, #f7f1e8) 50% 72% / 34% 52% no-repeat, #dccab2; }
.shop-name { font-family: var(--serif); font-size: 1.02rem; }
.shop-price { font-size: .875rem; color: #6d5a49; }
.shop-add { justify-self: start; margin-top: .2rem; padding: .45rem 1rem; border: 0; border-radius: 999px; background: var(--s-ink); color: var(--s-bg); font-size: .8125rem; font-weight: 600; }
.shop-add:hover { background: var(--s-acc); }
.shop-drawer {
  position: absolute; inset: 0 0 0 auto; width: min(21rem, 88%); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 1rem; overflow-y: auto;
  background: #fffaf3; box-shadow: -12px 0 32px rgba(43, 33, 24, .14);
  animation: drawer-in .3s cubic-bezier(.2, .8, .2, 1);
}
.shop-drawer[hidden] { display: none; }
@keyframes drawer-in { from { transform: translateX(100%); } }
.shop-steps { list-style: none; display: flex; gap: .4rem; font-size: .8125rem; color: #8a7765; }
.shop-steps li { flex: 1; padding-top: .45rem; border-top: 3px solid #e2d8cb; }
.shop-steps li.is-on { border-color: var(--s-acc); color: var(--s-ink); font-weight: 700; }
.shop-view { display: grid; gap: .8rem; }
.shop-lines { list-style: none; }
.shop-lines li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .55rem; border-bottom: 1px solid #ece2d5; }
.shop-total { display: flex; justify-content: space-between; font-size: 1.05rem; }
.shop-primary { width: 100%; padding: .8rem 1rem; border: 0; border-radius: 999px; background: var(--s-acc); color: #fff; font-weight: 700; }
.shop-link { justify-self: start; padding: .2rem 0; border: 0; background: none; color: var(--s-ink); text-decoration: underline; text-underline-offset: 3px; }
.shop-hint, .shop-empty { font-size: .875rem; color: #6d5a49; }
.shop-pay { display: grid; gap: .6rem; }
.shop-field { display: grid; gap: .25rem; font-size: .8125rem; color: #6d5a49; }
.shop-field input { padding: .55rem .7rem; border: 1px solid #ddd1c2; border-radius: 8px; background: #fff; font: inherit; color: var(--s-ink); }
.shop-done { text-align: center; display: grid; justify-items: center; gap: .5rem; padding-top: .5rem; }
.shop-tick { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--s-acc); color: #fff; font-size: 1.6rem; font-weight: 700; }
.shop-done-title { font-family: var(--serif); font-size: 1.35rem; }
@container (max-width: 34rem) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Demo 2: plataforma SaaS, en índigo */
.demo-saas { display: grid; grid-template-columns: 9rem minmax(0, 1fr); background: #f4f5fb; color: #1b1f3b; }
.saas-nav { display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem 1rem; background: #1b1f3b; color: #a9aee0; font-size: .875rem; }
.saas-logo { margin-bottom: .6rem; color: #fff; font-weight: 800; font-size: 1.1rem; }
.saas-nav .is-on { color: #fff; font-weight: 700; }
.saas-main { display: grid; gap: .9rem; align-content: start; padding: 1.1rem 1.25rem; }
.saas-hello { font-size: 1.25rem; font-weight: 750; }
.saas-kpis { display: flex; gap: .75rem; }
.saas-kpis p { flex: 1; padding: .7rem .9rem; border-radius: 12px; background: #fff; color: #5b6288; font-size: .8125rem; }
.saas-kpi { display: block; color: #1b1f3b; font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.saas-chart { padding: .8rem 1rem; border-radius: 12px; background: #fff; }
.saas-toggle { display: inline-flex; gap: .25rem; padding: .2rem; border-radius: 999px; background: #eef0fb; }
.saas-toggle button { padding: .3rem .8rem; border: 0; border-radius: 999px; background: transparent; color: #4b5280; font-size: .8125rem; font-weight: 600; }
.saas-toggle button[aria-pressed="true"] { background: #4f5bd5; color: #fff; }
.saas-bars { display: flex; gap: .5rem; height: 6.5rem; margin-top: .7rem; }
.saas-bar { flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.saas-track { flex: 1; display: flex; align-items: flex-end; }
.saas-fill { display: block; width: 100%; border-radius: 6px 6px 0 0; background: #c9cdf7; transition: height .45s cubic-bezier(.2, .8, .2, 1); }
.saas-bar.is-today .saas-fill { background: #4f5bd5; }
.saas-label { font-size: .7rem; text-align: center; color: #8a90b5; }
.saas-habits { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.saas-habits label { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border-radius: 10px; background: #fff; font-size: .8125rem; cursor: pointer; }
.saas-habits input { width: 1.05rem; height: 1.05rem; accent-color: #4f5bd5; }
@container (max-width: 34rem) {
  .demo-saas { grid-template-columns: 1fr; }
  .saas-nav { display: none; }
  .saas-habits { grid-template-columns: 1fr; }
}

/* Demo 3: app de eventos y comunidad, en el móvil */
.demo-events { --e-acc: #0e9f6e; padding: 1.4rem 1rem 1rem; background: #f4faf7; color: #10261d; overflow-y: auto; }
.ev-screen { display: grid; gap: .75rem; align-content: start; }
.ev-screen[hidden] { display: none; }
.ev-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.ev-field { display: grid; gap: .25rem; font-size: .8125rem; color: #4b635a; }
.ev-field input { padding: .65rem .8rem; border: 1px solid #cfe0d8; border-radius: 12px; background: #fff; font: inherit; font-size: .95rem; color: #10261d; }
.ev-field input:focus-visible { outline: 2px solid var(--e-acc); outline-offset: 1px; box-shadow: none; }
.ev-btn { padding: .8rem 1rem; border: 0; border-radius: 999px; background: var(--e-acc); color: #fff; font-weight: 700; }
.ev-btn:disabled { background: #9fcdb8; cursor: default; }
.ev-card { display: grid; gap: .35rem; padding: .9rem 1rem; border-radius: 16px; background: #fff; box-shadow: 0 1px 0 #d8e8e0; }
.ev-card.is-new { outline: 2px solid var(--e-acc); animation: card-in .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes card-in { from { opacity: 0; transform: translateY(-.6rem) scale(.97); } }
.ev-card-name { font-weight: 750; font-size: 1.02rem; }
.ev-card-when, .ev-count { font-size: .8125rem; color: #4b635a; }
.ev-people { display: flex; min-height: 2rem; padding-left: .45rem; }
.ev-person {
  display: grid; place-items: center; width: 2rem; height: 2rem; margin-left: -.45rem; border: 2px solid #fff; border-radius: 50%;
  color: #fff; font-size: .62rem; font-weight: 800; animation: pop .35s ease-out;
}
.ev-person.is-you { background: var(--ink); }
.ev-again { justify-self: center; padding: .3rem; border: 0; background: none; color: #10261d; text-decoration: underline; text-underline-offset: 3px; }

/* Demo 4: portfolio editorial, en blanco y negro */
.demo-folio { background: #fafafa; color: #111; }
.folio-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; }
.folio-logo { font-weight: 800; letter-spacing: -.02em; }
.folio-menu { display: flex; gap: 1rem; font-size: .8125rem; }
.folio-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: 0 1.25rem 1.25rem; }
.folio-tile { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: none; overflow: hidden; }
.folio-tile .art { transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.folio-tile:hover .art { transform: scale(1.04); }
.art { display: block; width: 100%; height: 100%; }
.art-1 { background: radial-gradient(circle at 36% 50%, #ff4a10 0 27%, transparent 27.5%), #111; }
.art-2 { background: repeating-linear-gradient(90deg, #111 0 12%, #e6e6e6 12% 24%); }
.art-3 { background: linear-gradient(135deg, #e6e6e6 0 50%, #111 50%); }
.art-4 { background: radial-gradient(circle at 50% 100%, #111 0 42%, transparent 42.5%), radial-gradient(circle at 50% 0, #ff9a1f 0 42%, transparent 42.5%), #e6e6e6; }
.art-5 { background: radial-gradient(#111 22%, transparent 24%) 0 0 / 16% 22%, #e6e6e6; }
.art-6 { background: linear-gradient(#111, #111) 30% 34% / 40% 44% no-repeat, linear-gradient(#ff4a10, #ff4a10) 64% 66% / 40% 44% no-repeat, #e6e6e6; }
.folio-full { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .9rem; padding: 1.25rem; background: #fafafa; }
.folio-full[hidden] { display: none; }
.folio-cap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.folio-cap p { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.folio-cap button { padding: .3rem 0; border: 0; background: none; color: #111; text-decoration: underline; text-underline-offset: 3px; }
::view-transition-group(folio-art) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
@container (max-width: 34rem) { .folio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .folio-menu { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .shop-drawer, .ev-card.is-new, .ev-person, .shop-count.is-bump { animation: none !important; }
  .saas-fill, .folio-tile .art { transition: none !important; }
}

/* ---------- Sala de máquinas: el estudio en pixel art ---------- */
.lab { background: var(--ink); color: var(--paper); padding-block: clamp(3rem, 6vw, 5rem); }
.lab-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1rem clamp(2rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.lab-head h2 { font-size: var(--fs-2xl); }
.lab-head p { font-size: var(--fs-md); color: #b9c7c9; max-width: 40ch; }
.lab-head strong { color: var(--paper); font-weight: 750; }
@media (max-width: 52rem) { .lab-head { grid-template-columns: 1fr; } }

/* La escena manda: tan grande como permita la pantalla, sin dejar fuera sus controles */
.studio { width: min(100% - 2 * var(--gutter), calc((100svh - 11.5rem) * 16 / 9), 90rem); margin-inline: auto; }
@media (max-width: 599px) { .studio { width: calc(100% - 2 * var(--gutter)); } }
html:not(.js) .studio { display: none; }
.js .studio-fallback { display: none; }
.studio-fallback .lab-claim { margin-bottom: 1.25rem; }
.studio-agents { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; color: #dbe4e5; }
.studio-agents li { padding: .4rem .9rem; border: 1px solid #3a484c; border-radius: 999px; }

.studio-stage {
  position: relative; container-type: inline-size;
  border-radius: var(--radius-panel); overflow: hidden; background: #e4eaea;
  box-shadow: 0 0 0 1px #263236;
}
.studio-canvas {
  display: block; width: 100%; height: auto; aspect-ratio: var(--ratio, 288 / 162);
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.studio-overlay { position: absolute; inset: 0; pointer-events: none; }

.studio-desk {
  position: absolute; pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 1px solid rgba(169, 184, 186, .55);
  border-radius: 3px;
  background: rgba(255, 255, 255, .7);
  color: #1e293b;
  font-family: var(--mono);
  font-size: clamp(8px, .95cqw, 12px);
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  backdrop-filter: blur(2px);
  transition: all .15s ease;
}
.studio-desk:hover, .studio-desk[aria-expanded="true"] {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transform: translateY(-1px);
}
.studio-desk:focus-visible {
  outline: 2px solid #c21300;
  outline-offset: 1px;
}
@container (max-width: 599px) {
  .studio-desk { font-size: clamp(7.5px, 2.7cqw, 11px); padding: 0 2px; }
}

.studio-panel-label {
  position: absolute; display: flex; align-items: center; margin: 0;
  font-family: var(--mono); font-size: clamp(7px, .8cqw, 11px); line-height: 1; color: #9fb0b3; white-space: nowrap;
}
@container (max-width: 599px) { .studio-panel-label { font-size: clamp(7px, 2.6cqw, 9px); } }
.studio-counter {
  position: absolute; transform: translateX(-50%); margin: .1em 0 0;
  font-family: var(--mono); font-size: clamp(8px, 1cqw, 12px); color: #3d5359; white-space: nowrap;
}
@container (max-width: 599px) { .studio-counter { font-size: clamp(7px, 2.6cqw, 10px); } }

.studio-bubble {
  --tail: 50%;
  position: absolute; z-index: 2; transform: translateY(-100%);
  display: grid; gap: .2em; width: max-content; max-width: 30cqw;
  padding: .6em .8em; border-radius: 10px; background: var(--paper); color: var(--ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
  animation: bubble-in .25s ease-out both;
}
.studio-bubble::after {
  content: ""; position: absolute; left: var(--tail); bottom: -6px; width: 12px; height: 7px; transform: translateX(-50%);
  background: inherit; clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.studio-bubble-who { font-size: .72em; font-weight: 700; color: var(--slate); }
.is-agent { font-family: var(--mono); font-size: clamp(10px, 1.2cqw, 15px); line-height: 1.35; }
.is-agent .studio-bubble-who { font-family: var(--mono); color: #b56a00; }
.is-human { font-size: clamp(11px, 1.45cqw, 18px); line-height: 1.2; border: 2px solid var(--red); }
.is-human .studio-bubble-text { font-weight: 750; letter-spacing: -.01em; }
.is-human .studio-bubble-who { color: #c21300; }
.is-human::after { background: var(--red); }
@container (max-width: 599px) {
  .studio-bubble { max-width: 64cqw; }
  .is-agent { font-size: clamp(10px, 3.6cqw, 13px); }
  .is-human { font-size: clamp(11px, 4.1cqw, 15px); }
}
@keyframes bubble-in { from { opacity: 0; transform: translateY(calc(-100% + 6px)); } }

/* Ficha del agente, dentro de la escena */
.studio-card {
  position: absolute; z-index: 3; top: 30%; right: 2.5%; width: min(24rem, 40%);
  padding: 1.1rem 1.25rem 1.25rem; border-radius: 14px;
  background: var(--ink); color: #c7d3d4; box-shadow: 0 8px 0 rgba(0, 0, 0, .18);
  font-size: clamp(.8125rem, .7rem + .3vw, 1rem);
  max-height: 65%; overflow-y: auto;
}
.studio-card[hidden] { display: none; }
.studio-card p + p { margin-top: .5rem; }
.studio-card-close {
  position: absolute; top: .4rem; right: .5rem; width: 2.25rem; height: 2.25rem;
  border: 0; border-radius: 50%; background: transparent; color: var(--paper); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.studio-card-close:hover { background: #263236; }
.studio-detail-name { font-size: 1.15em; font-weight: 750; color: var(--paper); padding-right: 2rem; }
.studio-detail-role { font-family: var(--mono); font-size: .8125em; color: var(--amber); margin-top: .15rem !important; }
.studio-detail-human strong { color: var(--paper); }
@container (max-width: 599px) { .studio-card { top: auto; bottom: 2.5%; right: 2.5%; left: 2.5%; width: auto; max-height: 55%; } }

.studio-bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 2rem; margin-top: 1rem; }
.studio-ask { flex: 1 1 32rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.studio-ask-label { font-weight: 700; }
.studio-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.lab .chip { background: transparent; color: var(--paper); border-color: #5b6d72; }
.lab .chip:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.lab .qa-replay {
  color: #b9c7c9;
  border-color: #3a484c;
  background: rgba(255, 255, 255, .05);
}
.lab .qa-replay:hover {
  color: var(--paper);
  border-color: var(--amber);
  background: rgba(255, 255, 255, .12);
}
.studio-pause { flex: none; }
.lab-claim { font-size: var(--fs-xl); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; max-width: 18ch; }
@media (prefers-reduced-motion: reduce) { .studio-bubble { animation: none; } }

/* ---------- Diagnóstico: una conversación ---------- */
.diag-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: start; }
.diag-intro h2 { font-size: var(--fs-2xl); margin-bottom: 1.25rem; }
.diag-intro p { font-size: var(--fs-md); color: var(--slate); max-width: 36ch; }
@media (max-width: 52rem) { .diag-grid { grid-template-columns: 1fr; } }

.chat { display: flex; flex-direction: column; min-height: 32rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--paper); border-radius: var(--radius-panel); }
.chat-thread { list-style: none; display: grid; gap: 1.1rem; margin-bottom: 1.5rem; }
.msg { max-width: 92%; }
.msg-us { justify-self: start; }
.msg-who { font-size: var(--fs-sm); font-weight: 600; color: #c21300; margin-bottom: .3rem; }
.msg-text { font-size: var(--fs-lg); font-weight: 750; line-height: 1.2; letter-spacing: -.015em; }
.msg-detail { margin-top: .6rem; color: #2c3d42; max-width: 48ch; }
.msg-you {
  justify-self: end; padding: .6rem 1rem; border-radius: 16px 16px 4px 16px;
  background: var(--mist); font-weight: 600; line-height: 1.35;
}
.msg-typing { display: inline-flex; gap: .3rem; padding: .7rem 0; }
.msg-typing span { width: .5rem; height: .5rem; border-radius: 50%; background: var(--slate); animation: typing 1s ease-in-out infinite; }
.msg-typing span:nth-child(2) { animation-delay: .15s; }
.msg-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 50% { transform: translateY(-4px); opacity: .4; } }
.msg-new { animation: feed-in .3s ease-out both; }
@keyframes feed-in { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }

.chat-options { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: auto; }
.chip {
  padding: .65rem 1.1rem; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); font-weight: 600; text-align: left; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.chip:hover { background: var(--ink); color: var(--paper); }
.chat-options .actions { width: 100%; justify-content: flex-end; align-items: center; gap: .5rem 1.5rem; }
.chat-noscript { color: var(--slate); }
@media (max-width: 52rem) { .chat { min-height: 0; } .chat-options { margin-top: 1rem; } }

/* ---------- Contacto: una carta ---------- */
.letter-title { font-size: clamp(3.5rem, 1rem + 9vw, 9rem); line-height: .9; letter-spacing: -.055em; margin-bottom: 1.25rem; }
.letter-intro { font-size: var(--fs-md); color: var(--slate); max-width: 44ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.letter-intro a { color: var(--ink); font-weight: 700; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.letter { max-width: 70rem; }
.letter-line { font-size: clamp(1.5rem, 1rem + 1.7vw, 2.5rem); font-weight: 700; line-height: 1.75; letter-spacing: -.015em; margin-bottom: 2.25rem; }
.blank {
  min-width: 6ch; max-width: 100%; padding: 0 .1em;
  field-sizing: content;
  font: inherit; letter-spacing: inherit; color: #c21300;
  background: transparent; border: 0; border-bottom: 3px solid var(--ink); border-radius: 0;
  transition: border-color .15s, background-color .15s;
}
.blank::placeholder { color: #9aacb0; font-weight: 500; }
.blank:focus-visible { outline: none; box-shadow: none; border-bottom-color: var(--red); background: #fff4ef; }
.blank[aria-invalid="true"] { border-bottom-color: var(--red); background: #fff4ef; }
@media (max-width: 48rem) {
  .letter-line { font-size: 1.35rem; line-height: 1.8; margin-bottom: 1.75rem; }
  .blank { border-bottom-width: 2px; }
}
@media (max-width: 32rem) {
  .letter-line { font-size: 1.15rem; line-height: 1.7; }
  .blank { padding: .1rem .2rem; }
}

.letter-label { display: block; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.015em; margin-bottom: .5rem; }
.letter-body {
  --line: 2.1rem;
  display: block; width: 100%; min-height: calc(var(--line) * 5); padding: 0;
  font-size: var(--fs-md); line-height: var(--line);
  border: 0; border-radius: 0; resize: vertical;
  background: transparent repeating-linear-gradient(transparent 0 calc(var(--line) - 1px), #c9d3d3 calc(var(--line) - 1px) var(--line)) local;
}
.letter-body::placeholder { color: #8aa0a4; }
.letter-body:focus-visible { outline: 3px solid var(--amber); outline-offset: 6px; box-shadow: none; border-radius: 4px; }
.letter-body[aria-invalid="true"] { outline: 2px solid var(--red); outline-offset: 6px; }

.letter-errors { display: grid; gap: .25rem; margin: 1rem 0 1.5rem; }
.field-error { font-size: var(--fs-sm); font-weight: 600; color: #c21300; }
.field-error:empty { display: none; }
.letter-check { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; align-items: start; max-width: 44rem; margin-bottom: 1.75rem; }
.letter-check input { width: 1.35rem; height: 1.35rem; margin: .15rem 0 0; accent-color: var(--red); }
.letter-check label { font-size: 1rem; }
.letter-check .field-error { grid-column: 2; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
.letter-send { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-status { font-weight: 600; }
.form-status.is-ok { color: #0c6b3a; }
.form-status.is-error { color: #c21300; }

@media (prefers-reduced-motion: reduce) {
  .mline-strike, .mline-yes, .knot, .knot-n { transition: none !important; }
  .msg-typing span, .msg-new { animation: none !important; }
}

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(4rem, 8vw, 7rem) 2.5rem; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 2rem 3rem; align-items: center; }
.footer-claim {
  grid-column: 1 / -1; order: -1; margin-bottom: clamp(1.5rem, 4vw, 3.5rem);
  font-size: clamp(2.5rem, 1rem + 5.2vw, 6rem); font-weight: 800; line-height: .95; letter-spacing: -.045em;
  max-width: 13ch;
}
.footer-logo { height: 2.6rem; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 1.5rem; font-size: 1rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--amber); }
.footer-copy { grid-column: 1 / -1; font-size: var(--fs-sm); color: #8fa0a3; border-top: 1px solid #253033; padding-top: 1.5rem; }
.site-footer :focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--amber); }
@media (max-width: 52rem) { .footer-inner { grid-template-columns: 1fr; } .footer-nav { justify-content: flex-start; } }

/* ---------- Páginas simples (legal, 404) ---------- */
.page { padding-block: clamp(3rem, 6vw, 6rem) var(--space-section); }
.page .wrap { max-width: 48rem; }
.page h1 { font-size: var(--fs-2xl); margin-bottom: 1.5rem; }
.page h2 { font-size: var(--fs-xl); margin: 3rem 0 1rem; }
.page h3 { font-size: var(--fs-md); margin: 1.75rem 0 .5rem; }
.page p, .page ul { margin-bottom: 1rem; }
.page ul { padding-left: 1.25rem; }
.page .note { background: #fff4ef; border-left: 4px solid var(--red); padding: 1rem 1.25rem; border-radius: 0 var(--radius-control) var(--radius-control) 0; }
.not-found { min-height: 70vh; display: grid; align-content: center; }
.not-found .hero-quote { margin-bottom: .5rem; }
.not-found h1 { font-size: var(--fs-hero); margin-bottom: 1.5rem; max-width: 14ch; }
.not-found p:not(.hero-quote) { font-size: var(--fs-md); color: var(--slate); margin-bottom: 2rem; max-width: 36ch; }
