/* =========================================================
   Horizonte Ambateño · Base (tokens, tipografía, UI común)
   ========================================================= */
:root {
  --forest: #0e3322;
  --forest-2: #14472d;
  --forest-3: #1d5a37;
  --green: #2f6b2a;
  --leaf: #6fae3c;
  --leaf-2: #8cc152;
  --brown: #6b4423;
  --brown-2: #8a5a2e;
  --sun: #f0a81e;
  --gold: #c9a45c;
  --gold-2: #e5cf95;
  --gold-3: #b08a45;
  --cream: #f7f3ea;
  --paper: #fbf9f4;
  --sand: #eadfc6;
  --ink: #16241b;
  --muted: #5b6a5f;
  --line: rgba(14, 51, 34, .12);
  --ok: #2f8f3c;
  --sold: #b83227;

  --f-serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --f-script: 'Great Vibes', 'Brush Script MT', cursive;
  --f-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 10px;
  --r: 18px;
  --r-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(14, 51, 34, .08);
  --shadow: 0 18px 45px -18px rgba(14, 51, 34, .35);
  --shadow-lg: 0 40px 80px -30px rgba(14, 51, 34, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 76px;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold-2); color: var(--forest); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tipografía ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold-3);
}
.kicker::before { content: ''; width: 34px; height: 1.5px; background: currentColor; }
.kicker--light { color: var(--gold-2); }
.display {
  font-family: var(--f-serif); font-weight: 600; line-height: 1.02;
  letter-spacing: -.01em; margin: 0;
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
}
.script { font-family: var(--f-script); font-weight: 400; color: var(--gold); letter-spacing: 0; }
.lead { font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--muted); max-width: 58ch; }
.gold-text {
  background: linear-gradient(100deg, var(--gold-3), var(--gold-2) 45%, var(--gold) 70%, var(--gold-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .1em; margin-right: -.05em;
}

/* ---------- Botones ---------- */
.btn {
  --bg: var(--forest); --fg: var(--cream);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 14px; letter-spacing: .04em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
  box-shadow: 0 10px 24px -12px rgba(14, 51, 34, .6);
  overflow: hidden; isolation: isolate; white-space: nowrap;
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -14px rgba(14, 51, 34, .65); }
.btn:hover::after { transform: translateX(120%); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--gold { --bg: linear-gradient(120deg, #d9b86b, #f1dca2 45%, #c9a45c); --fg: var(--forest); }
.btn--ghost { --bg: transparent; --fg: var(--forest); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--ghost-light { --bg: rgba(255, 255, 255, .08); --fg: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.btn--wa { --bg: #1f7a45; --fg: #fff; }
.btn--sm { padding: 10px 18px; font-size: 13px; }
.btn--block { width: 100%; }
.btn.is-pending { opacity: .92; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--ok { background: #e3f3e1; color: #1f7a2e; }
.pill--sold { background: #fbe4e1; color: var(--sold); }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: #f1ece0; color: var(--forest-2); font-size: 12px; font-weight: 600;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .4s, box-shadow .4s, height .4s, transform .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(251, 249, 244, .86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px -20px rgba(14, 51, 34, .35);
  --header-h: 66px;
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 58px; height: auto; transition: width .4s; }
.is-scrolled .brand img { width: 48px; }
.brand__txt { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--f-serif); font-weight: 600; font-size: 25px; color: var(--green); letter-spacing: -.01em; }
.brand__tag { font-size: 8.5px; font-weight: 600; letter-spacing: .2em; color: #4b5a4f; margin-top: 5px; text-transform: uppercase; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  position: relative; padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--forest);
  border-radius: 999px; transition: background .25s;
}
.nav a::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px;
  background: var(--sun); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.header-cta { flex: none; }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; background: var(--forest); position: relative; margin-left: auto; }
.burger span { position: absolute; left: 14px; right: 14px; height: 2px; background: var(--cream); border-radius: 2px; transition: transform .35s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 27px; }
.menu-open .burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 55; background: var(--forest); color: var(--cream);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 30px) 28px 32px;
  clip-path: circle(0 at calc(100% - 43px) 38px); transition: clip-path .7s var(--ease);
  visibility: hidden;
}
.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 43px) 38px); visibility: visible; }
.menu-open .site-header { background: transparent; box-shadow: none; backdrop-filter: none; }
.menu-open .site-header .brand__name, .menu-open .site-header .brand__tag { color: var(--cream); }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-family: var(--f-serif); font-size: clamp(2.2rem, 10vw, 3.2rem); font-weight: 600; line-height: 1.25;
  display: flex; align-items: baseline; gap: 14px; opacity: 0; transform: translateY(20px);
  transition: opacity .5s, transform .5s var(--ease), color .2s;
}
.mobile-menu nav a small { font-family: var(--f-sans); font-size: 12px; color: var(--gold-2); letter-spacing: .2em; }
.mobile-menu nav a.is-active { color: var(--gold-2); }
.menu-open .mobile-menu nav a { opacity: 1; transform: none; }
.menu-open .mobile-menu nav a:nth-child(2) { transition-delay: .06s; }
.menu-open .mobile-menu nav a:nth-child(3) { transition-delay: .12s; }
.menu-open .mobile-menu nav a:nth-child(4) { transition-delay: .18s; }
.menu-open .mobile-menu nav a:nth-child(5) { transition-delay: .24s; }
.mobile-menu__foot { display: grid; gap: 12px; }
.mobile-menu__foot p { margin: 0 0 6px; font-size: 13px; color: rgba(247, 243, 234, .7); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: rgba(247, 243, 234, .78); padding: 80px 0 30px; position: relative; overflow: hidden; }
.site-footer::before {
  content: ''; position: absolute; width: 620px; height: 620px; right: -200px; top: -320px; border-radius: 50%;
  border: 38px solid rgba(240, 168, 30, .08);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; position: relative; }
.site-footer .brand__name { color: var(--cream); }
.site-footer .brand__tag { color: var(--gold-2); }
.site-footer h4 { margin: 0 0 16px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-values { display: flex; gap: 18px; margin-top: 22px; font-size: 11px; letter-spacing: .3em; color: var(--gold-2); flex-wrap: wrap; }
.footer-bottom {
  margin-top: 60px; padding-top: 22px; border-top: 1px solid rgba(247, 243, 234, .12);
  display: flex; justify-content: space-between; gap: 20px; font-size: 12px; flex-wrap: wrap;
}

/* ---------- Toast ---------- */
.toast-zone { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; pointer-events: none; width: min(420px, calc(100% - 32px)); }
.toast {
  background: var(--forest); color: var(--cream); padding: 14px 18px; border-radius: 14px;
  box-shadow: var(--shadow-lg); font-size: 14px; display: flex; gap: 12px; align-items: center;
  animation: toastIn .45s var(--ease) both;
}
.toast svg { width: 20px; height: 20px; color: var(--gold-2); flex: none; }
.toast.is-out { animation: toastOut .35s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 16px 30px -10px rgba(0, 0, 0, .4);
  transition: transform .3s var(--ease);
}
.wa-float::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: ring 2.2s infinite; }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- Revelado al hacer scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal="left"] { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="zoom"] { transform: scale(.94); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav, .header-cta { display: none; }
  .burger { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  :root { --header-h: 66px; }
  .brand img { width: 46px; }
  .brand__name { font-size: 21px; }
  .brand__tag { font-size: 7px; letter-spacing: .14em; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { padding: 14px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
