/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  font-family: 'Space Grotesk', sans-serif;
  color: #111;
  overflow-x: hidden;
}

/* ===== KEYFRAMES ===== */
@keyframes pjFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pjFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pjScaleIn {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pjFloaty {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}
@keyframes pjPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .3; transform: scale(.65); }
}
@keyframes pjEq {
  0%, 100% { transform: scaleY(.3); }
  50%      { transform: scaleY(1); }
}
@keyframes pjTransLabel {
  0%   { opacity: 0; letter-spacing: .2em; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; letter-spacing: .5em; }
}
@keyframes pjLine {
  0%   { transform: scaleX(0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: scaleX(1); opacity: .15; }
}
@keyframes pjBlobEnter {
  0%   { transform: translateX(var(--pjshift, 0)) scale(.02); animation-timing-function: cubic-bezier(.2,.7,.2,1); }
  60%  { transform: translateX(var(--pjshift, 0)) scale(1);   animation-timing-function: cubic-bezier(.55,0,.15,1); }
  80%  { transform: translateX(0) scale(1); }
  100% { transform: translateX(0) scale(1); }
}
@keyframes pjRightEnter {
  0%, 80% { opacity: 0; }
  100%    { opacity: 1; }
}
@keyframes pjRippleBtn {
  0%   { transform: translate(-50%, -50%) scale(.5); opacity: .32; }
  100% { transform: translate(-50%, -50%) scale(7); opacity: 0; }
}
@keyframes pjLoadLetter {
  from { opacity: .5; }
  to   { opacity: 1; }
}
@keyframes pjLoadBar {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes pjLoaderOut {
  0%, 72% { opacity: 1; }
  100%    { opacity: 0; pointer-events: none; }
}
@keyframes pjPulse {
  0%, 100% { opacity: .6; transform: scale(.995); }
  50%      { opacity: 1;  transform: scale(1.012); }
}

/* ===== APP ===== */
.app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #fff;
  overflow-x: hidden;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 50% 38%, rgba(0,0,0,.025), transparent 70%),
    radial-gradient(40% 40% at 85% 90%, rgba(0,0,0,.02), transparent 70%);
}

.hidden { display: none !important; }

/* ===== LOADING SCREEN ===== */
.screen-loading {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  animation: pjLoaderOut 2.8s forwards;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-letters {
  display: flex;
  gap: .36em;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(16px, 2.6vw, 28px);
  letter-spacing: .12em;
  color: #111;
}

.loader-letters span {
  opacity: .5;
  animation: pjLoadLetter .5s ease forwards;
}

.loader-bar-wrap {
  width: min(220px, 52vw);
  height: 2px;
  background: rgba(0,0,0,.08);
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  background: #111;
  width: 0;
  animation: pjLoadBar 1.9s cubic-bezier(.4,0,.1,1) .1s forwards;
}

/* ===== SCREEN BASE ===== */
.screen {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ===== UTILITIES ===== */
.overline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .34em;
  color: #b3b3b1;
  margin-bottom: 34px;
}

.pj-h1 {
  margin: 0;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-size: clamp(34px, 6.4vw, 76px);
}

.pj-h1 .ln {
  display: block;
  opacity: 0;
  animation: pjFadeUp .95s cubic-bezier(.2,.75,.2,1) forwards;
}

.pj-h1 .bold { font-weight: 700; }

.anim-fadein {
  opacity: 0;
  animation: pjFadeIn .8s ease forwards;
}

.anim-fadeup {
  opacity: 0;
  animation: pjFadeUp .9s cubic-bezier(.2,.75,.2,1) forwards;
}

.anim-scalein {
  opacity: 0;
  animation: pjScaleIn .5s cubic-bezier(.2,.75,.2,1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .anim-fadein, .anim-fadeup, .anim-scalein {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .3em;
  color: #111;
  font-weight: 500;
  white-space: nowrap;
  margin: 0;
  line-height: 1;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: #e6e6e4;
}

.section-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .1em;
  color: #b3b3b1;
}

.hint-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .16em;
  color: #b3b3b1;
}

.btn-cancel-diagnostico {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  color: #b3b3b1;
  padding: 8px;
  transition: color .2s ease;
}

.btn-cancel-diagnostico:hover {
  color: #111;
}

/* ===== INTRO SCREEN ===== */
#screen-intro {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-inner {
  text-align: center;
  padding: 40px 24px 120px;
  cursor: pointer;
}

.intro-cta {
  margin-top: 62px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(0,0,0,.13);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pjRippleBtn 7s ease-out infinite;
  pointer-events: none;
}

.btn-start {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  letter-spacing: .36em;
  color: #111;
  font-weight: 500;
  padding: 14px 10px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: opacity .25s;
}

.btn-start:hover { opacity: .55; }

.pj-pulse {
  display: inline-block;
  animation: pjPulse 3.2s ease-in-out infinite;
}

/* ===== VOICE SCREEN ===== */
#screen-voice {
  min-height: 100vh;
  display: flex;
}

.voice-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px clamp(24px, 5vw, 72px) 110px;
  gap: clamp(28px, 5vw, 72px);
  min-height: 100vh;
  width: 100%;
}

.blob-wrap {
  flex: 0 0 auto;
  width: clamp(260px, 40vw, 520px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  --pjshift: calc((clamp(300px, 40vw, 480px) + clamp(28px, 5vw, 72px)) / 2);
  animation: pjBlobEnter 5s both;
}

.blob-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.voice-panel {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  width: clamp(300px, 40vw, 480px);
  animation: pjRightEnter 5s both;
}

#panel-question {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.pj-q {
  animation: pjFadeUp .85s cubic-bezier(.2,.75,.2,1) both;
}

.pj-q p {
  margin: 0;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.015em;
  font-size: clamp(24px, 3.4vw, 42px);
  text-wrap: balance;
}

.pj-ctrl {
  animation: pjFadeIn .6s ease .25s both;
}

/* Idle state */
.ctrl-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: pjFloaty 4s ease-in-out infinite;
}

.btn-record {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #111;
  color: #fff;
  border: 1.5px solid #111;
  border-radius: 999px;
  padding: 16px 32px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  box-shadow: 0 12px 30px -16px rgba(0,0,0,.6);
}

.btn-record:hover {
  transform: scale(1.04);
  box-shadow: 0 18px 38px -16px rgba(0,0,0,.6);
}

.dot-white {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}

/* Recording state */
.ctrl-recording {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
}

.eq-bars span {
  width: 3px;
  height: 100%;
  background: #111;
  transform-origin: bottom;
  animation: pjEq .7s ease-in-out infinite;
}

.btn-stop {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #111;
  border: 1.5px solid #111;
  border-radius: 999px;
  padding: 15px 30px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform .25s, background .25s, color .25s;
}

.btn-stop:hover {
  transform: scale(1.04);
  background: #111;
  color: #fff;
}

.dot-red {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #e5484d;
  animation: pjPulseDot 1s ease-in-out infinite;
  flex-shrink: 0;
}

.mic-error {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .05em;
  color: #c0584a;
  max-width: 30ch;
  text-align: center;
}

/* Transition panel */
#panel-transition {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.trans-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: .4em;
  color: #9a9a98;
  animation: pjTransLabel 3s ease forwards;
}

.trans-line {
  width: min(220px, 40vw);
  height: 1px;
  background: #111;
  transform-origin: left center;
  animation: pjLine 3s cubic-bezier(.4,0,.1,1) forwards;
}

/* ===== FINAL SCREEN ===== */
#screen-final {
  min-height: 100vh;
}

.final-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 120px 24px 130px;
}

.final-header {
  text-align: center;
  max-width: 24ch;
  margin: 0 auto 14px;
}

.final-h2 {
  font-size: clamp(30px, 5vw, 60px);
  line-height: 1.06;
}

.final-subtitle {
  text-align: center;
  max-width: 46ch;
  margin: 24px auto 0;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.5;
  color: #555;
}

/* ===== PROJECT CARDS ===== */
.pj-card {
  opacity: 0;
  animation: pjFadeUp .75s cubic-bezier(.2,.75,.2,1) forwards;
  background: #fff;
  border: 1px solid #ececeb;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .45s cubic-bezier(.2,.75,.2,1), box-shadow .45s;
}

.pj-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 46px -22px rgba(0,0,0,.28);
}

.pj-bento .pj-card:nth-child(1),
.pj-grid  .pj-card:nth-child(1),
.pj-carousel-track .pj-card:nth-child(1) { animation-delay: .08s; }
.pj-bento .pj-card:nth-child(2),
.pj-grid  .pj-card:nth-child(2),
.pj-carousel-track .pj-card:nth-child(2) { animation-delay: .18s; }
.pj-bento .pj-card:nth-child(3),
.pj-grid  .pj-card:nth-child(3),
.pj-carousel-track .pj-card:nth-child(3) { animation-delay: .28s; }
.pj-bento .pj-card:nth-child(4),
.pj-grid  .pj-card:nth-child(4),
.pj-carousel-track .pj-card:nth-child(4) { animation-delay: .38s; }
.pj-bento .pj-card:nth-child(5),
.pj-grid  .pj-card:nth-child(5),
.pj-carousel-track .pj-card:nth-child(5) { animation-delay: .48s; }
.pj-bento .pj-card:nth-child(6),
.pj-grid  .pj-card:nth-child(6),
.pj-carousel-track .pj-card:nth-child(6) { animation-delay: .58s; }

.card-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 15px;
  border-bottom: 1px solid #f1f1f0;
}

.card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0e0de;
}

.card-url {
  margin-left: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #b3b3b1;
}

.card-url--private {
  font-style: italic;
  color: #ccc;
  letter-spacing: 0.02em;
}

.card-preview {
  background: repeating-linear-gradient(135deg, #f7f7f6 0 13px, #efefed 13px 26px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-kind {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  color: #a9a9a7;
}

.card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #111;
  font-weight: 500;
}

.card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: #b3b3b1;
  border: 1px solid #ececeb;
  border-radius: 99px;
  padding: 3px 9px;
}

.card-name {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* ===== BENTO LAYOUT ===== */
.pj-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.pj-bento .pj-card:nth-child(1) { grid-column: span 4; }
.pj-bento .pj-card:nth-child(2) { grid-column: span 2; }
.pj-bento .pj-card:nth-child(3) { grid-column: span 2; }
.pj-bento .pj-card:nth-child(4) { grid-column: span 2; }
.pj-bento .pj-card:nth-child(5) { grid-column: span 2; }
.pj-bento .pj-card:nth-child(6) { grid-column: span 6; }

/* ===== CAROUSEL LAYOUT ===== */
.pj-carousel-wrap {
  position: relative;
  overflow: hidden;
}

.pj-carousel-track {
  display: flex;
  gap: 18px;
  transition: transform .55s cubic-bezier(.2,.75,.2,1);
  will-change: transform;
}

.pj-carousel-track .pj-card {
  flex: 0 0 calc((100% - 36px) / 3);
  min-width: 0;
}

.pj-car-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 20px;
}

.pj-car-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #e0e0de;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, color .2s;
  line-height: 1;
}
.pj-car-btn:hover:not(:disabled) {
  background: #111;
  color: #fff;
  border-color: #111;
}
.pj-car-btn:disabled {
  opacity: .28;
  cursor: default;
}

.pj-car-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #aaa;
  min-width: 36px;
  text-align: center;
}

/* ===== GRID LAYOUT ===== */
.pj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* ===== SERVICE CARDS ===== */
.service-card {
  border-top: 1px solid #111;
  padding: 22px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  animation: pjFadeUp .75s cubic-bezier(.2,.75,.2,1) forwards;
}

.service-card:nth-child(1) { animation-delay: .08s; }
.service-card:nth-child(2) { animation-delay: .18s; }
.service-card:nth-child(3) { animation-delay: .28s; }
.service-card:nth-child(4) { animation-delay: .38s; }

.service-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #111;
  font-weight: 500;
}

.service-title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.015em;
}

.service-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #666;
  max-width: 38ch;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  pointer-events: none;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(18px, 4vw, 40px) 12px;
}

.progress-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .16em;
  color: #b3b3b1;
}

.progress-track {
  height: 3px;
  width: 100%;
  background: rgba(0,0,0,.06);
}

.progress-fill {
  height: 100%;
  background: #111;
  width: 0%;
  transition: width 1s cubic-bezier(.4,0,.1,1);
}

/* ===== FOOTER ===== */
.footer {
  display: flex;
  justify-content: center;
  padding: 28px 24px 36px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .18em;
  color: #a9a9a7;
  pointer-events: none;
}

/* Footer fijo: solo en pantallas que no tienen scroll (intro / final) */
.footer-fixed {
  position: fixed;
  bottom: 22px;
  left: 0;
  right: 0;
  z-index: 6;
  padding: 0;
}

/* ===== LANDING ===== */
#screen-landing {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Header bar: siempre en la cima, en flujo normal */
.landing-header-bar {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(20px, 5vw, 56px);
  max-width: 1180px;
  margin: 0 auto;
}

.logo-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  letter-spacing: .14em;
  color: #111;
  font-weight: 500;
}

.logo-link {
  text-decoration: none;
  transition: opacity .2s;
}

.logo-link:hover {
  opacity: .5;
}

.hero-section {
  position: absolute;
  overflow: hidden;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(20px, 5vw, 56px);
  text-align: center;
  height: calc(100vh - 68px);
  display: none;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

#blob-hero {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(400px, 70vw, 900px);
  height: clamp(400px, 70vw, 900px);
  opacity: 0.055;
  pointer-events: none;
  z-index: 0;
}

.hero-h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(40px, 7.6vw, 92px);
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
}

.hero-p {
  position: relative;
  z-index: 1;
  max-width: 50ch;
  margin: 32px auto 0;
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.5;
  color: #555;
  cursor: default;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.services-section {
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(20px, 5vw, 56px);
  height: calc(100vh - 68px);
  overflow: hidden;
  display: none;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.projects-section {
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(20px, 5vw, 56px);
  height: calc(100vh - 68px);
  overflow: hidden;
  display: none;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.cta-section {
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(20px, 5vw, 56px);
  height: calc(100vh - 68px);
  overflow: hidden;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

.cta-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cta-h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  font-size: clamp(28px, 4.4vw, 52px);
  max-width: 16ch;
  text-align: left;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: #111;
  color: #fff;
  border: 1.5px solid #111;
  border-radius: 999px;
  padding: 16px 30px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  box-shadow: 0 12px 30px -16px rgba(0,0,0,.6);
  text-decoration: none;
}

.btn-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 18px 38px -16px rgba(0,0,0,.6);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #111;
  border: 1.5px solid #111;
  border-radius: 999px;
  padding: 16px 30px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background .25s, color .25s;
}

.btn-secondary:hover {
  background: #111;
  color: #fff;
}

.btn-outline {
  background: none;
  border: 1.5px solid #111;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  color: #111;
  cursor: pointer;
  transition: background .25s, color .25s;
}

.btn-outline:hover {
  background: #111;
  color: #fff;
}

.cta-section .btn-primary {
  margin-top: 32px;
}

.cta-section .footer {
  padding: 48px 0 0;
  justify-content: flex-start;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .pj-bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .pj-bento .pj-card:nth-child(1) { grid-column: span 2; }
  .pj-bento .pj-card:nth-child(2) { grid-column: span 1; }
  .pj-bento .pj-card:nth-child(3) { grid-column: span 1; }
  .pj-bento .pj-card:nth-child(4) { grid-column: span 1; }
  .pj-bento .pj-card:nth-child(5) { grid-column: span 1; }
  .pj-bento .pj-card:nth-child(6) { grid-column: span 2; }
  .pj-grid { grid-template-columns: repeat(2, 1fr); }
  .pj-carousel-track .pj-card { flex: 0 0 calc((100% - 18px) / 2); }
}

@media (max-width: 640px) {
  .pj-bento,
  .pj-bento .pj-card:nth-child(1),
  .pj-bento .pj-card:nth-child(2),
  .pj-bento .pj-card:nth-child(3),
  .pj-bento .pj-card:nth-child(4),
  .pj-bento .pj-card:nth-child(5),
  .pj-bento .pj-card:nth-child(6) {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }
  .pj-bento { display: flex; flex-direction: column; }
  .pj-grid  { grid-template-columns: 1fr; }
  .grid-2   { grid-template-columns: 1fr; }
  .voice-inner { flex-direction: column; }
  .landing-header { flex-direction: column; gap: 16px; text-align: center; }
  .pj-carousel-track .pj-card { flex: 0 0 100%; }
}

/* ===== EFECTO MERCURIO (hero-p) ===== */
@keyframes pjMercuryDrip {
  0%   {
    clip-path: inset(0 0 0 0);
    transform: scaleY(1) translateY(0);
    filter: blur(0px);
    letter-spacing: inherit;
    opacity: 1;
  }
  40%  {
    clip-path: inset(0 0 30% 0);
    transform: scaleY(.72) translateY(8px);
    filter: blur(1.5px);
    letter-spacing: .04em;
    opacity: .8;
  }
  70%  {
    clip-path: inset(0 0 72% 0);
    transform: scaleY(.28) translateY(20px);
    filter: blur(3.5px);
    letter-spacing: .1em;
    opacity: .45;
  }
  100% {
    clip-path: inset(0 0 100% 0);
    transform: scaleY(0) translateY(32px);
    filter: blur(6px);
    letter-spacing: .18em;
    opacity: 0;
  }
}

@keyframes pjMercuryRise {
  0%   {
    clip-path: inset(100% 0 0 0);
    transform: scaleY(.05) translateY(-20px);
    filter: blur(5px);
    letter-spacing: .14em;
    opacity: 0;
  }
  35%  {
    clip-path: inset(30% 0 0 0);
    transform: scaleY(.55) translateY(-8px);
    filter: blur(2px);
    letter-spacing: .05em;
    opacity: .6;
  }
  100% {
    clip-path: inset(0 0 0 0);
    transform: scaleY(1) translateY(0);
    filter: blur(0px);
    letter-spacing: inherit;
    opacity: 1;
  }
}

.hero-p-inner {
  display: inline-block;
  transform-origin: bottom center;
  will-change: transform, filter, clip-path, letter-spacing;
}

.hero-p-inner.mercury-out {
  animation: pjMercuryDrip .55s cubic-bezier(.4, 0, .6, 1) forwards;
}

.hero-p-inner.mercury-in {
  animation: pjMercuryRise .65s cubic-bezier(.2, .8, .3, 1) forwards;
}

/* ===== BLOB DECORATIVO LANDING (fixed, cambia posición por sección) ===== */
.landing-blob-canvas {
  position: fixed;
  pointer-events: none;
  z-index: 5;
  width: clamp(140px, 21vw, 270px);
  aspect-ratio: 1;
  top: 0;
  left: 0;
  opacity: 0;
  transition: transform 1s cubic-bezier(0.2, 0.75, 0.2, 1), opacity 0.7s ease;
  will-change: transform, opacity;
}

/* Esquina inferior derecha (CTA hero + Qué hacemos) */
.landing-blob-canvas.blob-br {
  opacity: 0.92;
  transform: translate(calc(100vw - 78%), calc(100vh - 74%));
}

/* Esquina superior izquierda (Por qué + Cómo) */
.landing-blob-canvas.blob-tl {
  opacity: 0.92;
  transform: translate(-32%, -32%);
}

/* Centro-derecha (CTA final) */
.landing-blob-canvas.blob-r {
  opacity: 0.92;
  transform: translate(calc(100vw - 64%), calc(50vh - 50%));
}

/* Oculto (Proyectos) */
.landing-blob-canvas.blob-hidden {
  opacity: 0;
}

/* ===== PROYECTOS: INTRO NARRATIVO ===== */
.projects-intro {
  max-width: 68ch;
  margin: 0 0 32px;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.65;
  color: #555;
  opacity: 0;
  animation: pjFadeUp .9s cubic-bezier(.2,.75,.2,1) .1s forwards;
  display: none; /* hidden in full-page mode */
}

/* ===== PROYECTOS: CARD PREVIEW CANVAS ===== */
.card-preview-canvas {
  position: relative;
  overflow: hidden;
}

.card-preview-canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity .4s ease;
}

.pj-card:hover .card-preview-canvas canvas {
  opacity: 1;
}

.card-preview-canvas .card-kind {
  position: relative;
  z-index: 1;
  transition: opacity .3s ease;
}

.pj-card:hover .card-preview-canvas .card-kind {
  opacity: 0;
}

/* ===== SECCIÓN QUÉ HACEMOS: PROSE BLOCK ===== */
.prose-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 72ch;
  opacity: 0;
  animation: pjFadeUp .8s cubic-bezier(.2,.75,.2,1) .08s forwards;
}

.prose-title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #111;
}

.prose-text {
  margin: 0;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.7;
  color: #444;
  max-width: 68ch;
}

/* ===== SECCIONES POR QUÉ / CÓMO: STAT CARDS ===== */
.stat-card {
  border-top: 2px solid #111;
  padding: 28px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  animation: pjFadeUp .75s cubic-bezier(.2,.75,.2,1) forwards;
}

.stat-card:nth-child(1) { animation-delay: .08s; }
.stat-card:nth-child(2) { animation-delay: .20s; }

.stat-figure {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #111;
  line-height: 1;
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .3em;
  color: #b3b3b1;
  font-weight: 500;
}

.stat-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #555;
  max-width: 44ch;
}

.stat-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  color: #c0c0be;
  margin-top: 4px;
}

/* ===== SECTION FULLPAGE TRANSITIONS ===== */
@keyframes pjSectionOutUp {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-36px); }
}
@keyframes pjSectionInUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pjSectionOutDown {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(36px); }
}
@keyframes pjSectionInDown {
  from { opacity: 0; transform: translateY(-36px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-exit-up   { animation: pjSectionOutUp   0.52s cubic-bezier(.4,0,.2,1) forwards; }
.section-enter-up  { animation: pjSectionInUp    0.52s cubic-bezier(.2,.8,.2,1) forwards; }
.section-exit-down { animation: pjSectionOutDown 0.52s cubic-bezier(.4,0,.2,1) forwards; }
.section-enter-down{ animation: pjSectionInDown  0.52s cubic-bezier(.2,.8,.2,1) forwards; }

/* ===== MODAL DE PROYECTO ===== */
@keyframes pjModalIn {
  from { opacity: 0; transform: scale(.97) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pjModalBdIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pj-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s ease;
}

.pj-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.pj-modal-bd {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.44);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .28s ease;
}

.pj-modal.is-open .pj-modal-bd { opacity: 1; }

.pj-modal-panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e8e8e6;
  box-shadow: 0 32px 80px -20px rgba(0,0,0,.3);
  width: min(960px, 100%);
  max-height: min(680px, 90vh);
  display: grid;
  grid-template-columns: 1fr 340px;
  overflow: hidden;
  transform: scale(.97) translateY(10px);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}

.pj-modal.is-open .pj-modal-panel {
  transform: scale(1) translateY(0);
}

.pj-modal-x {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e8e8e6;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
}

.pj-modal-x:hover { background: #111; border-color: #111; }
.pj-modal-x:hover svg path { stroke: #fff; }

/* Left: gallery + demo */
.pj-modal-left {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ececeb;
  min-height: 0;
  overflow: hidden;
}

.pj-modal-gallery {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f7f7f6;
}

.pj-gallery-track {
  flex: 1;
  display: flex;
  transition: transform .38s cubic-bezier(.2,.8,.2,1);
  min-height: 0;
}

.pj-gallery-slide {
  flex: 0 0 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pj-gallery-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid #ececeb;
  background: #fff;
  flex-shrink: 0;
}

.pj-gallery-arr {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #e8e8e6;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.pj-gallery-arr:hover { background: #111; }
.pj-gallery-arr:hover svg path { stroke: #fff; }

.pj-gallery-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pj-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d0d0ce;
  transition: background .2s, transform .2s;
  cursor: pointer;
}

.pj-gallery-dot.active {
  background: #111;
  transform: scale(1.3);
}

/* Demo area */
.pj-modal-demo {
  flex: 1;
  overflow: auto;
  padding: 20px;
  background: #f7f7f6;
}

/* Right: info */
.pj-modal-right {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.pj-modal-info {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.pj-modal-meta2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pj-modal-mid {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #111;
  font-weight: 500;
}

.pj-modal-mtag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: #b3b3b1;
  border: 1px solid #ececeb;
  border-radius: 99px;
  padding: 3px 9px;
}

.pj-modal-mname {
  margin: 0;
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.pj-modal-mdesc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #555;
}

.pj-modal-mfeats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pj-modal-mfeats li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #444;
  line-height: 1.4;
}

.pj-modal-mfeats li::before {
  content: '';
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #111;
  margin-top: 5px;
}

.pj-modal-mbtns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.pj-modal-mbtns .btn-primary,
.pj-modal-mbtns .btn-secondary {
  width: 100%;
  justify-content: center;
  font-size: 14px;
  padding: 13px 20px;
}

/* ===== MOCK WINDOW (gallery slides) ===== */
.mock-win {
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0de;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px -8px rgba(0,0,0,.14);
  font-size: 12px;
  user-select: none;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  background: #f4f4f3;
  border-bottom: 1px solid #e8e8e6;
}

.mock-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d9d9d7;
}

.mock-url {
  margin-left: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #aaa;
}

.mock-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .2em;
  color: #aaa;
  margin: 0 0 6px;
}

.mock-table { width: 100%; border-collapse: collapse; }
.mock-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: .12em;
  color: #aaa;
  text-align: left;
  padding: 0 8px 6px;
  border-bottom: 1px solid #f0f0ee;
}
.mock-table td {
  padding: 6px 8px;
  font-size: 11px;
  color: #333;
  border-bottom: 1px solid #f7f7f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.mock-mono { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #888; }

.mock-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 2px 7px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.mock-badge-pend  { background: #f0f0ee; color: #888; }
.mock-badge-proc  { background: #fef3c7; color: #92400e; }
.mock-badge-done  { background: #d1fae5; color: #065f46; }
.mock-badge-new   { background: #ede9fe; color: #5b21b6; }
.mock-badge-low   { background: #fef3c7; color: #92400e; }
.mock-badge-crit  { background: #fee2e2; color: #991b1b; }
.mock-badge-ok    { background: #d1fae5; color: #065f46; }

.mock-kpi-row { display: flex; gap: 8px; }
.mock-kpi {
  flex: 1;
  border: 1px solid #f0f0ee;
  border-radius: 8px;
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-kpi-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  color: #111;
  line-height: 1;
}
.mock-kpi-lbl {
  font-size: 10px;
  color: #aaa;
  line-height: 1.3;
}

.mock-bar-chart { display: flex; align-items: flex-end; gap: 5px; height: 52px; padding: 0 2px; }
.mock-bar-col { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; }
.mock-bar-fill { width: 100%; background: #111; border-radius: 3px 3px 0 0; min-height: 4px; }
.mock-bar-lbl { font-family: 'JetBrains Mono', monospace; font-size: 8px; color: #ccc; }

.mock-cal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.mock-cal-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #aaa;
  text-align: center;
  padding-bottom: 4px;
}
.mock-cal-slot {
  border: 1px solid #f0f0ee;
  border-radius: 4px;
  padding: 5px 4px;
  font-size: 9px;
  color: #ccc;
  text-align: center;
  min-height: 24px;
}
.mock-cal-slot.booked {
  background: #111;
  color: #fff;
  border-color: #111;
}
.mock-cal-slot.free {
  background: #f7f7f6;
  color: #bbb;
}

.mock-pipe { display: flex; gap: 6px; }
.mock-pipe-col { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.mock-pipe-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: .1em;
  color: #aaa;
  padding: 4px 6px;
}
.mock-pipe-card {
  border: 1px solid #ececeb;
  border-radius: 6px;
  padding: 7px 8px;
  font-size: 10px;
  color: #333;
  background: #fff;
  line-height: 1.3;
}
.mock-pipe-card .mock-mono { display: block; margin-top: 2px; }

/* ===== DEMO INTERACTIVO ===== */
.demo-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
}

.demo-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .22em;
  color: #aaa;
}

.demo-table { width: 100%; border-collapse: collapse; }
.demo-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: #aaa;
  text-align: left;
  padding: 0 10px 8px;
  border-bottom: 1px solid #e8e8e6;
}
.demo-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f2f2f0;
  font-size: 12px;
  color: #333;
  vertical-align: middle;
}
.demo-table td:last-child { text-align: right; }

.demo-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  transition: background .3s, color .3s;
}
.demo-badge.pend { background: #f0f0ee; color: #777; }
.demo-badge.proc { background: #fef3c7; color: #92400e; }
.demo-badge.done { background: #d1fae5; color: #065f46; }

.demo-btn-sm {
  border: 1px solid #e0e0de;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  background: #fff;
  color: #111;
  transition: background .2s, color .2s, border-color .2s;
}
.demo-btn-sm:hover:not(:disabled) { background: #111; color: #fff; border-color: #111; }
.demo-btn-sm:disabled { opacity: .35; cursor: default; }

.demo-form { display: flex; flex-direction: column; gap: 10px; }
.demo-row { display: flex; gap: 8px; align-items: flex-end; }
.demo-field { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.demo-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: .14em;
  color: #aaa;
}
.demo-input {
  border: 1px solid #e0e0de;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: 'Space Grotesk', sans-serif;
  color: #111;
  outline: none;
  transition: border-color .2s;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.demo-input:focus { border-color: #111; }

.demo-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 4px;
  border-top: 1px solid #e8e8e6;
}
.demo-total-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: #888;
}
.demo-total-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: #111;
}

.demo-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-kpi {
  border: 1px solid #ececeb;
  border-radius: 10px;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.demo-kpi-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  color: #111;
  line-height: 1;
  transition: opacity .3s;
}
.demo-kpi-lbl { font-size: 11px; color: #888; }

.demo-cal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.demo-cal-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: .08em;
  color: #aaa;
  text-align: center;
  padding: 4px 0 6px;
}
.demo-cal-slot {
  border: 1px solid #e8e8e6;
  border-radius: 6px;
  padding: 7px 5px;
  font-size: 10px;
  text-align: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  line-height: 1.2;
}
.demo-cal-slot.free:hover { background: #f0f0ee; border-color: #ccc; }
.demo-cal-slot.booked {
  background: #111;
  border-color: #111;
  color: #fff;
  cursor: default;
  font-size: 9px;
}

.demo-contacts { display: flex; flex-direction: column; gap: 6px; }
.demo-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #ececeb;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.demo-contact:hover, .demo-contact.active {
  border-color: #111;
  background: #fafafa;
}
.demo-contact-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.demo-contact-info { flex: 1; min-width: 0; }
.demo-contact-name { font-weight: 600; font-size: 12px; }
.demo-contact-sub { font-size: 10px; color: #888; }

.demo-note-log { display: flex; flex-direction: column; gap: 6px; max-height: 100px; overflow-y: auto; }
.demo-note-item {
  padding: 7px 10px;
  background: #f7f7f6;
  border-radius: 6px;
  font-size: 11px;
  color: #444;
  line-height: 1.4;
}
.demo-note-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #bbb;
  margin-top: 2px;
}

.demo-stock-table { width: 100%; border-collapse: collapse; }
.demo-stock-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: .1em;
  color: #aaa;
  text-align: left;
  padding: 0 8px 7px;
  border-bottom: 1px solid #e8e8e6;
}
.demo-stock-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #f2f2f0;
  font-size: 11px;
  color: #333;
  vertical-align: middle;
}

.demo-toast {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}
.demo-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Demo: tabs */
.demo-tabs { display:flex; gap:4px; border-bottom:1px solid #e8e8e6; padding-bottom:8px; margin-bottom:10px; flex-wrap:wrap; }
.demo-tab { font-family:'JetBrains Mono',monospace; font-size:10px; padding:4px 10px; border:1px solid #e0e0de; border-radius:99px; cursor:pointer; color:#888; background:#fff; transition:all .15s; }
.demo-tab.active, .demo-tab:hover { border-color:#111; color:#fff; background:#111; }

/* Demo: CRM pipeline */
.demo-pipeline { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.demo-pipeline-col { display:flex; flex-direction:column; gap:6px; }
.demo-pipeline-head { font-family:'JetBrains Mono',monospace; font-size:9px; color:#aaa; padding:0 0 6px 0; border-bottom:2px solid #111; margin-bottom:2px; }
.demo-pipeline-card { background:#f7f7f6; border:1px solid #e8e8e6; border-radius:7px; padding:8px 10px; cursor:pointer; transition:border-color .15s; }
.demo-pipeline-card:hover { border-color:#111; background:#fff; }
.demo-pipeline-card-name { font-weight:600; font-size:11px; color:#111; }
.demo-pipeline-card-sub { font-size:10px; color:#888; margin-top:1px; }

/* Demo: back button */
.demo-back-btn { display:inline-flex; align-items:center; gap:5px; background:none; border:none; cursor:pointer; font-family:'JetBrains Mono',monospace; font-size:10px; color:#888; padding:0 0 8px 0; transition:color .15s; }
.demo-back-btn:hover { color:#111; }

/* Demo: timeline */
.demo-timeline { display:flex; flex-direction:column; gap:0; }
.demo-timeline-step { display:flex; gap:10px; align-items:flex-start; padding:6px 0; }
.demo-timeline-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; margin-top:3px; }
.demo-timeline-label { font-size:11px; color:#555; }

/* Demo: stock bar */
.demo-stock-bar-wrap { background:#e8e8e6; border-radius:3px; height:5px; min-width:50px; overflow:hidden; margin-top:3px; }
.demo-stock-bar-fill { height:100%; border-radius:3px; transition:width .4s; }

/* Demo: entry panel */
.demo-entry-panel { border:1px solid #e8e8e6; border-radius:8px; padding:12px; margin-top:10px; display:flex; flex-direction:column; gap:8px; background:#fafaf9; }

/* Demo: activity feed */
.demo-activity { display:flex; flex-direction:column; }
.demo-activity-item { display:flex; justify-content:space-between; align-items:center; padding:7px 0; border-bottom:1px solid #f0f0ee; gap:10px; }
.demo-activity-msg { font-size:11px; color:#333; }
.demo-activity-time { font-family:'JetBrains Mono',monospace; font-size:9px; color:#bbb; flex-shrink:0; }

/* Demo: agenda events */
.demo-events { display:flex; flex-direction:column; gap:6px; }
.demo-event-item { display:flex; gap:10px; padding:8px 10px; border:1px solid #e8e8e6; border-radius:7px; align-items:center; }
.demo-event-time { font-family:'JetBrains Mono',monospace; font-size:10px; color:#888; flex-shrink:0; min-width:38px; }
.demo-event-body { flex:1; }
.demo-event-name { font-size:12px; font-weight:600; color:#111; }
.demo-event-sub { font-size:10px; color:#888; }

/* Demo: Centauro pipeline horizontal */
.dc-pipeline-h {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 6px 0 4px;
}
.dc-pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
  position: relative;
}
.dc-pipeline-line {
  position: absolute;
  top: 7px;
  right: 50%;
  width: 100%;
  height: 2px;
  z-index: 0;
}
.dc-pipeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  z-index: 1;
  flex-shrink: 0;
  transition: background .25s;
}
.dc-pipeline-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  margin-top: 5px;
  text-align: center;
  letter-spacing: .04em;
  line-height: 1.3;
  transition: color .25s, font-weight .25s;
}

/* Modal responsive */
@media (max-width: 720px) {
  .pj-modal-panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }
  .pj-modal-left {
    border-right: none;
    border-bottom: 1px solid #ececeb;
    max-height: 45vh;
  }
  .pj-modal-right { overflow-y: auto; }
}

/* ============================================================
   PROCESSING SCREEN — Analizando con IA
   ============================================================ */

#screen-processing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f5f5f0;
}

.proc-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  padding: 40px 24px;
  text-align: center;
}

/* Orb animado */
.proc-orb {
  position: relative;
  width: 136px;
  height: 136px;
  flex-shrink: 0;
}

/* Anillo exterior — gira lento */
.proc-orb::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(17,17,17,.22);
  animation: procSpin 9s linear infinite;
}

/* Anillo medio — gira en contra */
.proc-orb::after {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(17,17,17,.1);
  animation: procSpin 5.5s linear infinite reverse;
}

/* Blob interior */
.proc-orb-core {
  position: absolute;
  inset: 36px;
  border-radius: 50%;
  background: #111;
  animation: procPulse 2.6s ease-in-out infinite;
}

@keyframes procSpin  { to { transform: rotate(360deg); } }
@keyframes procPulse {
  0%,100% { transform: scale(.88); opacity: .85; }
  50%     { transform: scale(1);   opacity: 1;   }
}

/* Texto */
.proc-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.proc-overline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .12em;
  color: rgba(17,17,17,.42);
  transition: opacity .2s;
}

.proc-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 600;
  color: #111;
  line-height: 1.2;
  margin: 0;
}

/* Puntos pulsantes */
.proc-dots {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.proc-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111;
  animation: procDot 1.6s ease-in-out infinite;
}
.proc-dots span:nth-child(2) { animation-delay: .22s; }
.proc-dots span:nth-child(3) { animation-delay: .44s; }

@keyframes procDot {
  0%,80%,100% { transform: scale(.55); opacity: .3; }
  40%         { transform: scale(1);   opacity: 1; }
}

/* ============================================================
   RESULTS SCREEN — Estadísticas + Formulario
   ============================================================ */

#screen-results {
  min-height: 100vh;
  overflow-y: auto;
  background: #f5f5f0;
}

.results-inner {
  max-width: 660px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.results-inner--split {
  max-width: 1180px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: start;
}

.results-col {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.results-col-right {
  position: sticky;
  top: 40px;
}

/* ── Fases del resultado (análisis → siguientes pasos) ────────── */
.results-stage {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Fase 1: % general a la izquierda, puntos críticos a la derecha */
.results-grid--analysis {
  grid-template-columns: .92fr 1.08fr;
}

.results-col-left {
  position: sticky;
  top: 40px;
}

.results-col-critical {
  gap: 24px;
}

/* Botón continuar centrado al final del análisis */
.results-continue-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.btn-continue-results {
  min-width: 260px;
  height: 56px;
  justify-content: center;
  font-size: 13px;
  letter-spacing: .12em;
}

/* Encabezado de la fase de siguientes pasos */
.results-stage-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111;
  line-height: 1.15;
  margin: 0 0 28px;
}

/* Transiciones entre fases */
@keyframes stageExitLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-48px); }
}

@keyframes stageEnterRight {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}

.results-stage.stage-exit-left {
  animation: stageExitLeft .42s cubic-bezier(.4, 0, .2, 1) forwards;
  pointer-events: none;
}

.results-stage.stage-enter {
  animation: stageEnterRight .55s cubic-bezier(.4, 0, .2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .results-stage.stage-exit-left,
  .results-stage.stage-enter {
    animation: none;
  }
}

/* ── Cabecera ───────────────────────────────────────────────── */
.results-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.results-stat-hero {
  display: flex;
  align-items: baseline;
  gap: 22px;
  flex-wrap: wrap;
}

.results-big-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(72px, 17vw, 108px);
  font-weight: 500;
  line-height: 1;
  color: #111;
}

.results-stat-desc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(16px, 2.5vw, 20px);
  color: rgba(17,17,17,.65);
  max-width: 300px;
  line-height: 1.4;
  margin: 0;
}

.results-stat-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .08em;
  color: rgba(17,17,17,.35);
  margin: 0;
}

/* ── Lista de errores ───────────────────────────────────────── */
.results-errors {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.results-error-item {
  display: flex;
  gap: 20px;
  padding: 22px 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(17,17,17,.07);
  transition: box-shadow .2s;
}

.results-error-item:hover {
  box-shadow: 0 4px 20px rgba(17,17,17,.07);
}

.results-error-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(17,17,17,.28);
  min-width: 22px;
  padding-top: 3px;
  flex-shrink: 0;
}

.results-error-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.results-error-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin: 0;
  line-height: 1.3;
}

.results-error-desc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: rgba(17,17,17,.55);
  margin: 0;
  line-height: 1.55;
}

.results-error-stat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.stat-pct-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: #f5f5f0;
  background: #111;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.stat-txt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: rgba(17,17,17,.4);
  line-height: 1.6;
}

/* ── Siguientes pasos (timeline, distinto de puntos críticos) ─── */
.results-steps-block,
.results-form-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.results-steps-block { order: 0; }
.results-form-block  { order: 1; }

.results-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.results-steps::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 13.5px;
  width: 1.5px;
  background: rgba(17,17,17,.14);
}

.results-step-item {
  position: relative;
  display: flex;
  gap: 18px;
}

.results-step-num {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111;
  color: #f5f5f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.results-step-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 3px;
}

.results-step-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin: 0;
  line-height: 1.3;
}

.results-step-desc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: rgba(17,17,17,.55);
  margin: 0;
  line-height: 1.55;
}

/* Foco por teclado dentro de la columna sticky: evita que el input
   quede oculto tras el borde superior al hacer scroll-into-view. */
.form-input,
.results-form {
  scroll-margin-top: 56px;
}

/* ── Comparativa con otros negocios ───────────────────────────── */
.results-compare {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.results-compare-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(17,17,17,.07);
}

.compare-question {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  margin: 0;
  line-height: 1.4;
}

.compare-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compare-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(17,17,17,.55);
  width: clamp(90px, 22%, 160px);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #f0f0ee;
  overflow: hidden;
}

.compare-bar-fill {
  height: 100%;
  background: #111;
  border-radius: 3px;
}

.compare-bar-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(17,17,17,.4);
  width: 34px;
  text-align: right;
  flex-shrink: 0;
}

.compare-highlight {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: rgba(17,17,17,.7);
  margin: 0;
  line-height: 1.5;
}

/* ── Formulario lead ────────────────────────────────────────── */
.results-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.results-form-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: rgba(17,17,17,.55);
  margin: 0;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(17,17,17,.45);
}

.form-input {
  height: 50px;
  padding: 0 16px;
  border: 1.5px solid rgba(17,17,17,.14);
  border-radius: 10px;
  background: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  color: #111;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,.07);
}

.form-input::placeholder { color: rgba(17,17,17,.3); }

.btn-send-results {
  width: 100%;
  height: 54px;
  font-size: 12px;
  letter-spacing: .1em;
  margin-top: 4px;
}

.btn-send-results:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.form-legal {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(17,17,17,.3);
  text-align: center;
  margin: 0;
  line-height: 1.6;
}

/* ── Estado de éxito ────────────────────────────────────────── */
.lead-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(17,17,17,.07);
  text-align: center;
}

.lead-success-icon {
  font-size: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #111;
  color: #f5f5f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.lead-success p {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  color: #111;
  margin: 0;
  line-height: 1.5;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .results-grid       { grid-template-columns: 1fr; gap: 52px; }
  .results-grid--analysis { grid-template-columns: 1fr; }
  .results-col-right  { position: static; }
  .results-col-left   { position: static; top: auto; }
  /* En mobile priorizamos captar el lead: formulario antes que los pasos. */
  .results-form-block { order: -1; }
}

@media (max-width: 640px) {
  .results-stat-hero  { flex-direction: column; gap: 6px; }
  .results-stat-desc  { max-width: 100%; }
  .form-row           { grid-template-columns: 1fr; }
  .results-error-item { padding: 16px; }
}
