/* Contacto: pre-configurador en la portada, formulario protagonista, formas de contacto y qué pasa después. Prefijo ct-. */

/* ── Portada: pre-configurador dentro del mosaico ── */
.ct-stage { flex-direction: column; }
.ct-stage-3d { width: clamp(84px, 8vw, 124px); right: clamp(10px, 2vw, 28px); top: clamp(8px, 1.4vw, 20px); }
.ct-sim { position: relative; z-index: 2; width: min(100%, 470px); padding: 0; overflow: hidden; border-radius: 22px; font-size: 1rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .42); }
.ct-sim-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #eef1ee; color: #4f5c70; font-size: .875rem; font-weight: 600; }
.ct-sim-title { margin-left: auto; }
.ct-sim-dots { display: flex; gap: 6px; margin: 0; padding: 16px 20px 0; list-style: none; }
.ct-sim-dots li { flex: 1; height: 5px; border-radius: 5px; background: #e6eae6; transition: background-color .3s ease; }
.ct-sim-dots li.is-on { background: var(--lime); }
.ct-sim-step { display: grid; gap: 12px; padding: 16px 20px 4px; }
.ct-sim-step[hidden] { display: none; }
.ct-sim-q { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.012em; line-height: 1.25; color: #1d2a3d; }
.ct-sim-q:focus { outline: none; }
.ct-sim-q:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.ct-sim-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ct-opt { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 12px; border: 0; border-radius: 14px; background: #f0f3f1; color: #1d2a3d; font: inherit; font-size: .9375rem; font-weight: 500; line-height: 1.2; text-align: left; cursor: pointer; transition: background-color .18s ease, scale .1s ease-out; }
.ct-opt svg { flex: none; width: 19px; height: 19px; color: #4f5c70; }
.ct-opt:hover { background: #e6ebd0; }
.ct-opt:active { scale: .97; }
.ct-opt.is-on { background: #eef3b3; outline: 2px solid var(--lime); outline-offset: -2px; font-weight: 600; }
.ct-opt.is-on svg { color: #1d2a3d; }
.ct-opt:focus-visible, .ct-nav:focus-visible { outline: 2px solid #5f6800; outline-offset: 2px; }
.ct-sim-res { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: #f0f3f1; }
.ct-res-k { font-size: .8125rem; font-weight: 500; color: #4f5c70; }
.ct-res-k + .ct-res-v, .ct-res-k + .ct-res-t { margin-bottom: 8px; }
.ct-res-v { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.014em; line-height: 1.2; color: #1d2a3d; }
.ct-res-t { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--navy); color: #ffffff; font-size: .9375rem; font-weight: 600; }
.ct-res-t svg { width: 17px; height: 17px; color: var(--lime); }
.ct-res-d { font-size: .875rem; line-height: 1.4; color: #4f5c70; }
.ct-fill { width: 100%; justify-content: center; }
.ct-fill.is-done { background: #2ca24a; color: #ffffff; }
.ct-sim-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 20px 0; padding: 12px 0 16px; border-top: 1px solid #e6eae6; }
.ct-sim-n { font-size: .875rem; font-weight: 500; color: #4f5c70; }
.ct-sim-nav { display: flex; gap: 6px; }
.ct-nav { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: #f0f3f1; color: #1d2a3d; font: inherit; font-size: .9375rem; font-weight: 500; cursor: pointer; transition: background-color .18s ease, scale .1s ease-out; }
.ct-nav[hidden] { display: none; }
.ct-nav svg { width: 17px; height: 17px; }
.ct-nav:hover { background: #e3e8e3; }
.ct-nav:active { scale: .97; }
.ct-nav.is-next { background: var(--navy); color: #ffffff; }
.ct-nav.is-next svg { color: var(--lime); }
.ct-nav.is-next:hover { background: #33465f; }
.ct-stage-toast { position: absolute; z-index: 4; left: clamp(14px, 2.4vw, 40px); bottom: clamp(16px, 2vw, 30px); display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 16px; box-shadow: 0 18px 44px rgba(0, 0, 0, .3); }
.ct-stage-toast b { display: block; font-size: 1rem; font-weight: 600; }
.ct-stage-toast span span { color: var(--ui-soft); }
.ct-toast-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--lime); color: var(--on-lime); }
.ct-toast-ico svg { width: 21px; height: 21px; }

/* ── Formulario + formas de contacto ── */
.ct-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.ct-form-tile { scroll-margin-top: 80px; transition: background-color .25s ease, color .25s ease, box-shadow .4s ease; }
.ct-form-tile.is-flash { box-shadow: 0 0 0 4px var(--lime); }
.ct-form-tile .tile-copy { max-width: none; }
.ct-form-p { color: var(--soft); }
.ct-req { color: #b42318; font-weight: 600; }
html.dark .ct-req { color: #ff8a80; }

.ct-meter { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.ct-meter-bar { flex: 1; max-width: 260px; height: 8px; border-radius: 8px; background: var(--surface); overflow: hidden; }
.ct-meter-bar span { display: block; width: 100%; height: 100%; border-radius: 8px; background: var(--lime); transform: scaleX(0); transform-origin: left center; transition: transform .45s var(--ease-out); }
.ct-meter-t { font-size: var(--t-small); font-weight: 500; color: var(--soft); }
.ct-meter.is-ready .ct-meter-t { color: var(--brand); font-weight: 600; }

.ct-filled { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: #eef3b3; color: #1d2a3d; font-size: var(--t-small); line-height: 1.35; }
.ct-filled[hidden] { display: none; }
.ct-filled svg { flex: none; width: 19px; height: 19px; margin-top: 1px; }

.ct-form { display: grid; gap: 16px; margin-top: 22px; }
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ct-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ct-field { display: grid; gap: 6px; min-width: 0; }
.ct-label { font-size: var(--t-small); font-weight: 600; color: var(--ink); }
.ct-input { width: 100%; min-height: 52px; padding: 12px 16px; border: 1.5px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 14px; background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.35; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; -webkit-appearance: none; appearance: none; }
.ct-input::placeholder { color: var(--soft); opacity: .85; }
.ct-input:hover { border-color: color-mix(in srgb, var(--ink) 32%, transparent); }
.ct-input:focus { outline: none; }
.ct-input:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 45%, transparent); background: var(--tile); }
.ct-textarea { min-height: 140px; resize: vertical; }
.ct-select-wrap { position: relative; display: block; }
.ct-select-wrap svg { position: absolute; right: 16px; top: 50%; width: 20px; height: 20px; translate: 0 -50%; color: var(--soft); pointer-events: none; }
.ct-select { padding-right: 48px; cursor: pointer; }
.ct-select:invalid { color: var(--soft); }
.ct-select option { color: #1d2a3d; background: #ffffff; }
html.dark .ct-input { color-scheme: dark; }
html.dark .ct-select option { color: #f2f5f8; background: #172231; }
.ct-input[aria-invalid="true"] { border-color: #b42318; }
.ct-input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 4px rgba(180, 35, 24, .18); }
html.dark .ct-input[aria-invalid="true"] { border-color: #ff8a80; }
.ct-err { display: flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 500; color: #b42318; }
.ct-err[hidden] { display: none; }
html.dark .ct-err { color: #ff8a80; }
.ct-err::before { content: '!'; flex: none; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: currentColor; color: var(--tile); font-size: .75rem; font-weight: 700; line-height: 1; }
.ct-submit { justify-self: start; margin-top: 4px; }
.ct-legal { display: flex; align-items: flex-start; gap: 8px; max-width: 40em; font-size: .875rem; line-height: 1.4; color: var(--soft); }
.ct-legal svg { flex: none; margin-top: .15em; }
.ct-legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.ct-done { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--navy); color: #f2f5f8; }
.ct-done[hidden] { display: none; }
.ct-done b { display: block; font-weight: 600; }
.ct-done span span { display: block; font-size: var(--t-small); color: #c8d1dc; }
.ct-done-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); color: var(--on-lime); }
.ct-done-ico svg { width: 24px; height: 24px; }

/* Formas de contacto: tarjetas sobre el mosaico azul */
.ct-ways-tile { position: sticky; top: 80px; }
.ct-ways-tile .h-tile { color: #ffffff; padding-right: 96px; }
.ct-ways-3d { width: clamp(80px, 7vw, 112px); right: clamp(12px, 1.6vw, 24px); top: clamp(10px, 1.4vw, 20px); }
.ct-ways { display: grid; gap: 8px; margin-top: clamp(20px, 2.4vw, 30px); padding: 0; list-style: none; }
.ct-way { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px 12px 12px; border-radius: 16px; background: rgba(255, 255, 255, .07); color: #f2f5f8; transition: background-color .18s ease, translate .18s var(--ease-out); }
a.ct-way:hover { background: rgba(255, 255, 255, .13); translate: 0 -2px; }
a.ct-way:active { scale: .98; }
.ct-way.is-main { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(200, 212, 0, .4); }
.ct-way-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--lime); color: var(--on-lime); }
.ct-way-ico.is-wa { background: #25d366; color: #0b2a16; }
.ct-way-ico svg { width: 21px; height: 21px; }
.ct-way-tx { min-width: 0; }
.ct-way-tx small { display: block; font-size: .8125rem; line-height: 1.2; color: #c8d1dc; }
.ct-way-tx b { display: block; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.012em; line-height: 1.25; overflow-wrap: anywhere; }
.ct-way-go { margin-left: auto; width: 20px; height: 20px; color: var(--lime); transition: translate .18s var(--ease-out); }
a.ct-way:hover .ct-way-go { translate: 3px -3px; }
.ct-ways-tile a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ── Qué pasa después de enviar: tres pasos unidos por una línea ── */
.ct-after { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.ct-after-line { position: absolute; z-index: 1; left: 16.67%; right: 16.67%; top: calc(var(--tile-pad) + 28px); height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.ct-after-fill { display: block; height: 100%; border-radius: 3px; background: var(--lime); transform-origin: left center; }
.ct-after-dot { position: absolute; z-index: 4; left: 16.67%; top: calc(var(--tile-pad) + 29.5px); display: grid; place-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--navy); color: var(--lime); box-shadow: 0 0 0 4px var(--lime); opacity: 0; }
.ct-after-dot svg { width: 16px; height: 16px; }
.ct-astep { align-items: center; text-align: center; overflow: visible; }
.ct-astep-3d { width: clamp(72px, 6vw, 100px); right: clamp(8px, 1.2vw, 18px); top: clamp(-30px, -2vw, -18px); }
.ct-astep-n { position: relative; z-index: 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--lime); color: var(--on-lime); font-size: 1.25rem; font-weight: 600; transition: background-color .3s ease, color .3s ease, scale .3s var(--ease-out); }
.ct-astep-h { margin-top: 16px; font-size: clamp(1.375rem, 1.1rem + .8vw, 1.875rem); font-weight: 600; letter-spacing: -0.026em; line-height: 1.1; }
.ct-astep-p { margin-top: 6px; color: var(--soft); line-height: 1.35; }
.ct-astep-ui { flex: 1; display: grid; align-content: center; gap: 8px; width: 100%; min-height: 150px; margin-top: 20px; text-align: left; transition: translate .3s var(--ease-out), box-shadow .3s ease; }
.ct-astep.is-on .ct-astep-n { background: var(--navy); color: var(--lime); scale: 1.12; }
html.dark .ct-astep.is-on .ct-astep-n { background: #f2f5f8; color: #1d2a3d; }
.ct-astep.is-on .ct-astep-ui { translate: 0 -4px; box-shadow: 0 0 0 2px var(--lime); }

.ct-mini-row { display: grid; gap: 1px; padding: 8px 12px; border-radius: 10px; background: var(--ui-line); }
.ct-mini-row small { font-size: .8125rem; color: var(--ui-soft); }
.ct-mini-row b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-mini-btn { display: inline-flex; align-items: center; justify-self: start; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-weight: 600; }
.ct-mini-btn svg { width: 16px; height: 16px; }

.ct-clock-ui { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.ct-clock { width: 68px; height: 68px; }
.ct-clock-face { fill: var(--ui-line); stroke: var(--lime); stroke-width: 3; }
.ct-clock-m, .ct-clock-h { stroke: var(--ui-ink); stroke-width: 3; stroke-linecap: round; }
.ct-clock-h { stroke-width: 3.6; }
.ct-clock-c { fill: var(--ui-ink); }
.ct-clock-tx b { display: block; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.014em; line-height: 1.2; }
.ct-clock-tx small { display: block; margin-top: 2px; font-size: .8125rem; color: var(--ui-soft); }

.ct-mail { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; }
.ct-mail-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: var(--lime); }
html.dark .ct-mail-ico { background: #f2f5f8; color: #1d2a3d; }
.ct-mail-ico svg { width: 21px; height: 21px; }
.ct-mail-tx small { display: block; font-size: .8125rem; color: var(--ui-soft); }
.ct-mail-tx b { display: block; font-size: 1.0625rem; font-weight: 600; line-height: 1.2; }
.ct-mail-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ct-mail-tags span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #e3f5ea; color: #13703a; font-size: .8125rem; font-weight: 600; }
html.dark .ct-mail-tags span { background: rgba(127, 227, 174, .14); color: #7fe3ae; }
.ct-mail-tags svg { width: 14px; height: 14px; }

/* ── Cierre: en esta página ya está el formulario arriba, así que el cierre muestra solo las otras vías. ── */
#contacto .contact { grid-template-columns: minmax(0, 1fr); }
/* El cierre de esta página no repite el formulario: lo quita el build (contacto.sinFormulario). */
#contacto .foot-cta { max-width: 72rem; }
@media (min-width: 900px) {
  #contacto .foot-contact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #contacto .foot-contact li:last-child { grid-column: auto; }
}

/* ── Tamaños ── */
@media (max-width: 1023px) {
  .ct-grid { grid-template-columns: minmax(0, 1fr); }
  .ct-ways-tile { position: relative; top: auto; }
  .ct-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-ways li:last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .ct-after { grid-template-columns: minmax(0, 1fr); }
  .ct-after-line, .ct-after-dot { display: none; }
  .ct-astep-ui { min-height: 0; }
}
@media (max-width: 720px) {
  .ct-stage { padding-top: 64px; padding-bottom: 92px; }
  html:not(.ph-oscura) .ct-stage { padding: 78px 12px 96px; }
  .ct-stage-3d { width: 62px; right: 12px; top: 8px; }
  .ct-sim-step { padding-inline: 14px; }
  .ct-sim-dots { padding-inline: 14px; }
  .ct-sim-foot { margin-inline: 14px; }
  .ct-sim-head { font-size: .8125rem; }
  .ct-opt { min-height: 56px; padding: 10px; font-size: .9375rem; }
  .ct-stage-toast { left: 12px; bottom: 16px; }
  .ct-row { grid-template-columns: minmax(0, 1fr); }
  .ct-form-tile { padding: 24px 16px; }
  .ct-submit { justify-self: stretch; }
  .ct-meter { flex-wrap: wrap; gap: 8px 14px; }
  .ct-meter-bar { flex-basis: 100%; max-width: none; }
  .ct-ways { grid-template-columns: minmax(0, 1fr); }
  .ct-ways-tile { padding: 26px 16px; }
  .ct-ways-tile .h-tile { padding-right: 70px; }
  .ct-ways-3d { width: 66px; right: 10px; top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-meter-bar span, .ct-input, .ct-way, .ct-opt { transition: none; }
}
