/* CAPE — sólo lo que las utilidades de Tailwind no dan.
   OJO: con el CDN de Tailwind `@apply` NO funciona (la maqueta original lo usaba
   y por eso el botón de "Agendar" salía sin estilos). Aquí va CSS plano. */

:root { color-scheme: light; }

body { font-family: Inter, system-ui, -apple-system, sans-serif; }
h1, h2, h3, h4 { font-family: 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: -0.02em; }

/* Etiquetas monoespaciadas (kickers, tags) */
.mono-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .75rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px; padding: .8rem 1.6rem;
  font-weight: 600; font-size: .95rem; line-height: 1.2;
  min-height: 44px;                 /* área táctil mínima */
  cursor: pointer; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #6c38f0 0%, #5306d8 100%);
  color: #fff; border: none;
  box-shadow: 0 10px 24px -12px rgba(83, 6, 216, .7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(83, 6, 216, .8); }
.btn-ghost { border: 1.5px solid #5306d8; color: #5306d8; background: transparent; }
.btn-ghost:hover { background: #f1ebff; }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: .45; cursor: not-allowed; transform: none; box-shadow: none;
}

/* Foco visible en todo lo interactivo (la maqueta no tenía) */
:focus-visible { outline: 3px solid #6c38f0; outline-offset: 2px; border-radius: 6px; }

/* Tarjetas */
.card {
  background: #fff; border: 1px solid #e5e2ee; border-radius: 18px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(18, 16, 26, .35);
  border-color: #cfc4f3;
}

/* Aparición al hacer scroll */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s ease-out; }
[data-reveal].in { opacity: 1; transform: none; }

/* ── Rejilla de integraciones: apagadas hasta que pasás por encima ──── */
.logo-cell {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1.25rem .5rem; border-radius: 14px;
  color: #8c86a3; font-weight: 600; text-align: center;
  opacity: .62; filter: grayscale(1);
  transition: opacity .35s ease, filter .35s ease, transform .35s ease, background-color .35s ease;
}
.logo-cell:hover, .logo-cell:focus-within {
  opacity: 1; filter: none; transform: scale(1.06);
  background: #fff; color: #12101a;
}
.logo-cell__ico { color: #5306d8; font-size: 30px; }

/* Aro circular del ícono en las tarjetas */
.ring {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #f1ebff, #e0d3ff);
}

/* Inputs */
.field {
  width: 100%; background: #fff; border: 1px solid #d9d5e6; border-radius: 10px;
  padding: .75rem 1rem; font-size: 1rem;   /* 16px: evita el auto-zoom de iOS */
  min-height: 44px; color: #12101a;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field:focus { outline: none; border-color: #5306d8; box-shadow: 0 0 0 3px rgba(83, 6, 216, .15); }
.field[aria-invalid="true"] { border-color: #ba1a1a; box-shadow: 0 0 0 3px rgba(186, 26, 26, .12); }
.field-error { color: #93000a; font-size: .8rem; margin-top: .35rem; display: block; }

/* Calendario */
.day {
  aspect-ratio: 1; min-height: 44px; border-radius: 10px;
  display: grid; place-items: center; font-size: .95rem; font-variant-numeric: tabular-nums;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.day:hover:not(:disabled) { background: #f1ebff; border-color: #cfc4f3; }
.day[aria-pressed="true"] { background: #5306d8; color: #fff; font-weight: 600; }
.day:disabled { opacity: .3; cursor: not-allowed; }
.slot {
  border: 1px solid #d9d5e6; border-radius: 10px; padding: .7rem .5rem; min-height: 44px;
  font-family: 'JetBrains Mono', monospace; font-size: .85rem; color: #5306d8; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.slot:hover:not(:disabled) { border-color: #5306d8; background: #f1ebff; }
.slot[aria-pressed="true"] { background: #5306d8; border-color: #5306d8; color: #fff; font-weight: 600; }
/* Hora ya reservada. Mismo criterio que .day:disabled, y con línea encima para que se
   note sin depender solo del color. */
.slot:disabled {
  opacity: .35; cursor: not-allowed; text-decoration: line-through;
  background: #f6f5fa; border-color: #e6e3ef;
}

/* ══ Nav: píldora flotante de cristal ═══════════════════════════════════
   Flota sobre secciones claras Y sobre el hero oscuro (por eso es vidrio
   esmerilado, no un color plano: un fondo sólido se vería mal en uno de
   los dos). La regla global de prefers-reduced-motion (arriba) ya apaga
   estas transiciones con !important; no hace falta repetirla aquí. */
.pill-nav {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 10px 30px -12px rgba(18, 10, 40, .22), 0 1px 2px rgba(18, 10, 40, .05);
}
/* El panel desplegable va SÓLIDO, sin vidrio: al abrirse queda flotando sobre
   el resto de la página (el header es fixed, no empuja el contenido). Con
   blur + transparencia, aunque fuera al 96%, el blur igual arrastraba la
   silueta del título y el botón "Agendar" de atrás — parecían dos botones
   fantasma superpuestos. La píldora de arriba sí puede quedarse en vidrio:
   el problema es propio de un panel grande con botones clicables encima. */
.pill-nav__mobile-inner.pill-nav {
  background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none;
}

/* Píldora que se desliza bajo el link activo/hovereado (JS: capePillIndicador). */
.pill-nav__indicator {
  position: absolute; top: 4px; left: 0; height: calc(100% - 8px);
  border-radius: 999px; background: #f1ebff;
  opacity: 0; width: 0;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1), width .4s cubic-bezier(.22, 1, .36, 1), opacity .25s ease;
  will-change: transform, width;
}
.pill-nav__indicator.is-ready { opacity: 1; }

/* Hamburguesa de 3 barras que se convierte en X con un leve rebote. */
.pill-nav__burger {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
}
.pill-nav__burger-bar {
  position: absolute; width: 20px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease, width .25s ease;
}
.pill-nav__burger-bar:nth-child(1) { transform: translateY(-6px); }
.pill-nav__burger-bar:nth-child(3) { transform: translateY(6px); }
.pill-nav__burger[aria-expanded="true"] .pill-nav__burger-bar:nth-child(1) { transform: rotate(45deg); }
.pill-nav__burger[aria-expanded="true"] .pill-nav__burger-bar:nth-child(2) { opacity: 0; width: 0; }
.pill-nav__burger[aria-expanded="true"] .pill-nav__burger-bar:nth-child(3) { transform: rotate(-45deg); }

/* Panel móvil: alto animado por max-height, medido en JS (capePillMobileAlto).
   grid-template-rows:0fr/1fr se probó primero pero en WebKit el track no
   termina de colapsar (queda en el contenido mínimo, ~42px, en vez de 0) —
   max-height con el valor real del contenido sí es consistente entre motores. */
/* Sin margen propio: el header YA tiene px-4, igual que la píldora de arriba.
   Un margen aquí ENCIMA de ese padding metía el panel 16px más adentro que la
   píldora por cada lado — quedaba angosto y descuadrado, no pegado a ella. */
.pill-nav__mobile {
  overflow: hidden; max-height: 0;
  transition: max-height .5s cubic-bezier(.34, 1.15, .64, 1);
}
.pill-nav__mobile-link {
  opacity: 0; transform: translateY(-6px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.34, 1.15, .64, 1);
}
.pill-nav__mobile.is-open .pill-nav__mobile-link { opacity: 1; transform: none; }
/* Acotado a los links DENTRO del <nav>: el CTA es hermano suelto después, con su
   propio retraso más largo (nth-child sin acotar los mezclaría a los dos). */
.pill-nav__mobile-inner nav .pill-nav__mobile-link:nth-child(1) { transition-delay: .04s; }
.pill-nav__mobile-inner nav .pill-nav__mobile-link:nth-child(2) { transition-delay: .08s; }
.pill-nav__mobile-inner nav .pill-nav__mobile-link:nth-child(3) { transition-delay: .12s; }
.pill-nav__mobile-inner nav .pill-nav__mobile-link:nth-child(4) { transition-delay: .16s; }
.pill-nav__mobile-inner > .pill-nav__mobile-link { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ══ Banner isométrico del hero ══════════════════════════════════════
   Estructura aprendida de la referencia, código propio. La clave: en la
   ilustración los lados de la pantalla son VERTICALES y sólo los bordes
   de arriba y abajo bajan hacia la derecha — eso es un skewY, no una
   rotación 3D (con rotateX/Z el monitor se ve de canto). El teclado sí
   es isométrico de verdad, con su propio ángulo.
   Medidas pensadas para caber en la columna derecha del hero: las piezas
   se salen de la caja a propósito, por eso .hero-dark recorta. */

.hero-dark {
  overflow: hidden;
  background:
    radial-gradient(ellipse 65% 55% at 75% 45%, rgba(124, 77, 255, .3), transparent 70%),
    #08050f;
  color: #f0ebff;
}
.hero-dark .text-ink-soft { color: #a99fd0; }
.hero-dark .btn-ghost { border-color: #a78bfa; color: #ddd0ff; }
.hero-dark .btn-ghost:hover { background: rgba(167, 139, 250, .14); }
.hero-dark .acento { color: #c4a9ff; }

.iso { display: grid; place-items: center; padding: 1.5rem 0; }
.iso__wrap {
  position: relative; width: 300px; height: 400px;
  /* El contenido va de -96px (teclado) a 304px (panel derecho): su centro no
     coincide con el de la caja, así que sin este translate queda corrido. */
  transform: scale(var(--iso, 1)) translateX(46px);
}

.iso__ghost {
  position: absolute; left: -70px; top: 62px; width: 80px; height: 128px;
  border-radius: 7px; transform: skewY(29deg);
  background: linear-gradient(160deg, rgba(124, 77, 255, .3), rgba(124, 77, 255, .05));
}
.iso__far {
  position: absolute; left: 206px; top: 104px; width: 98px; height: 196px;
  border-radius: 7px; transform: skewY(29deg);
  background: linear-gradient(200deg, rgba(124, 77, 255, .22), rgba(124, 77, 255, .04));
}

.iso__screen {
  position: absolute; left: 0; top: 0; width: 300px; height: 196px;
  transform: skewY(29deg); border-radius: 6px; padding: 18px 20px;
  background: linear-gradient(160deg, #7b4ae2 0%, #4c1d95 55%, #34127a 100%);
}
.iso__tab { width: 44px; height: 5px; border-radius: 3px; background: #c9b3ff; }

.iso__type {
  margin-top: 42px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 26px; line-height: 1.15; letter-spacing: .5px;
  color: #dccfff; white-space: nowrap; min-height: 1.2em;
}
.iso__caret {
  display: inline-block; width: 6px; height: .92em; margin-left: 6px;
  background: #dccfff; vertical-align: -.08em;
  animation: iso-blink 1.05s steps(1) infinite;
}
.iso__prompt { color: #a98bff; margin-right: 10px; }
@keyframes iso-blink { 0%, 55% { opacity: 1 } 55.01%, 100% { opacity: 0 } }

.iso__dashes { position: absolute; right: 20px; top: 78px; display: grid; gap: 14px; justify-items: end; }
.iso__dashes i { display: block; width: 30px; height: 4px; border-radius: 2px; background: #b9a2ff; opacity: .85; }
.iso__dashes i:nth-child(2) { width: 24px; }
.iso__dashes i:nth-child(3) { width: 27px; }

.iso__lower {
  position: absolute; left: -32px; top: 158px; width: 292px; height: 206px;
  transform: skewY(29deg); border-radius: 6px; padding: 18px 20px;
  background: linear-gradient(165deg, rgba(46, 16, 101, .96), rgba(24, 8, 58, .96));
}
.iso__para { width: 146px; }
.iso__para b { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: #c9b3ff; font-weight: 400; }
.iso__para i { display: block; height: 2px; margin-top: 9px; border-radius: 1px; background: #9b7cf0; opacity: .9; }
.iso__para i:nth-child(3) { width: 92% }
.iso__para i:nth-child(4) { width: 96% }
.iso__para i:nth-child(5) { width: 78% }
.iso__para i:nth-child(6) { width: 88% }

.iso__block {
  position: absolute; left: 16px; top: 118px; width: 148px; height: 66px;
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(124, 77, 255, .22), rgba(124, 77, 255, .02) 75%);
}

.iso__thumb {
  position: absolute; right: 26px; top: 56px; width: 72px; height: 72px;
  border-radius: 5px; overflow: hidden;
  background: linear-gradient(150deg, rgba(167, 139, 250, .55), rgba(76, 29, 149, .9));
  box-shadow: -16px 18px 0 -2px rgba(12, 4, 32, .5);
}
.iso__thumb::after {
  content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 36px;
  background: linear-gradient(135deg, #c4a9ff, #7c4dff);
  clip-path: polygon(0 100%, 34% 30%, 58% 100%, 72% 58%, 100% 100%);
}

/* Teclado. La rotación es la del original: rotateZ es POSITIVO — en negativo
   las filas caen hacia el lado contrario y la distribución queda irreconocible.
   7 columnas porque el original da 290px útiles / 38px por tecla. */
.iso__keys {
  position: absolute; left: -150px; top: 268px;
  z-index: 10;                  /* el panel de abajo le pasaba por encima */
  display: grid; grid-template-columns: repeat(7, 30px); gap: 7px;
  transform: rotateX(55deg) rotateY(-3deg) rotateZ(49deg);
}
.iso__keys i {
  height: 30px; border-radius: 3px;
  background: linear-gradient(135deg, #a78bfa, rgba(109, 40, 217, .81));
  box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .8);
}
/* Opacidades tecla por tecla, copiadas del original: son las que dan la
   profundidad (brillan las del frente, se apagan las del fondo). No siguen
   una fórmula, por eso van a mano. */
.iso__keys i:nth-child(2) { opacity: .9 }
.iso__keys i:nth-child(3), .iso__keys i:nth-child(4),
.iso__keys i:nth-child(5), .iso__keys i:nth-child(8) { opacity: .8 }
.iso__keys i:nth-child(6) { opacity: .75 }
.iso__keys i:nth-child(9) { opacity: .7 }
.iso__keys i:nth-child(7), .iso__keys i:nth-child(10),
.iso__keys i:nth-child(11) { opacity: .6 }
.iso__keys i:nth-child(12), .iso__keys i:nth-child(13) { opacity: .5 }
.iso__keys i:nth-child(15) { opacity: .45 }
.iso__keys i:nth-child(14) { opacity: .41 }
.iso__keys i:nth-child(16) { opacity: .4 }
.iso__keys i.sp {
  grid-column: span 3;          /* un solo rectángulo en lugar de 3 teclas */
  background: linear-gradient(135deg, #b69bfb, rgba(109, 40, 217, .55));
  opacity: 1;
}
/* Las dos últimas se desvanecen hacia la nada: cierran el teclado sin borde. */
.iso__keys i.fade {
  background: linear-gradient(150deg, rgba(139, 92, 246, .51), rgba(139, 92, 246, 0) 75%);
  box-shadow: none;
}

@media (max-width: 1023px) { .iso__wrap { --iso: .88 } }
@media (max-width: 767px)  { .iso__wrap { --iso: .72 } }
@media (max-width: 420px)  { .iso__wrap { --iso: .56 } }

@media (prefers-reduced-motion: reduce) { .iso__caret { animation: none } }

/* Logos del stack: SVG de Simple Icons (CC0) servidos en local, no por CDN.
   Vienen con su color de marca; .logo-cell los apaga y el hover los revive. */
.tech-ico { width: 34px; height: 34px; object-fit: contain; }

/* Cinta de logos: se desplaza sola en bucle. La lista va duplicada en el HTML
   y el recorrido es del 50%, así el salto al reiniciar es invisible. */
.marquee { overflow: hidden; }
.marquee__track {
  display: flex; width: max-content; gap: 0;
  animation: marquee 38s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; }
}
