/* =========================================================
   ARVIZTO · COTIZADOR — Estilos
   Reskin visual sobre la identidad de arvizto.com
   (dark, glass, gradiente cian→azul→violeta)
   No contiene lógica: solo presentación.
   ========================================================= */

:root {
  color-scheme: dark;

  --bg: #08080c;
  --bg-2: #0e0e15;
  --surface: #12121a;
  --surface-2: #17171f;
  --surface-3: #1c1c26;
  --surface-muted: #14141c;

  --text: #f4f6fa;
  --muted: #9aa3b2;
  --dim: #6b7280;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --grad: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, rgba(34,211,238,0.14), rgba(139,92,246,0.14));

  --accent: var(--cyan);
  --accent-contrast: #06060a;

  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --success-line: rgba(52, 211, 153, 0.28);

  --warning: #f2c14e;
  --warning-bg: rgba(242, 193, 78, 0.1);
  --warning-line: rgba(242, 193, 78, 0.28);

  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.1);
  --danger-line: rgba(251, 113, 133, 0.28);

  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 12px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================
   FONDO DECORATIVO (grid + orbes, como arvizto.com)
   ========================================================= */

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 80%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}
.bg-orb-1 {
  width: 480px; height: 480px;
  top: -160px; left: -120px;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
}
.bg-orb-2 {
  width: 420px; height: 420px;
  top: 30%; right: -160px;
  background: radial-gradient(circle, var(--violet), transparent 70%);
}

/* =========================================================
   SHELL
   ========================================================= */

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 20px 96px;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 4px 2px;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.22em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* =========================================================
   TARJETAS PRINCIPALES
   ========================================================= */

.wizard-card,
.results-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.02) inset;
}

.results-card { margin-top: 24px; }

/* =========================================================
   PROGRESO
   ========================================================= */

.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}
#progress-label { color: var(--text); }

.progress-track {
  height: 4px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 36px;
}
.progress-track span {
  display: block;
  height: 100%;
  width: 12.5%;
  background: var(--grad);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
  transition: width 0.35s var(--ease);
}

/* =========================================================
   TIPOGRAFÍA DE PASO
   ========================================================= */

.step h1, .step h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}
.step h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); }
.step h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }

.lede {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  flex-shrink: 0;
}

/* =========================================================
   GRILLAS DE OPCIONES
   ========================================================= */

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.choice-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.choice {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 18px 20px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  transition: all 0.22s var(--ease);
}
.choice:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
  transform: translateY(-2px);
}
.choice.selected {
  border-color: var(--cyan);
  background: var(--grad-soft);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35), 0 10px 30px -14px rgba(34, 211, 238, 0.4);
  transform: translateY(-2px);
}
.choice strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}
.choice span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* =========================================================
   BOTONES
   ========================================================= */

.primary, .secondary, .text-button {
  border-radius: 100px;
  border: 1px solid transparent;
  padding: 13px 24px;
  font-weight: 600;
  font-size: 0.94rem;
  text-align: center;
  transition: all 0.25s var(--ease);
  will-change: transform;
}

.primary {
  background: var(--grad);
  color: var(--accent-contrast);
  box-shadow: 0 10px 30px -10px rgba(34, 211, 238, 0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px rgba(34, 211, 238, 0.65), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.secondary {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-strong);
  color: var(--text);
}
.secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.24);
  transform: translateY(-2px);
}

.text-button {
  border: 0;
  background: transparent;
  padding: 10px 4px;
  color: var(--muted);
}
.text-button:hover { color: var(--text); }

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

/* Estado de carga: el propio botón informa que está
   trabajando, en vez de mostrar un aviso técnico aparte. */
.primary.is-loading,
.secondary.is-loading {
  cursor: progress;
  opacity: 0.85;
}
.primary.is-loading .btn-label,
.secondary.is-loading .btn-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.primary.is-loading .btn-label::before,
.secondary.is-loading .btn-label::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  animation: btn-spin 0.7s linear infinite;
}
.secondary.is-loading .btn-label::before {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: var(--cyan);
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* Revelado progresivo (formulario de contacto por pasos) */
.contact-fields.hidden { display: none; }

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: reveal-in 0.35s var(--ease) both;
}

/* =========================================================
   CAMPOS DE FORMULARIO
   ========================================================= */

.field { margin-top: 22px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text);
}
.field input, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.field input::placeholder { color: var(--dim); }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--cyan);
  background: var(--surface-3);
}
.field small {
  display: block;
  color: var(--dim);
  margin-top: 7px;
  font-size: 0.82rem;
}

/* =========================================================
   RESULTADOS DE BÚSQUEDA DE RESTAURANTE
   ========================================================= */

.restaurant-results {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.restaurant-result {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: all 0.2s var(--ease);
}
.restaurant-result:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}
.restaurant-result button {
  width: 100%;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  padding: 0;
}
.result-title { font-weight: 600; color: var(--text); }
.result-address { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }

.restaurant-result button.is-loading {
  opacity: 0.55;
  cursor: progress;
}
.restaurant-result button.is-loading .result-title::after {
  content: "Verificando...";
  display: inline-block;
  margin-left: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cyan);
}

/* =========================================================
   MENSAJES DE ESTADO
   ========================================================= */

.info-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.error, .success, .warning {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.error   { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-line); }
.success { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-line); }

/* =========================================================
   PROPUESTAS / RESULTADOS
   ========================================================= */

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.quote-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  min-height: 320px;
  transition: all 0.25s var(--ease);
  position: relative;
}
.quote-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.quote-card.selected {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    var(--grad) border-box;
  box-shadow: 0 20px 50px -20px rgba(34, 211, 238, 0.35);
}

.quote-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}
.quote-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 12px 0 2px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.quote-monthly, .quote-timing, .quote-note {
  color: var(--muted);
  font-size: 0.86rem;
}
.quote-timing { margin-top: 2px; }
.quote-note { margin-top: 10px; }

.quote-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 8px 0 2px;
}
.quote-capacity {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.quote-regular {
  color: var(--muted);
  font-size: 0.86rem;
}
.quote-regular s { color: var(--dim); }
.quote-benefit {
  margin: 10px 0 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--success-bg);
  border: 1px solid var(--success-line);
  color: var(--success);
  font-size: 0.84rem;
  font-weight: 600;
}

.quote-list {
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
  display: grid;
  gap: 9px;
  color: var(--text);
  font-size: 0.88rem;
}
.quote-list li {
  padding-left: 20px;
  position: relative;
  color: var(--muted);
}
.quote-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad);
}

.quote-card .actions {
  margin-top: auto;
  padding-top: 20px;
  flex-direction: column;
}
.quote-card .actions .primary,
.quote-card .actions .secondary { width: 100%; }

/* =========================================================
   CONTACTO
   ========================================================= */

.contact-wrap {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.check-grid {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}
.check-grid label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
}
.check-grid input[type="checkbox"] {
  accent-color: var(--cyan);
  width: 17px; height: 17px;
  margin-top: 1px;
  flex-shrink: 0;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 760px) {
  .choice-grid,
  .choice-grid.three,
  .results-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wizard-card, .results-card {
    padding: 22px;
    border-radius: 20px;
  }
  .quote-price { font-size: 1.9rem; }
  .app-shell { padding: 28px 16px 72px; }
}