/* =========================================================
   Veterinaria Colibrí · Demo · Archetype: Liquid Wave
   ========================================================= */

:root {
  --bg: #EEF9F9;
  --tint: #DDF3F2;
  --surface: #FFFFFF;
  --deep: #0B5A60;
  --ink: #072429;
  --muted: #3D5A5E;
  --accent: #13B39A;
  --accent-ink: #04342C;
  --sun: #FFD166;
  --sun-ink: #3A2A00;
  --line: rgba(7, 36, 41, 0.12);
  --ok: #138A5A;
  --closed: #B4442F;

  --font-display: "Fredoka", "Avenir Next Rounded", "Nunito", system-ui, sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", system-ui, sans-serif;
  --font-hand: "Caveat", "Bradley Hand", cursive;

  --radius: 28px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
a { color: var(--deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 860px; }
.eyebrow { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--deep); }
.eyebrow-light { color: var(--sun); }
.hand { font-family: var(--font-hand); font-size: 1.9rem; color: var(--accent); line-height: 1; }
.muted { color: var(--muted); }

/* ---------- Demo ribbon ---------- */
.demo-ribbon {
  background: var(--ink); color: #DFF5F3; text-align: center; font-size: 0.88rem;
  padding: 8px 16px;
}
.demo-ribbon strong { color: var(--sun); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--deep); color: #FFFFFF; box-shadow: 0 8px 20px rgba(11, 90, 96, 0.22); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(11, 90, 96, 0.3); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--deep); color: var(--deep); }
.btn-sun { background: var(--sun); color: var(--sun-ink); box-shadow: 0 8px 20px rgba(255, 209, 102, 0.35); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }
.btn-lg { min-height: 58px; padding: 0 32px; font-size: 1.1rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(238, 249, 249, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
@supports (backdrop-filter: blur(12px)) {
  .nav { background: rgba(238, 249, 249, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(7, 36, 41, 0.06); }
.nav-inner { min-height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; background: var(--accent); color: var(--ink); display: grid; place-items: center; flex: none; }
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.brand-text small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.78rem; color: var(--muted); }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--deep); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(40px, 7vw, 88px) clamp(110px, 12vw, 170px); }
.hero-waves { position: absolute; left: 0; bottom: 0; width: 200%; height: clamp(120px, 16vw, 220px); z-index: 0; }
.wave { animation: waveDrift 22s linear infinite; }
.wave-a { fill: var(--tint); }
.wave-b { fill: var(--surface); animation-duration: 30s; animation-direction: reverse; }
@keyframes waveDrift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero-title { font-size: clamp(2.6rem, 6.2vw, 4.6rem); font-weight: 700; max-width: 14ch; }
.hero-title em { font-style: normal; color: var(--deep); background: linear-gradient(transparent 62%, var(--sun) 62%, var(--sun) 92%, transparent 92%); padding-inline: 4px; }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 48ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.status-pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-weight: 700; font-size: 0.98rem; font-variant-numeric: tabular-nums;
}
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: none; }
.status-pill.is-open { color: var(--ok); }
.status-pill.is-open .status-dot { background: var(--ok); animation: pulse 2.4s ease-in-out infinite; }
.status-pill.is-closed { color: var(--closed); }
.status-pill.is-closed .status-dot { background: var(--closed); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(19, 138, 90, 0.45); } 50% { box-shadow: 0 0 0 8px rgba(19, 138, 90, 0); } }

.hero-visual { position: relative; min-width: 0; aspect-ratio: 1 / 1; max-width: 560px; justify-self: center; width: 100%; }
.blob { overflow: hidden; border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%; animation: morph 14s ease-in-out infinite; }
.blob img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92); }
.blob-photo { position: absolute; inset: 6% 4% 4% 6%; z-index: 2; box-shadow: 0 30px 60px rgba(11, 90, 96, 0.22); }
.blob-photo img { animation: bob 7s ease-in-out infinite; transform-origin: center; }
.blob-sun { position: absolute; width: 42%; aspect-ratio: 1; right: -2%; top: -4%; background: var(--sun); z-index: 1; animation-duration: 18s; }
@keyframes morph {
  0%, 100% { border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%; }
  50% { border-radius: 58% 42% 40% 60% / 55% 38% 62% 45%; }
}
@keyframes bob { 0%, 100% { transform: scale(1.06) translateY(0); } 50% { transform: scale(1.06) translateY(-10px); } }
.float-card {
  position: absolute; z-index: 3; left: -4%; bottom: 8%;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 20px; padding: 14px 18px;
  box-shadow: 0 14px 30px rgba(7, 36, 41, 0.14); font-size: 0.95rem; line-height: 1.35;
  animation: floatCard 6s ease-in-out infinite;
}
.float-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--deep); display: grid; place-items: center; flex: none; }
@keyframes floatCard { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; order: -1; }
  .float-card { left: 0; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(72px, 9vw, 120px); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(32px, 4vw, 52px); max-width: 720px; }
.section-tint { background: var(--tint); }
.section-deep { background: var(--deep); color: #E6F6F4; }
.section-deep h2 { color: #FFFFFF; }
.divider { position: absolute; left: 0; width: 100%; height: clamp(36px, 5vw, 72px); pointer-events: none; }
.divider-top { top: -1px; fill: var(--bg); }
.divider-bottom { bottom: -1px; fill: var(--bg); }
.section-tint + .section .divider-top, .divider-deep { fill: var(--bg); }
#visitanos .divider-top { fill: var(--bg); }
.divider-ink { fill: var(--bg); }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }
.service {
  background: var(--surface); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
  box-shadow: 0 1px 0 var(--line);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.service:hover { transform: translateY(-6px); box-shadow: 0 22px 40px rgba(11, 90, 96, 0.14); }
.service-ico {
  width: 56px; height: 56px; display: grid; place-items: center; color: var(--deep); background: var(--tint);
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
}
.service-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service p { color: var(--muted); }
.service .price { margin-top: auto; color: var(--ink); font-weight: 700; }

/* Split panels */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-reverse .split-media { order: 2; }
.split-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.split-media { position: relative; min-width: 0; }
.blob-alt { aspect-ratio: 4 / 3; border-radius: 55% 45% 48% 52% / 46% 55% 45% 54%; }
.blob-tall { aspect-ratio: 3 / 4; max-width: 440px; margin-inline: auto; border-radius: 48% 52% 44% 56% / 38% 46% 54% 62%; }
.note-hand { text-align: center; margin-top: 14px; font-size: 1.6rem; color: var(--deep); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-media { order: -1; }
}
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%23072429' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* Timeline (cartilla) */
.timeline { list-style: none; margin: 6px 0 8px; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.age { font-family: var(--font-display); font-weight: 600; color: var(--deep); }
@media (max-width: 480px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }
.split-copy > .btn { align-self: flex-start; }

/* Reviews */
.reviews { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .reviews { grid-template-columns: 1fr; } }
.score { background: var(--sun); color: var(--sun-ink); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.score-num { font-family: var(--font-display); font-weight: 700; font-size: 3.2rem; line-height: 1; }
.score-stars { font-size: 1.3rem; letter-spacing: 2px; }
.review-slot {
  margin: 0; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 24px; color: var(--muted); font-weight: 500; display: grid; place-items: center; text-align: center; min-height: 160px;
}

/* Visit */
.visit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 800px) { .visit { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours td { padding: 11px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-weight: 700; }
.hours tr:last-child td { border-bottom: 0; }
.hours tr.is-today td { color: var(--deep); }
.hours tr.is-today td:first-child::after { content: " · hoy"; font-weight: 700; color: var(--accent); }
.map-slot { min-height: 170px; border-radius: 20px; background: var(--tint); border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; padding: 16px; color: var(--muted); font-weight: 500; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.copy-ok { color: var(--ok); font-weight: 700; font-size: 0.92rem; }
[hidden] { display: none !important; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border-radius: 22px; padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--deep); transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; }

/* CTA */
.cta { padding-block: clamp(40px, 6vw, 80px) clamp(90px, 10vw, 130px); }
.cta-inner {
  background: var(--accent); color: var(--accent-ink); border-radius: 44px; text-align: center;
  padding: clamp(40px, 6vw, 72px) 24px; display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.cta-inner h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }

/* Footer */
.footer { position: relative; background: var(--ink); color: #CFE6E3; padding-block: 72px 110px; }
.footer .divider-top { top: -1px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #FFFFFF; margin-bottom: 6px; }
.footer-meta { display: flex; flex-direction: column; gap: 6px; max-width: 480px; }
.footer strong { color: var(--sun); }
.credits { font-size: 0.82rem; opacity: 0.75; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; z-index: 60;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 18px;
  border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-weight: 700; text-decoration: none;
  box-shadow: 0 14px 30px rgba(7, 36, 41, 0.25);
  transition: transform .25s var(--ease-out);
}
.wa-float:hover { transform: translateY(-3px) scale(1.03); }
@media (max-width: 480px) { .wa-float span { display: none; } .wa-float { padding: 0; width: 58px; justify-content: center; } }

/* ---------- Reveal (content-first: hidden only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.split-media.reveal.is-visible .blob { animation-play-state: running; }

/* Only the truly intrusive bits are gated by reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wave { animation: none; }
  .blob-photo img { animation: none; }
}
