/* =========================================================
   Residencial VISTA MART · Landing
   Paleta y tipografía: sistema de diseño MART Constructora
   ========================================================= */

@font-face { font-family: "Gilroy"; src: url("../fonts/Gilroy-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("../fonts/Gilroy-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("../fonts/Gilroy-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("../fonts/Gilroy-Heavy.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --blue: #0071ce;
  --dark-blue: #17264e;
  --cyan: #51c2eb;
  --yellow: #fdbc68;
  --ink: #25282a;
  --white: #ffffff;
  --pale: #f2f6fb;
  --line: #e3e9f2;
  --field: #6b7590;
  --error: #b42318;
  --gutter: clamp(16px, 5vw, 80px);
  --shadow: 0 16px 40px rgba(23, 38, 78, 0.08);
  --font: "Gilroy", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-width: 320px; background: var(--white); color: var(--dark-blue);
  font-family: var(--font); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--dark-blue); color: var(--white); font-weight: 700; }
.skip-link:focus { top: 12px; }

.eyebrow { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.section-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.section-head h2 { margin: 0; font-size: clamp(30px, 5vw, 40px); line-height: 1.15; font-weight: 600; color: var(--dark-blue); }
.section-head p { margin: 0; color: var(--ink); }

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 60px; padding: 0 24px;
  border: 0; border-radius: 14px; background: var(--blue); color: var(--white); font-size: 17px; font-weight: 700;
  text-decoration: none; cursor: pointer; box-shadow: 0 12px 28px rgba(0, 113, 206, 0.3);
  transition: background-color .2s ease, transform .2s ease;
}
.btn-primary:hover { background: #005fae; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { background: var(--dark-blue); cursor: progress; box-shadow: none; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--white); }
.hero__media { position: relative; height: 100vh; height: 100svh; min-height: 560px; max-height: 1000px; overflow: hidden; background: var(--dark-blue); }
.hero__media picture, .hero__photo { width: 100%; height: 100%; }
.hero__photo { object-fit: cover; object-position: 50% 62%; transform: scale(1.08); transition: transform 2.2s cubic-bezier(.2,.7,.2,1); }

.hero__header {
  position: absolute; top: 12px; left: clamp(12px, 5vw, 80px); right: clamp(12px, 5vw, 80px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; z-index: 2;
}
.hero__logo { display: flex; align-items: center; min-height: 44px; }
.hero__logo img { height: 35px; width: auto; }
.hero__register { display: flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; background: var(--blue); color: var(--white); font-weight: 700; font-size: 15px; text-decoration: none; }
.hero__register:hover { background: #005fae; }

.hero__copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(64px, 8vw, 104px); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero__badge { margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--white); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.hero__title { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: clamp(40px, 10vw, 56px); line-height: 1.04; font-weight: 800; letter-spacing: -0.01em; color: var(--white); }
.hero__line { display: inline-block; padding: 6px 14px 8px; background: var(--dark-blue); }
.hero__line > span { display: inline-block; }
.hero__title .accent { color: var(--cyan); }

.hero__cta { position: relative; z-index: 2; display: flex; justify-content: center; margin-top: -30px; padding: 0 16px; }
.hero__cta .btn-primary { width: 100%; max-width: 360px; }

/* Animación de entrada (solo si hay JS y el usuario no pidió menos movimiento) */
.js .hero__header, .js .hero__badge { opacity: 0; }
.js .hero__badge { transform: translateY(12px); }
.js .hero__line { clip-path: inset(0 100% 0 0); }
.js .hero__line > span { opacity: 0; transform: translateY(60%); }
.is-loaded .hero__photo { transform: scale(1); }
.is-loaded .hero__header { opacity: 1; transition: opacity .6s ease .1s; }
.is-loaded .hero__badge { opacity: 1; transform: none; transition: opacity .6s ease .2s, transform .6s ease .2s; }
.is-loaded .hero__line { clip-path: inset(0 0 0 0); transition: clip-path .8s cubic-bezier(.7,0,.2,1) .35s; }
.is-loaded .hero__line + .hero__line { transition-delay: .6s; }
.is-loaded .hero__line > span { opacity: 1; transform: none; transition: opacity .6s ease .8s, transform .6s cubic-bezier(.2,.7,.2,1) .8s; }
.is-loaded .hero__line + .hero__line > span { transition-delay: 1.05s; }
@media (prefers-reduced-motion: reduce) {
  .js .hero__header, .js .hero__badge, .js .hero__line, .js .hero__line > span, .hero__photo { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
}

/* ---------- Intro ---------- */
.intro { padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(48px, 6vw, 88px); }
.intro__inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.intro__text { margin: 0; max-width: 480px; font-size: 16px; line-height: 1.5; color: var(--dark-blue); text-wrap: pretty; }

/* ---------- Tipologías ---------- */
.tipologias { background: var(--pale); padding: clamp(48px, 7vw, 104px) var(--gutter); }
.tipologias__inner { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(24px, 4vw, 40px); }
.carousel { display: flex; flex-direction: column; gap: 20px; }
.carousel__frame { border-radius: 20px; overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.carousel__track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; display: flex; flex-direction: column; }
.slide__img { padding: clamp(8px, 2vw, 24px); }
.slide__img img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: contain; border-radius: 12px; }
.slide__caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(16px, 3vw, 28px); background: var(--dark-blue); }
.slide__name { display: flex; align-items: baseline; gap: 12px; }
.slide__num { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--cyan); }
.slide__title { font-size: 22px; line-height: 28px; font-weight: 700; color: var(--white); }
.slide__area { font-size: 22px; line-height: 28px; font-weight: 800; color: var(--yellow); }
.carousel__controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.carousel__arrow { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; background: var(--white); color: var(--dark-blue); border: 1px solid var(--dark-blue); border-radius: 12px; cursor: pointer; transition: opacity .2s ease, background-color .2s ease; }
.carousel__arrow:hover:not([disabled]) { background: var(--pale); }
.carousel__arrow[disabled] { opacity: .35; cursor: default; }
.carousel__dots { display: flex; align-items: center; gap: 2px; }
.carousel__dot { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.carousel__dot span { display: block; width: 8px; height: 8px; border-radius: 999px; background: #9aa3b8; transition: width .25s ease, background-color .25s ease; }
.carousel__dot[aria-current="true"] span { width: 28px; background: var(--blue); }

/* ---------- Registro ---------- */
.registro { padding: clamp(48px, 7vw, 104px) var(--gutter); scroll-margin-top: 0; }
.registro__inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(24px, 4vw, 40px); }
.registro .section-head p { max-width: 520px; }
.card { padding: clamp(20px, 4vw, 40px); background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }

.form { display: flex; flex-direction: column; gap: 20px; }
.form__note { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink); }
.req { color: var(--blue); font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dark-blue); }
.optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink); }
.input {
  width: 100%; height: 52px; padding: 0 14px; font-size: 16px; color: var(--dark-blue); background: var(--white);
  border: 1px solid var(--field); border-radius: 10px; appearance: none; -webkit-appearance: none;
}
select.input {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2317264e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 113, 206, 0.25); }
.input[aria-invalid="true"] { border: 2px solid var(--error); }
.input::placeholder { color: #737b8c; }
.phone { display: flex; gap: 8px; }
.phone select { flex: 0 0 124px; }
.phone input { flex: 1 1 auto; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.row > .field { flex: 1 1 240px; }
.error { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--error); }
.error:empty { display: none; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--error); border-radius: 12px; color: var(--error); font-weight: 600; }
.alert svg { flex: none; }
.alert[hidden] { display: none; }

/* Bloque de cita (destacado) */
.cita { margin: 12px 0 0; padding: clamp(20px, 4vw, 32px); border: 0; border-radius: 18px; background: var(--dark-blue); color: var(--white); display: flex; flex-direction: column; gap: 20px; min-width: 0; box-shadow: 0 16px 36px rgba(23, 38, 78, 0.22); }
.cita legend { float: left; width: 100%; padding: 0; margin: 0; }
.cita__head { display: flex; flex-direction: column; gap: 14px; }
.cita__tag { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.cita__icon { display: flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--cyan); color: var(--dark-blue); }
.cita__question { display: block; font-size: clamp(22px, 3.4vw, 26px); line-height: 1.25; font-weight: 700; color: var(--yellow); }
.cita__hint { display: block; font-size: 15px; line-height: 22px; color: var(--white); }
.cita__options { display: flex; flex-wrap: wrap; gap: 12px; }
.option { flex: 1 1 240px; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 16px; cursor: pointer; border-radius: 12px; border: 1px solid var(--white); color: var(--white); font-weight: 700; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.option input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--dark-blue); }
.option:has(input:checked) { background: var(--cyan); border: 2px solid var(--cyan); color: var(--dark-blue); }
.option:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 2px; }
.cita.has-error .option:not(:has(input:checked)) { border: 2px solid var(--yellow); }
.cita .error { color: var(--yellow); }
.cita__wa { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 1px solid var(--cyan); }
.cita__wa p { margin: 0; color: var(--white); }
.cita__wa-note { font-size: 14px; line-height: 20px; }
.cita__wa-note strong { color: var(--yellow); }
.btn-wa { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 0 20px; border-radius: 14px; background: #25d366; color: var(--dark-blue); font-size: 17px; font-weight: 700; text-decoration: none; transition: background-color .2s ease; }
.btn-wa:hover { background: #1fbd5a; }
.btn-wa:focus-visible { outline-color: var(--yellow); }

/* Primera vivienda */
.pv { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pv__legend { padding: 0; margin: 0 0 10px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dark-blue); }
.pv__options { display: flex; gap: 12px; }
.pv__option { flex: 1 1 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; cursor: pointer; border-radius: 12px; border: 1px solid var(--field); background: var(--white); font-weight: 700; color: var(--dark-blue); transition: background-color .2s ease, border-color .2s ease; }
.pv__option input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--blue); }
.pv__option:has(input:checked) { border: 2px solid var(--blue); background: var(--pale); }
.pv__option:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.pv.has-error .pv__option:not(:has(input:checked)) { border: 2px solid var(--error); }
.catastro { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 12px; background: var(--pale); border: 1px solid var(--line); }
.catastro p { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink); }
.catastro strong { color: var(--dark-blue); }
.btn-outline { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 18px; border-radius: 12px; border: 2px solid var(--blue); background: var(--white); color: var(--blue); font-size: 16px; font-weight: 700; text-decoration: none; text-align: center; }
.btn-outline:hover { background: #eaf3fc; }

.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field label.consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--blue); }
.consent a { font-weight: 600; }
#e-privacidad { margin-left: 34px; }
.turnstile { min-height: 0; }
.form .btn-primary { width: 100%; }
.form__foot { margin: -6px 0 0; font-size: 14px; line-height: 20px; color: var(--ink); text-align: center; }

.gracias { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: clamp(24px, 4vw, 40px); border-radius: 18px; background: var(--dark-blue); color: var(--white); }
.gracias[hidden] { display: none; }
.gracias:focus { outline: none; }
.gracias__icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; background: var(--cyan); color: var(--dark-blue); }
.gracias h3 { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; }
.gracias p { margin: 0; font-size: 17px; line-height: 26px; }
.gracias strong { color: var(--yellow); }
.gracias__cita { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.gracias__status { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--cyan); font-size: 12px !important; line-height: 16px !important; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.btn-ghost { min-height: 48px; margin-top: 8px; padding: 0 20px; font-size: 16px; font-weight: 700; color: var(--white); background: transparent; border: 1px solid var(--white); border-radius: 12px; cursor: pointer; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- Brochure ---------- */
.brochure { background: var(--pale); padding: clamp(40px, 6vw, 80px) var(--gutter); }
.brochure__card { max-width: 1040px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; padding: clamp(24px, 4vw, 48px); border-radius: 20px; background: var(--dark-blue); color: var(--white); box-shadow: 0 16px 40px rgba(23, 38, 78, 0.18); }
.brochure__text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; }
.brochure__text h2 { margin: 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.2; font-weight: 600; }
.brochure__text p:last-child { margin: 0; }
.eyebrow--cyan { color: var(--cyan); }
.btn-cyan { flex: 0 1 320px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 0 24px; border-radius: 14px; background: var(--cyan); color: var(--dark-blue); font-size: 17px; font-weight: 700; text-decoration: none; transition: background-color .2s ease; }
.btn-cyan:hover { background: #73cff0; }
.btn-cyan:focus-visible { outline-color: var(--yellow); }

/* ---------- Footer ---------- */
.footer { background: var(--dark-blue); color: var(--white); padding: clamp(32px, 4vw, 48px) var(--gutter) 20px; }
.footer__inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.footer__top { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
.footer__brand { flex: 1 1 220px; display: flex; flex-direction: column; gap: 14px; }
.footer__brand img { height: 60px; width: auto; align-self: flex-start; }
.footer__brand p { margin: 0; max-width: 280px; font-size: 14px; line-height: 20px; }
.footer__social { display: flex; flex-direction: column; gap: 8px; }
.footer__icons { display: flex; gap: 10px; }
.footer__icons a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--cyan); color: var(--white); transition: background-color .2s ease; }
.footer__icons a:hover { background: rgba(81, 194, 235, 0.15); }
.footer__cols { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.footer__col { display: flex; flex-direction: column; }
.footer__label { margin: 0 0 2px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.footer__col a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--white); }
.footer__contact a { font-weight: 600; text-decoration: none; }
.footer__contact a:hover { text-decoration: underline; }
.footer__copy { margin: 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: 13px; line-height: 20px; text-align: center; }

/* ---------- Páginas legales ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 40px var(--gutter) 64px; }
.legal__back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; text-decoration: none; }
.legal h1 { margin: 16px 0 8px; font-size: clamp(30px, 5vw, 40px); line-height: 1.15; font-weight: 700; }
.legal h2 { margin: 32px 0 8px; font-size: 20px; line-height: 26px; font-weight: 700; }
.legal p, .legal li { color: var(--ink); }
.legal__draft { padding: 12px 16px; border-radius: 12px; background: var(--pale); border: 1px solid var(--line); font-weight: 600; }
