/* Cotizador (/cotizador): onboarding de cliente en 4 pasos */
:root {
  --navy: #0A1F44;
  --blue: #1565C0;
  --accent: #0B6CFF;
  --sky: #29B6F6;
  --light: #E3F2FD;
  --gray: #F5F7FA;
  --line: #E6EAF0;
  --muted: #6b7280;
  --danger: #c2410c;
  --gradient: linear-gradient(135deg, var(--accent), var(--sky));
  --radius: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--navy);
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* Header */
.cz-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.cz-header__logo img { height: 40px; width: auto; display: block; }
.cz-header__exit {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; color: var(--muted); text-decoration: none;
}
.cz-header__exit:hover { color: var(--navy); }

/* Contenido */
.cz-main {
  flex: 1;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 48px clamp(16px, 4vw, 40px) 140px;
}

/* Progreso */
.cz-steps {
  list-style: none;
  display: flex;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}
.cz-steps__item { flex: 1; }
.cz-steps__bar { display: block; height: 5px; border-radius: 3px; background: var(--line); transition: background .3s; }
.cz-steps__item.is-active .cz-steps__bar,
.cz-steps__item.is-done .cz-steps__bar { background: var(--gradient); }
.cz-steps__label { display: block; margin-top: 12px; font-size: 13px; font-weight: 500; letter-spacing: .04em; color: #9AA5B5; }
.cz-steps__item.is-active .cz-steps__label { color: var(--accent); font-weight: 600; }
.cz-steps__item.is-done .cz-steps__label { color: var(--navy); }
.cz-steps__meta { display: none; }

/* Pasos */
.cz-step { display: none; animation: czIn .35s ease; }
.cz-step.is-active { display: block; }
@keyframes czIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cz-title {
  margin-top: 52px;
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.1;
  text-align: center;
}
.cz-sub { margin-top: 14px; font-size: clamp(15px, 1.6vw, 19px); color: var(--muted); text-align: center; }

/* Paso 1: tarjetas de servicio */
.cz-grid {
  margin: 48px auto 0;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.cz-card {
  position: relative;
  text-align: left;
  min-height: 200px;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--navy);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.cz-card:hover { border-color: #BFD6FF; transform: translateY(-2px); }
.cz-card:focus-visible { outline: 3px solid rgba(11, 108, 255, .35); outline-offset: 2px; }
.cz-card__icon {
  width: 54px; height: 54px; border-radius: 15px;
  background: var(--gray);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.cz-card__icon svg { width: 28px; height: 28px; stroke: var(--navy); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cz-card__name { display: block; margin-top: 22px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.cz-card__desc { display: block; margin-top: 7px; font-size: 15px; color: var(--muted); line-height: 1.4; }
.cz-card__check {
  position: absolute; top: 22px; right: 22px;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid #D5DCE6;
  display: flex; align-items: center; justify-content: center;
}
.cz-card__check svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.cz-card[aria-pressed="true"] {
  border: 2px solid var(--accent);
  padding: 25.5px 23.5px;
  background: linear-gradient(180deg, #F5F9FF, #fff);
  box-shadow: 0 18px 40px rgba(11, 108, 255, .14);
}
.cz-card[aria-pressed="true"] .cz-card__icon { background: var(--gradient); }
.cz-card[aria-pressed="true"] .cz-card__icon svg { stroke: #fff; }
.cz-card[aria-pressed="true"] .cz-card__check { border: none; background: var(--accent); }
.cz-card[aria-pressed="true"] .cz-card__check svg { opacity: 1; }

.cz-help { margin-top: 36px; text-align: center; font-size: 16px; color: var(--muted); }
.cz-help a { color: var(--accent); font-weight: 600; text-decoration: none; }
.cz-help a:hover { text-decoration: underline; }

/* Pasos 2 y 3: bloques de preguntas */
.cz-blocks { margin: 44px auto 0; max-width: 760px; display: flex; flex-direction: column; gap: 18px; }
.cz-step > .cz-block { max-width: 760px; margin: 18px auto 0; }
.cz-block {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  background: #fff;
}
.cz-block__head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.cz-block__head .cz-card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gradient); }
.cz-block__head .cz-card__icon svg { width: 22px; height: 22px; stroke: #fff; }
.cz-block__service { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.cz-block__title { display: block; font-size: 19px; font-weight: 600; margin-bottom: 14px; }
.cz-q { border: none; min-width: 0; }
.cz-q + .cz-q { margin-top: 22px; }
.cz-q__label { display: block; padding: 0; font-size: 17px; font-weight: 600; margin: 14px 0 12px; }
.cz-q__hint { font-weight: 400; color: var(--muted); font-size: 14px; }
.cz-optional { font-weight: 400; font-size: 13px; color: #9AA5B5; margin-left: 6px; }

.cz-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cz-chip { position: relative; }
.cz-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cz-chip span {
  display: inline-flex; align-items: center;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
  user-select: none;
}
.cz-chip span:hover { border-color: #BFD6FF; }
.cz-chip input:checked + span { border-color: var(--accent); background: var(--light); color: var(--blue); }
.cz-chip input:focus-visible + span { outline: 3px solid rgba(11, 108, 255, .35); outline-offset: 2px; }

.cz-input {
  width: 100%;
  font: inherit; font-size: 16px; color: var(--navy);
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.cz-input::placeholder { color: #A3ADBB; }
.cz-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(11, 108, 255, .12); }
.cz-input.is-invalid { border-color: var(--danger); }
.cz-textarea { resize: vertical; min-height: 96px; }

/* Paso 4: contacto + resumen */
.cz-contact {
  margin: 44px auto 0;
  max-width: 1040px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.cz-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cz-field label, .cz-field__label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.cz-field--full { grid-column: 1 / -1; }
.cz-summary {
  background: var(--gray);
  border-radius: var(--radius);
  padding: 26px 26px 20px;
}
.cz-summary__title { font-size: 18px; font-weight: 700; }
.cz-summary__list { margin-top: 14px; }
.cz-summary__list dt { margin-top: 14px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8A96A8; }
.cz-summary__list dd { margin-top: 4px; font-size: 15px; line-height: 1.45; }
.cz-link { margin-top: 18px; background: none; border: none; color: var(--accent); font-weight: 600; font-size: 15px; padding: 0; }
.cz-link:hover { text-decoration: underline; }

/* Listo */
.cz-done { text-align: center; padding-top: 30px; }
.cz-done__icon {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--gradient);
  margin: 40px auto 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 40px rgba(11, 108, 255, .25);
}
.cz-done__icon svg { width: 44px; height: 44px; stroke: #fff; stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cz-done .cz-title { margin-top: 28px; }
.cz-done__actions { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Errores */
.cz-error { margin-top: 20px; text-align: center; font-size: 15px; font-weight: 500; color: var(--danger); min-height: 1px; }
.cz-error:empty { margin-top: 0; }

/* Barra inferior */
.cz-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 10;
}
.cz-bar__inner {
  max-width: 1260px; margin: 0 auto;
  min-height: 96px;
  padding: 16px clamp(16px, 4vw, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.cz-bar.is-hidden { display: none; }
.cz-bar__summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; color: var(--muted); min-width: 0; }
.cz-tag { padding: 7px 14px; border-radius: 999px; background: var(--light); color: var(--blue); font-weight: 600; font-size: 14px; white-space: nowrap; }
.cz-bar__actions { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.cz-back { background: none; border: none; font-size: 16px; font-weight: 500; color: var(--muted); }
.cz-back:hover { color: var(--navy); }
.cz-back[hidden] { display: none; }

.cz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 56px; padding: 0 32px;
  border: none; border-radius: 999px;
  background: var(--gradient); color: #fff;
  font-size: 17px; font-weight: 600; text-decoration: none;
  box-shadow: 0 14px 30px rgba(11, 108, 255, .28);
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.cz-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(11, 108, 255, .34); }
.cz-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.cz-btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); box-shadow: none; }
.cz-btn--ghost:hover { box-shadow: none; border-color: #BFD6FF; }

.cz-hidden { position: absolute; left: -9999px; }

/* Tablet */
@media (max-width: 1024px) {
  .cz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cz-contact { grid-template-columns: 1fr; }
}

/* Celular */
@media (max-width: 640px) {
  .cz-header { height: 64px; }
  .cz-header__logo img { height: 30px; }
  .cz-header__exit { font-size: 14px; }
  .cz-main { padding-top: 24px; padding-bottom: 120px; }
  .cz-steps { gap: 6px; }
  .cz-steps__bar { height: 4px; }
  .cz-steps__label { display: none; }
  .cz-steps__meta { display: block; margin-top: 12px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
  .cz-title { margin-top: 14px; text-align: left; }
  .cz-sub { text-align: left; margin-top: 8px; }
  .cz-grid { margin-top: 24px; gap: 10px; }
  .cz-card { min-height: 128px; padding: 16px; border-radius: 16px; }
  .cz-card[aria-pressed="true"] { padding: 15.5px; }
  .cz-card__icon { width: 40px; height: 40px; border-radius: 11px; }
  .cz-card__icon svg { width: 21px; height: 21px; }
  .cz-card__name { margin-top: 14px; font-size: 15px; line-height: 1.25; }
  .cz-card__desc { display: none; }
  .cz-card__check { top: 14px; right: 14px; width: 22px; height: 22px; }
  .cz-card__check svg { width: 13px; height: 13px; }
  .cz-help { text-align: left; font-size: 15px; margin-top: 24px; }
  .cz-blocks, .cz-contact { margin-top: 24px; }
  .cz-block { padding: 20px; border-radius: 16px; }
  .cz-chip span { padding: 10px 15px; font-size: 14px; }
  .cz-fields { grid-template-columns: 1fr; }
  .cz-done, .cz-done .cz-title, .cz-done .cz-sub { text-align: center; }
  .cz-bar__inner { min-height: 80px; padding: 12px 16px; }
  .cz-bar__summary { display: none; }
  .cz-bar__actions { width: 100%; justify-content: space-between; }
  .cz-bar__actions .cz-btn { flex: 1; max-width: 340px; margin-left: auto; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .cz-step { animation: none; }
  .cz-card, .cz-btn { transition: none; }
}
