/* =========================================================
   Centro Veterinario Razas — Sistema de diseño compartido
   ========================================================= */

:root {
  --primary: #F26522;
  --primary-dark: #D4541A;
  --primary-light: #FEF0E7;
  --primary-glow: rgba(242, 101, 34, 0.16);
  --charcoal: #4D4D4D;
  --charcoal-deep: #353535;
  --charcoal-light: #6B6B6B;
  --white: #FFFFFF;
  --cream: #FAFAF7;
  --cream-deep: #F4F1EB;
  --border: #E8E4DF;
  --success: #22C55E;
  --emergency: #EF4444;
  --whatsapp: #25D366;

  --maxw: 1200px;
  --nav-h: 84px;

  --shadow-sm: 0 2px 10px rgba(77,77,77,.06);
  --shadow-md: 0 12px 34px rgba(77,77,77,.10);
  --shadow-lg: 0 28px 64px rgba(77,77,77,.16);
  --shadow-glow: 0 18px 44px rgba(242,101,34,.20);

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--charcoal-light);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: 'Nunito', sans-serif; color: var(--charcoal); line-height: 1.12; letter-spacing: -0.02em; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.wrap--wide { max-width: 1340px; }

.script { font-family: 'Dancing Script', cursive; font-weight: 700; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--primary); border-radius: 2px; }
.eyebrow--center { justify-content: center; }
.eyebrow--pill {
  background: var(--primary-light); padding: 8px 16px; border-radius: 999px; letter-spacing: 0.08em;
}
.eyebrow--pill::before { display: none; }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { background: rgba(255,255,255,.7); }

/* ---------- Section heads ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; position: relative; }
.section--cream { background: var(--cream); }
.section--charcoal { background: var(--charcoal-deep); color: rgba(255,255,255,.78); }
.section--charcoal h2, .section--charcoal h3 { color: #fff; }

.shead { max-width: 660px; margin-bottom: 60px; }
.shead--center { margin-left: auto; margin-right: auto; text-align: center; }
.shead h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 800; margin: 20px 0 16px; }
.shead p { font-size: clamp(16px, 1.6vw, 19px); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 16px;
  border-radius: 999px; padding: 15px 30px; cursor: pointer; border: none;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s;
  white-space: nowrap; overflow: hidden;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-glow); }
.btn--primary:hover { background: var(--primary-dark); box-shadow: 0 22px 50px rgba(242,101,34,.30); }
.btn--ghost { background: transparent; color: var(--charcoal); border: 2px solid var(--border); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn--white { background: #fff; color: var(--charcoal); box-shadow: var(--shadow-md); }
.btn--white:hover { color: var(--primary); }
.btn--whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 14px 32px rgba(37,211,102,.28); }
.btn--whatsapp:hover { background: #1da851; }
.btn--lg { font-size: 17px; padding: 18px 38px; }

/* shine on primary */
.btn--primary::after, .btn--whatsapp::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: left .6s var(--ease);
}
.btn--primary:hover::after, .btn--whatsapp:hover::after { left: 130%; }

.icon { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================
   UTILITY BAR + NAV
   ========================================================= */
.topbar {
  background: var(--charcoal-deep); color: rgba(255,255,255,.72);
  font-size: 13.5px; transition: margin .35s var(--ease);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 40px; gap: 24px; }
.topbar a { color: rgba(255,255,255,.72); transition: color .2s; }
.topbar a:hover { color: #fff; }
.topbar-left { display: flex; gap: 26px; align-items: center; }
.topbar-left span, .topbar-left a { display: inline-flex; align-items: center; gap: 7px; }
.topbar-left .icon { width: 15px; height: 15px; color: var(--primary); }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.topbar-right a { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); }
.topbar-right a:hover { background: var(--primary); color: #fff; }

header.nav {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s, background .3s;
}
header.nav.scrolled { box-shadow: var(--shadow-sm); border-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: auto; }
.brand-text { line-height: 1; }
.brand-text b { display: block; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 20px; color: var(--charcoal); letter-spacing: -0.01em; }
.brand-text small { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links > li > a {
  position: relative; display: block; font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 15.5px;
  color: var(--charcoal); padding: 10px 16px; border-radius: 10px; transition: color .2s, background .2s;
}
.nav-links > li > a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px;
  background: var(--primary); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-links > li > a:hover { color: var(--primary); }
.nav-links > li > a:hover::after { transform: scaleX(1); }
.nav-links > li > a.active { color: var(--primary); }
.nav-links > li > a.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 14px; }
.hamburger { display: none; background: none; border: none; cursor: pointer; color: var(--charcoal); padding: 8px; }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0 0 0 auto; width: min(360px, 86vw); z-index: 200;
  background: #fff; box-shadow: -20px 0 60px rgba(77,77,77,.18); padding: 26px 24px;
  transform: translateX(100%); transition: transform .4s var(--ease-out); display: flex; flex-direction: column;
}
.mobile-menu.open { transform: translateX(0); }
.mm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.mm-close { background: none; border: none; cursor: pointer; color: var(--charcoal); padding: 6px; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu ul a { display: block; padding: 15px 16px; font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 17px; color: var(--charcoal); border-radius: 12px; }
.mobile-menu ul a:hover, .mobile-menu ul a.active { background: var(--primary-light); color: var(--primary); }
.mobile-menu .btn { width: 100%; margin-top: auto; }
.scrim { position: fixed; inset: 0; background: rgba(53,53,53,.5); backdrop-filter: blur(3px); z-index: 190; opacity: 0; pointer-events: none; transition: opacity .35s; }
.scrim.show { opacity: 1; pointer-events: auto; }

/* =========================================================
   PAGE HERO (subpáginas)
   ========================================================= */
.page-hero { position: relative; padding: clamp(64px,7vw,104px) 0 clamp(56px,6vw,88px); background: linear-gradient(180deg, var(--cream) 0%, #fff 100%); overflow: hidden; }
.page-hero::before { content: ""; position: absolute; top: -20%; right: -8%; width: 540px; height: 540px; background: radial-gradient(circle, var(--primary-light), rgba(254,240,231,0) 68%); z-index: 0; }
.page-hero .wrap { position: relative; z-index: 1; }
.crumbs { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--charcoal-light); margin-bottom: 20px; }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { opacity: .5; }
.crumbs .cur { color: var(--primary); }
.page-hero h1 { font-size: clamp(38px,5vw,62px); font-weight: 900; max-width: 760px; margin-bottom: 18px; }
.page-hero .lead { font-size: clamp(17px,1.7vw,20px); max-width: 620px; }
.page-hero--center { text-align: center; }
.page-hero--center h1, .page-hero--center .lead { margin-left: auto; margin-right: auto; }
.page-hero--center .crumbs { justify-content: center; }

/* placeholder note for sections en construcción */
.soon { text-align: center; max-width: 560px; margin: 0 auto; }
.soon .soon-ic { width: 78px; height: 78px; border-radius: 22px; background: var(--primary-light); color: var(--primary); display: grid; place-items: center; margin: 0 auto 26px; }
.soon .soon-ic .icon { width: 38px; height: 38px; }
.soon h2 { font-size: clamp(26px,3.4vw,38px); font-weight: 800; margin-bottom: 14px; }
.soon p { font-size: 17px; margin-bottom: 28px; }

/* =========================================================
   FOOTER
   ========================================================= */
footer.foot { background: var(--charcoal-deep); color: rgba(255,255,255,.66); padding: 80px 0 32px; position: relative; overflow: hidden; }
.foot::before { content: ""; position: absolute; top: -120px; right: -80px; width: 360px; height: 360px; background: radial-gradient(circle, var(--primary-glow), transparent 70%); }
.foot-grid { position: relative; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.12); }
.foot-brand img { height: 76px; width: auto; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: .95; }
.foot-brand p { font-size: 15px; max-width: 300px; margin-bottom: 20px; }
.foot-social { display: flex; gap: 11px; }
.foot-social a { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; transition: background .2s, transform .2s; }
.foot-social a:hover { background: var(--primary); transform: translateY(-3px); }
.foot-col h5 { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 20px; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.foot-col a { font-size: 15px; transition: color .2s, padding .2s; }
.foot-col a:hover { color: var(--primary); padding-left: 4px; }
.foot-col li.with-ic { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; }
.foot-col li.with-ic .icon { width: 18px; height: 18px; color: var(--primary); margin-top: 3px; flex: none; }
.foot-bottom { position: relative; padding-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: rgba(255,255,255,.45); font-size: 13.5px; }
.foot-bottom a:hover { color: rgba(255,255,255,.8); }

/* =========================================================
   FLOATING WHATSAPP
   ========================================================= */
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 95; display: flex; align-items: center; gap: 0; }
.fab a { display: flex; align-items: center; height: 60px; background: var(--whatsapp); color: #fff; border-radius: 999px; padding: 0 18px; box-shadow: 0 12px 30px rgba(37,211,102,.42); transition: padding .3s var(--ease); overflow: hidden; }
.fab a svg { width: 30px; height: 30px; flex: none; }
.fab a .fab-label { max-width: 0; opacity: 0; white-space: nowrap; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 15px; transition: max-width .35s var(--ease), opacity .3s, margin .35s; }
.fab a:hover .fab-label { max-width: 180px; opacity: 1; margin-left: 10px; }

/* =========================================================
   ANIMATION UTILITIES
   ========================================================= */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-l { opacity: 0; transform: translateX(-40px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal-l.in { opacity: 1; transform: none; }
.reveal-r { opacity: 0; transform: translateX(40px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal-r.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(.94); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal-scale.in { opacity: 1; transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(30px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
[data-stagger].in > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal, .reveal-l, .reveal-r, .reveal-scale, [data-stagger] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  [data-parallax] { transform: none !important; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .topbar { display: none; }
  .nav-links { display: none; }
  .hamburger { display: block; }
  .nav-right .btn--primary { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .foot-grid { grid-template-columns: 1fr; }
  .fab a .fab-label { display: none; }
}

/* =========================================================
   GLOBAL EXTRAS (progress, back-to-top, preloader,
   page transitions, whatsapp greeting, tweaks panel)
   ========================================================= */

/* Animations-off (user toggle) */
.anim-off [data-parallax] { transform: none !important; }
.anim-off .reveal, .anim-off .reveal-l, .anim-off .reveal-r, .anim-off .reveal-scale, .anim-off [data-stagger] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
.anim-off .float-card--a, .anim-off .float-card--b, .anim-off .status .dot, .anim-off .scroll-cue .mouse::after, .anim-off .fab a, .anim-off .pre-ring, .anim-off .pre-logo { animation: none !important; }

/* Page enter / leave */
body { animation: pageIn .5s var(--ease) both; }
body.is-leaving { opacity: 0; transition: opacity .28s var(--ease); animation: none; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
.anim-off body, body.anim-off { animation: none !important; }

/* Scroll progress bar */
#progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 150;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark)); box-shadow: 0 0 10px var(--primary-glow); transition: width .08s linear; }

/* Back to top */
#to-top { position: fixed; right: 24px; bottom: 96px; z-index: 92; width: 46px; height: 46px; border-radius: 50%;
  background: var(--charcoal-deep); color: #fff; border: none; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s; }
#to-top.show { opacity: 1; visibility: visible; transform: none; }
#to-top:hover { background: var(--primary); transform: translateY(-3px); }
#to-top svg { width: 20px; height: 20px; }

/* Preloader */
#preloader { position: fixed; inset: 0; z-index: 9999; background: var(--white); display: grid; place-items: center;
  animation: preOut .5s var(--ease) 2.6s forwards; }
#preloader.done { animation: preOut .45s var(--ease) forwards; }
@keyframes preOut { to { opacity: 0; visibility: hidden; } }
.pre-inner { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.pre-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--primary-light); border-top-color: var(--primary); animation: preSpin 1s linear infinite; }
.pre-logo { width: 78px; height: auto; animation: prePulse 1.3s ease-in-out infinite; }
@keyframes preSpin { to { transform: rotate(360deg); } }
@keyframes prePulse { 0%,100% { transform: scale(.92); opacity: .85; } 50% { transform: scale(1.04); opacity: 1; } }

/* WhatsApp greeting bubble */
.fab-greet { position: absolute; right: 70px; bottom: 6px; width: max-content; max-width: 232px;
  background: #fff; border-radius: 16px; border-bottom-right-radius: 4px; box-shadow: var(--shadow-lg);
  padding: 13px 16px 14px; text-align: left; opacity: 0; transform: translateX(12px) scale(.92);
  transform-origin: bottom right; pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.fab-greet.show { opacity: 1; transform: none; pointer-events: auto; }
.fab-greet strong { display: block; font-family: 'Nunito',sans-serif; font-size: 14.5px; color: var(--charcoal); margin-bottom: 2px; }
.fab-greet span { display: block; font-size: 12.5px; color: var(--charcoal-light); line-height: 1.45; }
.fab-greet .fg-x { position: absolute; top: -9px; left: -9px; width: 24px; height: 24px; border-radius: 50%; border: none;
  background: var(--charcoal-deep); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; display: grid; place-items: center; box-shadow: var(--shadow-sm); }

/* Tweaks / personalization panel */
#tk-btn { position: fixed; left: 24px; bottom: 24px; z-index: 92; width: 50px; height: 50px; border-radius: 50%;
  background: #fff; color: var(--charcoal); border: 1px solid var(--border); cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-md); transition: transform .3s var(--ease), color .2s, box-shadow .2s; }
#tk-btn:hover { color: var(--primary); transform: rotate(40deg); box-shadow: var(--shadow-glow); }
#tk-btn svg { width: 24px; height: 24px; }
#tk-panel { position: fixed; left: 24px; bottom: 86px; z-index: 93; width: 270px; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px 18px 20px; opacity: 0; visibility: hidden; transform: translateY(14px) scale(.97);
  transform-origin: bottom left; transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s; }
#tk-panel.open { opacity: 1; visibility: visible; transform: none; }
.tk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tk-head b { font-family: 'Nunito',sans-serif; font-size: 16px; color: var(--charcoal); }
.tk-close { background: none; border: none; cursor: pointer; font-size: 22px; line-height: 1; color: var(--charcoal-light); padding: 0 4px; }
.tk-close:hover { color: var(--primary); }
.tk-row { margin-bottom: 16px; }
.tk-row:last-child { margin-bottom: 0; }
.tk-row > label { display: block; font-family: 'Nunito',sans-serif; font-weight: 700; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--charcoal-light); margin-bottom: 10px; }
.tk-swatches { display: flex; gap: 10px; }
.tk-sw { width: 38px; height: 38px; border-radius: 11px; border: 2px solid transparent; cursor: pointer; position: relative; transition: transform .2s; box-shadow: inset 0 0 0 2px #fff; }
.tk-sw:hover { transform: scale(1.08); }
.tk-sw.active { border-color: var(--charcoal); }
.tk-sw.active::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800; }
.tk-seg { display: flex; background: var(--cream); border: 1px solid var(--border); border-radius: 11px; padding: 4px; gap: 4px; }
.tk-opt { flex: 1; border: none; background: none; cursor: pointer; font-family: 'Nunito',sans-serif; font-weight: 700; font-size: 13.5px; color: var(--charcoal-light); padding: 8px 6px; border-radius: 8px; transition: background .2s, color .2s; }
.tk-opt.active { background: var(--primary); color: #fff; }

@media (max-width: 560px) {
  #to-top { bottom: 86px; right: 18px; }
  #tk-btn { left: 18px; bottom: 18px; }
  #tk-panel { left: 18px; right: 18px; width: auto; bottom: 78px; }
}
