/* ============================================================
   Su Bono de Vivienda CR — hoja de estilos compartida
   Estilo: inmobiliaria costarricense — crema, naranja, Montserrat/DM Sans.
   Mobile-first.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800;900&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #faf6f1;
  --color-surface: #ffffff;
  --color-ink: #1a1512;
  --color-ink-soft: #675e54;
  --color-orange: #ff6304;
  --color-orange-dark: #e0550a;
  --color-orange-pale: #ffe7d6;
  --color-verde: #1d5c1f;
  --color-verde-dark: #123f14;
  --color-verde-pale: #e3efdf;
  --color-line: #ece1d1;
  --color-whatsapp: #25d366;
  --color-whatsapp-dark: #1da851;

  --font-display: 'Montserrat', 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-verde-dark);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header: barra crema translúcida flotando sobre el hero ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: rgba(250, 246, 241, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(26, 21, 18, 0.06);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

.brand span.accent {
  color: var(--color-orange);
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.header-phone {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  text-decoration: none;
  display: none;
}

@media (min-width: 640px) {
  .header-phone {
    display: block;
  }
}

/* ---- Badge / pill (eyebrow, tags) ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  border-radius: 999px;
}

.pill-on-photo {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.pill-verde {
  background: var(--color-verde-pale);
  color: var(--color-verde-dark);
}

.eyebrow {
  margin-bottom: 16px;
}

/* ---- Hero: escena ilustrada a pantalla completa ---- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: -73px;
  padding-top: 73px;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(10, 6, 3, 0.92) 0%,
    rgba(10, 6, 3, 0.55) 45%,
    rgba(10, 6, 3, 0.1) 75%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 0 48px;
  width: 100%;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.05;
  margin: 16px 0 18px;
  letter-spacing: -0.01em;
  max-width: 15ch;
}

.hero h1 span {
  color: var(--color-orange);
}

.hero p.lead {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 46ch;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  max-width: 320px;
  margin-bottom: 24px;
}

@media (min-width: 520px) {
  .hero-actions {
    flex-direction: row;
    max-width: none;
  }
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.82);
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-row span::before {
  content: '✓';
  color: var(--color-orange);
  font-weight: 700;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 15px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 3px solid var(--color-orange-dark);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--color-orange);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(255, 99, 4, 0.32);
}

.btn-primary:hover {
  background: var(--color-orange-dark);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn svg {
  width: 19px;
  height: 19px;
}

/* ---- Sections ---- */
section {
  padding: 56px 0;
}

.section-head {
  max-width: 56ch;
  margin: 0 0 32px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--color-ink-soft);
  margin: 0;
}

/* ---- Stepper interactivo (secuencia real → numeración justificada) ---- */
.stepper-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 28px;
}

.stepper-line {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  height: 3px;
  background: var(--color-line);
  border-radius: 999px;
  z-index: 0;
}

.stepper-line-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--color-orange);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.stepper-dot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-display);
  flex: 1;
}

.stepper-dot span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2.5px solid var(--color-orange);
  color: var(--color-orange-dark);
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.stepper-dot em {
  font-style: normal;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--color-ink-soft);
  text-align: center;
}

.stepper-dot:hover span {
  transform: translateY(-2px);
}

.stepper-dot.is-active span {
  background: var(--color-orange);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(255, 99, 4, 0.35);
}

.stepper-dot.is-active em {
  color: var(--color-ink);
}

.stepper-dot:focus-visible span {
  outline: 3px solid var(--color-orange-dark);
  outline-offset: 3px;
}

.stepper-panels {
  display: grid;
}

.stepper-panel {
  grid-area: 1 / 1;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 28px 26px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.stepper-panel.is-active {
  opacity: 1;
  visibility: visible;
}

.stepper-panel-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--color-orange-dark);
  background: var(--color-orange-pale);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  margin-bottom: 14px;
}

.stepper-panel h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.stepper-panel p {
  margin: 0;
  color: var(--color-ink-soft);
  max-width: 60ch;
}

@media (min-width: 640px) {
  .stepper-dot em {
    font-size: 0.85rem;
  }

  .stepper-panel {
    padding: 36px 40px;
  }

  .stepper-panel h3 {
    font-size: 1.35rem;
  }
}

/* ---- Galería de fotos ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-line);
  aspect-ratio: 4 / 3;
}

.gallery-wide {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  color: #fff;
  background: rgba(26, 21, 18, 0.6);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 999px;
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---- Requisitos ---- */
.req-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 640px) {
  .req-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.req-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.req-card .req-icon {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--color-orange-dark);
  background: var(--color-orange-pale);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  flex-shrink: 0;
}

.req-card p {
  margin: 0;
  font-size: 0.94rem;
}

.req-note {
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--color-ink-soft);
}

/* ---- Formulario ---- */
.form-section {
  background: var(--color-verde-dark);
  color: #fff;
  border-radius: 22px;
  margin: 0 20px;
  padding: 44px 22px;
}

@media (min-width: 900px) {
  .form-section {
    margin: 0 auto;
    max-width: var(--max-width);
    padding: 56px 64px;
  }
}

.form-section .section-head h2 {
  color: #fff;
}

.form-section .section-head p {
  color: #d7e6de;
}

.form-section .pill-verde {
  background: rgba(255, 255, 255, 0.14);
  color: #ffe0c2;
}

.lead-form {
  display: grid;
  gap: 16px;
  max-width: 480px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #eef3ef;
}

.field input,
.field select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  background: #fff;
  color: var(--color-ink);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 1px;
}

.field-error {
  font-size: 0.8rem;
  color: #ffd4c2;
  min-height: 1em;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.86rem;
  color: #d7e6de;
}

.consent input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.consent a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.lead-form .btn-primary {
  width: 100%;
  padding: 16px 22px;
  font-size: 1.05rem;
  margin-top: 6px;
}

/* ---- Footer ---- */
.site-footer {
  padding: 34px 0 60px;
  border-top: 1px solid var(--color-line);
  margin-top: 20px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--color-ink-soft);
}

.site-footer a {
  color: var(--color-ink-soft);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ---- Botón flotante circular de WhatsApp ---- */
.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}

.whatsapp-fab:hover {
  background: var(--color-whatsapp-dark);
  transform: scale(1.05);
}

.whatsapp-fab svg {
  width: 28px;
  height: 28px;
}

.whatsapp-fab:focus-visible {
  outline: 3px solid var(--color-verde-dark);
  outline-offset: 3px;
}

/* ---- Páginas simples (privacidad / gracias) ---- */
.simple-page {
  padding: 48px 0 70px;
}

.simple-page .wrap {
  max-width: 760px;
}

.simple-page h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 6px;
}

.simple-page .updated {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--color-ink-soft);
  margin-bottom: 36px;
  display: block;
}

.simple-page h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 34px;
}

.simple-page p,
.simple-page li {
  color: var(--color-ink-soft);
}

.simple-page ul {
  padding-left: 20px;
}

/* ---- Página de gracias ---- */
.thanks-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.thanks-card .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-verde-pale);
  color: var(--color-verde-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.6rem;
}

.thanks-card h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  margin: 0 0 10px;
}

.thanks-card p {
  color: var(--color-ink-soft);
  margin: 0 0 26px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
