/* KSANET — Promociones v2 (atlas + fichas archivadas) */

/* ─── HERO ──────────────────────────────────────────────── */
.ph-hero {
  padding: clamp(60px, 9vw, 110px) 0 clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(1200px 600px at 12% 0%, rgba(140,30,34,0.06), transparent 60%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.ph-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(15,13,12,0.025) 39px 40px);
  pointer-events: none;
}
.ph-hero-grid {
  display: grid; grid-template-columns: 1.45fr 1fr;
  gap: 64px; align-items: end;
  position: relative; z-index: 1;
}
@media (max-width: 980px) {
  .ph-hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* Rule: tickerline editorial */
.ph-rule {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.ph-rule-l { white-space: nowrap; }
.ph-rule-d { color: var(--brand); }
.ph-rule-line {
  flex: 1 1 auto; height: 1px; background: var(--line-2);
  min-width: 40px; max-width: 120px;
}

.ph-hero-title {
  font-family: var(--tight); font-weight: 300;
  font-size: clamp(46px, 7.6vw, 110px);
  line-height: 0.94; letter-spacing: -0.04em;
  margin: 0; text-wrap: balance;
}
.ph-hero-title em {
  font-style: italic; font-family: var(--serif);
  color: var(--brand); font-weight: 400;
}
.ph-hero-lede {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55; color: var(--ink-2);
  max-width: 52ch; margin: 28px 0 30px;
}
.ph-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Stack stats */
.ph-stack {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 28px 30px 14px;
  position: relative;
}
.ph-stack::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--brand);
}
.ph-stack-h { padding-bottom: 18px; border-bottom: 1px dashed var(--line); }
.ph-stack-rows { display: flex; flex-direction: column; }
.ph-stack-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  gap: 18px;
}
.ph-stack-row:last-child { border-bottom: none; }
.ph-stack-n {
  font-family: var(--tight); font-weight: 300;
  font-size: clamp(36px, 4.2vw, 56px);
  letter-spacing: -0.04em; line-height: 1;
  color: var(--ink);
}
.ph-stack-l {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); text-align: right;
  max-width: 130px;
}

/* Reel inferior */
.ph-reel {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin-top: 56px;
  position: relative; z-index: 1;
}
@media (max-width: 980px) {
  .ph-reel { grid-template-columns: repeat(4, 1fr); }
  .ph-reel-cell:nth-child(n+5) { display: none; }
}
.ph-reel-cell {
  aspect-ratio: 4 / 3;
  background-size: cover; background-position: center;
  position: relative; overflow: hidden;
  filter: grayscale(0.35) contrast(1.02);
  transition: filter .35s, transform .35s;
}
.ph-reel-cell::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15,13,12,0.6));
}
.ph-reel-cell:hover { filter: none; transform: translateY(-2px); }
.ph-reel-tag {
  position: absolute; bottom: 10px; left: 10px; z-index: 2;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #f3e8da;
}

/* ─── FILTROS V2 ─────────────────────────────────────────── */
.filters-v2 {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 26px 30px;
}
@media (max-width: 880px) {
  .filters-v2 { grid-template-columns: 1fr; }
}
.filters-v2-inner { display: flex; flex-direction: column; gap: 14px; }
.filter-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.filter-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); min-width: 100px;
}
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 13px;
  border: 1px solid var(--line);
  background: transparent; color: var(--ink-2);
  transition: all .2s;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.filter-result {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: center;
  padding-left: 32px;
  border-left: 1px solid var(--line);
  min-width: 130px;
}
@media (max-width: 880px) {
  .filter-result {
    border-left: none; border-top: 1px dashed var(--line);
    padding-left: 0; padding-top: 14px;
    align-items: flex-start;
  }
}
.filter-count {
  font-family: var(--tight); font-weight: 300;
  font-size: 56px; letter-spacing: -0.04em; line-height: 1;
  color: var(--brand);
  display: flex; align-items: baseline; gap: 12px;
}
.filter-count-l {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
.list-col { display: flex; flex-direction: column; gap: 36px; }

/* ─── ATLAS SECTION (full-width destacado) ─────────────── */
.atlas-section {
  background:
    radial-gradient(1200px 600px at 90% 0%, rgba(140,30,34,0.05), transparent 60%),
    var(--paper);
}
.atlas-section-h {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 56px; align-items: end;
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.atlas-section-h .h-1 em {
  font-style: italic; font-family: var(--serif);
  color: var(--brand); font-weight: 400;
}
.atlas-section-lede { max-width: 44ch; }
@media (max-width: 900px) {
  .atlas-section-h { grid-template-columns: 1fr; gap: 24px; }
}

.atlas-feature {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.atlas-feature-map { border-right: 1px solid var(--ink); }
.atlas-feature-map .atlas { border: none; }
.atlas-feature-list {
  display: flex; flex-direction: column;
  background: #fbf8f2;
}
.atlas-feature-list-h {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.atlas-feature-list-rows {
  display: flex; flex-direction: column;
  flex: 1 1 auto;
}
.afl-row {
  display: grid;
  grid-template-columns: 56px 1fr auto 28px;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  transition: background .2s, padding-left .2s;
  position: relative;
}
.afl-row:last-child { border-bottom: none; }
.afl-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: transparent; transition: background .2s;
}
.afl-row:hover, .afl-row.is-hover {
  background: var(--paper);
  padding-left: 28px;
}
.afl-row:hover::before, .afl-row.is-hover::before { background: var(--brand); }

.afl-num {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.22em; color: var(--muted);
  font-weight: 600;
}
.afl-row:hover .afl-num, .afl-row.is-hover .afl-num { color: var(--brand); }
.afl-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.afl-name {
  font-family: var(--tight); font-weight: 500;
  font-size: 18px; letter-spacing: -0.015em;
  color: var(--ink); line-height: 1.1;
}
.afl-loc {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.afl-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.afl-pill .dot { width: 8px; height: 8px; display: inline-block; }
.afl-pill.comercial .dot { background: var(--brand); }
.afl-pill.obra .dot { background: var(--gold); }
.afl-pill.proxima .dot { background: var(--moss); }
.afl-pill.entregada .dot { background: var(--silver-2); }
.afl-arr {
  font-family: var(--tight); font-size: 18px;
  color: var(--line-2); text-align: right;
  transition: transform .2s, color .2s;
}
.afl-row:hover .afl-arr, .afl-row.is-hover .afl-arr { color: var(--brand); transform: translateX(3px); }

@media (max-width: 980px) {
  .atlas-feature { grid-template-columns: 1fr; }
  .atlas-feature-map { border-right: none; border-bottom: 1px solid var(--ink); }
}

/* ─── ATLAS ─────────────────────────────────────────────── */
.atlas {
  background: var(--paper);
  border: 1px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.atlas-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink); color: #f3e8da;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.atlas-head-l { display: flex; flex-direction: column; gap: 4px; }
.atlas-head-eyebrow { font-weight: 600; }
.atlas-head-coord { color: rgba(243,232,218,0.6); letter-spacing: 0.16em; }
.atlas-head-r { font-weight: 600; }

.atlas-canvas {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #ece6d8;
}
.atlas-svg { width: 100%; height: 100%; display: block; }
.atlas-leaflet {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  filter: saturate(0.85) contrast(1.05);
}
.atlas-leaflet .leaflet-control-attribution {
  background: rgba(251,248,242,0.85);
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.04em; padding: 2px 6px;
  color: var(--muted);
}
.atlas-leaflet .leaflet-control-attribution a { color: var(--ink-2); }
.atlas-leaflet .leaflet-control-zoom a {
  background: rgba(251,248,242,0.95);
  color: var(--ink); border: 1px solid var(--line);
  font-family: var(--mono); font-weight: 500;
}
.atlas-leaflet .leaflet-control-zoom a:hover { background: var(--ink); color: var(--paper); }

/* Pin marcador numerado */
.atlas-pin { background: transparent; border: none; }
.atlas-pin-num {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(251,248,242,0.96);
  border: 1.5px solid var(--pin-color, var(--brand));
  font-family: var(--mono); font-size: 12px;
  font-weight: 600; letter-spacing: 0.05em;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(15,13,12,0.18), 0 1px 2px rgba(15,13,12,0.1);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.atlas-pin.is-hover .atlas-pin-num,
.atlas-pin:hover .atlas-pin-num {
  transform: scale(1.18);
  background: var(--pin-color, var(--brand));
  color: var(--paper);
  box-shadow: 0 8px 22px rgba(15,13,12,0.28);
}

.atlas-region {
  filter: drop-shadow(0 1px 0 rgba(15,13,12,0.05));
}

.atlas-legend {
  position: absolute; left: 14px; bottom: 14px;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2);
  background: rgba(251,248,242,0.92);
  border: 1px solid var(--line);
  padding: 10px 12px;
  backdrop-filter: blur(4px);
}
.atlas-legend span { display: inline-flex; align-items: center; gap: 7px; }
.atlas-legend .dot { width: 7px; height: 7px; display: inline-block; }

.atlas-compass {
  position: absolute; right: 14px; top: 14px;
  width: 54px; height: 54px;
  background: rgba(251,248,242,0.92);
  border: 1px solid var(--line);
  padding: 4px;
  backdrop-filter: blur(4px);
}
.atlas-compass svg { width: 100%; height: 100%; display: block; }

.atlas-focus {
  display: grid; grid-template-columns: 110px 1fr;
  border-top: 1px solid var(--ink);
  background: #0c0a09; color: #f3e8da;
  min-height: 110px;
}
.atlas-focus-img {
  background-color: var(--brand);
  background-size: cover; background-position: center;
  position: relative;
}
.atlas-focus-num {
  position: absolute; top: 8px; left: 10px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; color: #f3e8da; font-weight: 600;
  background: rgba(15,13,12,0.55);
  padding: 4px 7px;
}
.atlas-focus-body {
  padding: 16px 20px;
  display: flex; flex-direction: column; justify-content: center;
  gap: 6px;
}
.atlas-focus-loc {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(243,232,218,0.6);
}
.atlas-focus-name {
  font-family: var(--tight); font-weight: 400;
  font-size: 22px; letter-spacing: -0.02em;
  line-height: 1.05;
}
.atlas-focus-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(243,232,218,0.78);
  margin-top: 4px;
}

/* Atlas aside */
.atlas-aside {
  background: var(--paper); border: 1px solid var(--line);
  padding: 22px 24px;
}
.atlas-aside-cta {
  width: 100%; justify-content: space-between;
}

/* ─── FICHA (cards archivadas) ──────────────────────────── */
.fcard {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  position: relative;
  transition: transform .3s ease, border-color .25s, box-shadow .3s;
}
.fcard:hover, .fcard.is-hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -28px rgba(15,13,12,0.4);
}

.fcard-stripe {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbf8f2;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.fcard-stripe-num { color: var(--ink); font-weight: 600; }
.fcard-stripe-num span { color: var(--line-2); margin: 0 4px; font-weight: 400; }
.fcard-stripe-code { letter-spacing: 0.16em; }

.fcard-grid {
  display: grid; grid-template-columns: 360px 1fr;
}
@media (max-width: 820px) {
  .fcard-grid { grid-template-columns: 1fr; }
}

.fcard-img {
  position: relative;
  background-size: cover; background-position: center;
  min-height: 360px;
}
@media (max-width: 820px) {
  .fcard-img { min-height: 0; aspect-ratio: 16/10; }
}
.fcard-status {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #f3e8da; padding: 7px 11px;
  background: rgba(15,13,12,0.6);
  backdrop-filter: blur(4px);
}
.fcard-status .dot {
  display: inline-block; width: 6px; height: 6px;
  background: #6abf7a; margin-right: 7px; vertical-align: middle;
}
.fcard-status.upcoming .dot { background: var(--gold); }
.fcard-status.delivered .dot { background: var(--silver); }
.fcard-tipo {
  position: absolute; bottom: 14px; left: 14px;
  font-family: var(--serif); font-style: italic;
  font-size: 22px; color: #fbf8f2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.fcard-body {
  padding: 28px 32px 30px;
  display: flex; flex-direction: column;
}
.fcard-loc {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.fcard-name {
  font-family: var(--tight); font-weight: 400;
  font-size: clamp(28px, 2.4vw, 36px);
  letter-spacing: -0.025em; line-height: 1.02;
  margin: 0;
}
.fcard-desc {
  font-size: 14px; line-height: 1.6; color: var(--ink-2);
  margin: 16px 0 20px; max-width: 56ch;
}

.fcard-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.fcard-stats > div {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px 14px 0;
  border-right: 1px dashed var(--line);
}
.fcard-stats > div:last-child { border-right: none; padding-right: 0; }
.fcard-stats .lbl {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
}
.fcard-stats .val {
  font-family: var(--tight); font-weight: 500;
  font-size: 20px; letter-spacing: -0.01em;
  color: var(--ink);
}
.fcard-stats .val em {
  font-style: normal; font-family: var(--mono);
  font-size: 11px; color: var(--muted); font-weight: 400;
  margin-left: 2px;
}

.fcard-progress {
  margin-bottom: 22px;
}
.fcard-progress-bar {
  height: 3px; background: var(--line);
  position: relative; overflow: hidden;
}
.fcard-progress-bar span {
  display: block; height: 100%;
  background: var(--brand);
  transition: width .5s ease;
}
.fcard-progress-meta {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}

.fcard-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.fcard-foot-l {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.fcard-price {
  font-family: var(--tight); font-weight: 500;
  font-size: 28px; color: var(--brand); letter-spacing: -0.02em;
  line-height: 1;
}
.fcard-cta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); display: inline-flex; align-items: center; gap: 8px;
}
.fcard:hover .btn-arrow { transform: translateX(4px); }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  padding: 60px 40px;
  border: 1px dashed var(--line-2);
  text-align: center;
}

/* ─── ÍNDICE TABULAR (sección oscura) ───────────────────── */
.ph-index-h { margin-bottom: 36px; }
.ph-index-h .h-2 em {
  font-family: var(--serif); font-style: italic;
  color: rgba(243,232,218,0.7); font-weight: 400;
}

.ph-index-table {
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(243,232,218,0.18);
}
.ph-index-row {
  display: grid;
  grid-template-columns: 50px 2fr 1.2fr 1fr 0.8fr 1.2fr 1fr 0.6fr 32px;
  align-items: center;
  gap: 18px;
  padding: 18px 4px;
  border-bottom: 1px solid rgba(243,232,218,0.12);
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(243,232,218,0.85);
  transition: background .2s, color .2s;
}
.ph-index-row:not(.ph-index-head):hover {
  background: rgba(243,232,218,0.04);
  color: #f3e8da;
}
.ph-index-head {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(243,232,218,0.5);
  padding: 14px 4px;
}
.ph-index-num {
  font-family: var(--mono); font-weight: 600; color: rgba(243,232,218,0.5);
  letter-spacing: 0.1em;
}
.ph-index-name {
  font-family: var(--tight); font-weight: 500;
  font-size: 18px; letter-spacing: -0.015em;
  color: #f3e8da;
}
.ph-index-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.ph-index-pill .dot {
  width: 6px; height: 6px; display: inline-block;
}
.ph-index-pill.comercial .dot { background: var(--brand-soft); }
.ph-index-pill.obra .dot { background: var(--gold); }
.ph-index-pill.proxima .dot { background: var(--moss); }
.ph-index-pill.entregada .dot { background: var(--silver); }
.ph-index-price { color: #f3e8da; font-weight: 500; }
.ph-index-cert {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--brand); color: #f3e8da;
  font-family: var(--tight); font-weight: 500;
  font-size: 14px; letter-spacing: 0;
}
.ph-index-arr {
  font-family: var(--tight); font-size: 18px;
  color: rgba(243,232,218,0.4);
  text-align: right;
}
.ph-index-row:not(.ph-index-head):hover .ph-index-arr {
  color: #f3e8da; transform: translateX(3px); transition: transform .2s, color .2s;
}

@media (max-width: 1100px) {
  .ph-index-row {
    grid-template-columns: 36px 1.6fr 1fr 0.8fr 1fr 32px;
    font-size: 11px;
  }
  .ph-index-row > :nth-child(4),
  .ph-index-row > :nth-child(5),
  .ph-index-row > :nth-child(8) { display: none; }
  .ph-index-name { font-size: 16px; }
}
