/* ============================================================
   INMOALIANZA — Cotizador
   Modern responsive design — Mobile-first
============================================================ */

:root {
  --bg:       #0b1a24;
  --text:     #2d3940;
  --text-sec: #4b4b4b;
  --muted:    #94a3b8;
  --white:    #ffffff;
  --line:     rgba(255,255,255,.2);
  --accent:   #247390;
  --accent2:  #36809a;
  --accent-light: #7EBEC5;
  --cta:      #e09004;
  --cta-hover:#b97600;
  --danger:   #ef4444;
  --radius:   16px;
  --radius-lg:24px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* glass tokens */
  --glass-bg:      rgba(36,115,144,.12);
  --glass-border:  rgba(126,190,197,.22);
  --glass-blur:    20px;
  --input-bg:      rgba(255,255,255,.18);
  --input-border:  rgba(255,255,255,.3);
  --input-focus:   rgba(36,115,144,.6);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
fieldset { border: 0; }

/* ============================================================
   TOPBAR
============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 26, 36, .95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(126,190,197,.12);
}

.topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 36px;
  width: auto;
  flex-shrink: 0;
}

.brand__name {
  font-weight: 900;
  font-size: 17px;
  letter-spacing: .4px;
  color: #fff;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__link {
  display: none;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color .2s, background .2s;
}

.topbar__link:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.topbar__cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  border-radius: 10px;
  background: var(--cta);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
}

.topbar__cta:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(224,144,4,.35);
}

/* ============================================================
   HERO
============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(36,115,144,.2), rgba(126,190,197,.12)),
    url("../assets/images/hero.jpg");
  background-size: cover;
  background-position: center;
}

.hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 25% 40%, rgba(0,0,0,.35), transparent),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.75) 100%);
}

.hero__content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* ----- Hero text ----- */
.hero__text {
  color: #fff;
  text-align: center;
  max-width: 600px;
}

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(126,190,197,.15);
  border: 1px solid rgba(126,190,197,.35);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero__text h1 {
  font-size: clamp(28px, 5vw, 50px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -.02em;
}

.hero__text p {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,.78);
  line-height: 1.65;
}



/* ============================================================
   GLASS FORM CARD
============================================================ */
.card {
  width: 100%;
  max-width: 660px;
  padding: 28px 20px;
  border-radius: var(--radius-lg);

  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 24px 64px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.25);
}

.card__header {
  text-align: center;
  margin-bottom: 24px;
}

.card__title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.card__subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

/* ============================================================
   FORM SECTIONS
============================================================ */
.form-section {
  margin-bottom: 8px;
}

.form-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: .6px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(126,190,197,.15);
}

.form-section__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(36,115,144,.2);
  color: var(--accent-light);
  flex-shrink: 0;
}

/* ============================================================
   FORM FIELDS
============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 14px;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.88);
}

.label-opt {
  font-weight: 400;
  color: rgba(255,255,255,.45);
  font-size: 11px;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  width: 100%;
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  font-family: var(--font);
  font-size: 14px;
  background: var(--input-bg);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder {
  color: rgba(255,255,255,.35);
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,.6)' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select option {
  background: #1e293b;
  color: #fff;
}

input:focus,
select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(36,115,144,.2);
  background: rgba(255,255,255,.25);
}

/* Error states */
input.input-error,
select.input-error {
  border-color: var(--danger);
  background: rgba(239,68,68,.1);
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}

input.input-error:focus,
select.input-error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(239,68,68,.25);
}

.err {
  min-height: 0;
  font-size: 12px;
  color: #fca5a5;
  line-height: 1.3;
}

.err:empty { display: none; }

.hint {
  font-size: 11px;
  color: rgba(255,255,255,.5);
}

/* ============================================================
   RADIO BUTTONS
============================================================ */
.radios {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid rgba(255,255,255,.2);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  font-size: 13px;
  transition: all .2s;
}

.radio:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.35);
}

.radio input[type="radio"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent);
  padding: 0;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: radio;
}

.radio:has(input:checked) {
  background: rgba(36,115,144,.15);
  border-color: rgba(36,115,144,.5);
}

.radio__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* ============================================================
   LEGAL & CHECKBOX
============================================================ */
.legal {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.legal p {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
  margin-bottom: 12px;
}

.legal a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal a:hover { color: #a8dde3; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  cursor: pointer;
}

.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: checkbox;
}

/* ============================================================
   BUTTON
============================================================ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 24px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  background: var(--cta);
  color: #fff;
  margin-top: 18px;
  transition: transform .2s, box-shadow .2s, background .2s;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--cta-hover);
  box-shadow: 0 8px 28px rgba(224,144,4,.4);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.btn__arrow {
  transition: transform .2s;
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ============================================================
   SENDING STATE
============================================================ */
.sending {
  text-align: center;
  padding: 20px;
  margin-top: 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}

.sending__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.sending__title {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.sending__sub {
  color: rgba(255,255,255,.55);
  font-size: 13px;
}

/* ============================================================
   TOAST NOTIFICATION
============================================================ */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  animation: toastIn .4s ease;
  position: relative;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast--success {
  background: rgba(16,185,129,.12);
  border: 1.5px solid rgba(16,185,129,.35);
}

.toast--error {
  background: rgba(239,68,68,.12);
  border: 1.5px solid rgba(239,68,68,.35);
}

.toast__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.toast--success .toast__icon {
  background: rgba(16,185,129,.2);
}

.toast--error .toast__icon {
  background: rgba(239,68,68,.2);
}

.toast__body {
  flex: 1;
  min-width: 0;
}

.toast__title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.toast__msg {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin: 0;
  line-height: 1.5;
  word-break: break-word;
}

.toast--success .toast__title { color: #6ee7b7; }
.toast--error .toast__title { color: #fca5a5; }

.toast__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color .2s;
}

.toast__close:hover {
  color: #fff;
}

/* ============================================================
   RESULT BOX
============================================================ */
.result {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
}

.result__item {
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255,255,255,.15);
  margin-bottom: 10px;
}

/* ============================================================
   BENEFITS SECTION
============================================================ */
.benefits {
  background: linear-gradient(180deg, #f9f5f2 0%, #fff 100%);
  padding: 60px 20px;
}

.benefits__wrap {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(36,115,144,.1);
  color: #247390;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.benefits__wrap h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -.02em;
}

.benefits__desc {
  font-size: 16px;
  color: var(--text-sec);
  max-width: 540px;
  margin: 0 auto 40px;
}

.benefits__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.benefit {
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 24px rgba(0,0,0,.04);
  transition: transform .25s, box-shadow .25s;
  text-align: center;
}

.benefit:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
}

.benefit__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(36,115,144,.1), rgba(126,190,197,.12));
  margin-bottom: 18px;
}

.benefit__icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.benefit h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.benefit p {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
  background: #0b1a24;
  color: rgba(255,255,255,.6);
  padding: 28px 20px;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__brand strong {
  font-size: 15px;
  color: #fff;
  letter-spacing: .3px;
}

.footer__brand span {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

.footer__copy {
  font-size: 12px;
}

.footer__dev {
  font-size: 11px;
  color: rgba(255,255,255,.35);
}

.footer__dev a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
  transition: color .2s;
}

.footer__dev a:hover {
  color: #fff;
}

/* ============================================================
   SCROLL TO TOP
============================================================ */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--cta);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, visibility .3s, transform .3s, background .2s;
  z-index: 900;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(224,144,4,.45);
}

.scroll-top:active {
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — Tablet (≥ 600px)
============================================================ */
@media (min-width: 600px) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }

  .radios {
    flex-direction: row;
  }

  .radio {
    flex: 1;
    justify-content: center;
    text-align: center;
  }

  .card {
    padding: 36px 32px;
  }

  .benefits__grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .benefit:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 400px;
    justify-self: center;
  }
}

/* ============================================================
   RESPONSIVE — Desktop (≥ 1024px)
============================================================ */
@media (min-width: 1024px) {
  .topbar__link { display: inline-flex; }

  .hero__content {
    flex-direction: row;
    align-items: center;
    padding: 80px 40px;
    gap: 50px;
  }

  .hero__text {
    text-align: left;
    flex: 1;
    max-width: 480px;
  }

  .hero__stats { justify-content: flex-start; }

  .card {
    flex: 0 0 580px;
    max-width: 580px;
    padding: 36px;
  }

  .benefits {
    padding: 100px 40px;
  }

  .benefits__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }

  .benefit:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================================
   RESPONSIVE — Large desktop (≥ 1280px)
============================================================ */
@media (min-width: 1280px) {
  .hero__content {
    gap: 80px;
    padding: 80px 20px;
  }

  .card {
    flex: 0 0 640px;
    max-width: 640px;
    padding: 40px;
  }
}
