/* Casas DEAL — Landing propietarios con adeudo
   Valores: Context/Canonical/brand-tokens.md (fuente única). */

@font-face {
  font-family: "Clash Display";
  src: url("assets/fonts/ClashDisplay-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("assets/fonts/ClashDisplay-Medium.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  /* marca [BB] */
  --brand-pink: #ECBACC;
  --brand-stone: #BEBABC;
  --brand-bone: #F2F2F2;
  --brand-black: #020204;
  --brand-white: #FFFFFF;
  /* derivados (propuesta, AA verificado) */
  --pink-deep: #9E4A6A;
  --ink-soft: #5C585A;
  --pink-tint: #F8E6ED;
  --ink-hover: #2A2A2E;

  --font-display: "Clash Display", "Satoshi", system-ui, sans-serif;
  --font-body: "Satoshi", "Inter", system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-card: 16px;
  --radius-pill: 999px;
  --dur-fast: 160ms;
  --dur-base: 220ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 10vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--brand-bone);
  color: var(--brand-black);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.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 { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand-black); color: var(--brand-bone); padding: 10px 16px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--brand-black); outline-offset: 3px; box-shadow: 0 0 0 7px var(--brand-pink); border-radius: 6px; }

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background: var(--brand-pink);
  border-radius: 0 999px 999px 0; /* media "D" del isotipo */
}
.eyebrow--ink { color: var(--brand-black); }
.eyebrow--ink::before { background: var(--brand-black); }
.eyebrow--pink { color: var(--brand-pink); }

.h2 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.04; max-width: 20ch; }
.h2--sm { font-size: clamp(1.6rem, 3.6vw, 2.5rem); max-width: 30ch; }
.lead { margin-top: 20px; max-width: 58ch; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--ink-soft); }
.section { padding-block: var(--section); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display); font-weight: 500; font-size: 1.0625rem; letter-spacing: .01em;
  text-decoration: none; text-align: center;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--wa { background: var(--brand-black); color: var(--brand-bone); box-shadow: 0 10px 30px -12px rgba(2,2,4,.55); }
.btn--wa:hover { background: var(--ink-hover); transform: translateY(-2px); }
.btn--pink { background: var(--brand-pink); color: var(--brand-black); }
.btn--pink:hover { background: #F3CCDA; transform: translateY(-2px); }
.btn--block { width: 100%; }
.wa-ico { width: 22px; height: 22px; fill: currentColor; flex: none; }
.microcopy { margin-top: 12px; font-size: .9375rem; color: var(--ink-soft); }
.microcopy--inv { color: #CFCBCD; }

/* ---------- topbar ---------- */
.topbar { padding-block: 18px; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar__logo img { width: clamp(132px, 16vw, 174px); height: auto; }
.topbar__tag { font-size: .875rem; color: var(--ink-soft); display: none; }
@media (min-width: 720px) { .topbar__tag { display: block; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(20px, 5vw, 56px) clamp(48px, 8vw, 96px); position: relative; overflow: hidden; }
.hero::after { /* D gigante de fondo */
  content: ""; position: absolute; z-index: -1;
  width: min(62vw, 720px); aspect-ratio: 1 / 2;
  right: -12vw; top: -8vw;
  background: var(--pink-tint);
  border-radius: 0 999px 999px 0;
  transform: rotate(-90deg);
  transform-origin: center;
}
.hero__grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 1fr; } }
.hero__title { font-size: clamp(2.5rem, 7.2vw, 5rem); line-height: .98; letter-spacing: -0.02em; }
.hero__title .mark {
  display: inline;
  background: linear-gradient(transparent 58%, var(--brand-pink) 58%, var(--brand-pink) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero__sub { margin-top: 24px; font-size: clamp(1.0625rem, 1.7vw, 1.25rem); max-width: 52ch; color: #2E2B2D; }
.hero__sub strong { color: var(--brand-black); }

.ticks { list-style: none; margin-top: 24px; display: grid; gap: 10px; }
.ticks li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.tick { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-black); position: relative; flex: none; }
.tick::after { content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 10px; border: solid var(--brand-pink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cta-block { margin-top: 32px; }
@media (max-width: 559px) { .cta-block .btn { width: 100%; } }

/* before / after */
.hero__visual { margin: 0; }
.hero__visual figcaption { margin-top: 14px; font-size: .9375rem; color: var(--ink-soft); max-width: 46ch; }
.ba {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius-card) 999px 999px var(--radius-card); /* forma de "D" */
  background: var(--brand-stone);
  box-shadow: 0 1px 2px rgba(2,2,4,.06), 0 24px 60px -24px rgba(2,2,4,.35);
  --pos: 50%;
  touch-action: pan-y;
}
@media (max-width: 559px) { .ba { border-radius: var(--radius-card) 160px 160px var(--radius-card); } }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px;
  background: var(--brand-bone); pointer-events: none;
}
.ba__handle span {
  position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; background: var(--brand-black); border: 3px solid var(--brand-bone);
}
.ba__handle span::before, .ba__handle span::after {
  content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border: solid var(--brand-pink); border-width: 0 0 2px 2px;
}
.ba__handle span::before { left: 10px; transform: rotate(45deg); }
.ba__handle span::after { right: 10px; transform: rotate(-135deg); }
.ba__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
}
.ba__range:focus-visible + * , .ba:has(.ba__range:focus-visible) { outline: 3px solid var(--brand-black); outline-offset: 4px; }
.pill {
  position: absolute; bottom: 16px; z-index: 2;
  font-family: var(--font-display); font-weight: 500; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 14px; border-radius: var(--radius-pill); pointer-events: none;
}
.pill--before { left: 16px; background: var(--brand-white); color: var(--brand-black); }
.pill--after { right: 18%; background: var(--brand-pink); color: var(--brand-black); }

/* ---------- trust ---------- */
.trust { background: var(--brand-black); color: var(--brand-bone); }
.trust__list { list-style: none; display: grid; gap: 0; padding-block: 8px; }
.trust__list li { display: flex; flex-direction: column; padding: 18px 0; border-bottom: 1px solid #2A2A2E; }
.trust__list li:last-child { border-bottom: 0; }
.trust__list strong { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; color: var(--brand-pink); }
.trust__list span { color: #CFCBCD; font-size: .9375rem; }
@media (min-width: 760px) {
  .trust__list { grid-template-columns: repeat(3, 1fr); padding-block: 12px; }
  .trust__list li { border-bottom: 0; padding: 22px 28px; border-left: 1px solid #2A2A2E; }
  .trust__list li:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- debt ---------- */
.debt__cards { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 760px) { .debt__cards { grid-template-columns: repeat(3, 1fr); } }
.dcard {
  position: relative; overflow: hidden;
  background: var(--brand-white); border-radius: var(--radius-card);
  padding: 28px 26px 24px;
  box-shadow: 0 1px 2px rgba(2,2,4,.06), 0 8px 24px rgba(2,2,4,.06);
}
.dcard__d { position: absolute; right: -28px; top: -18px; width: 72px; height: 110px; background: var(--brand-pink); border-radius: 0 999px 999px 0; opacity: .9; }
.dcard h3 { font-size: 1.625rem; line-height: 1.1; max-width: 12ch; }
.dcard p { margin-top: 10px; color: var(--ink-soft); padding-right: 44px; }
.dcard .dcard__ok { margin-top: 18px; color: var(--brand-black); font-family: var(--font-display); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.dcard .dcard__ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pink-deep); }

.numbers-note {
  margin-top: 40px; padding: 28px clamp(22px, 4vw, 40px);
  border-left: 6px solid var(--brand-black);
  background: var(--pink-tint); border-radius: 0 var(--radius-card) var(--radius-card) 0;
  display: grid; gap: 8px; max-width: 880px;
}
.numbers-note__k { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; }
.numbers-note p:not(.numbers-note__k) { font-size: 1.125rem; }

/* ---------- steps ---------- */
.steps { background: var(--brand-pink); position: relative; overflow: hidden; }
.steps::before { /* isotipo gigante como textura */
  content: ""; position: absolute; right: -6%; bottom: -30%;
  width: min(70vw, 760px); aspect-ratio: 881 / 582;
  background: url("assets/logos/isotipo.svg") no-repeat center / contain;
  filter: brightness(1.12) saturate(.7); opacity: .45; pointer-events: none;
}
.steps .wrap { position: relative; }
.steps__list { list-style: none; display: grid; gap: 16px; margin-top: 40px; counter-reset: s; }
@media (min-width: 860px) { .steps__list { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--brand-white); border-radius: var(--radius-card); padding: 26px; position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 8px; align-items: center; }
.step__ico { grid-row: 1; grid-column: 1; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-black); display: grid; place-items: center; }
.step__ico svg { width: 24px; height: 24px; fill: none; stroke: var(--brand-pink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step__n { grid-row: 1; grid-column: 2; justify-self: end; font-family: var(--font-display); font-size: 2.5rem; line-height: 1; color: var(--brand-stone); }
.step h3 { grid-column: 1 / -1; font-size: 1.5rem; margin-top: 14px; }
.step p { grid-column: 1 / -1; color: var(--ink-soft); }
.steps__cta { margin-top: 36px; }
.steps__cta .microcopy { color: var(--brand-black); }
@media (max-width: 559px) { .steps__cta .btn { width: 100%; } }

/* ---------- proof ---------- */
.proof__rail {
  margin-top: 36px; display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 360px);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
  scrollbar-width: thin; scrollbar-color: var(--brand-stone) transparent;
}
.proof__rail img { width: 100%; height: auto; border-radius: var(--radius-card); scroll-snap-align: start; box-shadow: 0 8px 24px rgba(2,2,4,.08); }
@media (min-width: 960px) { .proof__rail { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }

/* ---------- stance ---------- */
.stance { background: var(--brand-black); color: var(--brand-bone); }
.stance__grid { display: grid; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .stance__grid { grid-template-columns: 1fr 1.1fr; } }
.stance__photo { margin: 0; position: relative; }
.stance__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 62% center;
  border-radius: var(--radius-card) 999px 999px var(--radius-card);
}
.stance__photo::after {
  content: ""; position: absolute; left: -14px; bottom: -14px; width: 38%; aspect-ratio: 1 / 2;
  background: var(--brand-pink); border-radius: 0 999px 999px 0; z-index: -0; mix-blend-mode: normal; opacity: .95;
  transform: translateZ(0);
}
.stance__photo img { position: relative; z-index: 1; }
.stance .h2 { color: var(--brand-bone); }
.quote { margin: 28px 0; padding: 0; }
.quote p { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.8vw, 2rem); line-height: 1.2; color: var(--brand-pink); }
.quote footer { margin-top: 14px; font-size: .9375rem; color: #CFCBCD; }
.stance__copy > p:last-child { color: #DCD8DA; max-width: 52ch; font-size: 1.125rem; }

/* ---------- signs ---------- */
.signs__grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 36px; }
@media (min-width: 760px) { .signs__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .signs__grid { grid-template-columns: repeat(6, 1fr); } }
.signs__grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 35%; border-radius: var(--radius-card); }
.signs__grid li:nth-child(even) img { border-radius: var(--radius-card) 999px 999px var(--radius-card); }
.signs__cap { margin-top: 14px; font-size: .9375rem; color: var(--ink-soft); }

/* ---------- more ---------- */
.more { padding-top: 0; }
.chips { list-style: none; display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 760px) { .chips { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .chips { grid-template-columns: repeat(4, 1fr); } }
.chip {
  display: flex; flex-direction: column; gap: 4px; height: 100%;
  padding: 18px 20px; border-radius: var(--radius-card);
  border: 1.5px solid var(--brand-black); text-decoration: none;
  transition: background-color var(--dur-base) var(--ease), transform var(--dur-fast) var(--ease);
  position: relative;
}
.chip strong { font-family: var(--font-display); font-weight: 500; font-size: 1.1875rem; }
.chip span { color: var(--ink-soft); font-size: .9375rem; }
.chip::after { content: "→"; position: absolute; right: 18px; top: 16px; font-family: var(--font-display); }
.chip:hover { background: var(--brand-white); transform: translateY(-2px); }

/* ---------- zone ---------- */
.zone { background: var(--brand-white); }
.zone__grid { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .zone__grid { grid-template-columns: 1fr 1.2fr; } }
.zone__list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.zone__list li {
  font-family: var(--font-display); font-weight: 500; font-size: 1.125rem;
  padding: 10px 18px 10px 14px; border-radius: var(--radius-pill);
  background: var(--brand-bone); display: inline-flex; align-items: center; gap: 8px;
}
.zone__list li::before { content: ""; width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pink-deep); }

/* ---------- faq ---------- */
.faq__wrap { display: grid; gap: 32px; }
@media (min-width: 960px) { .faq__wrap { grid-template-columns: .8fr 1.2fr; align-items: start; } .faq .h2 { position: sticky; top: 32px; } }
.faq__list { border-top: 1.5px solid var(--brand-black); }
.faq details { border-bottom: 1px solid var(--brand-stone); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 28px; height: 28px; margin-top: -14px;
  border-radius: 50%; background: var(--brand-black);
  -webkit-mask: none;
  transition: transform var(--dur-base) var(--ease);
}
.faq summary::before {
  content: "+"; position: absolute; right: 4px; top: 50%; width: 28px; line-height: 28px; margin-top: -14px;
  text-align: center; color: var(--brand-pink); z-index: 1; font-size: 1.25rem;
  transition: transform var(--dur-base) var(--ease);
}
.faq details[open] summary::before { transform: rotate(45deg); }
.faq details p { padding: 0 48px 24px 0; color: var(--ink-soft); max-width: 62ch; }

/* ---------- closing ---------- */
.closing { background: var(--brand-black); color: var(--brand-bone); padding-block: clamp(80px, 12vw, 140px); text-align: center; overflow: hidden; }
.closing__in { display: flex; flex-direction: column; align-items: center; }
.closing__iso { width: 88px; height: auto; margin-bottom: 28px; }
.closing__title { font-size: clamp(2.25rem, 6.5vw, 4.5rem); line-height: 1; max-width: 16ch; }
.closing__title span { color: var(--brand-pink); }
.closing__sub { margin-top: 20px; color: #DCD8DA; font-size: 1.125rem; max-width: 44ch; }
.closing .btn { margin-top: 32px; }
@media (max-width: 559px) { .closing .btn { width: 100%; } }

/* ---------- footer ---------- */
.footer { background: var(--brand-black); color: #CFCBCD; border-top: 1px solid #2A2A2E; padding-block: 36px calc(36px + 80px); }
@media (min-width: 760px) { .footer { padding-bottom: 36px; } }
.footer__in { display: grid; gap: 20px; }
.footer__in img { width: 150px; }
.footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--brand-pink); }
.footer__legal { font-size: .8125rem; color: #9A9698; }
@media (min-width: 900px) { .footer__in { grid-template-columns: auto 1fr auto; align-items: center; } }

/* ---------- sticky CTA (móvil) ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(242, 242, 242, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(2,2,4,.08);
  transform: translateY(110%); transition: transform var(--dur-base) var(--ease);
}
.sticky-cta.is-on { transform: translateY(0); }
.sticky-cta .btn { min-height: 52px; }
@media (min-width: 760px) { .sticky-cta { display: none; } }

/* ---------- entrada del hero ---------- */
.reveal { animation: rise .7s var(--ease) both; }
.hero__copy .reveal:nth-child(2) { animation-delay: .06s; }
.hero__copy .reveal:nth-child(3) { animation-delay: .14s; }
.hero__copy .reveal:nth-child(4) { animation-delay: .22s; }
.hero__copy .reveal:nth-child(5) { animation-delay: .3s; }
.hero__visual.reveal { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
