:root {
  --maroon: #7c2732;
  --maroon-dark: #5e1e26;
  --navy: #16233f;
  --navy-deep: #0f1a30;
  --cream: #f7f4ee;
  --cream-soft: #faf8f4;
  --ink: #221f1c;
  --line: #e7e1d4;
  --line-soft: #efe9df;
  --muted: #5c574d;
  --muted-soft: #948e80;
  --whatsapp: #25d366;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--maroon-dark); }

img { max-width: 100%; display: block; }

button { font-family: inherit; }

.serif { font-family: 'Lora', serif; }

/* ---------- keyframes ---------- */
@keyframes heroFade { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatChevron { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }
@keyframes waPulse { 0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,0.28), 0 0 0 0 rgba(37,211,102,0.55); } 50% { box-shadow: 0 4px 16px rgba(0,0,0,0.28), 0 0 0 10px rgba(37,211,102,0); } }
@keyframes ctaPulse { 0%, 100% { box-shadow: 0 6px 20px rgba(124,39,50,0.35), 0 0 0 0 rgba(124,39,50,0.4); } 50% { box-shadow: 0 6px 20px rgba(124,39,50,0.35), 0 0 0 10px rgba(124,39,50,0); } }
@keyframes spin360 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  background: transparent;
  backdrop-filter: none;
  transition: all 0.35s ease;
  box-shadow: none;
}
.site-header.solid {
  padding: 12px 24px;
  background: rgba(247,244,238,0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(15,26,48,0.08);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 78px; width: auto; transition: height 0.35s ease; }
.site-header.solid .brand img { height: 58px; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { color: var(--cream-soft); font-size: 15px; font-weight: 500; }
.site-header.solid .main-nav a { color: var(--navy); }
.main-nav a.nav-cta {
  background: var(--maroon); color: var(--cream); padding: 11px 22px; font-size: 14px;
}
.main-nav a.nav-cta:hover { background: var(--maroon-dark); color: var(--cream); }

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
}
.menu-toggle svg path { stroke: var(--cream-soft); transition: stroke 0.3s ease; }
.site-header.solid .menu-toggle svg path { stroke: var(--navy); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--navy);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--cream-soft); font-size: 22px; font-family: 'Lora', serif; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- views ---------- */
.view { display: none; }
.view.active { display: block; }

.page-hero {
  padding: 160px 24px 72px; background: var(--navy); color: var(--cream);
}
.page-hero .container { max-width: 1320px; margin: 0 auto; }
.page-hero .back-link { color: #c9a5ac; font-size: 14px; font-weight: 600; }
.page-hero .eyebrow { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: #c9a5ac; margin: 22px 0 12px; font-weight: 600; }
.page-hero h1 { font-family: 'Lora', serif; font-weight: 500; font-size: clamp(28px, 3.8vw, 46px); margin: 0; }

/* ---------- hero (inicio) ---------- */
.hero {
  position: relative; height: 100vh; min-height: 600px; overflow: hidden;
  display: flex; align-items: flex-end;
}
.hero-bg {
  position: absolute; inset: -60px 0 -60px 0;
  transform: translateY(0) scale(1.08);
  transition: transform 0.05s linear;
  will-change: transform;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,26,48,0.35) 0%, rgba(15,26,48,0.15) 35%, rgba(15,26,48,0.75) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 0 24px 64px; max-width: 1200px; width: 100%; }
.hero-inner { max-width: 820px; margin: 0 auto 0 0; padding: 0 36px; }
.hero-kicker { color: #e7c9ac; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 16px; animation: heroFade 0.9s ease both; }
.hero h1 { font-family: 'Lora', serif; font-weight: 500; font-size: clamp(34px, 5.6vw, 68px); line-height: 1.1; color: var(--cream-soft); margin: 0 0 24px; animation: heroFade 1s ease 0.1s both; }
.hero p.lead { font-size: 17px; line-height: 1.65; color: #e9e5dc; max-width: 600px; margin: 0 0 32px; animation: heroFade 1s ease 0.2s both; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; animation: heroFade 1s ease 0.3s both; }

.btn { display: inline-block; padding: 15px 30px; font-size: 15px; font-weight: 500; cursor: pointer; border: none; }
.btn-cream { background: var(--cream-soft); color: var(--navy); }
.btn-cream:hover { background: #e9e5dc; color: var(--navy); }
.btn-outline { border: 1px solid rgba(250,248,244,0.55); color: var(--cream-soft); background: transparent; }
.btn-outline:hover { border-color: var(--cream-soft); background: rgba(250,248,244,0.08); color: var(--cream-soft); }
.btn-maroon { background: var(--maroon); color: var(--cream); padding: 16px 34px; font-weight: 600; }
.btn-maroon:hover { background: var(--maroon-dark); color: var(--cream); }

.scroll-chevron {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--cream-soft); opacity: 0.75;
  animation: floatChevron 2.2s ease-in-out infinite;
}

/* ---------- featured properties (inicio) ---------- */
.section { padding: 96px 24px; background: var(--cream); }
.section .container { max-width: 1320px; margin: 0 auto; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; flex-wrap: wrap; gap: 16px; }
.eyebrow { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--maroon); margin: 0 0 12px; font-weight: 600; }
.section-head h2 { font-family: 'Lora', serif; font-weight: 500; font-size: clamp(26px, 3.4vw, 40px); color: var(--navy); margin: 0; }
.link-strong { font-size: 15px; font-weight: 600; color: var(--maroon); }

.property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.property-card {
  background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.property-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -20px rgba(22,35,63,0.28); }
.property-photo { width: 100%; aspect-ratio: 4/3; position: relative; overflow: hidden; background: #ece6d8; }
.property-photo img { width: 100%; height: 100%; object-fit: cover; }
.property-photo .placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px; font-size: 13px; color: #948e80; background: #ece6d8;
  border: 1px dashed #cbc3ae;
}
.is-hidden { display: none !important; }
.ribbon {
  position: absolute; top: 20px; left: -42px; width: 180px; transform: rotate(-40deg);
  background: var(--maroon); color: #fff; text-align: center; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.1em; padding: 7px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.28); z-index: 2;
}
.tag-unavailable {
  position: absolute; top: 12px; right: 12px; background: rgba(93,97,104,0.92); color: #fff;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; padding: 5px 11px; border-radius: 4px; z-index: 2;
}
.property-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.property-comuna { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--maroon); margin: 0 0 10px; font-weight: 600; }
.property-title { font-family: 'Lora', serif; font-weight: 500; font-size: 18px; color: var(--navy); margin: 0 0 10px; line-height: 1.35; }
.property-desc { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 20px; flex: 1; }
.property-desc.italic { font-size: 13.5px; color: var(--muted-soft); font-style: italic; }
.property-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.property-price { font-family: 'Lora', serif; font-size: 17px; color: var(--navy); font-weight: 600; }
.property-link { font-size: 13px; font-weight: 600; color: var(--maroon); }

/* ---------- services (inicio) ---------- */
.section-dark { padding: 96px 24px; background: var(--navy); color: var(--cream); }
.section-dark .container { max-width: 1320px; margin: 0 auto; }
.services-intro { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.services-intro .eyebrow { color: #c9a5ac; }
.services-intro h2 { font-family: 'Lora', serif; font-weight: 500; font-size: clamp(26px, 3.2vw, 38px); margin: 0 0 20px; line-height: 1.3; }
.services-intro p { font-size: 16px; line-height: 1.75; color: #c9c5bc; margin: 0; }

.interactive-row { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; margin-bottom: 64px; }
@media (max-width: 900px) { .interactive-row, .split-row { grid-template-columns: 1fr !important; } }

.tilt-frame {
  position: relative; aspect-ratio: 4/3; overflow: hidden; perspective: 900px; cursor: pointer; background: var(--navy-deep);
}
.tilt-frame .tilt-inner {
  position: absolute; inset: -6%; transition: transform 0.35s ease-out; will-change: transform;
}
.tilt-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-caption {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 16px; color: rgba(247,244,238,0.55); font-size: 13px;
}
.photo-caption svg { opacity: 0.5; }

.interactive-copy p.lead { font-family: 'Lora', serif; font-size: 22px; margin: 0 0 14px; color: var(--cream-soft); }
.interactive-copy p { font-size: 15.5px; line-height: 1.75; color: #c9c5bc; margin: 0 0 20px; }
.interactive-copy p:last-child { margin: 0; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: rgba(247,244,238,0.14); }
.service-tile { background: var(--navy); padding: 32px 28px; }
.service-tile svg { margin-bottom: 18px; }
.service-tile p.title { font-family: 'Lora', serif; font-size: 19px; margin: 0 0 8px; color: var(--cream-soft); }
.service-tile p.desc { font-size: 14px; line-height: 1.6; color: #b8b3a9; margin: 0; }

/* ---------- valuation CTA banner ---------- */
.cta-banner {
  position: relative; padding: 100px 24px; overflow: hidden; text-align: center;
  background: linear-gradient(135deg, #b9bdc4 0%, #9ca1aa 100%);
}
.cta-banner .container { position: relative; z-index: 2; max-width: 680px; margin: 0 auto; color: var(--navy); }
.cta-banner h2 { font-family: 'Lora', serif; font-weight: 500; font-size: clamp(26px, 3.4vw, 40px); margin: 0 0 18px; }
.cta-banner p { font-size: 16px; line-height: 1.7; color: #33394a; margin: 0 0 32px; }

/* ---------- tasación ---------- */
.section-light { padding: 88px 24px; background: var(--cream); text-align: center; }
.section-light .intro { max-width: 760px; margin: 0 auto 56px; }
.section-light .intro p { font-size: 17px; line-height: 1.7; color: #4a463f; margin: 0; }

.steps-wrap { max-width: 840px; margin: 0 auto 72px; position: relative; }
.steps-line { position: absolute; top: 27px; left: 70px; right: 70px; height: 2px; background: var(--line); overflow: hidden; }
.steps-line-fill { height: 100%; background: var(--maroon); width: 0%; transition: width 1s ease 0.2s; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }
@media (max-width: 700px) { .steps-grid { grid-template-columns: 1fr; } .steps-line { display: none; } }
.step-item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed .step-item { opacity: 1; transform: translateY(0); }
.step-num {
  width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: var(--cream-soft);
  display: flex; align-items: center; justify-content: center; font-family: 'Lora', serif; font-size: 20px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.step-item:hover .step-num { background: var(--maroon); box-shadow: 0 0 0 6px rgba(124,39,50,0.22), 0 0 18px rgba(124,39,50,0.5); }
.step-item p.title { font-family: 'Lora', serif; font-size: 16.5px; color: var(--navy); margin: 0; }
.step-item p.desc { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 200px; }

.benefits-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.benefit-card {
  background: #fff; border: 1px solid var(--line); padding: 32px 28px; text-align: left;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
[data-reveal].revealed .benefit-card { opacity: 1; transform: translateY(0); }
.benefit-card:hover { transform: translateY(0) scale(1.04); box-shadow: 0 22px 44px -16px rgba(22,35,63,0.32); }
.benefit-icon {
  width: 44px; height: 44px; border-radius: 50%; background: #f7f0e8; display: flex; align-items: center;
  justify-content: center; margin-bottom: 16px; transition: transform 0.25s ease;
}
.benefit-card:hover .benefit-icon { transform: scale(1.15) rotate(-8deg); }
.benefit-card p.title { font-family: 'Lora', serif; font-size: 19px; color: var(--navy); margin: 0 0 10px; }
.benefit-card p.desc { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin: 0; }

.faq-section { padding: 88px 24px; background: #fff; }
.faq-section .container { max-width: 820px; margin: 0 auto; }
.faq-section h2 { font-family: 'Lora', serif; font-weight: 500; font-size: clamp(24px, 3vw, 32px); color: var(--navy); margin: 0 0 40px; text-align: center; }
.faq-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); }
.faq-item { background: #fff; padding: 22px 24px; cursor: pointer; }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q p { font-family: 'Lora', serif; font-size: 16.5px; color: var(--navy); margin: 0; }
.faq-icon { font-size: 22px; color: var(--maroon); flex-shrink: 0; display: inline-block; transform: rotate(0deg); transition: transform 0.3s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { height: 0; overflow: hidden; transition: height 0.35s ease; }
.faq-a p { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin: 14px 0 0; }

.split-cta { padding: 88px 24px; background: var(--navy); color: var(--cream); }
.split-cta .container { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-cta .cta-col { text-align: center; }
.split-cta .btn-maroon { padding: 17px 36px; animation: ctaPulse 2.4s ease-in-out infinite; }
.split-cta .form-col p.lead { font-family: 'Lora', serif; font-size: 22px; margin: 0 0 8px; }
.split-cta .form-col p.sub { font-size: 14.5px; color: #c9c5bc; margin: 0 0 24px; }

/* ---------- forms ---------- */
.form-dark { display: flex; flex-direction: column; gap: 16px; }
.form-dark input, .form-dark textarea {
  background: transparent; border: none; border-bottom: 1px solid rgba(247,244,238,0.35);
  padding: 10px 2px; color: var(--cream); font-size: 15px; font-family: 'Work Sans', sans-serif; outline: none;
}
.form-light { display: flex; flex-direction: column; gap: 18px; }
.form-light input, .form-light textarea {
  background: #fff; border: 1px solid #d9d2c1; padding: 12px 14px; color: var(--navy);
  font-size: 15px; font-family: 'Work Sans', sans-serif; outline: none;
}
.form-light textarea { resize: none; }
.form-submit {
  margin-top: 6px; border: none; padding: 14px 28px; font-size: 15px; font-weight: 600;
  cursor: pointer; align-self: flex-start;
}
.form-submit.light { background: var(--cream-soft); color: var(--navy); }
.form-submit.light:hover { background: #e9e5dc; }
.form-submit.maroon { background: var(--maroon); color: var(--cream); }
.form-submit.maroon:hover { background: var(--maroon-dark); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-error { color: var(--maroon); font-size: 13px; margin: 8px 0 0; display: none; }
.form-error.show { display: block; }
.form-success { color: #2f6b3a; font-size: 13px; margin: 8px 0 0; display: none; }
.form-success.show { display: block; }

/* ---------- nosotros ---------- */
.split-row { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.about-section { padding: 88px 24px; background: #fff; }
.about-section .container { max-width: 1180px; margin: 0 auto; }
.about-copy { display: flex; flex-direction: column; gap: 22px; }
.about-copy p { font-size: 16px; line-height: 1.8; color: #4a463f; margin: 0; }

.pan-frame {
  position: relative; aspect-ratio: 4/3; overflow: hidden; cursor: pointer; background: var(--navy-deep); color: var(--cream);
}
.pan-frame .pan-inner {
  position: absolute; top: 0; bottom: 0; height: 100%; width: 160%; left: -30%;
  transition: left 0.35s ease-out, transform 0.35s ease-out; will-change: left, transform;
}
.pan-frame img { width: 100%; height: 100%; object-fit: cover; }

.reframe-btn {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(15,26,48,0.65); color: var(--cream); display: none; align-items: center;
  justify-content: center; cursor: pointer;
}

.contact-cta { padding: 88px 24px; background: var(--navy); color: var(--cream); }
.contact-cta .container { max-width: 640px; margin: 0 auto; text-align: center; }
.contact-cta p.lead { font-family: 'Lora', serif; font-size: 22px; margin: 0 0 8px; }
.contact-cta p.sub { font-size: 14.5px; color: #c9c5bc; margin: 0 0 32px; }
.contact-cta .form-dark { text-align: left; }

/* ---------- contacto ---------- */
.contact-section { padding: 88px 24px 110px; background: var(--cream); }
.contact-section .container { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; font-size: 15.5px; }
.contact-info a { color: var(--navy); }

/* ---------- whatsapp float ---------- */
.wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 1000; width: 58px; height: 58px; border-radius: 50%;
  background: var(--whatsapp); display: flex; align-items: center; justify-content: center;
  animation: waPulse 2.6s ease-in-out infinite; transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- footer ---------- */
.site-footer { padding: 56px 24px; background: var(--navy-deep); color: #8f97a8; }
.site-footer .container {
  max-width: 1320px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 24px;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 380px; }
.footer-brand img { height: 47px; width: auto; }
.footer-brand p { font-family: 'Lora', serif; font-style: italic; font-size: 14.5px; color: #c9c5bc; margin: 0; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.footer-contact a { color: #c9c5bc; }
.footer-social a { color: #c9c5bc; }
.site-footer .copyright { font-size: 13px; margin: 0; }

@media (max-width: 700px) {
  .split-cta .container,
  .contact-section .container { grid-template-columns: 1fr; }
}
