/* =============================================================
   1. Tokens — editorial cálido
   ============================================================= */
:root {
  --bg:       #f4efe6;
  --bg-2:     #e8dfd0;
  --paper:    #fffdf9;
  --ink:      #1c1712;
  --ink-soft: #4a4038;
  --ink-mute: #7a6e63;
  --accent:   #b85c3a;   /* terracota */
  --accent-d: #9c4a2c;
  --moss:     #4a5d3a;
  --line:     rgba(28,23,18,.12);
  --serif:    "Fraunces", Georgia, serif;
  --sans:     "Inter", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius:   18px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, iframe { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--ink); color: var(--paper); z-index: 9999; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-bar { background: var(--ink); color: #e8dfd0; text-align: center; font-size: .78rem; padding: .4rem 1rem; }

/* =============================================================
   4. Typography
   ============================================================= */
.kicker { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: .9rem; }
.kicker.light { color: #f0c9a8; }
.section-title { font-size: clamp(2rem, 4.4vw, 3.3rem); max-width: 20ch; margin-bottom: 1.2rem; }
.section-title.small { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-title em, .hero-title em { font-style: italic; font-weight: 400; color: var(--accent); }
.section-title.light, .lead.light { color: var(--paper); }
.section-title.light em { color: #f0c9a8; }
.center { text-align: center; margin-inline: auto; }
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 54ch; margin-bottom: 1.6rem; }
.lead.light { color: #d9cfc2; }
.note { font-size: .85rem; color: var(--ink-mute); font-style: italic; }
.opt { font-weight: 400; color: var(--ink-mute); }

/* =============================================================
   5. Components
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .95rem 1.5rem; border-radius: 999px; font-weight: 600; transition: transform .35s var(--ease-out), background .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.btn:hover { transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: var(--paper); box-shadow: 0 14px 30px -14px rgba(184,92,58,.8); }
.btn-accent:hover { background: var(--accent-d); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-ghost { border: 1px solid var(--ink); }
.btn-sm { padding: .6rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; }

.nav { position: sticky; top: 0; z-index: 50; background: rgba(244,239,230,.94); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand em { font-style: italic; font-weight: 400; color: var(--accent); }
.nav-links { display: none; gap: 1.8rem; color: var(--ink-soft); font-weight: 500; }
.nav-links a { background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1px no-repeat; transition: background-size .35s var(--ease-out); padding-bottom: 2px; }
.nav-links a:hover { background-size: 100% 1px; }

.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field select { font: inherit; width: 100%; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.field input[type=range] { padding: 0; accent-color: var(--accent); border: 0; background: none; }
.field-row { display: grid; gap: 0 1rem; }
.form-error { color: #b42318; font-size: .9rem; margin-bottom: .8rem; }
.fine { font-size: .8rem; color: var(--ink-mute); margin-top: .8rem; text-align: center; }

/* =============================================================
   6. Sections
   ============================================================= */
.hero { position: relative; min-height: 88vh; min-height: 88svh; display: flex; align-items: flex-end; padding: 6rem 0 4rem; color: var(--paper); overflow: clip; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: slowZoom 24s ease-out both; }
@keyframes slowZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,23,18,.15) 0%, rgba(28,23,18,.35) 45%, rgba(28,23,18,.85) 100%); }
.hero-content { position: relative; }
.hero-title { font-size: clamp(2.6rem, 7vw, 5.6rem); max-width: 14ch; margin-bottom: 1.2rem; }
.hero-title em { color: #f0c9a8; }
.hero-sub { font-size: 1.12rem; max-width: 50ch; color: #eadfd2; margin-bottom: 2rem; }
.hero-search { display: grid; gap: .6rem; background: rgba(255,253,249,.96); color: var(--ink); padding: .6rem; border-radius: 22px; max-width: 640px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.hero-search select { font: inherit; padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); }
.seg { display: flex; background: var(--bg); border-radius: 14px; padding: 4px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: .65rem 1rem; border-radius: 11px; font-weight: 600; cursor: pointer; transition: background .3s var(--ease-out), color .3s; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

.section { padding: 5.5rem 0; }
.section-tight { padding: 3.5rem 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2.2rem; }
.section-dark { background: var(--ink); color: var(--paper); }
.section-sand { background: var(--bg-2); }

.props { display: grid; gap: 1.4rem; }
.prop { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line); transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); display: flex; flex-direction: column; }
.prop:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -28px rgba(28,23,18,.45); }
.prop[hidden] { display: none; }
.prop-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.prop-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out), filter 1s var(--ease-out); }
.prop:hover .prop-img img { transform: scale(1.08); filter: saturate(1.12); }
.prop-ph { display: grid; place-items: center; background: repeating-linear-gradient(135deg, #e8dfd0 0 14px, #efe8dc 14px 28px); font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--ink-mute); }
.tag { position: absolute; top: .9rem; left: .9rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: .3rem .7rem; border-radius: 999px; background: var(--paper); color: var(--ink); font-family: var(--sans); font-style: normal; }
.prop-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.prop-zone { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--moss); margin-bottom: .4rem; }
.prop-body h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.prop-meta { color: var(--ink-mute); font-size: .92rem; margin-bottom: .8rem; }
.prop-price { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin-top: auto; }
.prop-cta { margin-top: .8rem; font-weight: 600; color: var(--accent); }
.empty { margin-top: 1.5rem; color: var(--ink-soft); }
.empty a { color: var(--accent); font-weight: 600; }

.calc-grid { display: grid; gap: 2.5rem; align-items: start; }
.calc { background: var(--paper); color: var(--ink); border-radius: 24px; padding: 1.8rem; }
.calc-out { display: grid; gap: .6rem; margin: .4rem 0 1rem; }
.calc-out div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--bg); }
.calc-out span { font-size: .9rem; color: var(--ink-soft); }
.calc-out strong { font-family: var(--serif); font-size: 1.35rem; white-space: nowrap; }
.calc-out div:first-child { background: var(--ink); color: var(--paper); }
.calc-out div:first-child span { color: #d9cfc2; }
.calc-out div:first-child strong { font-size: 1.7rem; color: #f0c9a8; }
.calc-fine { font-size: .78rem; color: var(--ink-mute); margin-bottom: 1rem; }

.two-col { display: grid; gap: 2.5rem; align-items: start; }
.card-form { background: var(--paper); border-radius: 24px; padding: 1.8rem; box-shadow: 0 30px 60px -40px rgba(28,23,18,.4); }

.tasa { text-align: center; display: grid; justify-items: center; }

.quotes { display: grid; gap: 1.2rem; margin-top: 1.6rem; }
.quote { background: var(--paper); border-radius: var(--radius); padding: 1.8rem; border-left: 3px solid var(--accent); }
.quote blockquote { font-family: var(--serif); font-size: 1.15rem; font-style: italic; margin-bottom: 1rem; }
.quote figcaption { font-size: .85rem; color: var(--ink-mute); }

.contact { display: grid; gap: 1.5rem; align-items: center; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.footer { border-top: 1px solid var(--line); padding: 2.5rem 0 6rem; color: var(--ink-mute); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer a { color: var(--accent); font-weight: 600; }
.credits { font-size: .74rem; margin-top: 1rem; }
.credits a { font-weight: 400; text-decoration: underline; color: inherit; }

/* Chat */
.chat-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: inline-flex; align-items: center; gap: .5rem; padding: .9rem 1.2rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; box-shadow: 0 18px 40px -14px rgba(28,23,18,.7); transition: transform .35s var(--ease-out); }
.chat-fab:hover { transform: translateY(-3px); }
.chat-fab svg { width: 20px; fill: #f0c9a8; }
.chat { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 70; max-height: min(640px, calc(100svh - 2rem)); display: flex; flex-direction: column; background: var(--paper); border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(28,23,18,.6); border: 1px solid var(--line); }
.chat[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.chat-name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.chat-status { font-size: .8rem; color: var(--ink-mute); display: flex; align-items: center; gap: .4rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
.chat-close { font-size: 1.6rem; line-height: 1; width: 36px; height: 36px; border-radius: 50%; }
.chat-close:hover { background: var(--bg); }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; min-height: 180px; }
.msg { max-width: 85%; padding: .7rem .95rem; border-radius: 16px; font-size: .95rem; line-height: 1.45; white-space: pre-line; }
.msg-bot { background: var(--bg); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--ink); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-typing { color: var(--ink-mute); font-style: italic; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.2rem .8rem; }
.chat-suggest button { font-size: .82rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
.chat-suggest button:hover { border-color: var(--accent); color: var(--accent); }
.chat-form { display: flex; gap: .5rem; padding: .8rem 1.2rem; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; font: inherit; padding: .75rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.chat-form button { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--paper); flex-shrink: 0; }
.chat-wa { display: block; text-align: center; padding: .75rem; font-weight: 600; color: var(--accent); border-top: 1px solid var(--line); }

/* =============================================================
   7. Effects
   ============================================================= */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
[data-reveal].is-revealed, .no-js [data-reveal] { opacity: 1; transform: none; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .hero-search { grid-template-columns: 1.2fr 1fr auto; align-items: center; }
  .field-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .props { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: repeat(3, 1fr); }
  .chat { left: auto; width: 380px; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .props { grid-template-columns: repeat(4, 1fr); }
  .calc-grid, .two-col { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .contact { grid-template-columns: 1fr auto; }
}

/* =============================================================
   9. Reduced motion (solo lo intrusivo)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
  html { scroll-behavior: auto; }
}
