/* =========================================================================
   IRIGOIN & DELIA - Century 21 Mare
   Editorial cálido golden-hour. MOBILE-FIRST. Acento único: terracota.
   ========================================================================= */

:root {
  --bg:        #F3ECDF;
  --surface:   #FBF7EF;
  --surface-2: #EDE3D2;
  --ink:       #2A2521;
  --muted:     #6E6557;
  --muted-2:   #9A9080;
  --line:      rgba(42, 37, 33, 0.13);
  --line-2:    rgba(42, 37, 33, 0.24);
  --terra:     #B4572E;
  --terra-2:   #9A4825;
  --terra-soft: rgba(180, 87, 46, 0.10);
  --charcoal:  #26221D;
  --cream:     #FBF7EF;

  --r: 4px;
  --container: 1200px;
  --serif: "Cormorant", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 80px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-bottom: 64px; /* barra WhatsApp mobile */
}
img, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }

/* ---------------- tipografía ---------------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.04; letter-spacing: -0.005em; }
.amp { font-style: italic; color: var(--terra); font-weight: 500; }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.7rem; font-weight: 700; color: var(--terra); margin-bottom: 0.85rem; }
.section-lead { color: var(--muted); font-size: 1.02rem; line-height: 1.6; max-width: 60ch; }

/* ---------------- botones ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; padding: 0.95em 1.5em; border-radius: var(--r); font-family: var(--sans); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em; border: 1.5px solid transparent; transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-terra { background: var(--terra); color: #FFF6EC; }
.btn-terra:hover { background: var(--terra-2); }
.btn-outline { color: #FBF7EF; border-color: rgba(251, 247, 239, 0.55); background: rgba(30, 26, 22, 0.28); backdrop-filter: blur(6px); }
.btn-outline:hover { background: rgba(30, 26, 22, 0.5); }
.btn-line { color: var(--terra); border-color: var(--terra); }
.btn-line:hover { background: var(--terra); color: #FFF6EC; }
.btn-sm { padding: 0.6em 1em; font-size: 0.85rem; }
.btn-block { width: 100%; }

.wa-glyph { width: 1.05em; height: 1.05em; flex: none; background: currentColor;
  -webkit-mask: var(--wa) center / contain no-repeat; mask: var(--wa) center / contain no-repeat;
  --wa: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.885-9.886 9.885M20.52 3.449C18.24 1.245 15.24 0 12.045 0 5.463 0 .104 5.359.101 11.945c0 2.096.547 4.142 1.588 5.945L0 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.581 0 11.94-5.358 11.943-11.945A11.86 11.86 0 0020.52 3.449'/></svg>"); }

/* ---------------- marca ---------------- */
.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-word { font-family: var(--serif); font-weight: 600; font-size: 1.32rem; letter-spacing: 0.005em; }
.brand-sub { font-family: var(--sans); text-transform: uppercase; font-size: 0.56rem; letter-spacing: 0.28em; color: var(--muted-2); margin-top: 0.25rem; }

/* ---------------- header ---------------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: var(--terra); z-index: 60; }
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease); border-bottom: 1px solid transparent; }
.site-header.is-scrolled { background: rgba(243, 236, 223, 0.9); backdrop-filter: blur(12px) saturate(120%); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-header .brand-word { font-size: 1.18rem; }
.nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }

/* ---------------- hero ---------------- */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 28s var(--ease) infinite alternate; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(28,22,16,0.86) 0%, rgba(28,22,16,0.32) 45%, rgba(28,22,16,0.05) 72%, rgba(28,22,16,0.18) 100%); }
@keyframes kenburns { from { transform: scale(1.03); } to { transform: scale(1.13); } }
.hero-content { position: relative; z-index: 1; padding-bottom: clamp(36px, 9vh, 90px); padding-top: 96px; color: #FBF7EF; }
.hero-content .eyebrow { color: #E6C9A8; }
.hero-title { font-size: clamp(3rem, 14vw, 6rem); line-height: 0.98; margin-bottom: 0.6rem; }
.hero-title .amp { color: #E6B98C; }
.hero-tag { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 5.4vw, 2rem); color: #F4E7D6; margin-bottom: 1rem; line-height: 1.15; }
.hero-sub { font-size: 1.02rem; color: #E9DFD0; max-width: 42ch; margin-bottom: 1.6rem; }
.hero-cta { display: flex; flex-direction: column; gap: 0.7rem; }
.hero-cta .btn { width: 100%; }

/* ---------------- stats ---------------- */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.stats { padding-block: 1.6rem; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stats-grid > div { background: var(--surface); padding: 1.1rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; text-align: center; }
.stat-num, .stat-v { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; color: var(--terra); line-height: 1; }
.stat-k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2); }

/* ---------------- secciones ---------------- */
.section { padding-block: clamp(56px, 12vw, 120px); }
.section-head { margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(2.1rem, 9vw, 3.4rem); margin-bottom: 0.9rem; }
.full-media { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin-bottom: 2rem; }
.full-media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.proyecto-points { display: grid; gap: 1.6rem; }
.proyecto-points h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.proyecto-points p { color: var(--muted); }

/* ---------------- locales ---------------- */
.locales-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.local-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease); }
.local-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 20px 44px rgba(42,37,33,0.14); }
.local-figure { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.local-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.local-card:hover .local-figure img { transform: scale(1.05); }
.local-badge { position: absolute; top: 10px; left: 10px; padding: 0.35em 0.7em; background: var(--terra); color: #FFF6EC; border-radius: var(--r); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.local-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.35rem; }
.local-name { font-family: var(--serif); font-size: 1.5rem; }
.local-tag { color: var(--muted); font-size: 0.9rem; }
.local-foot { margin-top: 0.7rem; padding-top: 0.9rem; border-top: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-between; }
.local-price { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; color: var(--terra); line-height: 1; }
.local-price small { display: block; font-family: var(--sans); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; margin-bottom: 0.2rem; }
.local-m2 { font-size: 0.95rem; color: var(--ink); font-weight: 600; }
.cochera-note { margin-top: 18px; background: var(--charcoal); color: #F4E7D6; border-radius: var(--r); padding: 1.4rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.cochera-note strong { font-family: var(--serif); font-size: 1.5rem; color: #E6B98C; font-weight: 600; }
.cochera-note span { color: #D9CBB6; font-size: 0.95rem; }

/* ---------------- invertir ---------------- */
.invertir { background: var(--surface); border-block: 1px solid var(--line); }
.reasons { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.reason { padding-top: 1.3rem; border-top: 2px solid var(--terra); }
.reason h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.reason p { color: var(--muted); font-size: 0.95rem; }

/* ---------------- ubicación ---------------- */
.map { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.map-facade, .map iframe { width: 100%; min-height: 300px; border: 0; }
.map-facade { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; background: var(--surface-2); color: var(--ink); cursor: pointer; aspect-ratio: 16 / 11; }
.map-facade:hover { background: #E7DCC8; }
.map-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--terra); margin-bottom: 0.6rem; box-shadow: 0 0 0 6px var(--terra-soft); }
.map-txt { font-weight: 700; }
.map-addr { font-size: 0.85rem; color: var(--muted); }
.map iframe { aspect-ratio: 16 / 11; filter: saturate(0.9); }

/* ---------------- galería ---------------- */
.galeria .container { margin-bottom: 1.6rem; }
.gallery-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: 22px; padding-bottom: 0.8rem; scrollbar-width: thin; scrollbar-color: var(--terra) transparent; }
.gallery-item { flex: 0 0 auto; width: min(86vw, 540px); scroll-snap-align: center; }
.gallery-item img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); }
.gallery-item figcaption { margin-top: 0.55rem; font-size: 0.82rem; color: var(--muted-2); }

/* ---------------- contacto ---------------- */
.contacto { background: var(--charcoal); color: #F4E7D6; }
.contacto .eyebrow { color: #E6B98C; }
.contacto h2 { color: #FBF7EF; font-size: clamp(2rem, 8vw, 3rem); margin-bottom: 0.8rem; }
.contacto-info > p { color: #D9CBB6; max-width: 44ch; }
.contacto-grid { display: grid; gap: 2.2rem; }
.agente { margin-top: 1.8rem; }
.agente-name { font-family: var(--serif); font-size: 1.5rem; color: #FBF7EF; }
.agente-role { color: #C5B79F; font-size: 0.9rem; margin-bottom: 1.2rem; }
.agente-links { display: flex; flex-direction: column; gap: 0.7rem; }
.contacto .btn-line { color: #E6B98C; border-color: rgba(230,185,140,0.5); }
.contacto .btn-line:hover { background: #E6B98C; color: var(--charcoal); }
.comercializa { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.6rem; }
.comercializa span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.18em; color: #B7A990; }
.comercializa img { height: 46px; width: auto; opacity: 0.95; }
.contacto-form { background: rgba(251,247,239,0.05); border: 1px solid rgba(251,247,239,0.16); border-radius: var(--r); padding: 1.5rem; display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: #C5B79F; }
.field input, .field select, .field textarea { background: rgba(251,247,239,0.08); border: 1px solid rgba(251,247,239,0.22); border-radius: var(--r); padding: 0.8em 0.9em; color: #FBF7EF; font-family: var(--sans); font-size: 0.95rem; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.field input::placeholder, .field textarea::placeholder { color: #9C8F78; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #E6B98C; box-shadow: 0 0 0 3px rgba(230,185,140,0.18); }
.field select option { color: #2A2521; }
.field textarea { resize: vertical; }
.form-note { font-size: 0.76rem; color: #B7A990; text-align: center; }

/* ---------------- footer ---------------- */
.site-footer { background: var(--surface); padding-top: 3rem; padding-bottom: 2rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.footer-brand .brand-word { font-size: 1.5rem; }
.footer-brand .footer-tag { font-family: var(--serif); font-style: italic; color: var(--muted); margin-top: 0.6rem; }
.footer-col h5 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-2); margin-bottom: 0.9rem; font-weight: 700; }
.footer-col a, .footer-col p { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--terra); }
.footer-comercializa img { height: 48px; width: auto; }
.dev-note { margin-top: 0.6rem; font-size: 0.82rem; color: var(--muted-2); }
.footer-legal { padding-top: 1.6rem; display: grid; gap: 0.5rem; }
.footer-legal p { font-size: 0.74rem; color: var(--muted-2); line-height: 1.55; }

/* ---------------- barra WhatsApp mobile ---------------- */
.wa-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; align-items: center; justify-content: center; gap: 0.5em; height: 56px; background: #1F8B4C; color: #fff; font-family: var(--sans); font-weight: 700; font-size: 1rem; box-shadow: 0 -6px 24px rgba(0,0,0,0.18); }
.wa-bar:active { background: #18713d; }

/* ---------------- modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; }
.modal[aria-hidden="false"] { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(28,22,16,0.66); backdrop-filter: blur(5px); }
.modal-card { position: relative; z-index: 1; width: 100%; max-width: 880px; max-height: 94vh; overflow: auto; background: var(--surface); border-radius: 14px 14px 0 0; animation: sheetUp 0.4s var(--ease); }
@keyframes sheetUp { from { transform: translateY(6%); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: 10px; right: 12px; z-index: 3; width: 40px; height: 40px; font-size: 1.6rem; color: #FBF7EF; background: rgba(28,22,16,0.5); border-radius: 50%; }
.modal-body { display: grid; }
.modal-figure { aspect-ratio: 16 / 10; overflow: hidden; }
.modal-figure img { width: 100%; height: 100%; object-fit: cover; }
.modal-detail { padding: 1.5rem 1.4rem 2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.modal-title { font-family: var(--serif); font-size: 1.9rem; }
.modal-price { font-family: var(--serif); font-weight: 600; font-size: 2.1rem; color: var(--terra); }
.modal-sup { display: flex; gap: 1.5rem; }
.modal-sup .k { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); }
.modal-sup .v { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.modal-block h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--terra); margin-bottom: 0.5rem; }
.modal-block p { color: var(--muted); font-size: 0.92rem; }
.plano-box { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.plano-box img { width: 100%; }
.modal-cta { display: flex; flex-direction: column; gap: 0.7rem; }

/* ---------------- reveals ---------------- */
html.js .reveal { opacity: 0; transform: translateY(26px); }
.reveal { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================================
   ENHANCE: tablet
   ========================================================================= */
@media (min-width: 600px) {
  .container { padding-inline: 32px; }
  .locales-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-cta { flex-direction: row; flex-wrap: wrap; }
  .hero-cta .btn { width: auto; }
  .reasons { grid-template-columns: 1fr 1fr; }
  .proyecto-points { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .agente-links { flex-direction: row; }
  .modal { align-items: center; padding: 24px; }
  .modal-card { border-radius: 14px; }
  .modal-body { grid-template-columns: 1.05fr 1fr; }
  .modal-figure { aspect-ratio: auto; height: 100%; }
}

/* =========================================================================
   ENHANCE: desktop
   ========================================================================= */
@media (min-width: 1024px) {
  :root { --r: 4px; }
  body { padding-bottom: 0; }
  .wa-bar { display: none; }
  [id] { scroll-margin-top: 92px; }
  .header-inner { height: 78px; }
  .site-header .brand-word { font-size: 1.3rem; }
  .nav { display: flex; gap: 1.9rem; }
  .nav a { font-size: 0.92rem; color: var(--muted); transition: color 0.2s var(--ease); }
  .nav a:hover { color: var(--ink); }
  .nav-toggle { display: none; }
  .hero-content { padding-bottom: clamp(56px, 9vh, 110px); }
  .hero-title { font-size: clamp(4rem, 8vw, 7rem); }
  .hero-sub { font-size: 1.18rem; }
  .section { padding-block: clamp(96px, 9vw, 150px); }
  .section-head { max-width: 800px; }
  .locales-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .reasons { grid-template-columns: repeat(4, 1fr); }
  .full-media img { aspect-ratio: 21 / 9; }
  .contacto-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1.2fr 1.2fr; }
}

/* mobile nav abierta */
@media (max-width: 1023px) {
  .nav.is-open { display: flex; flex-direction: column; position: fixed; inset: 64px 0 auto 0; background: rgba(243,236,223,0.98); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
  .nav.is-open a { padding: 0.95rem 22px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 1rem; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .hero-media img { animation: none; }
}
