:root {
  --ink: #0B2B21;
  --ink-soft: #24463A;
  --muted: #6B7F76;
  --paper: #FFFBEC;
  --surface: #FFFFFF;
  --tint: #FBF1D6;
  --line: #E7DFC3;
  --deep: #004737;
  --deep-line: #2C6553;
  --deep-muted: #9FC2B4;
  --accent: #56F09F;
  --accent-ink: #04543B;
  --accent-soft: #D3F5E3;

  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #EDF3EF;
    --ink-soft: #C6D3CC;
    --muted: #8AA096;
    --paper: #0E1713;
    --surface: #16211C;
    --tint: #1B2721;
    --line: #2A362F;
    --deep: #06352A;
    --deep-line: #3A6F5C;
    --deep-muted: #9FC2B4;
    --accent: #56F09F;
    --accent-ink: #B6F5D3;
    --accent-soft: #1E3A2C;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.inner { max-width: 640px; margin: 0 auto; }

/* ---------- Header ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--deep);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.brand .name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* ---------- Hero (asymmetric rounded panel) ---------- */

.hero {
  background: var(--deep);
  color: var(--paper);
  margin-top: 24px;
  border-bottom-left-radius: 110px;
}

.hero .inner {
  padding: 40px 24px 48px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--paper);
  border: 1px solid var(--deep-line);
  border-radius: 999px;
  padding: 7px 16px 7px 12px;
  margin-bottom: 22px;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  text-wrap: balance;
}

.hero p {
  margin: 0;
  max-width: 52ch;
  color: var(--deep-muted);
  font-size: 1.02rem;
}

.hero p strong { color: var(--paper); font-weight: 700; }

/* ---------- Cómo funciona ---------- */

.pasos {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 8px;
}

.pasos h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

.pasos ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.pasos li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  align-items: baseline;
}

.pasos .n {
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-ink);
  background: var(--accent-soft);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pasos p { margin: 0; font-size: 0.98rem; }
.pasos p b { font-weight: 700; }
.pasos p span { color: var(--muted); }

/* ---------- Form card ---------- */

.form-wrap { max-width: 640px; margin: 0 auto; padding: 32px 24px 0; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
}

.form-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.form-card .sub {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 0.95rem;
}

form { display: grid; gap: 22px; }

.fila { display: grid; gap: 22px; grid-template-columns: 1fr; }

@media (min-width: 480px) {
  .fila { grid-template-columns: 1fr 1fr; }
}

.campo { display: grid; gap: 8px; }

.etiqueta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.opcional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

input[type="text"], input[type="email"], input[type="number"], textarea {
  font: inherit;
  color: var(--ink);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
}

input::placeholder, textarea::placeholder { color: var(--muted); }

input:focus, textarea:focus {
  outline: 2px solid var(--accent-ink);
  outline-offset: 1px;
}

textarea { resize: vertical; font-family: var(--font); }

/* Segmented control (Arriendo / Compra) */

.segmentado {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segmentado input { position: absolute; opacity: 0; pointer-events: none; }

.segmentado .pill {
  text-align: center;
  padding: 12px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
}

.segmentado .pill:has(input:checked) {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--paper);
}

.segmentado .pill:has(input:focus-visible) {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

/* Room-count chips */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips input { position: absolute; opacity: 0; pointer-events: none; }

.chips .chip {
  min-width: 46px;
  text-align: center;
  padding: 10px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  position: relative;
}

.chips .chip:has(input:checked) {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--paper);
}

.chips .chip:has(input:focus-visible) {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

/* Money input with prefix/suffix */

.input-money {
  display: flex;
  align-items: center;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
}

.input-money .prefix { color: var(--muted); font-weight: 600; }

.input-money input {
  border: none;
  background: transparent;
  padding: 12px 8px;
  flex: 1;
}

.input-money input:focus { outline: none; }

.input-money .suffix {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* Checkbox */

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.4;
}

.checkbox input {
  width: auto;
  margin-top: 3px;
  accent-color: var(--accent-ink);
  flex: none;
}

/* Submit + privacy */

button[type="submit"] {
  font: inherit;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 15px 20px;
  cursor: pointer;
}

button[type="submit"]:hover { filter: brightness(0.97); }
button[type="submit"]:focus-visible { outline: 2px solid var(--deep); outline-offset: 2px; }

.privacidad {
  display: flex;
  gap: 8px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.privacidad .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-ink);
  flex: none;
  margin-top: 7px;
}

/* Notices (ya_registrado) */

.aviso {
  margin: 0;
  padding: 18px 20px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.aviso a { color: inherit; font-weight: 700; }

.errores {
  margin: 0 0 20px;
  padding: 14px 18px;
  background: #F7E3DD;
  color: #A5432F;
  border-radius: 12px;
  font-size: 0.92rem;
  list-style: none;
}

.errores li + li { margin-top: 4px; }

/* ---------- Footer band ---------- */

.pie {
  background: var(--deep);
  color: var(--deep-muted);
  margin-top: 48px;
  border-top-left-radius: 110px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.pie .inner {
  padding: 40px 24px 44px;
}

.pie a {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.pie a:hover { text-decoration: underline; }

@media (max-width: 420px) {
  .hero { border-bottom-left-radius: 60px; }
  .pie { border-top-left-radius: 60px; }
  .form-card { padding: 22px; }
}
