/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --ink:        #0f2420;
  --ink-soft:   #1e3a34;
  --ink-mute:   #5c7269;
  --bg:         #f6f2ea;
  --paper:      #ffffff;
  --coral:      #ff7a59;
  --coral-lt:   #ffb199;
  --teal:       #0e8f88;
  --teal-lt:    #1ec8bb;
  --gold:       #e8b34c;
  --glass:      rgba(255, 255, 255, 0.55);
  --glass-2:    rgba(255, 255, 255, 0.3);
  --glass-line: rgba(255, 255, 255, 0.6);
  --line:       rgba(15, 36, 32, 0.12);
  --shadow-lg:  0 30px 70px -25px rgba(15, 36, 32, 0.3);
  --shadow-md:  0 14px 34px -14px rgba(15, 36, 32, 0.24);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  overflow-x: clip;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); font-weight: 700; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--coral-lt); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 10px; font-weight: 600;
  transition: top .25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.78); /* solid fallback */
}
@supports (backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px)) {
  .glass {
    background: var(--glass);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; } /* defensive: never let split-text stay invisible */

.eyebrow {
  display: inline-block;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .6rem;
}
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  max-width: 24ch;
  margin-bottom: 1rem;
}

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background-color .25s var(--ease-out);
}
.btn-primary {
  background: linear-gradient(135deg, var(--coral) 0%, #ff9a72 100%);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(255, 122, 89, 0.55);
}
.btn-primary:hover { box-shadow: 0 18px 38px -12px rgba(255, 122, 89, 0.65); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-ghost { color: var(--ink); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: .9rem;
  background: rgba(246, 242, 234, 0.7);
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease-out), border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
@supports (backdrop-filter: blur(14px)) {
  .nav { backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px -18px rgba(15,36,32,.35); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; color: var(--ink); flex-shrink: 0; }

.nav-links { display: none; align-items: center; gap: 1.7rem; }
.nav-links a { position: relative; font-weight: 500; font-size: .93rem; color: var(--ink-soft); padding-block: .3rem; }
.nav-links a span { position: relative; }
.nav-links a span::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 2px; background: var(--coral);
  transition: right .3s var(--ease-out);
}
.nav-links a:hover span::after,
.nav-links a:focus-visible span::after { right: 0; }

.nav-actions { display: none; align-items: center; gap: .7rem; }
.nav-tel { display: none; }

.nav-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border-radius: 10px;
}
.nav-burger span { width: 20px; height: 2px; background: var(--ink); margin-inline: auto; transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links.is-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  position: absolute;
  top: 100%; left: 0; right: 0;
  padding: 1.5rem 1.25rem 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  padding-block: 3.5rem 4rem;
  overflow: clip;
}
.hero-mesh {
  position: absolute;
  inset: -10% -10% -20% -10%;
  z-index: -1;
  background:
    radial-gradient(38% 32% at 14% 18%, rgba(255, 177, 153, .75), transparent 70%),
    radial-gradient(35% 30% at 88% 12%, rgba(255, 214, 165, .65), transparent 70%),
    radial-gradient(40% 38% at 78% 82%, rgba(30, 200, 187, .5), transparent 70%),
    radial-gradient(32% 30% at 12% 88%, rgba(185, 245, 223, .6), transparent 70%);
  filter: blur(60px) saturate(140%);
  animation: meshDrift 26s ease-in-out infinite;
}
@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.15) rotate(8deg); }
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.kicker {
  font-weight: 600; font-size: .85rem; letter-spacing: .06em;
  color: var(--teal); text-transform: uppercase; margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  max-width: 15ch;
  margin-bottom: 1.1rem;
}
.hero-title em { font-style: italic; color: var(--coral); }
.hero-sub { font-size: 1.08rem; max-width: 42ch; color: var(--ink-mute); margin-bottom: 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.8rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .85rem; color: var(--ink-mute); font-weight: 500; }
.hero-badges li { display: flex; align-items: center; gap: .4rem; }
.hero-badges li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

.hero-visual {
  position: relative;
  height: 400px;
  display: none;
}
.hero-illustration {
  position: absolute;
  top: 50%; left: 50%;
  width: 72%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 30px 40px rgba(15, 36, 32, 0.28));
  animation: floatY 7s ease-in-out infinite;
}
.glass-shard {
  position: absolute;
  display: flex; align-items: center; gap: .6rem;
  padding: .9rem 1.2rem;
  border-radius: 18px;
  background: var(--glass-2);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: .88rem; color: var(--ink);
  animation: floatY 6s ease-in-out infinite;
}
@supports (backdrop-filter: blur(16px)) {
  .glass-shard { backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); }
}
.shard-1 { top: 2%;  left: 0%;  color: var(--coral); animation-delay: 0s; }
.shard-2 { top: 68%; left: 60%; color: var(--teal); animation-delay: 1.4s; }
.shard-3 { top: 74%; left: 0%;  color: var(--gold); animation-delay: .7s; }
.shard-4 { top: 4%;  left: 64%; color: var(--teal); animation-delay: 2.1s; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* =============================================================
   7. Stats
   ============================================================= */
.stats { padding-block: 1rem 2.5rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.stat-tile { padding: 1.6rem 1.2rem; text-align: center; }
.stat-num { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; color: var(--ink); }
.stat-label { font-size: .82rem; color: var(--ink-mute); margin-top: .3rem; }

/* =============================================================
   8. Sections & grids
   ============================================================= */
.section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section-alt { background: linear-gradient(180deg, rgba(30,200,187,.08), rgba(255,122,89,.05)); }

.grid-3 {
  display: grid;
  gap: 1.4rem;
  margin-top: 2.2rem;
}
.card { padding: 1.9rem 1.7rem; }
.card-icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--coral-lt), var(--coral));
  color: #fff; margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.card p { color: var(--ink-mute); font-size: .95rem; }

/* Timeline */
.timeline { margin-top: 2.2rem; display: flex; flex-direction: column; gap: 1.6rem; }
.timeline-item { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; padding-block: .3rem; }
.timeline-step {
  font-weight: 800; font-size: 1.1rem; color: var(--teal);
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 1.5px solid var(--line);
}
.timeline-item h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.timeline-item p { color: var(--ink-mute); font-size: .93rem; max-width: 56ch; }

/* Zonas */
.zonas-banner {
  width: 100%;
  aspect-ratio: 1600 / 520;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 2.4rem;
  box-shadow: var(--shadow-md);
}
.zonas-grid { display: grid; gap: 2rem; align-items: center; }
.chip-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.chip {
  padding: .5rem 1rem; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: .85rem; font-weight: 600; color: var(--ink-soft);
}
.map-frame { aspect-ratio: 4 / 3; overflow: hidden; padding: 0; }
.map-frame iframe { width: 100%; height: 100%; border-radius: 22px; }

/* Testimonials */
.quote { font-size: 1.02rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
blockquote.card footer { display: flex; flex-direction: column; gap: .15rem; }
blockquote.card footer strong { color: var(--ink); }
blockquote.card footer span { font-size: .82rem; color: var(--ink-mute); }

/* About */
.about-grid { display: grid; gap: 2.2rem; align-items: center; }
.about-avatar {
  width: 160px; height: 160px; border-radius: 34px;
  background: linear-gradient(145deg, var(--teal-lt), var(--teal) 55%, var(--ink) 130%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 3rem; font-weight: 800; letter-spacing: -.02em;
  box-shadow: var(--shadow-lg);
  justify-self: start;
}
.credentials-list { margin-top: 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.credentials-list li { position: relative; padding-left: 1.5rem; font-size: .93rem; color: var(--ink-soft); }
.credentials-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--teal); font-weight: 800;
}

/* FAQ */
.faq-list { margin-top: 2rem; display: flex; flex-direction: column; gap: .8rem; }
.faq-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.1rem 1.3rem;
}
.faq-item summary {
  cursor: pointer; list-style: none; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem; font-weight: 400; color: var(--teal); flex-shrink: 0;
  transition: transform .25s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: .8rem; color: var(--ink-mute); font-size: .93rem; }

/* Contact */
.contact-grid { display: grid; gap: 2.5rem; }
.contact-copy { position: relative; }
.contact-keys {
  display: none;
  position: absolute;
  top: -2.6rem;
  right: -1rem;
  width: 108px;
  filter: drop-shadow(0 16px 22px rgba(15, 36, 32, 0.22));
  animation: floatY 6.5s ease-in-out infinite;
  animation-delay: .5s;
}
.contact-list { margin-top: 1.6rem; display: flex; flex-direction: column; gap: .8rem; }
.contact-list li { display: flex; align-items: center; gap: .7rem; color: var(--ink-soft); font-size: .95rem; }
.contact-list svg { color: var(--teal); flex-shrink: 0; }
.contact-list a:hover { color: var(--coral); }
.social-links { display: flex; gap: .7rem; margin-top: 1.4rem; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 1px solid var(--line);
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), transform .25s var(--ease-out);
}
.social-links a:hover { background: var(--coral); color: #fff; transform: translateY(-2px); }

.lead-form { padding: 1.9rem; display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-row { display: grid; gap: 1.1rem; }
label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
input, select, textarea {
  font: inherit; padding: .75rem .9rem; border-radius: 12px;
  border: 1.5px solid var(--line); background: rgba(255,255,255,.7);
  color: var(--ink); transition: border-color .2s var(--ease-out);
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; }
textarea { resize: vertical; min-height: 100px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-status { font-size: .85rem; min-height: 1.2em; color: var(--ink-mute); }
.form-status[data-state="ok"] { color: var(--teal); font-weight: 600; }
.form-status[data-state="error"] { color: var(--coral); font-weight: 600; }

/* Footer */
.footer { background: var(--ink); color: rgba(246,242,234,.85); padding-block: 3.5rem 2rem; margin-top: 2rem; }
.footer .nav-logo { color: var(--bg); }
.footer-grid { display: grid; gap: 2.2rem; padding-bottom: 2.2rem; border-bottom: 1px solid rgba(246,242,234,.14); }
.footer-tag { margin-top: 1rem; font-size: .9rem; max-width: 34ch; color: rgba(246,242,234,.65); }
.footer h3 { color: var(--bg); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem; }
.footer nav, .footer > .container > div { display: flex; flex-direction: column; gap: .6rem; }
.footer a { font-size: .9rem; color: rgba(246,242,234,.75); }
.footer a:hover { color: var(--coral-lt); }
.footer .social-links a { background: rgba(246,242,234,.08); border-color: rgba(246,242,234,.16); color: var(--bg); font-size: .72rem; font-weight: 700; }
.footer .social-links a:hover { background: var(--coral); color: #fff; }
.footer-legal { padding-top: 1.6rem; display: flex; flex-direction: column; gap: .6rem; font-size: .78rem; color: rgba(246,242,234,.55); }

/* =============================================================
   9. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .hero-visual { display: block; }
  .about-grid { grid-template-columns: auto 1fr; }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-actions { display: flex; }
  .nav-tel { display: inline-flex; }
  .nav-burger { display: none; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
  .zonas-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: .9fr 1.1fr; }
  .contact-keys { display: block; }
  .footer-grid { grid-template-columns: 1.4fr .8fr 1fr; }
}

@media (min-width: 1280px) {
  .section-title { font-size: clamp(1.9rem, 2.6vw, 2.8rem); }
}

/* =============================================================
   10. Reduced motion — only intrusive effects are gated
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Mesh gradient, glass-shard float, hovers, tilts and reveals are
     ambient/functional motion and intentionally keep running — see
     reference/04-critical-gotchas.md (A.2) and 07-windows-troubleshooting.md. */
}
