/* ════════════════════════════════════════════════════
   PHSICO STUDIOS — contact.css
   Panel de Contacto que baja desde arriba con el menú, igual que el de Login (login.css/login.js).
   Diseño: 02_Web/Contact.ai — artboards Desktop (1440) y Mobile (390). Sobre fondo special-1.
   Tipografía: la de Login / form de hitos (.label, inputs 15px desktop · 14px mobile). Illustrator trabaja en pt,
   acá van los tamaños del sistema (px).
   Alto del panel SIN la tira del menú: formulario 226px desktop / 290px mobile (230 + 20 arriba + 40 abajo) (pares) + lo que crece el campo Mensaje · confirmación 126px / 186px.
════════════════════════════════════════════════════ */

#ct {
  position: fixed; top: 0; left: 0; right: 0; height: 0; overflow: hidden;
  z-index: 190;                          /* debajo de la tira del menú (200) y del header (300), igual que #lg */
  display: none; pointer-events: none;
  background: var(--black); color: var(--middle-2); font-family: "panel-mono", monospace;   /* negro como la tira del menú: la ola de píxeles lo pasa a amarillo */
}
#ct.on { display: block; }
#ct.ct-bg { background: var(--special-1); }
#ct { --ct-line: 0.7px; }   /* grosor de todas las líneas del form (reglas y casillas del teléfono) sobre amarillo */
.ct-formel { position: absolute; inset: 0; }
#ct *, #ct *::before, #ct *::after { box-sizing: border-box; }
#ct ::selection { background: var(--middle-2); color: var(--special-1); }

.ct-view { position: absolute; top: 0; bottom: 0; left: 50%; width: 500px; max-width: calc(100% - 22px); transform: translateX(-50%); pointer-events: none; }
.ct-view > *, .ct-view form { pointer-events: auto; }
.ct-done { width: 740px; max-width: calc(100% - 30px); }
.ct-a { opacity: 0; }                    /* entran animados; el JS les saca la clase al terminar */
.ct-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* tag + mensaje al lado */
.ct-tagrow { position: absolute; top: 25px; left: 5.5px; right: 0; height: 12px; white-space: nowrap; pointer-events: none; }
.ct-tag { color: var(--middle-0); }
.ct-msg { margin-left: 6px; }
.ct-msg.r { color: var(--special-2); }
.ct-msg:empty { margin-left: 0; }
.ct-tagrow.long .ct-tag { display: none; }
.ct-tagrow.long .ct-msg { margin-left: 0; }
.ct-cur { display: inline-block; width: 2px; height: 0.8em; margin-left: 2px; vertical-align: middle; background: currentColor; animation: ctBlink 0.75s step-end infinite; }
.ct-cur.typing { animation: none; opacity: 1; }
@keyframes ctBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* líneas (middle-2, 0.5px) */
.ct-rule { z-index: 1; position: absolute; left: 0; right: 0; height: var(--ct-line); background: var(--middle-2); transform-origin: left center; pointer-events: none; }
.ct-h0 { top: 41.5px; } .ct-h1 { top: 71.5px; } .ct-h2 { top: 101.5px; } .ct-h3 { top: 131.5px; } .ct-h4 { top: calc(191.2px + var(--ct-x, 0px)); transition: top 0.15s ease-out; }

/* filas: cada una es un form-field; el foco la pinta de --special-1-focus, el error de special-2 */
.ct-r { z-index: 0; position: absolute; left: 0; right: 0; transition: background-color 0.2s ease-out; }
.ct-rn { top: 41.5px; height: 30px; } .ct-rm { top: 71.5px; height: 30px; } .ct-rp { top: 101.5px; height: 30px; } .ct-rg { top: 131.5px; height: calc(59.7px + var(--ct-x, 0px)); transition: background-color 0.2s ease-out, height 0.15s ease-out; }
.ct-r:focus-within { background: var(--special-1-focus); }
.ct-off .ct-r, .ct-off .ct-r:focus-within { background: transparent; transition-duration: 0.16s; }   /* al salir, el campo con foco se apaga enseguida (antes de la ola de color) */
/* error: contorno rojo de 3px que se dibuja (el mismo efecto del foco de Login), por detrás de las líneas */
.ct-ring { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ct-ring path { fill: none; stroke: var(--special-2); stroke-width: 3; stroke-dasharray: 1.02 1.02; stroke-dashoffset: 1.02; }
.ct-l { position: absolute; left: 5.5px; top: 8px; white-space: nowrap; color: var(--middle-0); }
.ct-rg .ct-l { top: 8px; }
.ct-in {
  position: absolute; left: 90.7px; right: 5px; top: 4.5px; height: 22px; margin: 0; padding: 0; border: 0; border-radius: 0; outline: 0;
  background: none; font: inherit; font-size: 15px; line-height: 22px; letter-spacing: 1.5px; font-weight: 400; color: var(--middle-2);
  -webkit-appearance: none; appearance: none; min-width: 0;
}
.ct-rg .ct-in { left: 5.5px; top: 31px; height: 22px; resize: none; overflow: hidden; display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.ct-in::placeholder { color: var(--middle-0); opacity: 1; }
.ct-in:-webkit-autofill, .ct-pn:-webkit-autofill { -webkit-text-fill-color: var(--middle-2); caret-color: var(--middle-2); transition: background-color 600000s 0s, color 600000s 0s; }

/* teléfono: "+" fijo y 15 casillas de 20px (un solo input; el letter-spacing arma las casillas) */
.ct-plus { position: absolute; left: 84px; top: 4.5px; width: 20px; height: 22px; text-align: center; font-size: 15px; line-height: 22px; color: var(--black); pointer-events: none; }
.ct-pn {
  position: absolute; left: 104px; top: 4.5px; width: 360px; height: 22px; margin: 0; border: 0; border-radius: 0; outline: 0; background: none;
  font: inherit; font-size: 15px; line-height: 22px; font-weight: 400; color: var(--middle-2);
  letter-spacing: calc(20px - 1ch); padding: 0 0 0 calc((20px - 1ch) / 2); -webkit-appearance: none; appearance: none;
}
.ct-comb { position: absolute; left: 84px; top: 5.2px; width: 340px; height: 18px; pointer-events: none; transform-origin: left center; }
.ct-comb i { position: absolute; top: 0; bottom: 0; width: var(--ct-line); background: var(--middle-2); transform-origin: top center; }
/* dígitos de ejemplo del teléfono (uno por casilla, así entran y salen de a uno); se ocultan apenas se escribe */
.ct-phd { position: absolute; left: 104px; top: 4.5px; width: 340px; height: 22px; pointer-events: none; }
.ct-phd span { position: absolute; top: 0; width: 20px; text-align: center; font-size: 15px; line-height: 22px; color: var(--middle-0); }
.ct-rp.has .ct-phd { visibility: hidden; }

/* botón: oscuro, texto special-1; en hover el texto pasa a blanco y aparece la flecha */
.ct-sendw { position: absolute; left: 0; right: 0; padding-left: 5.5px; top: calc(199.3px + var(--ct-x, 0px)); transition: top 0.15s ease-out; display: flex; justify-content: flex-start; height: 20px; pointer-events: none; }
.ct-sendw > * { pointer-events: auto; }
.ct-btn {
  display: inline-block; box-sizing: border-box; height: 20px; padding: 4px 6px; background: var(--middle-2); color: var(--special-1);
  font-family: inherit; border: 0; margin: 0; border-radius: 0; white-space: pre; text-align: left; vertical-align: top; cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out; -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
}
.ct-btn .br { letter-spacing: 1px; }
.ct-btn .ch { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; vertical-align: top; transition: max-width 0.25s ease-out, opacity 0.2s ease-out; }
.ct-btn:hover, .ct-btn:focus-visible { color: var(--white); outline: none; }
.ct-btn:hover .ch, .ct-btn:focus-visible .ch { max-width: 1.2em; opacity: 1; }
@media (hover: none) { .ct-btn .ch { max-width: 1.2em; opacity: 1; } }
.ct-btn.busy { color: var(--middle-0); pointer-events: none; }
.ct-btn.busy .ch { max-width: 0; opacity: 0; }

/* trampa para bots: fuera de pantalla, nadie la ve ni la toca */
.ct-hp { position: absolute !important; left: -9999px !important; top: auto !important; width: 1px !important; height: 1px !important; opacity: 0 !important; overflow: hidden !important; }

/* confirmación */
.ct-grp { position: absolute; top: 49px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; }
.ct-big { font-size: 20px; line-height: 24px; letter-spacing: 1.5px; font-weight: 400; color: var(--middle-2); white-space: nowrap; text-align: center; }
.ct-big .ct-cur { height: 0.75em; background: var(--middle-2); }
.ct-leg { position: absolute; top: 80px; left: 0; right: 0; text-align: center; color: var(--middle-0); font-style: italic; }   /* label + modificador itálica */

/* ── mobile ── */
@media (max-width: 768px) {
  .ct-view { width: 344px; max-width: calc(100% - 12px); }   /* mobile: el ancho lo marca el teléfono (las 17 líneas de las casillas): todo el form llega hasta ahí y los márgenes laterales crecen */
  .ct-done { width: calc(100% - 18px); max-width: none; }
  .ct-tagrow { top: 25.5px; left: 7.5px; }
  .ct-h3 { top: 154.2px; } .ct-h4 { top: calc(206.9px + var(--ct-x, 0px)); }
  .ct-rp { height: 52.7px; } .ct-rg { top: 154.2px; height: calc(52.7px + var(--ct-x, 0px)); }   /* 3 nov: el teléfono tiene la misma altura que el Mensaje (52,7) */
  .ct-l { left: 7.5px; top: 9px; }
  .ct-in { left: 78.7px; top: 6px; height: 21px; font-size: 14px; line-height: 21px; letter-spacing: 0.8px; }
  .ct-rg .ct-l { top: 9px; }
  .ct-rg .ct-in { left: 7.5px; top: 30px; right: 7.5px; height: 21px; }
  .ct-rp .ct-l { top: 9px; }
  .ct-plus { left: 4px; top: 30px; height: 21px; font-size: 14px; line-height: 21px; }   /* el número va a la misma distancia de «PHONE >» que el placeholder de «MESSAGE OPTIONAL >» (top 30, línea de 21) */
  .ct-pn { left: 24px; width: 320px; top: 30px; height: 21px; font-size: 14px; line-height: 21px; }
  .ct-comb { left: 4px; top: 30px; height: calc(22.7px + var(--ct-line)); }   /* las verticales no crecen con la fila y llegan pegadas a la línea de abajo (fila 52,7 + grosor de la línea: se funden con ella) */
  .ct-sendw { top: calc(215px + var(--ct-x, 0px)); justify-content: center; padding-left: 0; }
  .ct-formel { top: 20px; }   /* +20px arriba y +40px después del botón (en hForm) para separar el form del menú */
  .ct-phd { left: 24px; top: 30px; width: 340px; height: 21px; }
  .ct-phd span { font-size: 14px; line-height: 21px; }
  .ct-grp { top: 51px; }
  .ct-big { line-height: 22px; white-space: pre; }
  .ct-leg { top: 126px; }
}

/* ── menú en amarillo mientras el panel de Contacto está abierto (body.ct-y) ──
   Desde el menú (negro): el fondo, las letras y la X cambian rápido mientras el panel baja.
   Con el menú oculto (CTA del chat): body.ct-now apaga las transiciones y todo entra ya amarillo. */
#menu-bar { transition: transform 0.4s ease-in; }   /* sin transición de color: el cambio lo hace la ola de píxeles */
#menu-bar.ct-bg { background-color: var(--special-1); }   /* el amarillo de la tira lo pinta la ola de píxeles (contact.js); esta clase lo deja fijo cuando la ola termina */
.menu-side { position: relative; z-index: 1; }
body.ct-y #header.menu-open ~ #header-box { background-color: var(--special-1); transition-delay: 0s; }
body.ct-y #header.menu-open .bar { background-color: var(--middle-2); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease-out, width 0.3s ease-out, opacity 0.25s ease-out, height 0.4s ease-out; }
body.ct-y #header.menu-open.hovered #bar-1, body.ct-y #header.menu-open.hovered #bar-3 { background-color: var(--black); }
body.ct-y .menu-item { color: var(--middle-0); }
body.ct-y .menu-item:hover { color: var(--middle-2); }
body.ct-y .menu-item.active, body.ct-y .menu-item.active:hover { color: var(--middle-3); }
@media (max-width: 768px) {   /* mobile: el menú sobre amarillo es más oscuro (middle-2) y sube un peso (500) */
  body.ct-y .menu-item { color: var(--middle-2); font-weight: 500; }
  body.ct-y .menu-item.active, body.ct-y .menu-item.active:hover { font-weight: 500; }
}
/* la insignia de reCAPTCHA no se ve nunca, en ninguna parte del sitio */
.grecaptcha-badge { visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }

body.ct-now #menu-bar, body.ct-now #header-box, body.ct-now .bar, body.ct-now .menu-item { transition-property: transform !important; }
