/* ==========================================================
   Umbral 1 · landing — Orlandi Martín
   Crema + negro + lila. Archivo (display) / Instrument Sans (texto)
   Mobile-first.
   ========================================================== */

:root {
  --crema: #EDEDE5;
  --crema-2: #E3E3D8;
  --papel: #F6F6F1;
  --tinta: #121212;
  --tinta-2: #3A3A36;
  --gris: #6B6B66;
  --linea: #C9C9BE;
  --lila: #C9C4FF;
  --lila-2: #9B93F0;
  --lila-tinta: #4A3FBF;
  --wa: #25D366;
  --wa-dark: #128C4A;
  --rojo: #B3261E;

  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --texto: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 1200px;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}
/* grano sutil */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 5.2vw, 3rem); font-weight: 600; max-width: 22ch; margin-bottom: .75rem; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1rem; }
mark {
  background: var(--lila); color: var(--tinta);
  padding: 0 .3em; border-radius: 2px; font-weight: 600; font-size: .95em;
}

.skip { position: absolute; left: -999px; top: 0; background: var(--tinta); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(3.5rem, 9vw, 7rem) 0; scroll-margin-top: 64px; }
.eyebrow {
  font-family: var(--display);
  font-size: .75rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: var(--lila-tinta);
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 1.5rem; height: 2px; background: var(--lila-2); }
.intro { font-size: 1.125rem; color: var(--tinta-2); max-width: 52ch; }
.fine { font-size: .8rem; color: var(--gris); line-height: 1.5; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  padding: .95rem 1.4rem; border-radius: var(--r);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s, box-shadow .2s;
  min-height: 52px;
}
.btn:active { transform: translateY(1px); }
.btn-wa { background: var(--wa); color: var(--tinta); box-shadow: 0 8px 24px -8px rgba(37,211,102,.55); }
.btn-wa:hover { background: #1fbf5b; }
.btn-ghost { background: transparent; border-color: var(--tinta); color: var(--tinta); }
.btn-ghost:hover { background: var(--tinta); color: var(--crema); }
.btn-dark { background: var(--tinta); color: var(--crema); width: 100%; }
.btn-dark:hover { background: #000; }
.btn-dark:disabled { opacity: .6; cursor: wait; }
.btn-inline { margin-top: .5rem; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem var(--pad);
  background: color-mix(in srgb, var(--crema) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}
.brand {
  font-family: var(--display); font-weight: 700; letter-spacing: .14em;
  font-size: .9rem; text-decoration: none;
}
.brand span { font-weight: 300; margin-left: .35em; }
.top-cta {
  font-family: var(--display); font-weight: 600; font-size: .85rem;
  text-decoration: none; padding: .5rem .9rem; border-radius: var(--r);
  background: var(--wa); color: var(--tinta);
}

/* ---------- Hero ---------- */
.hero { display: grid; }
.hero-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--crema-2); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--crema) 0%, transparent 35%);
}
.tag-legal {
  position: absolute; top: .75rem; left: .75rem; z-index: 2;
  font-size: .65rem; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(18,18,18,.7); color: #fff; padding: .3rem .55rem; border-radius: 2px;
}
.hero-copy { padding: 0 var(--pad) 3rem; margin-top: -2.5rem; position: relative; z-index: 2; }
h1 {
  font-size: clamp(3.4rem, 15vw, 8.5rem);
  font-weight: 700; font-variation-settings: "wdth" 88;
  letter-spacing: -0.04em; line-height: .9;
  display: flex; flex-direction: column;
}
.h1-sub {
  font-size: clamp(1rem, 3.6vw, 1.5rem); font-weight: 500;
  font-variation-settings: "wdth" 100; letter-spacing: 0; line-height: 1.3;
  margin-top: .6rem; color: var(--tinta-2);
  border-left: 3px solid var(--lila-2); padding-left: .75rem;
}
.lead { font-size: 1.15rem; margin: 1.5rem 0; max-width: 46ch; color: var(--tinta-2); }
.lead strong { color: var(--tinta); }
.hero-actions { display: flex; flex-direction: column; gap: .75rem; }
.hero-note { font-size: .875rem; color: var(--gris); margin-top: 1rem; }

/* reveal en carga */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .loaded .reveal { opacity: 1; transform: none; }
.js .loaded .reveal:nth-child(2) { transition-delay: .08s; }
.js .loaded .reveal:nth-child(3) { transition-delay: .16s; }
.js .loaded .reveal:nth-child(4) { transition-delay: .24s; }
.js .loaded .reveal:nth-child(5) { transition-delay: .32s; }

/* ---------- Barra de datos ---------- */
.databar { background: var(--tinta); color: var(--crema); overflow-x: auto; scrollbar-width: none; }
.databar::-webkit-scrollbar { display: none; }
.databar-track { display: flex; min-width: max-content; }
.datum {
  display: flex; flex-direction: column; gap: .15rem;
  padding: 1.25rem 1.5rem; border-right: 1px solid rgba(237,237,229,.18);
  min-width: 160px;
}
.datum-n {
  font-family: var(--display); font-weight: 700; font-size: 1.75rem;
  letter-spacing: -.02em; line-height: 1; font-variation-settings: "wdth" 92;
}
.datum-n i { font-style: normal; color: var(--lila); }
.datum-l { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(237,237,229,.7); }

/* ---------- Placeholders ---------- */
.ph {
  position: relative; background: var(--crema-2); border: 1px dashed var(--gris);
  display: grid; place-items: center; overflow: hidden;
  background-image: repeating-linear-gradient(45deg, transparent 0 14px, rgba(18,18,18,.05) 14px 15px);
}
.ph span {
  font-family: var(--display); font-size: .75rem; letter-spacing: .12em;
  color: var(--gris); background: var(--crema); padding: .35rem .6rem; border-radius: 2px;
}
.ph-face { aspect-ratio: 4/5; border-radius: var(--r); max-width: 260px; }
.ph-obra { aspect-ratio: 4/3; }

/* ---------- Quiénes ---------- */
.people { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
.person h3 { margin-top: 1rem; font-size: 1.5rem; }
.role { font-family: var(--display); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--lila-tinta); margin: .25rem 0 .75rem; font-weight: 600; }
.person p:last-child { color: var(--tinta-2); margin: 0; }

/* ---------- Obra ---------- */
.obra { background: var(--papel); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.obra-head { display: grid; gap: 2rem; }
.avance {
  background: var(--tinta); color: var(--crema); padding: 1.5rem; border-radius: var(--r);
  display: grid; gap: .25rem; align-content: start;
}
.avance-l { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(237,237,229,.7); }
.avance-n { font-family: var(--display); font-weight: 700; font-size: 4rem; line-height: 1; letter-spacing: -.04em; }
.avance-n i { font-style: normal; color: var(--lila); font-size: .5em; vertical-align: top; margin-left: .05em; }
.avance-s { font-size: .85rem; color: rgba(237,237,229,.7); }
.avance-bar { height: 6px; background: rgba(237,237,229,.15); border-radius: 3px; margin-top: 1rem; overflow: hidden; }
.avance-bar span { display: block; height: 100%; background: var(--lila); transition: width 1.2s cubic-bezier(.2,.7,.2,1); }

.gallery {
  display: flex; gap: 1rem; margin: 2.5rem calc(-1 * var(--pad)) 0; padding: 0 var(--pad) .5rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.shot { flex: 0 0 78%; margin: 0; scroll-snap-align: start; }
.shot .ph { border-radius: var(--r); }
.shot figcaption {
  font-family: var(--display); font-weight: 600; font-size: .9rem; margin-top: .6rem;
  display: inline-flex; align-items: center; gap: .5rem;
}
.shot figcaption::before { content: ""; width: 8px; height: 8px; background: var(--lila-2); border-radius: 50%; }

/* ---------- Pasos (fideicomiso / cómo se compra) ---------- */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 0; counter-reset: s; }
.steps li { position: relative; padding: 1.5rem 0 1.5rem 3.5rem; border-top: 1px solid var(--linea); }
.steps li:last-child { border-bottom: 1px solid var(--linea); }
.steps .num {
  position: absolute; left: 0; top: 1.6rem;
  font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .04em;
  color: var(--lila-tinta);
}
.steps h3 { margin-bottom: .5rem; }
.steps p { margin: 0; color: var(--tinta-2); }
.fid .fine { margin-top: 1.5rem; }

/* ---------- Unidades ---------- */
.units { background: var(--tinta); color: var(--crema); }
.units .eyebrow { color: var(--lila); }
.units .eyebrow::before { background: var(--lila); }
.units .intro { color: rgba(237,237,229,.75); }
.units mark { background: var(--lila); }
.cards { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.card {
  background: var(--crema); color: var(--tinta); border-radius: var(--r); overflow: hidden;
  display: grid; grid-template-rows: auto 1fr;
  transition: transform .2s ease;
}
.card:hover { transform: translateY(-3px); }
.card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.card-b { padding: 1.25rem; display: grid; gap: .5rem; align-content: start; }
.card h3 { font-size: 2rem; letter-spacing: -.03em; }
.tipo { color: var(--tinta-2); margin: 0; font-size: .95rem; }
.card dl { margin: .5rem 0 0; display: grid; gap: .35rem; }
.card dl div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--linea); padding-top: .35rem; font-size: .9rem; }
.card dt { color: var(--gris); }
.card dd { margin: 0; text-align: right; }
.card-cta {
  margin-top: .75rem; font-family: var(--display); font-weight: 600; font-size: .95rem;
  text-decoration: none; display: inline-flex; align-items: center; gap: .4rem;
  color: var(--tinta);
}
.card-cta::after { content: "→"; transition: transform .2s; }
.card-cta:hover::after { transform: translateX(4px); }
.card-star { outline: 2px solid var(--lila); outline-offset: -2px; }
.badge { margin: 0; font-family: var(--display); font-weight: 700; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--lila-tinta); }
.extras { margin-top: 3rem; padding: 1.5rem 2rem; border: 1px solid rgba(237,237,229,.18); border-radius: var(--r); }
.extras .eyebrow { color: var(--lila); }
.extras .eyebrow::before { background: var(--lila); }
.extras ul { padding-left: 1.2rem; margin: .75rem 0 0; display: grid; gap: .4rem; color: rgba(237,237,229,.85); }
.extras .fine { margin-top: 1rem; color: rgba(237,237,229,.6); }
.ficha { background: var(--papel); }
.ficha-grid { margin: 2.5rem 0 0; display: grid; gap: 1.25rem; }
.ficha-grid div { border-top: 1px solid var(--linea); padding-top: .9rem; }
.ficha-grid dt { font-family: var(--display); font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--lila-tinta); margin-bottom: .35rem; }
.ficha-grid dd { margin: 0; color: var(--tinta-2); }
.card-roof { background: var(--lila); }
.card-roof .tipo { color: var(--tinta); }
.pago { margin-top: 3rem; padding: 2rem; border: 1px solid rgba(237,237,229,.18); border-radius: var(--r); background: rgba(237,237,229,.04); }
.pago .eyebrow { color: var(--lila); }
.pago .eyebrow::before { background: var(--lila); }
.pago h3 { font-size: 1.35rem; margin: .5rem 0 1rem; letter-spacing: -.02em; }
.pago ul { padding-left: 1.2rem; display: grid; gap: .5rem; color: rgba(237,237,229,.85); }
.pago .fine { margin-top: 1.25rem; color: rgba(237,237,229,.6); }
.legal-precios { margin-top: 2rem; color: rgba(237,237,229,.65); }
.legal-precios mark { font-size: .9em; }

/* ---------- FAQ ---------- */
.acc { margin-top: 2rem; border-top: 1px solid var(--linea); }
.acc details { border-bottom: 1px solid var(--linea); }
.acc summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0;
  font-family: var(--display); font-weight: 600; font-size: 1.1rem; position: relative;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 300; color: var(--lila-tinta); transition: transform .2s;
}
.acc details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.acc details p { margin: 0 0 1.25rem; color: var(--tinta-2); max-width: 62ch; }

/* ---------- Formulario ---------- */
.contact { background: var(--papel); border-top: 1px solid var(--linea); }
.wrap-form { display: grid; gap: 2.5rem; }
.form { display: grid; gap: 1.1rem; background: var(--crema); padding: 1.5rem; border-radius: var(--r); border: 1px solid var(--linea); }
.field { display: grid; gap: .4rem; }
.field label { font-family: var(--display); font-weight: 600; font-size: .95rem; }
.field label small { font-weight: 400; color: var(--gris); font-family: var(--texto); }
.field input, .field select {
  font: inherit; color: var(--tinta); background: #fff;
  border: 1px solid var(--linea); border-radius: var(--r); padding: .8rem .9rem; min-height: 50px;
  width: 100%;
}
.field select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23121212' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.5rem; }
.field input:focus, .field select:focus { outline: 2px solid var(--lila-2); outline-offset: 1px; border-color: var(--lila-2); }
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: .7rem; }
.field-check input { width: 1.25rem; height: 1.25rem; min-height: 0; margin-top: .2rem; accent-color: var(--tinta); }
.field-check label { font-family: var(--texto); font-weight: 400; font-size: .85rem; color: var(--tinta-2); line-height: 1.45; }
.form .fine { margin: 0; text-align: center; }
.form-error { color: var(--rojo); font-size: .9rem; margin: 0; font-weight: 600; }
.thanks { background: var(--tinta); color: var(--crema); padding: 2rem; border-radius: var(--r); }
.thanks .eyebrow { color: var(--lila); }
.thanks .eyebrow::before { background: var(--lila); }
.thanks .intro { color: rgba(237,237,229,.75); }

/* ---------- Footer ---------- */
.foot { background: var(--tinta); color: rgba(237,237,229,.8); padding: 3rem 0 6rem; font-size: .9rem; }
.foot-grid { display: grid; gap: 1.5rem; }
.foot a { color: var(--crema); }
.brand-foot { color: var(--crema); margin-bottom: .25rem; }
.foot-legal { margin-top: 2rem; font-size: .75rem; color: rgba(237,237,229,.5); border-top: 1px solid rgba(237,237,229,.15); padding-top: 1.5rem; }
.foot mark { background: var(--lila); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 50;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--wa); color: var(--tinta); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  padding: .75rem 1.1rem .75rem .8rem; border-radius: 999px;
  box-shadow: 0 10px 30px -6px rgba(0,0,0,.45);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.04); }

/* ---------- Motion reduce ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .avance-bar span, .card, .btn { transition: none; }
}

/* ==========================================================
   Tablet / Desktop
   ========================================================== */
@media (min-width: 720px) {
  .hero-actions { flex-direction: row; }
  .people { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .ficha-grid { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .steps { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .steps li { border-top: 1px solid var(--linea); }
  .steps li:last-child { border-bottom: 0; }
  .steps li:nth-last-child(-n+2) { border-bottom: 1px solid var(--linea); }
  .obra-head { grid-template-columns: 1fr 260px; align-items: start; }
  .shot { flex: 0 0 42%; }
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
  .datum { min-width: 0; flex: 1; padding: 1.5rem 2rem; }
  .databar-track { min-width: 0; }
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: stretch; min-height: calc(100vh - 62px);
  }
  .hero-media { aspect-ratio: auto; order: 2; height: 100%; min-height: 560px; }
  .hero-media::after { background: linear-gradient(to right, var(--crema) 0%, transparent 18%); }
  .hero-copy {
    order: 1; margin-top: 0; padding: clamp(3rem, 6vw, 5rem) var(--pad) 3rem clamp(2rem, 6vw, 5rem);
    display: flex; flex-direction: column; justify-content: center;
  }
  h1 { font-size: clamp(6rem, 9.5vw, 10rem); }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .ficha-grid { grid-template-columns: repeat(3, 1fr); }
  .card h3 { font-size: 1.75rem; }
  .people { gap: 5rem; }
  .person { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: start; }
  .person h3 { margin-top: 0; }
  .person .ph-face { grid-row: 1 / span 4; }
  .shot { flex: 0 0 30%; }
  .wrap-form { grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
  .form-side { position: sticky; top: 90px; }
  .form { padding: 2rem; }
  .obra-head { grid-template-columns: 1fr 320px; }
  .avance { padding: 2rem; }
  .avance-n { font-size: 5rem; }
}
