/* ============================================================
   Cedral Studio — sistema de diseño
   ============================================================ */

:root {
  --bg:        #0B0C0E;
  --bg-2:      #101216;
  --surface:   #16191F;
  --surface-2: #1D2129;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.16);

  --text:      #F1F3F6;
  --muted:     #98A0AB;
  --dim:       #6B7280;

  --accent:    #C9A46A;
  --accent-2:  #E3C48F;
  --accent-dk: #8E7343;

  --ok:        #4ADE80;
  --warn:      #FBBF24;
  --off:       #F87171;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;

  --wrap: 1180px;
  --pad:  clamp(20px, 5vw, 48px);

  --ease: cubic-bezier(.22,.7,.24,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #0B0C0E; }

/* ---------- Tipografía ---------- */
.display {
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.03em;
}
h2.display { font-size: clamp(30px, 4.6vw, 52px); }
h3 { font-size: clamp(19px, 2vw, 23px); font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .19em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--accent); opacity: .6;
}

.lead { color: var(--muted); font-size: clamp(16px, 1.7vw, 18.5px); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.section { padding: clamp(72px, 11vw, 132px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 68px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { margin-bottom: 18px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: .005em;
  cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s, color .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary { background: var(--accent); color: #14100A; box-shadow: 0 10px 30px rgba(201,164,106,.22); }
.btn-primary:hover { background: var(--accent-2); box-shadow: 0 16px 40px rgba(201,164,106,.34); }

.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(201,164,106,.07); }

.btn-sm { padding: 10px 18px; font-size: 13.5px; }

/* ---------- Precargador ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 900; background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .75s var(--ease), visibility .75s;
}
#preloader.done { opacity: 0; visibility: hidden; }
#preloader::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 45%, rgba(201,164,106,.10), transparent 70%);
}
.pl-inner { position: relative; display: grid; justify-items: center; gap: 30px; }

.pl-logo {
  width: min(360px, 62vw); aspect-ratio: 1023/220; position: relative;
  animation: plIn 1s var(--ease) both;
}
@keyframes plIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* Dos capas recortadas con la silueta del logo: base tenue + barrido cálido */
.pl-logo::before, .pl-logo::after {
  content: ""; position: absolute; inset: 0;
  -webkit-mask: url(../img/logo.png) center/contain no-repeat;
          mask: url(../img/logo.png) center/contain no-repeat;
}
.pl-logo::before { background: var(--text); opacity: .24; }
.pl-logo::after {
  background: linear-gradient(100deg,
    transparent 22%, rgba(255,255,255,.95) 42%, var(--accent-2) 52%, var(--accent) 60%, transparent 80%);
  background-size: 280% 100%;
  animation: plSweep 2.1s cubic-bezier(.5,0,.5,1) .25s infinite;
}
@keyframes plSweep { from { background-position: 190% 0; } to { background-position: -90% 0; } }

.pl-bar { width: 132px; height: 2px; border-radius: 99px; background: rgba(255,255,255,.10); overflow: hidden; }
.pl-bar span {
  display: block; height: 100%; width: 42%; border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: plBar 1.35s ease-in-out infinite;
}
@keyframes plBar { from { transform: translateX(-120%); } to { transform: translateX(320%); } }

.pl-tag {
  font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--dim);
  animation: plIn 1s var(--ease) .35s both;
}

/* Sin JS el precargador no debe dejar la página en blanco */
.no-js #preloader { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pl-logo::after { animation: none; background: var(--accent-2); }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.stuck {
  background: rgba(11,12,14,.82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }

.logo { display: inline-flex; align-items: center; }
.logo img { height: 34px; width: auto; opacity: .95; transition: opacity .18s; }
.logo:hover img { opacity: 1; }
.footer .logo img { height: 42px; }
@media (max-width: 480px) { .logo img { height: 28px; } }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14.5px; color: var(--muted); transition: color .16s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px;
  background: var(--accent); transition: right .25s var(--ease);
}
.nav-links a:hover::after { right: 0; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px; cursor: pointer; }
.nav-toggle svg { width: 18px; height: 18px; display: block; }

@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11,12,14,.97); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .22s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links a::after { display: none; }
  .nav-links .btn { margin-top: 16px; }
  .nav-toggle { display: block; }
  .nav-cta-desktop { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding-top: 100px; padding-bottom: 60px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #08090B; }
.hero-bg video, .hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.82) contrast(1.04) brightness(.68);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 12% 20%, rgba(11,12,14,.86), rgba(11,12,14,.42) 55%, transparent 78%),
    linear-gradient(180deg, rgba(11,12,14,.66) 0%, rgba(11,12,14,.20) 34%, rgba(11,12,14,.72) 78%, var(--bg) 100%);
}
@media (max-width: 760px) {
  .hero-bg::after { background: linear-gradient(180deg, rgba(11,12,14,.74) 0%, rgba(11,12,14,.62) 45%, rgba(11,12,14,.86) 80%, var(--bg) 100%); }
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(38px, 7vw, 82px); font-weight: 800; letter-spacing: -.035em; line-height: 1.03;
  max-width: 15ch; margin: 22px 0 24px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent-2) 10%, var(--accent) 55%, var(--accent-dk) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lead { max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(28px, 6vw, 64px);
  margin-top: clamp(52px, 8vw, 88px); padding-top: 34px; border-top: 1px solid var(--line);
}
.hero-stats div strong { display: block; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.03em; }
.hero-stats div span { font-size: 13px; color: var(--dim); letter-spacing: .04em; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 1;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint i { display: block; width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: drop 1.9s ease-in-out infinite; }
@keyframes drop { 0%,100% { opacity: .25; transform: scaleY(.5); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }
@media (max-width: 760px) { .scroll-hint { display: none; } }

/* ---------- Tira de problemas / valor ---------- */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.value-grid > div { background: var(--bg); padding: clamp(26px, 3.4vw, 40px); }
.value-grid h3 { margin: 16px 0 10px; }
.value-grid p { color: var(--muted); font-size: 15px; }
.value-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(201,164,106,.12); border: 1px solid rgba(201,164,106,.24); color: var(--accent); }
.value-icon svg { width: 20px; height: 20px; }
@media (max-width: 860px) { .value-grid { grid-template-columns: 1fr; } }

/* ---------- Módulos / capacidades ---------- */
.module { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: clamp(32px, 5vw, 68px); align-items: center; }
.module + .module { margin-top: clamp(64px, 8vw, 104px); padding-top: clamp(64px, 8vw, 104px); border-top: 1px solid var(--line); }
/* Invertido: la maqueta conserva la columna ancha */
.module.rev { grid-template-columns: minmax(0,1.18fr) minmax(0,.82fr); }
.module.rev .module-copy { order: 2; }
@media (max-width: 980px) {
  .module, .module.rev { grid-template-columns: 1fr; }
  .module.rev .module-copy { order: 0; }
}

.module-copy .tag {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(201,164,106,.3); background: rgba(201,164,106,.08);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.module-copy h3 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; letter-spacing: -.025em; margin-bottom: 16px; }
.module-copy p { color: var(--muted); }
.module-copy ul { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.module-copy li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.module-copy li svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: var(--accent); }

.stage {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0,0,0,.9);
}
.stage-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02);
}
.stage-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: block; }
.stage-bar .title { margin-left: 8px; font-size: 12.5px; color: var(--dim); letter-spacing: .04em; }
.stage-bar .live {
  margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ok); display: inline-flex; align-items: center; gap: 6px;
}
.stage-bar .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,.5); } 50% { opacity: .6; box-shadow: 0 0 0 6px rgba(74,222,128,0); } }
.stage-body { padding: clamp(16px, 2.4vw, 24px); }

/* ---------- Demo: inventario ---------- */
.inv-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--line-2); background: rgba(255,255,255,.02); color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; transition: .16s;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #14100A; font-weight: 600; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; display: block; }

.inv-legend { margin-left: auto; display: flex; gap: 14px; font-size: 12px; color: var(--dim); }
.inv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.inv-legend i { width: 8px; height: 8px; border-radius: 2px; display: block; }

.inv-grid { display: grid; gap: 22px; }
.inv-tower { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.inv-tower > header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600;
}
.inv-tower > header em { font-style: normal; color: var(--dim); font-weight: 400; font-size: 12px; }
.inv-floors { padding: 12px; display: grid; gap: 7px; }
.inv-floor { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; }
.inv-floor > b { font-size: 11px; color: var(--dim); font-weight: 600; text-align: right; }
.inv-units { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.inv-units.casas { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }

.unit {
  position: relative; border-radius: 8px; border: 1px solid var(--line-2);
  padding: 9px 6px; font-size: 11.5px; font-weight: 600; text-align: center; cursor: pointer;
  background: rgba(255,255,255,.03); color: var(--muted);
  transition: transform .14s var(--ease), border-color .14s, background .14s, opacity .18s;
}
.unit:hover { transform: translateY(-2px) scale(1.04); border-color: var(--text); color: var(--text); z-index: 2; }
.unit.s-disponible { background: rgba(74,222,128,.13); border-color: rgba(74,222,128,.4); color: #A7F3C6; }
.unit.s-separado   { background: rgba(251,191,36,.13); border-color: rgba(251,191,36,.4); color: #FCD98A; }
.unit.s-vendido    { background: rgba(248,113,113,.10); border-color: rgba(248,113,113,.3); color: #F5A9A9; }
.unit.dimmed { opacity: .18; pointer-events: none; }
.unit.sel { outline: 2px solid var(--accent); outline-offset: 2px; }
.unit.flash { animation: flash .9s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(201,164,106,.7); } 100% { box-shadow: 0 0 0 14px rgba(201,164,106,0); } }

.inv-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.kpi { flex: 1 1 130px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: rgba(255,255,255,.02); }
.kpi b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.kpi span { font-size: 11.5px; color: var(--dim); letter-spacing: .05em; text-transform: uppercase; }

/* Ficha flotante de unidad */
.unit-sheet {
  position: fixed; z-index: 400; right: 24px; bottom: 24px; width: min(320px, calc(100vw - 32px));
  border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(22,25,31,.97);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0,0,0,.6); padding: 18px;
  transform: translateY(14px); opacity: 0; pointer-events: none; transition: .24s var(--ease);
}
.unit-sheet.show { transform: none; opacity: 1; pointer-events: auto; }
.unit-sheet h4 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.unit-sheet .st { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.unit-sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 16px 0 4px; font-size: 13.5px; }
.unit-sheet dt { color: var(--dim); }
.unit-sheet dd { text-align: right; font-weight: 600; }
.unit-sheet .close { position: absolute; top: 12px; right: 12px; background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 18px; line-height: 1; }
.unit-sheet .close:hover { color: var(--text); }

/* ---------- Demo: comparador ---------- */
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .cmp { grid-template-columns: 1fr; } }
.cmp-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: rgba(255,255,255,.02); }
.cmp-card select {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.04);
  padding: 12px 14px; font-size: 14px; font-weight: 600; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398A0AB' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 15px;
}
.cmp-card select option { background: #16191F; }
.cmp-plan { aspect-ratio: 4/3; display: grid; place-items: center; background: #0E1014; border-bottom: 1px solid var(--line); padding: 10px; }
.cmp-plan svg { width: 100%; height: 100%; }
.cmp-rows { padding: 4px 14px 14px; }
.cmp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row span { color: var(--dim); min-width: 0; }
.cmp-row b { font-weight: 650; white-space: nowrap; text-align: right; }
@media (max-width: 1100px) { .cmp-row { font-size: 12.5px; } }
.cmp-row b.better { color: var(--accent); }
.cmp-row b.better::after { content: " ▲"; font-size: 9px; vertical-align: 2px; }

/* ---------- Demo: personalizador ---------- */
.pz { display: grid; grid-template-columns: 1fr 220px; gap: 16px; }
@media (max-width: 720px) { .pz { grid-template-columns: 1fr; } }
.pz-canvas { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #0E1014; aspect-ratio: 16/11; }
.pz-canvas svg { width: 100%; height: 100%; display: block; }
.pz-panel { display: grid; gap: 18px; align-content: start; }
.pz-group > label { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 9px; }
.sw-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw {
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; border: 2px solid transparent;
  outline: 1px solid var(--line-2); outline-offset: -1px; transition: .16s var(--ease); position: relative;
}
.sw:hover { transform: scale(1.08); }
.sw.on { border-color: var(--accent); outline-color: var(--accent); transform: scale(1.06); }
.pz-cost { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: rgba(201,164,106,.06); }
.pz-cost span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.pz-cost b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--accent-2); }

/* ---------- Demo: avance de obra ---------- */
.obra { display: grid; gap: 16px; }
.obra-login { max-width: 330px; margin: clamp(16px,4vw,40px) auto; display: grid; gap: 11px; text-align: center; }
.obra-login .av { width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 6px; background: rgba(201,164,106,.14); border: 1px solid rgba(201,164,106,.3); display: grid; place-items: center; color: var(--accent); }
.obra-login .av svg { width: 22px; height: 22px; }
.obra-login input {
  width: 100%; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: rgba(255,255,255,.03); font-size: 14px;
}
.obra-login input:focus { outline: 0; border-color: var(--accent); }
.obra-login .btn { width: 100%; }
.obra-login .hint { font-size: 11.5px; color: var(--dim); }

.obra-panel { display: none; gap: 16px; }
.obra-panel.show { display: grid; }
.obra-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.obra-head h4 { font-size: 16px; font-weight: 700; }
.obra-head p { font-size: 12.5px; color: var(--dim); }

.prog { display: grid; gap: 13px; }
.prog-item span { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.prog-item span em { font-style: normal; color: var(--dim); }
.prog-item span b { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; width: 0;
  background: linear-gradient(90deg, var(--accent-dk), var(--accent-2));
  transition: width 1.1s var(--ease); }

.obra-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 8px; }
.obra-shot { aspect-ratio: 4/3; border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden; position: relative; background: var(--surface-2); }
.obra-shot svg { width: 100%; height: 100%; display: block; }
.obra-shot em { position: absolute; left: 6px; bottom: 5px; font-style: normal; font-size: 10px; color: rgba(255,255,255,.8); text-shadow: 0 1px 4px #000; }

.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.tl-dot { width: 21px; height: 21px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; background: var(--bg); font-size: 10px; z-index: 1; }
.tl-item.done .tl-dot { background: rgba(74,222,128,.16); border-color: rgba(74,222,128,.45); color: var(--ok); }
.tl-item.now .tl-dot { background: rgba(201,164,106,.18); border-color: var(--accent); color: var(--accent); }
.tl-item h5 { font-size: 14px; font-weight: 650; }
.tl-item p { font-size: 12.5px; color: var(--dim); }

/* ---------- Demo: 360 ---------- */
.tour-shell { position: relative; aspect-ratio: 16/9; background: #05070A; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.tour-shell #psv { position: absolute; inset: 0; }
.tour-cover { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; cursor: pointer; }
.tour-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.tour-cover .play {
  position: relative; display: inline-flex; align-items: center; gap: 11px;
  background: rgba(11,12,14,.72); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 14px 26px; font-weight: 600; font-size: 15px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: .18s var(--ease);
}
.tour-cover:hover .play { border-color: var(--accent); color: var(--accent); transform: scale(1.03); }
.tour-cover .play svg { width: 18px; height: 18px; }
.tour-rooms { position: absolute; z-index: 6; left: 12px; bottom: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 7px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.tour-rooms.show { opacity: 1; pointer-events: auto; }
.tour-rooms button {
  border: 1px solid rgba(255,255,255,.24); background: rgba(11,12,14,.66); color: #fff;
  border-radius: 999px; padding: 7px 14px; font-size: 12.5px; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: .16s;
}
.tour-rooms button:hover { border-color: var(--accent); color: var(--accent); }
.tour-rooms button.on { background: var(--accent); border-color: var(--accent); color: #14100A; font-weight: 600; }

/* ---------- Demo: plantas ---------- */
.plan-shell { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #0E1014; }
.plan-shell .pin.has360 { background: var(--accent); box-shadow: 0 0 0 3px rgba(201,164,106,.28), 0 3px 10px rgba(0,0,0,.5); }
.plan-shell .pin.plain { background: rgba(20,22,26,.9); color: #fff; border-color: rgba(255,255,255,.75); }
.plan-shell .pin.plain::after { border-color: rgba(255,255,255,.5); }
.pin-tip .go { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.plan-shell img { width: 100%; display: block; }
.pin {
  position: absolute; transform: translate(-50%,-50%); z-index: 3;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: #14100A; border: 2px solid #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(0,0,0,.35); transition: transform .16s var(--ease);
}
.pin::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--accent); animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.pin:hover { transform: translate(-50%,-50%) scale(1.22); }
.pin-tip {
  position: absolute; z-index: 4; transform: translate(-50%, calc(-100% - 20px));
  background: rgba(11,12,14,.94); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 9px 13px; font-size: 12.5px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .18s; color: var(--text);
}
.pin-tip.show { opacity: 1; }
.pin-tip b { display: block; font-size: 13px; }
.pin-tip em { font-style: normal; color: var(--dim); font-size: 11.5px; }

/* ---------- Galería ---------- */
.gal-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
@media (max-width: 980px) { .gallery { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.gal-item {
  position: relative; overflow: hidden; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface-2);
  aspect-ratio: 3/2; cursor: pointer; padding: 0; display: block;
  /* sin esto la imagen intrínseca desborda su celda y estira la fila */
  width: 100%; min-width: 0; align-self: start;
  transition: transform .3s var(--ease), border-color .2s, opacity .3s;
}
/* Pieza de apertura a todo el ancho: evita huecos del mosaico */
.gal-item.lead-shot { grid-column: 1 / -1; aspect-ratio: 16/5.4; }
@media (max-width: 700px) { .gal-item.lead-shot { aspect-ratio: 16/8; } }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease), filter .3s; }
.gal-item:hover { border-color: var(--accent); }
.gal-item:hover img { transform: scale(1.06); }
.gal-item.hidden { display: none; }
.gal-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 26px 14px 12px; text-align: left;
  font-size: 13px; font-weight: 600; letter-spacing: -.005em; color: #fff;
  background: linear-gradient(transparent, rgba(6,7,9,.86));
  opacity: 0; transform: translateY(6px); transition: .25s var(--ease);
}
.gal-item:hover figcaption, .gal-item:focus-visible figcaption { opacity: 1; transform: none; }
.gal-item .badge360 {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(11,12,14,.72); border: 1px solid var(--accent); color: var(--accent);
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; padding: 4px 9px; border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 500; display: grid; place-items: center;
  background: rgba(6,7,9,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); padding: 56px 20px;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox figure { max-width: min(1200px, 94vw); max-height: 100%; display: grid; gap: 12px; }
.lightbox img { max-height: calc(100vh - 150px); width: auto; margin-inline: auto; border-radius: var(--r); }
.lightbox figcaption { text-align: center; font-size: 14px; color: var(--muted); }
.lb-close, .lb-nav {
  position: absolute; z-index: 3; background: rgba(255,255,255,.06); color: #fff;
  border: 1px solid var(--line-2); border-radius: 50%; cursor: pointer;
  width: 44px; height: 44px; display: grid; place-items: center; font-size: 26px; line-height: 1;
  transition: .16s;
}
.lb-close:hover, .lb-nav:hover { background: var(--accent); color: #14100A; border-color: var(--accent); }
.lb-close { top: 18px; right: 18px; font-size: 22px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
@media (max-width: 620px) { .lb-nav { top: auto; bottom: 14px; transform: none; } .lb-nav.prev { left: 30%; } .lb-nav.next { right: 30%; } }

/* ---------- Paquetes ---------- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: stretch; }
@media (max-width: 880px) { .plans { grid-template-columns: 1fr; } }

.plan {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(26px, 3.4vw, 40px); background: linear-gradient(170deg, var(--surface), var(--bg-2));
  display: grid; gap: 22px; align-content: start; height: 100%;
}
.plan.featured {
  border-color: rgba(201,164,106,.42);
  background: linear-gradient(170deg, rgba(201,164,106,.09), var(--bg-2) 55%);
  box-shadow: 0 30px 80px -40px rgba(201,164,106,.5);
}
.plan-badge {
  position: absolute; top: -12px; right: 26px;
  background: var(--accent); color: #14100A; font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px;
}
.plan-no { font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.plan.featured .plan-no { color: var(--accent); }
.plan h3 { font-size: clamp(24px, 3vw, 31px); font-weight: 800; letter-spacing: -.025em; margin-top: 4px; }
.plan > p { color: var(--muted); font-size: 15px; }
.plan-feats { list-style: none; display: grid; gap: 13px; border-top: 1px solid var(--line); padding-top: 22px; }
.plan-feats li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; }
.plan-feats li svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: var(--accent); }
.plan-feats li b { font-weight: 650; }
.plan-feats li em { font-style: normal; color: var(--muted); display: block; font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
.plan-feats li.inherit svg { color: var(--dim); }
.plan-feats .head {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
  padding-top: 6px;
}
.plan .btn { width: 100%; margin-top: auto; }

/* ---------- Tabla comparativa ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.cmp-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.cmp-table th, .cmp-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.cmp-table thead th { background: rgba(255,255,255,.03); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.cmp-table thead th:not(:first-child) { text-align: center; }
.cmp-table td:not(:first-child) { text-align: center; width: 20%; }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.cmp-table .yes { color: var(--ok); font-size: 17px; }
.cmp-table .no { color: var(--dim); font-size: 17px; }
.cmp-table th.hi { color: var(--accent); }

/* ---------- Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--bg); padding: clamp(24px,3vw,34px); }
.step b { display: block; font-size: 12px; letter-spacing: .16em; color: var(--accent); margin-bottom: 14px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-size: clamp(16px,1.9vw,18px); font-weight: 600; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 300; color: var(--accent); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq .ans { padding: 0 44px 24px 0; color: var(--muted); max-width: 74ch; }

/* ---------- CTA final ---------- */
.cta-band {
  border: 1px solid rgba(201,164,106,.3); border-radius: var(--r-lg);
  background: radial-gradient(90% 130% at 15% 0%, rgba(201,164,106,.14), transparent 60%), var(--surface);
  padding: clamp(36px, 6vw, 72px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px,4vw,56px); align-items: center;
}
@media (max-width: 880px) { .cta-band { grid-template-columns: 1fr; } }
.cta-band h2 { font-size: clamp(27px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 16px; }
.cta-form { display: grid; gap: 11px; }
.cta-form input, .cta-form select, .cta-form textarea {
  width: 100%; padding: 13px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03); font-size: 14.5px;
}
.cta-form textarea { resize: vertical; min-height: 84px; }
.cta-form input:focus, .cta-form select:focus, .cta-form textarea:focus { outline: 0; border-color: var(--accent); background: rgba(201,164,106,.05); }
.cta-form select option { background: #16191F; }
.cta-form .ok { font-size: 13.5px; color: var(--ok); display: none; }
.cta-form.sent .ok { display: block; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 54px 0 40px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 26px; font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-bot { margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: 12.5px; color: var(--dim); }

/* ---------- Reveal ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; } .rv-d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
