/*! SDHome RD — estilos del sitio. Tokens + componentes del Design System + maquetación. Mobile-first. */

/* Fuentes base (la Configuración general puede cambiarlas) */
@font-face { font-family: "Jost"; src: url("../fonts/jost-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("../fonts/great-vibes-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* SDHome RD — variables de tokens.json (tema claro único) */
:root {
  --brand-earth: #583e19;
  --brand-gold: #8b6a3e;
  --brand-sand: #e8d9bc;
  --brand-leaf: #4f6b3f;
  --surface-0: #ffffff;
  --surface-100: #faf6ef;
  --surface-200: #f2ebdf;
  --surface-inverse: #3d2a10;
  --ink: #2b1f0e;
  --ink-muted: #5e4b33;
  --accent-text: #7a5629;
  --ink-inverse: #faf6ef;
  --ink-inverse-muted: #dccbae;
  --accent-inverse: #e3c58f;
  --action: #583e19;
  --action-hover: #43300f;
  --on-action: #ffffff;
  --line: #e2d6c2;
  --line-strong: #8f7a5b;
  --focus-ring: #1d5a86;
  --focus-ring-inverse: #f3d79c;
  --scrim: rgba(31, 22, 9, 0.8);
  --status-preventa-bg: #f3e4c6;
  --status-preventa-fg: #6b4a12;
  --status-construccion-bg: #e1ead9;
  --status-construccion-fg: #2f4a28;
  --status-vendido-bg: #e9e5df;
  --status-vendido-fg: #4a443c;
  --tag-reventa-bg: #e0e8ee;
  --tag-reventa-fg: #24465e;
  --danger: #a12b1a;
  --success: #2f5a2c;
  --shadow-card: 0 1px 2px rgba(43, 31, 14, 0.06), 0 4px 16px rgba(43, 31, 14, 0.06);
  --shadow-raised: 0 8px 28px rgba(43, 31, 14, 0.16);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px; --radius-pill: 999px;
  --tap-target: 48px; --container: 1200px; --measure: 68ch;
  --font-title: "Jost", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --title-weight: 300;
  --base-size: 16px;
  --font-sans: "Jost", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --font-script: "Great Vibes", "Snell Roundhand", cursive;
}


/* SDHome RD — componentes (mobile-first). Valores solo vía tokens. */

.sd, .sd *, .sd *::before, .sd *::after { box-sizing: border-box; }
.sd { font-family: var(--font-sans); font-size: var(--base-size, 16px); line-height: 1.625; color: var(--ink); -webkit-font-smoothing: antialiased; }
.sd img { max-width: 100%; display: block; }
/* Enlaces en texto: :where() deja especificidad 0 para que las clases de componente (.sd-btn, .sd-wa…) siempre ganen. */
:where(.sd) :where(a) { color: var(--accent-text); text-underline-offset: 3px; }
.sd :focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sd-inverse :focus-visible, .sd-on-photo :focus-visible { outline-color: var(--focus-ring-inverse); }
.sd-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sd-skip { position: absolute; left: var(--space-4); top: -100px; background: var(--action); color: var(--on-action); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); z-index: 10; }
.sd-skip:focus { top: var(--space-2); }

/* Tipografía utilitaria */
.sd-script { font-family: var(--font-script); font-weight: 400; color: var(--accent-text); font-size: 40px; line-height: 1.15; display: block; }
.sd-eyebrow { font-size: 13px; line-height: 1.4; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); margin: 0; }
.sd-display { font-size: 36px; line-height: 1.1; font-weight: 300; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.sd-price { font-size: 22px; line-height: 1.2; font-weight: 600; color: var(--ink); margin: 0; }
.sd-price small { font-size: 14px; font-weight: 400; color: var(--ink-muted); }
.sd-muted { color: var(--ink-muted); }

/* Button */
.sd-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tap-target); padding: var(--space-3) var(--space-5); border: 2px solid transparent; border-radius: var(--radius-sm); font: 500 16px/1 var(--font-sans); letter-spacing: 0.04em; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.sd-btn svg { width: 20px; height: 20px; flex: none; }
.sd-btn--primary { background: var(--action); color: var(--on-action); }
.sd-btn--primary:hover { background: var(--action-hover); }
.sd-btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.sd-btn--secondary:hover { background: var(--surface-200); }
.sd-btn--inverse { background: var(--ink-inverse); color: var(--surface-inverse); }
.sd-btn--outline-inverse { background: transparent; color: var(--ink-inverse); border-color: var(--ink-inverse); }
.sd-btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.sd-btn--block { width: 100%; }
.sd-btn[disabled], .sd-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .sd * { transition: none !important; scroll-behavior: auto !important; } }

/* StatusBadge */
.sd-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); font: 600 12px/1.4 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.sd-badge::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.sd-badge--preventa { background: var(--status-preventa-bg); color: var(--status-preventa-fg); }
.sd-badge--preventa::before { transform: rotate(45deg); }
.sd-badge--construccion { background: var(--status-construccion-bg); color: var(--status-construccion-fg); }
.sd-badge--construccion::before { border-radius: 2px 2px 8px 8px; }
.sd-badge--vendido { background: var(--status-vendido-bg); color: var(--status-vendido-fg); }
.sd-badge--vendido::before { border-radius: 50%; }
.sd-badge--reventa { background: var(--tag-reventa-bg); color: var(--tag-reventa-fg); }
.sd-badge--reventa::before { width: 10px; height: 2px; }

/* Specs (hab, baños, m², parqueo) */
.sd-specs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); color: var(--ink-muted); font-size: 14px; line-height: 1.45; }
.sd-specs li { display: inline-flex; align-items: center; gap: 6px; }
.sd-specs svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* PropertyCard */
.sd-card { position: relative; display: flex; flex-direction: column; background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-card); overflow: hidden; transition: box-shadow .2s ease; }
.sd-card:hover { box-shadow: var(--shadow-raised); }
.sd-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--brand-sand); }
.sd-card__media img { width: 100%; height: 100%; object-fit: cover; }
.sd-card__badges { position: absolute; left: var(--space-3); top: var(--space-3); display: flex; gap: var(--space-2); flex-wrap: wrap; }
.sd-card__body { display: grid; gap: var(--space-2); padding: var(--space-4); }
.sd-card__title { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 500; }
.sd-card__title a { color: var(--ink); text-decoration: none; }
.sd-card__title a::after { content: ""; position: absolute; inset: 0; }
.sd-card__title a:hover { text-decoration: underline; }
.sd-card__title a:focus-visible { outline: none; }
.sd-card:focus-within { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sd-card--sold .sd-card__media img { filter: grayscale(.6); }
@media (min-width: 600px) { .sd-card__body { padding: var(--space-5); } }
.sd-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 600px) { .sd-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .sd-grid { grid-template-columns: repeat(3, 1fr); } }

/* Placeholder (proyectos/fotos pendientes) */
.sd-placeholder { position: relative; display: grid; place-items: center; text-align: center; gap: var(--space-2); padding: var(--space-5); background: var(--brand-sand); color: var(--brand-earth); overflow: hidden; }
.sd-placeholder svg.sd-leaves { position: absolute; inset: 0; width: 100%; height: 100%; }
.sd-placeholder .sd-leaves path { fill: var(--brand-gold); opacity: .22; }
.sd-placeholder__text { position: relative; font-size: 14px; line-height: 1.45; font-weight: 500; }

/* ProjectHero */
.sd-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 520px; color: var(--ink-inverse); overflow: hidden; isolation: isolate; }
.sd-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.sd-hero::before { content: ""; position: absolute; inset: 0; background: var(--scrim); z-index: -1; }
.sd-hero__content { align-self: end; display: grid; gap: var(--space-3); padding: var(--space-7) var(--space-4) var(--space-6); max-width: var(--container); width: 100%; margin-inline: auto; }
.sd-hero .sd-script { color: var(--accent-inverse); font-size: 48px; line-height: 1.1; }
.sd-hero .sd-display { color: var(--ink-inverse); }
.sd-hero p { margin: 0; font-size: 18px; line-height: 1.6; max-width: 40ch; }
.sd-hero__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 15px; color: var(--ink-inverse); }
.sd-hero__actions { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); }
.sd-hero--soon { background: var(--surface-inverse); }
.sd-hero--soon::before { display: none; }
@media (min-width: 600px) { .sd-hero__actions { flex-direction: row; } }
@media (min-width: 900px) {
  .sd-hero { min-height: 640px; }
  .sd-hero__content { padding: var(--space-9) var(--space-6) var(--space-8); }
  .sd-hero .sd-script { font-size: 72px; }
  .sd-hero .sd-display { font-size: 56px; }
}

/* SiteHeader */
.sd-header { position: sticky; top: 0; z-index: 5; background: var(--surface-100); border-bottom: 1px solid var(--line); }
.sd-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 64px; padding: 0 var(--space-4); max-width: var(--container); margin-inline: auto; }
.sd-wordmark { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1; }
.sd-wordmark b { font-weight: 300; font-size: 22px; letter-spacing: .04em; }
.sd-wordmark span { font-family: var(--font-script); font-size: 18px; color: var(--accent-text); margin-top: 2px; }
.sd-menu-btn { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap-target); min-width: var(--tap-target); padding: 0 var(--space-3); background: transparent; color: var(--ink); border: 2px solid var(--line-strong); border-radius: var(--radius-sm); font: 500 15px/1 var(--font-sans); cursor: pointer; }
.sd-menu-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }
.js .sd-nav { display: none; }
html:not(.js) .sd-menu-btn { display: none; }
html:not(.js) .sd-nav { flex: 0 0 100%; padding-bottom: var(--space-4); }
.sd-nav ul { list-style: none; margin: 0; padding: 0; }
.sd-nav ul a { display: flex; align-items: center; min-height: var(--tap-target); text-decoration: none; color: var(--ink); font-size: 16px; letter-spacing: .04em; }
.sd-nav ul a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; color: var(--accent-text); }
.sd-header__bar { flex-wrap: wrap; }
.sd-header[data-open="true"] .sd-nav { display: block; flex: 0 0 calc(100% + 2 * var(--space-4)); margin: 0 calc(-1 * var(--space-4)); background: var(--surface-inverse); padding: var(--space-3) var(--space-4) var(--space-5); }
.sd-header[data-open="true"] .sd-nav ul a { color: var(--ink-inverse); font-size: 20px; border-bottom: 1px solid rgba(255,255,255,.14); }
.sd-header[data-open="true"] .sd-nav ul a[aria-current="page"] { color: var(--accent-inverse); }
.sd-header[data-open="true"] .sd-nav :focus-visible { outline-color: var(--focus-ring-inverse); }
.sd-header .sd-nav__cta { margin-top: var(--space-4); }
/* En el panel oscuro del menú móvil el CTA se invierte para mantener contraste */
.sd-header[data-open="true"] .sd-nav__cta { background: var(--ink-inverse); color: var(--surface-inverse); }
@media (min-width: 900px) {
  .sd-menu-btn { display: none; }
  .sd-header__bar { flex-wrap: nowrap; }
  .sd-header .sd-nav, .sd-header[data-open="true"] .sd-nav { display: flex; align-items: center; flex: 0 1 auto; margin: 0; background: none; padding: 0; }
  .sd-nav ul { display: flex; gap: var(--space-5); }
  .sd-header[data-open="true"] .sd-nav ul a { color: var(--ink); font-size: 16px; border: 0; }
  .sd-header[data-open="true"] .sd-nav ul a[aria-current="page"] { color: var(--accent-text); }
  .sd-header .sd-nav__cta, .sd-header[data-open="true"] .sd-nav__cta { margin: 0 0 0 var(--space-5); background: var(--action); color: var(--on-action); }
}

/* FilterBar */
.sd-filters { display: grid; gap: var(--space-4); padding: var(--space-4); background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md); }
.sd-filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.sd-filters legend, .sd-label { font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--ink); margin-bottom: var(--space-2); padding: 0; }
.sd-chips { display: flex; gap: var(--space-2); overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; }
.sd-chip { flex: none; min-height: 44px; padding: 0 var(--space-4); background: var(--surface-200); color: var(--ink); border: 2px solid var(--line-strong); border-radius: var(--radius-pill); font: 500 15px/1 var(--font-sans); cursor: pointer; }
.sd-chip[aria-pressed="true"] { background: var(--action); color: var(--on-action); border-color: var(--action); }
.sd-chip[aria-pressed="true"]::before { content: "✓ "; content: "✓ " / ""; }
.sd-filters__row { display: grid; gap: var(--space-4); }
.sd-filters__count { margin: 0; font-size: 14px; color: var(--ink-muted); }
@media (min-width: 600px) { .sd-filters__row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .sd-filters { padding: var(--space-5); } .sd-filters__row { grid-template-columns: repeat(3, 1fr) auto; align-items: end; } }

/* TextField */
.sd-field { display: grid; gap: 6px; }
.sd-field label, .sd-field .sd-label { margin: 0; }
.sd-req { color: var(--danger); }
.sd-input, .sd-select, .sd-textarea { width: 100%; min-height: var(--tap-target); padding: var(--space-3) 14px; background: var(--surface-0); color: var(--ink); border: 2px solid var(--line-strong); border-radius: var(--radius-sm); font: 400 16px/1.4 var(--font-sans); }
.sd-textarea { min-height: 120px; resize: vertical; }
.sd-select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.sd-input::placeholder, .sd-textarea::placeholder { color: var(--ink-muted); }
.sd-input:focus-visible, .sd-select:focus-visible, .sd-textarea:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-color: var(--ink); }
.sd-hint { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.sd-error { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--danger); font-weight: 500; }
.sd-error svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; margin-top: 1px; }
.sd-field--invalid .sd-input, .sd-field--invalid .sd-select, .sd-field--invalid .sd-textarea { border-color: var(--danger); }
.sd-alert { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-3) var(--space-4); border: 2px solid currentColor; border-radius: var(--radius-sm); font-weight: 500; }
.sd-alert--success { color: var(--success); }
.sd-alert--danger { color: var(--danger); }
.sd-alert svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; }
.sd-form { display: grid; gap: var(--space-4); }
@media (min-width: 600px) { .sd-form--2col { grid-template-columns: repeat(2, 1fr); } .sd-form--2col .sd-span-2 { grid-column: 1 / -1; } }
.sd-radios { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sd-radio { position: relative; }
.sd-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sd-radio span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4); border: 2px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-0); color: var(--ink); font-size: 15px; font-weight: 500; }
.sd-radio input:checked + span { background: var(--action); color: var(--on-action); border-color: var(--action); }
.sd-radio input:checked + span::before { content: "✓\00a0"; content: "✓\00a0" / ""; }
.sd-radio input:focus-visible + span { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sd-drop { display: grid; gap: var(--space-2); place-items: center; text-align: center; padding: var(--space-5); border: 2px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface-200); color: var(--ink-muted); font-size: 14px; }
.sd-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-3); }
.sd-thumb { display: grid; gap: 6px; }
.sd-thumb img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); }

/* TeamCard */
.sd-team { display: grid; gap: var(--space-3); text-align: left; margin: 0; }
.sd-team__photo { aspect-ratio: 1; border-radius: 50%; overflow: hidden; width: 160px; }
.sd-team__photo img { width: 100%; height: 100%; object-fit: cover; }
.sd-team__photo.sd-placeholder { padding: var(--space-3); }
.sd-team__initials { position: relative; font-size: 40px; font-weight: 300; letter-spacing: .08em; color: var(--brand-earth); }
.sd-team__name { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.3; }
.sd-team__role { margin: 0; color: var(--ink-muted); font-size: 15px; }

/* SiteFooter */
.sd-footer { background: var(--surface-inverse); color: var(--ink-inverse); }
.sd-footer li a, .sd-footer p a { color: var(--ink-inverse); }
.sd-footer :focus-visible { outline-color: var(--focus-ring-inverse); }
.sd-footer__inner { display: grid; gap: var(--space-6); padding: var(--space-7) var(--space-4); max-width: var(--container); margin-inline: auto; }
.sd-footer h2 { margin: 0 0 var(--space-3); font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-inverse); }
.sd-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sd-footer li a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; }
.sd-footer svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
.sd-footer .sd-script { color: var(--accent-inverse); font-size: 36px; }
.sd-footer__legal { border-top: 1px solid rgba(255,255,255,.16); padding: var(--space-4); text-align: center; font-size: 14px; color: var(--ink-inverse-muted); }
.sd-footer__legal p { margin: 0; }
.sd-temp { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px dashed currentColor; border-radius: var(--radius-sm); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-inverse); }
@media (min-width: 900px) { .sd-footer__inner { grid-template-columns: 1.3fr 1fr 1fr 1fr; padding: var(--space-8) var(--space-6); } }

/* WhatsAppButton */
.sd-wa { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 20; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 56px; padding: 0 var(--space-5) 0 var(--space-4); background: var(--action); color: var(--on-action); border-radius: var(--radius-pill); box-shadow: var(--shadow-raised); font: 500 16px/1 var(--font-sans); text-decoration: none; }
.sd-wa:hover { background: var(--action-hover); }
.sd-wa svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.sd-wa--static { position: static; }


/* SDHome RD — maquetación de páginas (mobile-first). Solo tokens. */
html { scroll-padding-top: 80px; }
.sd-page { min-height: 100%; background: var(--surface-100); padding-bottom: 88px; }
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4); }
.sec { padding-block: var(--space-7); }
.sec--alt { background: var(--surface-200); }
.sec--inv { background: var(--surface-inverse); color: var(--ink-inverse); }
.stack { display: grid; gap: var(--space-4); }
.stack-lg { display: grid; gap: var(--space-6); }
.t-h1 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 400; color: var(--ink); }
.t-h2 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 400; color: var(--ink); }
.t-h3 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 500; color: var(--ink); }
.t-lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink-muted); max-width: 60ch; }
.t-body { margin: 0; font-size: var(--base-size, 16px); line-height: 1.625; color: var(--ink); max-width: var(--measure); }
.t-small { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.sec--inv .t-h1, .sec--inv .t-h2, .sec--inv .t-h3, .sec--inv .t-body { color: var(--ink-inverse); }
.sec--inv .t-lead, .sec--inv .t-small { color: var(--ink-inverse-muted); }
.sec--inv .sd-eyebrow, .sec--inv .sd-script { color: var(--accent-inverse); }
.head { display: grid; gap: var(--space-2); margin-bottom: var(--space-6); max-width: 720px; }
.head .sd-script { font-size: 36px; }

/* Grillas */
.g2 { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); align-items: center; }
.g-cards { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
.g-values { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
.g-amen { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.g-team { display: grid; gap: var(--space-6) var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.g-soon { display: grid; grid-template-columns: minmax(0, 1fr); }

/* Piezas de página */
.photo { width: 100%; border-radius: var(--radius-md); object-fit: cover; display: block; }
.value { display: grid; gap: var(--space-2); padding: var(--space-5); background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md); }
.value__num { font-family: var(--font-script); font-size: 40px; line-height: 1; color: var(--accent-text); }
.amen { display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-3) var(--space-4); background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md); font-size: 15px; font-weight: 500; color: var(--ink); }
.amen svg, .ico { width: 24px; height: 24px; flex: none; stroke: var(--accent-text); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.list-check { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.list-check li { display: flex; gap: var(--space-2); align-items: flex-start; font-size: 16px; line-height: 1.5; }
.list-check svg { width: 20px; height: 20px; margin-top: 2px; flex: none; stroke: var(--brand-leaf); fill: none; stroke-width: 2; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin: 0; }
.facts div { padding: var(--space-3) var(--space-4); background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.facts dt { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.facts dd { margin: 2px 0 0; font-size: 20px; font-weight: 500; color: var(--ink); }
.poi { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); counter-reset: poi; }
.poi li { display: flex; align-items: center; gap: var(--space-3); font-size: 16px; }
.poi li::before { counter-increment: poi; content: counter(poi); display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--action); color: var(--on-action); font-size: 14px; font-weight: 600; }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-4); padding: 0; font-size: 14px; color: var(--ink-muted); }
.crumbs li + li::before { content: "›"; margin-right: var(--space-2); }
.crumbs a { color: var(--accent-text); }
.legal { margin: 0; font-size: 14px; color: var(--ink-muted); }
.pending { padding: var(--space-4); border: 2px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface-0); color: var(--ink-muted); font-size: 15px; }
.pending strong { color: var(--ink); }

/* Galería y pestañas */
.gallery { display: grid; gap: var(--space-3); }
.gallery__main { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-md); display: block; background: var(--brand-sand); }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.thumb-btn { display: block; width: 100%; min-height: 48px; padding: 0; border: 3px solid transparent; border-radius: var(--radius-sm); background: none; cursor: pointer; overflow: hidden; }
.thumb-btn img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.thumb-btn[aria-pressed="true"] { border-color: var(--action); }
.tabs { display: flex; gap: var(--space-2); flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: var(--space-5); }
.tab { min-height: var(--tap-target); padding: 0 var(--space-5); background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; font: 500 16px/1 var(--font-sans); color: var(--ink-muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--action); }
.info-card { display: grid; gap: var(--space-4); padding: var(--space-5); background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.price-big { margin: 0; font-size: 28px; font-weight: 600; color: var(--ink); }
.price-big small { display: block; font-size: 14px; font-weight: 400; color: var(--ink-muted); letter-spacing: .04em; }
.actions { display: flex; flex-direction: column; gap: var(--space-3); }
.cta-band { display: grid; gap: var(--space-5); align-items: center; }
.map-ph { display: grid; place-items: center; min-height: 240px; padding: var(--space-5); text-align: center; border-radius: var(--radius-md); background: var(--brand-sand); color: var(--brand-earth); font-weight: 500; }

@media (min-width: 600px) {
  .g-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-amen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .actions { flex-direction: row; flex-wrap: wrap; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .wrap { padding-inline: var(--space-6); }
  .sec { padding-block: var(--space-8); }
  .t-h1 { font-size: 44px; }
  .t-h2 { font-size: 34px; }
  .head .sd-script { font-size: 48px; }
  .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
  .g2--wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .g-soon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-amen { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .g-team { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cta-band { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (min-width: 1200px) {
  .g-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-values { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ */
/* Theme: base de WordPress y piezas que no estaban en el diseño       */
/* ------------------------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; }
body.sd { margin: 0; background: var(--surface-100); }
.sd-page { display: flex; flex-direction: column; min-height: 100vh; }
.sd-page > main { flex: 1 0 auto; }
main:focus { outline: none; }

/* Títulos con la fuente y el peso de la Configuración general */
.sd-display, .t-h1, .t-h2, .sd-wordmark b { font-family: var(--font-title); }
.sd-display, .t-h1 { font-weight: var(--title-weight); }

/* Íconos de línea del plugin */
.sd-ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sd-specs .sd-ico { width: 18px; height: 18px; }
.sd-btn .sd-ico, .sd-footer .sd-ico, .sd-alert .sd-ico { width: 20px; height: 20px; }
.amen .sd-ico, .amen svg, .ico { stroke: var(--accent-text); }
.list-check .sd-ico { width: 20px; height: 20px; margin-top: 2px; stroke: var(--brand-leaf); stroke-width: 2; }
.sd-error .sd-ico { width: 18px; height: 18px; stroke-width: 2; margin-top: 1px; }
.amen img, .amen .sd-amen-img { width: 24px; height: 24px; flex: none; }

/* Logo subido en Ajustes del sitio */
.sd-logo img { display: block; max-height: 48px; width: auto; }

/* Estado «Próximamente» */
.sd-badge--proximamente { background: var(--brand-sand); color: var(--brand-earth); }
.sd-badge--proximamente::before { background: transparent; border: 2px solid currentColor; border-radius: 50%; width: 9px; height: 9px; }

/* Campo trampa del formulario: fuera de la vista y del lector de pantalla */
.sd-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Hero de Inicio con 1 a 3 destacados (avance solo con botones) */
.sd-hero--slider { grid-template-rows: 1fr auto; }
.sd-hero__slides { display: grid; grid-template-columns: minmax(0, 1fr); align-self: end; }
.sd-hero__slide { display: grid; grid-template-columns: minmax(0, 1fr); }
.sd-hero__slide[hidden] { display: none; }
.sd-hero--slider .sd-hero__slide .sd-hero__content { padding-bottom: var(--space-4); }
.sd-hero__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); width: 100%; max-width: var(--container); margin-inline: auto; padding: 0 var(--space-4) var(--space-6); }
.sd-hero__controls[hidden] { display: none; }
.sd-hero__controls .sd-btn { min-width: var(--tap-target); padding: 0 var(--space-3); }
.sd-hero__dots { display: flex; list-style: none; margin: 0; padding: 0; }
.sd-hero__dot { display: grid; place-items: center; width: 44px; height: var(--tap-target); padding: 0; background: none; border: 0; cursor: pointer; }
.sd-hero__dot span { display: block; width: 12px; height: 12px; border-radius: var(--radius-pill); border: 2px solid var(--ink-inverse); background: transparent; transition: width .15s ease; }
.sd-hero__dot[aria-pressed="true"] span { width: 28px; background: var(--ink-inverse); }
.sd-hero__count { margin-left: var(--space-2); font-size: 15px; color: var(--ink-inverse); }
.sd-hero p.sd-eyebrow { color: var(--accent-inverse); font-size: 13px; }
.sd-hero .sd-leaves-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.sd-hero .sd-leaves-bg path { fill: var(--brand-gold); opacity: .28; }
.sd-hero--block { min-height: 420px; }
.sd-hero--soon p.sd-hero__lead { color: var(--ink-inverse-muted); font-size: 16px; }
.g-soon > * + * { border-top: 1px solid rgba(250, 246, 239, .16); }
@media (min-width: 900px) {
  .sd-hero__controls { padding: 0 var(--space-6) var(--space-8); }
  .sd-hero--slider .sd-hero__slide .sd-hero__content { padding-bottom: var(--space-5); }
  .g-soon > * + * { border-top: 0; border-left: 1px solid rgba(250, 246, 239, .16); }
}

/* Bloque que invita a ver todos los proyectos */
.sd-invite { position: relative; display: grid; align-content: end; min-height: 420px; background: var(--brand-sand); color: var(--ink); overflow: hidden; isolation: isolate; }
.sd-invite .sd-leaves-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.sd-invite .sd-leaves-bg path { fill: var(--brand-gold); opacity: .22; }
.sd-invite .sd-script { color: var(--brand-earth); font-size: 40px; }
.sd-invite .sd-display { color: var(--ink); font-size: 30px; }
.sd-invite p { margin: 0; font-size: 16px; max-width: 40ch; }

/* Filtros (formulario GET, sin envío automático) */
.sd-chip-radio { position: relative; flex: none; }
.sd-chip-radio input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sd-chip-radio span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4); background: var(--surface-200); color: var(--ink); border: 2px solid var(--line-strong); border-radius: var(--radius-pill); font: 500 15px/1 var(--font-sans); }
.sd-chip-radio input:checked + span { background: var(--action); color: var(--on-action); border-color: var(--action); }
.sd-chip-radio input:checked + span::before { content: "✓\00a0"; content: "✓\00a0" / ""; }
.sd-chip-radio input:focus-visible + span { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sd-filters__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
@media (min-width: 900px) { .sd-filters__row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Listado: cargar más */
.g-cards > li { display: grid; }
.sd-more { display: grid; justify-items: center; gap: var(--space-3); margin-top: var(--space-6); }
.sd-more[hidden] { display: none; }
.sd-pagination { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-5); }
.sd-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 var(--space-3); border: 2px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.sd-pagination .page-numbers.current { background: var(--action); border-color: var(--action); color: var(--on-action); }

/* Galería con enlaces (funciona sin JavaScript) */
.thumb-btn img { pointer-events: none; }
a.thumb-btn[aria-current="true"] { border-color: var(--action); }
.gallery__main-wrap { margin: 0; display: grid; gap: var(--space-2); }

/* Pestañas de tipos: sin JavaScript se ven todos los tipos en lista */
html:not(.js) .tabs { display: none; }
.tabpanel + .tabpanel { margin-top: var(--space-7); }
.js .tabpanel + .tabpanel { margin-top: 0; }
.tabpanel[hidden] { display: none; }

/* Formulario */
.sd-alert ul { margin: var(--space-2) 0 0; padding-left: var(--space-5); }
.sd-alert a { color: inherit; }
.sd-alert:focus { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sd-form-done { display: grid; gap: var(--space-4); justify-items: start; }

/* Contenido escrito en el panel (descripción de proyectos y propiedades) */
.sd-content { display: grid; gap: var(--space-4); font-size: 18px; line-height: 1.6; color: var(--ink-muted); max-width: var(--measure); }
.sd-content > * { margin: 0; }
.sd-content ul, .sd-content ol { padding-left: var(--space-5); display: grid; gap: var(--space-2); color: var(--ink); font-size: 16px; }
.sd-content strong { color: var(--ink); }
.sd-content--center { margin-inline: auto; text-align: left; }

/* Datos de contacto */
.sd-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.sd-contact-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.sd-contact-list .sd-ico { stroke: var(--accent-text); margin-top: 2px; }
.sd-contact-list .t-small { margin: 0; }
.sd-contact-list a, .sd-contact-list .sd-contact-val { font-size: 18px; margin: 0; }
.sd-temp--light { color: var(--accent-text); }
.sd-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.map-frame { width: 100%; min-height: 280px; border: 0; border-radius: var(--radius-md); }

/* Equipo */
.sd-team__photo.sd-placeholder { width: 100%; max-width: 180px; }
.sd-team__photo:not(.sd-placeholder) { width: 100%; max-width: 180px; }
.sd-team__initials { font-size: 20px; letter-spacing: .12em; text-transform: uppercase; }

/* Botón flotante de WhatsApp: deja espacio al final de la página */
.sd-page { padding-bottom: 0; }
.sd-footer__legal { padding-bottom: calc(var(--space-4) + 72px); }
@media (min-width: 900px) { .sd-footer__legal { padding-bottom: var(--space-4); } }

/* 404 y páginas genéricas */
.sd-404 { display: grid; gap: var(--space-4); justify-items: start; max-width: 640px; }

/* Barra de administración de WordPress con encabezado fijo */
.admin-bar .sd-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .sd-header { top: 32px; } }
@media (max-width: 600px) { .admin-bar .sd-header { top: 0; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .sd-hero__dot span { transition: none; } }
@media print { .sd-header, .sd-wa, .sd-footer, .sd-hero__controls { display: none !important; } }

/* Ajustes tras revisión visual */
.value { align-content: start; }
.sd-footer li a { flex-wrap: wrap; column-gap: var(--space-2); }
.sd-footer .sd-temp { margin-left: 0; }
.sd-field { align-content: start; }
