/* ==========================================================================
   HuellaVet — prototipo de landing (clínica veterinaria 3D) · tema cálido
   Paleta: crema #fbf6ef (campo), tinta #1e2a3a (estructura), coral #ff7a59
   (acción), menta #3cc4a0 (salud). Tipos: Bricolage Grotesque (títulos),
   Instrument Serif itálica (acento), Inter (texto).
   Capas (de atrás hacia delante):
     body → .section-bg de cada sección (z -1) → canvas Three.js fijo
     (#vet-3d, z 0) → contenido de cada sección (.container, z 1).
   Ningún <section>/<main> crea contexto de apilamiento: así el canvas queda
   entre el fondo y el contenido (el panel de Servicios tapa al perrito que se asoma).
   ========================================================================== */

:root {
   --page: #fbf6ef;
   --ink: #1e2a3a;
   --ink-lift: #2c3d55;
   --muted: #5d6878;
   --faint: #98a1ad;
   --accent: #ff7a59;
   --accent-deep: #f0603d;
   --accent-ink: #c24a2c;
   --accent-soft: #ffe6dc;
   --mint: #3cc4a0;
   --mint-soft: #d9f5ec;
   --sun: #ffc857;
   --line: rgba(30, 42, 58, 0.1);
   --glass: rgba(255, 255, 255, 0.75);
   --shadow: 0 30px 60px -36px rgba(30, 42, 58, 0.38), 0 0 0 1px var(--line);
   --ease: cubic-bezier(0.16, 1, 0.3, 1);
   --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
   --header-h: 76px;
   --serif: "Instrument Serif", Georgia, serif;
   --display: "Bricolage Grotesque", "Inter", sans-serif;
}

*,
*::before,
*::after {
   box-sizing: border-box;
}

html {
   scroll-behavior: smooth;
   overflow-x: clip;
}

body {
   margin: 0;
   font-family: "Inter", system-ui, sans-serif;
   font-size: 16px;
   line-height: 1.6;
   color: var(--ink);
   background: var(--page);
   -webkit-font-smoothing: antialiased;
   overflow-x: clip;
}

h1, h2, h3 {
   font-family: var(--display);
   line-height: 1.02;
   margin: 0;
   letter-spacing: -0.035em;
   color: var(--ink);
}

h1 em,
h2 em {
   font-family: var(--serif);
   font-style: italic;
   font-weight: 400;
   letter-spacing: -0.01em;
   color: var(--accent-ink);
}

p {
   margin: 0;
}

a {
   color: inherit;
}

::selection {
   background: var(--accent-soft);
}

.container {
   width: 100%;
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 24px;
}

/* Canvas 3D fijo */
.vet-3d {
   position: fixed;
   inset: 0;
   z-index: 0;
   pointer-events: none;
   opacity: 0;
   transition: opacity 1.2s ease;
}

.vet-3d.is-ready {
   opacity: 1;
}

.vet-3d canvas {
   display: block;
   width: 100% !important;
   height: 100% !important;
}

.proto-ribbon,
.site-footer {
   position: relative;
   z-index: 1;
}

.hero > .container,
.section > .container {
   position: relative;
   z-index: 1;
}

.pet-anchor {
   cursor: pointer;
   -webkit-tap-highlight-color: transparent;
}

/* --------------------------------------------------------------------------
   Fondos
   -------------------------------------------------------------------------- */
.section-bg {
   position: absolute;
   inset: 0;
   z-index: -1;
   overflow: hidden;
   pointer-events: none;
}

.blob {
   position: absolute;
   border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%;
   filter: blur(10px);
   animation: blob 14s ease-in-out infinite alternate;
}

@keyframes blob {
   to { border-radius: 58% 42% 40% 60% / 42% 58% 42% 58%; transform: translate3d(20px, -24px, 0) rotate(12deg); }
}

.bg-hero {
   background:
      radial-gradient(ellipse 60% 70% at 15% 30%, #fff, transparent 70%),
      linear-gradient(180deg, #fff3e6 0%, var(--page) 100%);
}

.bg-hero .blob-a {
   width: 560px;
   height: 520px;
   right: -60px;
   top: 8%;
   background: radial-gradient(circle at 40% 40%, #ffd8c8, #ffb59f 70%);
   opacity: 0.75;
}

.bg-hero .blob-b {
   width: 220px;
   height: 200px;
   right: 38%;
   bottom: 6%;
   background: var(--mint-soft);
   animation-duration: 18s;
}

/* Huellitas que cruzan el fondo del Hero */
.paw-trail {
   position: absolute;
   left: -10%;
   bottom: 10%;
   width: 120%;
   height: 140px;
   opacity: 0.12;
   background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 140'%3E%3Cg fill='%231e2a3a'%3E%3Cg transform='translate(10 70) rotate(70)'%3E%3Cellipse cx='16' cy='21' rx='7' ry='6'/%3E%3Cellipse cx='7' cy='13' rx='3' ry='3.8'/%3E%3Cellipse cx='12.5' cy='7.5' rx='3' ry='3.8'/%3E%3Cellipse cx='19.5' cy='7.5' rx='3' ry='3.8'/%3E%3Cellipse cx='25' cy='13' rx='3' ry='3.8'/%3E%3C/g%3E%3Cg transform='translate(90 30) rotate(80)'%3E%3Cellipse cx='16' cy='21' rx='7' ry='6'/%3E%3Cellipse cx='7' cy='13' rx='3' ry='3.8'/%3E%3Cellipse cx='12.5' cy='7.5' rx='3' ry='3.8'/%3E%3Cellipse cx='19.5' cy='7.5' rx='3' ry='3.8'/%3E%3Cellipse cx='25' cy='13' rx='3' ry='3.8'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat-x 0 0 / 160px 140px;
   animation: trail 40s linear infinite;
}

@keyframes trail {
   to { background-position: 1600px 0; }
}

.bg-services {
   background: linear-gradient(180deg, #f3ece2 0%, var(--page) 40%);
}

.bg-services .blob-a {
   width: 420px;
   height: 380px;
   left: -140px;
   bottom: 10%;
   background: var(--mint-soft);
   opacity: 0.8;
}

.bg-care {
   background: linear-gradient(180deg, var(--page) 0%, #fdf0e8 35%, #fbe8de 100%);
}

.bg-care .blob-a {
   width: 520px;
   height: 480px;
   left: -80px;
   top: 12%;
   background: radial-gradient(circle at 40% 40%, #ffe3d6, #ffc9b5 70%);
   opacity: 0.8;
}

.bg-care .blob-b {
   width: 240px;
   height: 220px;
   right: 4%;
   bottom: 10%;
   background: var(--mint-soft);
}

.bg-contact {
   border-radius: 40px 40px 0 0;
   background:
      radial-gradient(ellipse 50% 60% at 90% 0%, rgba(255, 122, 89, 0.35), transparent 70%),
      linear-gradient(150deg, var(--ink) 0%, var(--ink-lift) 100%);
}

.bg-contact .blob-a {
   width: 360px;
   height: 320px;
   left: -100px;
   bottom: -80px;
   background: rgba(60, 196, 160, 0.18);
}

/* --------------------------------------------------------------------------
   Aviso de prototipo + header flotante
   -------------------------------------------------------------------------- */
.proto-ribbon {
   display: flex;
   justify-content: center;
   gap: 16px;
   flex-wrap: wrap;
   padding: 6px 16px;
   font-size: 12px;
   color: rgba(255, 255, 255, 0.85);
   background: var(--ink);
}

.proto-ribbon a {
   color: var(--accent);
   font-weight: 600;
   text-decoration: none;
}

.site-header {
   position: sticky;
   top: 0;
   z-index: 30;
   padding-top: 12px;
   height: var(--header-h);
   pointer-events: none;
}

.header-pill {
   position: relative;
   display: flex;
   align-items: center;
   gap: 18px;
   height: 56px;
   padding: 0 8px 0 20px;
   border-radius: 999px;
   pointer-events: auto;
   background: rgba(255, 255, 255, 0.6);
   border: 1px solid rgba(255, 255, 255, 0.85);
   -webkit-backdrop-filter: blur(18px) saturate(1.5);
   backdrop-filter: blur(18px) saturate(1.5);
   box-shadow: 0 10px 30px -22px rgba(30, 42, 58, 0.4);
   transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.site-header.is-scrolled .header-pill {
   background: rgba(255, 255, 255, 0.86);
   box-shadow: 0 18px 40px -22px rgba(30, 42, 58, 0.45), 0 0 0 1px var(--line);
}

.scroll-progress {
   position: absolute;
   left: 26px;
   right: 26px;
   bottom: -1px;
   height: 2px;
   border-radius: 2px;
   background: linear-gradient(90deg, var(--accent), var(--sun));
   transform: scaleX(var(--progress, 0));
   transform-origin: 0 50%;
}

.brand {
   display: inline-flex;
   align-items: center;
   gap: 9px;
   font-family: var(--display);
   font-size: 19px;
   font-weight: 600;
   letter-spacing: -0.02em;
   text-decoration: none;
   color: var(--ink);
}

.brand strong {
   font-weight: 800;
   color: var(--accent-ink);
}

.brand-mark {
   width: 26px;
   height: 26px;
   color: var(--accent);
   transition: transform 0.6s var(--bounce);
}

.brand:hover .brand-mark {
   transform: rotate(-18deg) scale(1.12);
}

.main-nav {
   display: flex;
   align-items: center;
   gap: 2px;
   margin: 0 auto;
}

.main-nav a {
   position: relative;
   padding: 8px 14px;
   font-size: 14px;
   font-weight: 500;
   text-decoration: none;
   color: var(--muted);
   border-radius: 999px;
   transition: color 0.3s ease;
}

.main-nav a::after {
   content: "";
   position: absolute;
   left: 50%;
   bottom: 3px;
   width: 4px;
   height: 4px;
   margin-left: -2px;
   border-radius: 50%;
   background: var(--accent);
   transform: scale(0);
   transition: transform 0.4s var(--bounce);
}

.main-nav a:hover,
.main-nav a.is-active {
   color: var(--ink);
}

.main-nav a.is-active::after {
   transform: scale(1);
}

.main-nav .nav-cta {
   display: none;
}

.nav-toggle {
   display: none;
   position: relative;
   width: 44px;
   height: 44px;
   margin-left: auto;
   padding: 0;
   border: 0;
   border-radius: 50%;
   background: var(--ink);
   cursor: pointer;
}

.nav-toggle span {
   position: absolute;
   left: 14px;
   right: 14px;
   height: 2px;
   border-radius: 2px;
   background: #fff;
   transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}

.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 24px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
   position: relative;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 10px;
   padding: 15px 26px;
   border: 0;
   border-radius: 999px;
   font: 600 15px/1 "Inter", sans-serif;
   text-decoration: none;
   cursor: pointer;
   overflow: hidden;
   isolation: isolate;
   transition: transform 0.4s var(--ease), box-shadow 0.4s ease, color 0.3s ease;
}

.btn-primary {
   color: #fff;
   background: var(--ink);
   box-shadow: 0 16px 30px -16px rgba(30, 42, 58, 0.7);
}

.btn-primary::before {
   content: "";
   position: absolute;
   inset: 0;
   z-index: -1;
   border-radius: inherit;
   background: var(--accent);
   transform: translateY(101%);
   transition: transform 0.5s var(--ease);
}

.btn-primary:hover {
   box-shadow: 0 22px 40px -18px rgba(240, 96, 61, 0.9);
}

.btn-primary:hover::before {
   transform: none;
}

.btn-arrow {
   display: inline-block;
   transition: transform 0.4s var(--ease);
}

.btn:hover .btn-arrow {
   transform: translateX(4px);
}

.btn-link {
   padding-left: 8px;
   padding-right: 8px;
   color: var(--ink);
   background: none;
}

.btn-link::after {
   content: "";
   position: absolute;
   left: 8px;
   right: 8px;
   bottom: 8px;
   height: 1px;
   background: currentColor;
   transform-origin: 100% 50%;
   transition: transform 0.5s var(--ease);
}

.btn-link:hover::after {
   transform: scaleX(0);
}

.btn:focus-visible,
.main-nav a:focus-visible,
.contact-link:focus-visible,
.brand:focus-visible {
   outline: 2px solid var(--accent-deep);
   outline-offset: 3px;
}

.header-cta {
   padding: 12px 20px;
   font-size: 14px;
}

.btn-block {
   width: 100%;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
section[id] {
   scroll-margin-top: calc(var(--header-h) + 4px);
}

.hero {
   position: relative;
   min-height: calc(100svh - var(--header-h) - 30px);
   display: flex;
   align-items: center;
   padding: 10px 0 60px;
}

.hero-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   align-items: center;
   gap: 30px;
}

.kicker {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 7px 14px;
   font-size: 11.5px;
   font-weight: 700;
   letter-spacing: 0.14em;
   text-transform: uppercase;
   color: var(--accent-ink);
   background: var(--accent-soft);
   border-radius: 999px;
}

.kicker::before {
   content: "";
   width: 6px;
   height: 6px;
   border-radius: 50%;
   background: var(--accent);
}

.hero .kicker {
   color: var(--ink);
   background: #fff;
   box-shadow: 0 0 0 1px var(--line), 0 10px 24px -16px rgba(30, 42, 58, 0.4);
}

.hero .kicker::before {
   display: none;
}

.kicker .dot,
.pulse {
   position: relative;
   width: 7px;
   height: 7px;
   border-radius: 50%;
   background: var(--accent);
   flex: 0 0 auto;
}

.pulse.is-mint {
   background: var(--mint);
}

.kicker .dot::after,
.pulse::after {
   content: "";
   position: absolute;
   inset: 0;
   border-radius: 50%;
   background: inherit;
   animation: ping 2s var(--ease) infinite;
}

@keyframes ping {
   from { transform: scale(1); opacity: 0.7; }
   to { transform: scale(3.2); opacity: 0; }
}

.hero h1 {
   margin: 22px 0;
   font-size: clamp(3rem, 6.4vw, 5.6rem);
   font-weight: 800;
   line-height: 0.96;
}

.hero h1 em {
   font-size: 1.1em;
}

.lead {
   max-width: 440px;
   font-size: 18px;
   color: var(--muted);
}

.hero-actions {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 10px 18px;
   margin-top: 32px;
}

.hero-proof {
   display: flex;
   align-items: center;
   gap: 14px;
   margin-top: 36px;
   font-size: 14px;
   line-height: 1.35;
}

.hero-proof small {
   font-size: 13px;
   color: var(--muted);
}

.pets {
   display: flex;
}

.pets i {
   display: grid;
   place-items: center;
   width: 38px;
   height: 38px;
   margin-left: -10px;
   border: 2px solid var(--page);
   border-radius: 50%;
   background: var(--accent-soft);
}

.pets svg {
   width: 18px;
   height: 18px;
   fill: var(--accent-ink);
}

.pets i:nth-child(2) svg { fill: #b7791f; transform: rotate(-15deg); }
.pets i:last-child svg { fill: #1f8f73; transform: rotate(15deg); }

.pets i:first-child { margin-left: 0; background: #ffe9c7; }
.pets i:last-child { background: var(--mint-soft); }

.hero-stage {
   position: relative;
   height: min(600px, 66vh);
}

.stage-badge {
   position: absolute;
   display: grid;
   grid-template-columns: auto 1fr;
   column-gap: 10px;
   align-items: center;
   padding: 12px 16px;
   font-size: 12px;
   line-height: 1.35;
   color: var(--muted);
   background: var(--glass);
   border: 1px solid rgba(255, 255, 255, 0.95);
   border-radius: 18px;
   -webkit-backdrop-filter: blur(14px);
   backdrop-filter: blur(14px);
   box-shadow: var(--shadow);
   pointer-events: none;
   animation: badge-in 1s var(--bounce) both, bob 6s ease-in-out infinite alternate;
}

.stage-badge .pulse {
   grid-row: span 2;
}

.stage-badge strong {
   font-size: 13.5px;
   color: var(--ink);
}

.badge-a {
   top: 10%;
   left: 0;
   animation-delay: 0.9s, 1.9s;
}

.badge-b {
   bottom: 22%;
   right: 0;
   animation-delay: 1.1s, 0s;
}

@keyframes badge-in {
   from { opacity: 0; transform: translate3d(0, 20px, 0) scale(0.85); }
}

@keyframes bob {
   from { translate: 0 0; }
   to { translate: 0 -10px; }
}

/* Globo del ladrido (app.js lo activa al tocar al perrito) */
.bark {
   position: absolute;
   left: 58%;
   top: 8%;
   padding: 8px 16px;
   font: 800 20px/1 var(--display);
   color: #fff;
   background: var(--accent);
   border-radius: 18px 18px 18px 4px;
   box-shadow: 0 14px 28px -12px rgba(240, 96, 61, 0.8);
   opacity: 0;
   transform: scale(0.4) rotate(-10deg);
   transform-origin: 0 100%;
   pointer-events: none;
}

.bark.is-on {
   animation: bark 1.1s var(--bounce) both;
}

@keyframes bark {
   0% { opacity: 0; transform: scale(0.4) rotate(-10deg); }
   25% { opacity: 1; transform: scale(1.08) rotate(4deg); }
   70% { opacity: 1; transform: scale(1) rotate(0); }
   100% { opacity: 0; transform: translateY(-14px) scale(0.9); }
}

.stage-hint {
   position: absolute;
   left: 50%;
   bottom: 2%;
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 8px 14px;
   font-size: 12.5px;
   font-weight: 600;
   color: var(--ink);
   background: #fff;
   border-radius: 999px;
   box-shadow: var(--shadow);
   transform: translateX(-50%);
   pointer-events: none;
   white-space: nowrap;
   animation: hint 2.4s ease-in-out infinite;
}

.stage-hint svg {
   width: 16px;
   height: 16px;
   fill: var(--accent);
}

@keyframes hint {
   50% { transform: translate(-50%, -4px); }
}

/* --------------------------------------------------------------------------
   Cinta de servicios
   -------------------------------------------------------------------------- */
.marquee {
   position: relative;
   z-index: 1;
   overflow: hidden;
   padding: 22px 0;
   background:
      radial-gradient(ellipse 30% 120% at 85% 50%, rgba(255, 122, 89, 0.3), transparent 70%),
      var(--ink);
   transform: rotate(-1.4deg) scale(1.02);
   box-shadow: 0 30px 50px -30px rgba(30, 42, 58, 0.6);
}

.marquee-track {
   display: flex;
   align-items: center;
   gap: 30px;
   width: max-content;
   animation: marquee 40s linear infinite;
}

.marquee span {
   font: 700 clamp(1.4rem, 2.4vw, 2rem)/1 var(--display);
   letter-spacing: -0.02em;
   white-space: nowrap;
   color: #fff;
}

.marquee span:nth-of-type(even) {
   font: 400 clamp(1.5rem, 2.6vw, 2.2rem)/1 var(--serif);
   font-style: italic;
   color: var(--accent);
}

.marquee i svg {
   display: block;
   width: 22px;
   height: 22px;
   fill: var(--sun);
   transform: rotate(20deg);
}

.marquee:hover .marquee-track {
   animation-play-state: paused;
}

@keyframes marquee {
   to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */
.section {
   position: relative;
   padding: 110px 0;
}

.section-head {
   max-width: 720px;
   margin: 0 auto 50px;
   text-align: center;
}

.section-head.left {
   max-width: 560px;
   margin: 0 0 40px;
   text-align: left;
}

.section-head h2 {
   margin-top: 16px;
   font-size: clamp(2.3rem, 4.8vw, 3.8rem);
   font-weight: 800;
}

.section-head h2 em {
   display: block;
}

.section-head p {
   margin-top: 14px;
   font-size: 17px;
   color: var(--muted);
}

/* --------------------------------------------------------------------------
   Servicios: panel con tarjetas (el perrito se asoma por su borde superior)
   -------------------------------------------------------------------------- */
#servicios {
   padding-top: 0;
}

#servicios .marquee {
   margin-bottom: 90px;
}

.services-panel {
   position: relative;
   margin-top: 150px;
   padding: 18px;
   background: #fff;
   border-radius: 32px;
   box-shadow: 0 40px 80px -40px rgba(30, 42, 58, 0.38), 0 0 0 1px var(--line);
}

/* La cabeza del perrito vive encima de este rectángulo; su borde inferior = borde del panel */
.peek-anchor {
   position: absolute;
   right: 9%;
   bottom: 100%;
   width: 210px;
   height: 170px;
}

/* El encabezado sube junto al panel para no dejar hueco */
#servicios .section-head {
   margin-bottom: -110px;
}

.service-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 14px;
   margin: 0;
   padding: 0;
   list-style: none;
}

.service-card {
   position: relative;
   display: flex;
   flex-direction: column;
   gap: 8px;
   padding: 26px 24px;
   background: var(--page);
   border-radius: 24px;
   transition: transform 0.5s var(--bounce), box-shadow 0.4s ease, background-color 0.4s ease;
}

.service-card:hover {
   transform: translateY(-6px);
   background: #fff;
   box-shadow: var(--shadow);
}

.s-ico {
   display: grid;
   place-items: center;
   width: 54px;
   height: 54px;
   margin-bottom: 8px;
   border-radius: 18px;
   background: var(--accent-soft);
   transition: transform 0.6s var(--bounce);
}

.service-card:nth-child(2n) .s-ico { background: var(--mint-soft); }
.service-card:nth-child(3n) .s-ico { background: #ffefcc; }

.service-card:hover .s-ico {
   transform: rotate(-10deg) scale(1.08);
}

.s-ico svg {
   width: 28px;
   height: 28px;
   fill: none;
   stroke: var(--ink);
   stroke-width: 2.2;
   stroke-linecap: round;
   stroke-linejoin: round;
}

.service-card h3 {
   font-size: 21px;
   font-weight: 700;
   letter-spacing: -0.025em;
}

.service-card p {
   font-size: 14.5px;
   color: var(--muted);
}

.s-tag {
   align-self: flex-start;
   margin-top: auto;
   padding: 4px 10px;
   font-size: 11.5px;
   font-weight: 600;
   color: var(--muted);
   background: #fff;
   border-radius: 999px;
   box-shadow: 0 0 0 1px var(--line);
}

.service-card.is-featured {
   color: #fff;
   background:
      radial-gradient(ellipse 80% 70% at 100% 0%, rgba(255, 122, 89, 0.45), transparent 70%),
      var(--ink);
}

.service-card.is-featured h3 {
   color: #fff;
}

.service-card.is-featured p {
   color: rgba(255, 255, 255, 0.75);
}

.service-card.is-featured .s-ico {
   background: var(--accent);
}

.service-card.is-featured .s-tag {
   color: var(--ink);
   background: var(--sun);
   box-shadow: none;
}

.service-card.is-featured:hover {
   background:
      radial-gradient(ellipse 80% 70% at 100% 0%, rgba(255, 122, 89, 0.6), transparent 70%),
      var(--ink);
}

/* Cifras */
.stats-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   margin-top: 28px;
   padding: 40px;
   border-radius: 32px;
   background:
      radial-gradient(ellipse 45% 90% at 100% 0%, rgba(255, 122, 89, 0.35), transparent 70%),
      radial-gradient(ellipse 35% 80% at 0% 100%, rgba(60, 196, 160, 0.18), transparent 70%),
      linear-gradient(135deg, var(--ink), var(--ink-lift));
   box-shadow: 0 40px 70px -40px rgba(30, 42, 58, 0.7);
}

.stat {
   padding: 6px 28px;
   border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.stat:first-child {
   border-left: 0;
   padding-left: 0;
}

.stat strong {
   display: block;
   font: 800 clamp(2.2rem, 4.4vw, 3.4rem)/1 var(--display);
   letter-spacing: -0.04em;
   color: #fff;
   font-variant-numeric: tabular-nums;
}

.stat strong i {
   font-style: normal;
   color: var(--accent);
}

.stat span {
   display: block;
   margin-top: 10px;
   font-size: 14px;
   color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
   Castración (sección fijada: el gatito se recupera mientras se baja)
   -------------------------------------------------------------------------- */
#cuidado {
   --pin: 110svh;
   min-height: calc(100svh - var(--header-h) + var(--pin));
   padding: 0;
}

#cuidado > .container {
   position: sticky;
   top: var(--header-h);
   display: flex;
   align-items: center;
   height: calc(100svh - var(--header-h));
   padding-top: 16px;
   padding-bottom: 16px;
}

.care-grid {
   display: grid;
   grid-template-columns: 1.05fr 0.95fr;
   gap: 48px;
   align-items: center;
   width: 100%;
   height: 100%;
}

#cuidado .section-head {
   margin-bottom: 22px;
}

#cuidado .section-head h2 {
   margin-top: 12px;
   font-size: clamp(2rem, 3.8vw, 3.2rem);
}

.cat-stage {
   position: relative;
   height: 100%;
   max-height: 600px;
}

.heal-meter {
   position: absolute;
   left: 50%;
   bottom: 4%;
   transform: translateX(-50%);
   display: flex;
   align-items: center;
   gap: 12px;
   padding: 10px 16px;
   font-size: 12px;
   font-weight: 600;
   letter-spacing: 0.06em;
   text-transform: uppercase;
   color: var(--muted);
   background: var(--glass);
   border: 1px solid rgba(255, 255, 255, 0.95);
   border-radius: 999px;
   -webkit-backdrop-filter: blur(12px);
   backdrop-filter: blur(12px);
   box-shadow: var(--shadow);
   white-space: nowrap;
   pointer-events: none;
}

.meter {
   width: 110px;
   height: 6px;
   border-radius: 999px;
   background: rgba(60, 196, 160, 0.22);
   overflow: hidden;
}

.meter i {
   display: block;
   height: 100%;
   width: calc(var(--heal, 0) * 100%);
   border-radius: inherit;
   background: linear-gradient(90deg, #9be6cf, var(--mint));
}

.meter-value {
   min-width: 38px;
   color: var(--ink);
   font-variant-numeric: tabular-nums;
}

.steps {
   position: relative;
   display: grid;
   gap: 4px;
   margin: 0;
   padding: 0;
   list-style: none;
}

.steps::before,
.steps::after {
   content: "";
   position: absolute;
   left: 23px;
   top: 30px;
   width: 2px;
   border-radius: 2px;
}

.steps::before {
   bottom: 30px;
   background: rgba(30, 42, 58, 0.1);
}

.steps::after {
   height: calc((100% - 60px) * var(--steps-p, 0));
   background: linear-gradient(180deg, var(--ink), var(--mint));
}

.step {
   position: relative;
   display: flex;
   gap: 20px;
   align-items: center;
   padding: 14px 0;
   opacity: 0.35;
   transform: translateX(16px);
   transition: opacity 0.5s ease, transform 0.7s var(--ease);
}

.step.is-active {
   opacity: 1;
   transform: none;
}

.step-dot {
   position: relative;
   z-index: 1;
   flex: 0 0 48px;
   display: grid;
   place-items: center;
   width: 48px;
   height: 48px;
   border-radius: 50%;
   font: 800 18px/1 var(--display);
   color: var(--ink);
   background: #fff;
   box-shadow: 0 0 0 1px var(--line);
   transition: background-color 0.5s ease, box-shadow 0.5s ease, transform 0.6s var(--bounce);
}

.step.is-active .step-dot {
   color: #fff;
   background: var(--mint);
   box-shadow: 0 0 0 8px rgba(60, 196, 160, 0.2);
   transform: scale(1.05);
}

.step h3 {
   font-size: clamp(1.2rem, 2vw, 1.5rem);
   margin-bottom: 2px;
}

.step p {
   font-size: 15px;
   color: var(--muted);
}

/* --------------------------------------------------------------------------
   Contacto
   -------------------------------------------------------------------------- */
#contacto {
   padding-bottom: 100px;
}

#contacto .kicker {
   color: var(--ink);
   background: var(--sun);
}

#contacto .kicker::before {
   background: var(--ink);
}

#contacto .section-head h2 {
   color: #fff;
   font-size: clamp(2.6rem, 6vw, 4.4rem);
}

#contacto .section-head h2 em {
   color: var(--accent);
}

#contacto .section-head p {
   color: rgba(255, 255, 255, 0.72);
}

.contact-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 60px;
   align-items: end;
}

.contact-links {
   margin: 0;
   padding: 0;
   list-style: none;
   border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.contact-link {
   display: flex;
   align-items: center;
   gap: 16px;
   padding: 18px 4px;
   text-decoration: none;
   border-bottom: 1px solid rgba(255, 255, 255, 0.14);
   transition: padding 0.5s var(--ease);
}

.contact-link:hover {
   padding-left: 14px;
}

.contact-link small {
   display: block;
   font-size: 11px;
   letter-spacing: 0.12em;
   text-transform: uppercase;
   color: rgba(255, 255, 255, 0.55);
}

.contact-link > span:nth-child(2) {
   flex: 1;
   min-width: 0;
   font-weight: 600;
   color: #fff;
   overflow-wrap: anywhere;
}

.c-ico {
   display: grid;
   place-items: center;
   flex: 0 0 44px;
   height: 44px;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.1);
   transition: background-color 0.4s ease;
}

.c-ico svg {
   width: 20px;
   height: 20px;
   fill: #fff;
   transition: fill 0.4s ease;
}

.contact-link:hover .c-ico {
   background: #fff;
}

.contact-link:hover .c-ico svg {
   fill: var(--ink);
}

.contact-link.is-wa:hover .c-ico svg {
   fill: #16a34a;
}

.c-go {
   color: var(--accent);
   font-size: 18px;
   transition: transform 0.5s var(--ease);
}

.contact-link:hover .c-go {
   transform: translateX(6px) rotate(-45deg);
}

.contact-place {
   display: flex;
   align-items: center;
   gap: 12px;
   margin-top: 24px;
   font-size: 14px;
   color: rgba(255, 255, 255, 0.7);
}

/* El perrito se sienta en el borde superior del formulario */
.form-wrap {
   position: relative;
   padding-top: 170px;
}

/* Perrito (derecha), gatito (izquierda) y el ovillo entre ellos */
.contact-pet {
   position: absolute;
   right: 16px;
   top: -8px;
   width: 330px;
   height: 180px;
}

.contact-form {
   display: grid;
   gap: 16px;
   padding: 32px;
   background: #fff;
   border-radius: 28px;
   box-shadow: 0 50px 80px -40px rgba(8, 14, 24, 0.85);
}

.contact-form h3 {
   font-size: 26px;
}

.field-row {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 12px;
}

.field {
   position: relative;
   display: block;
}

.field input {
   width: 100%;
   padding: 24px 16px 10px;
   font: 15px "Inter", sans-serif;
   color: var(--ink);
   background: var(--page);
   border: 1px solid transparent;
   border-radius: 14px;
   transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.field > span {
   position: absolute;
   left: 17px;
   top: 17px;
   font-size: 15px;
   color: var(--faint);
   pointer-events: none;
   transform-origin: 0 0;
   transition: transform 0.35s var(--ease), color 0.3s ease;
}

.field input:focus {
   outline: none;
   background: #fff;
   border-color: var(--accent);
   box-shadow: 0 0 0 4px rgba(255, 122, 89, 0.2);
}

.field input:focus + span,
.field input:not(:placeholder-shown) + span {
   color: var(--accent-ink);
   transform: translateY(-10px) scale(0.75);
}

.chips {
   display: flex;
   flex-wrap: wrap;
   gap: 8px;
   margin: 0;
   padding: 0;
   border: 0;
}

.chips legend {
   width: 100%;
   margin-bottom: 8px;
   padding: 0;
   font-size: 13px;
   color: var(--muted);
}

.chips label {
   position: relative;
   cursor: pointer;
}

.chips input {
   position: absolute;
   opacity: 0;
   pointer-events: none;
}

.chips span {
   display: inline-block;
   padding: 8px 14px;
   font-size: 13.5px;
   color: var(--ink);
   border: 1px solid rgba(30, 42, 58, 0.16);
   border-radius: 999px;
   transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.4s var(--bounce);
}

.chips label:hover span {
   border-color: var(--ink);
}

.chips input:checked + span {
   color: #fff;
   background: var(--ink);
   border-color: var(--ink);
   transform: scale(1.04);
}

.chips input:focus-visible + span {
   outline: 2px solid var(--accent-deep);
   outline-offset: 2px;
}

.form-note {
   font-size: 12.5px;
   text-align: center;
   color: var(--faint);
}

.form-note.is-flash {
   color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
   padding: 36px 0;
   color: rgba(255, 255, 255, 0.7);
   background: #151e2b;
}

.site-footer .brand {
   color: #fff;
}

.site-footer .brand strong {
   color: var(--accent);
}

.footer-inner {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   justify-content: space-between;
   gap: 20px;
}

.footer-nav {
   display: flex;
   flex-wrap: wrap;
   gap: 22px;
}

.footer-nav a {
   font-size: 14px;
   color: rgba(255, 255, 255, 0.7);
   text-decoration: none;
}

.footer-nav a:hover {
   color: var(--accent);
}

.footer-credit {
   font-size: 13px;
}

.footer-credit a {
   color: var(--accent);
   font-weight: 600;
   text-decoration: none;
}

/* --------------------------------------------------------------------------
   Animaciones de entrada (se repiten al salir y volver a entrar)
   -------------------------------------------------------------------------- */
.reveal {
   opacity: 0;
   filter: blur(6px);
   transform: translate3d(0, 34px, 0);
   transition: opacity 0.9s ease, transform 1.1s var(--ease), filter 0.9s ease;
   transition-delay: var(--d, 0ms);
}

.reveal.is-in {
   opacity: 1;
   filter: none;
   transform: none;
}

.split .w {
   display: inline-block;
   overflow: hidden;
   vertical-align: top;
   padding: 0.06em 0.02em 0.12em;
   margin: -0.06em -0.02em -0.12em;
}

.split .w > span {
   display: inline-block;
   transform: translate3d(0, 110%, 0) rotate(4deg);
   transform-origin: 0 100%;
   transition: transform 1.1s var(--ease);
   transition-delay: calc(var(--i, 0) * 70ms + var(--d, 0ms));
}

.split.is-in .w > span {
   transform: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
   :root {
      --header-h: 70px;
   }

   /* Sin backdrop-filter: si no, el menú fijo quedaría encerrado dentro de la cápsula */
   .header-pill,
   .site-header.is-scrolled .header-pill {
      height: 54px;
      padding: 0 6px 0 18px;
      background: rgba(255, 255, 255, 0.95);
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
   }

   .main-nav {
      position: fixed;
      inset: 0;
      z-index: -1;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      gap: 6px;
      margin: 0;
      padding: 100px 32px 40px;
      background: rgba(251, 246, 239, 0.98);
      clip-path: circle(0 at calc(100% - 46px) 46px);
      visibility: hidden;
      transition: clip-path 0.7s var(--ease), visibility 0.7s;
   }

   .main-nav.is-open {
      clip-path: circle(150% at calc(100% - 46px) 46px);
      visibility: visible;
   }

   .main-nav a {
      padding: 6px 0;
      font: 800 clamp(2rem, 9vw, 2.8rem)/1.15 var(--display);
      letter-spacing: -0.035em;
      color: var(--ink);
      opacity: 0;
      transform: translateY(24px);
      transition: opacity 0.5s ease, transform 0.7s var(--ease);
   }

   .main-nav.is-open a {
      opacity: 1;
      transform: none;
      transition-delay: calc(0.15s + var(--i, 0) * 0.06s);
   }

   .main-nav a::after {
      display: none;
   }

   .main-nav a.is-active {
      color: var(--accent-ink);
   }

   .main-nav .nav-cta {
      display: inline-flex;
      margin-top: 26px;
      padding: 16px 28px;
      font: 600 16px/1 "Inter", sans-serif;
      letter-spacing: 0;
      color: #fff;
   }

   .nav-toggle {
      display: block;
   }

   .header-cta {
      display: none;
   }

   .hero-grid,
   .contact-grid {
      grid-template-columns: 1fr;
   }

   .hero {
      padding-top: 30px;
   }

   .hero-stage {
      height: 440px;
   }

   .section {
      padding: 90px 0;
   }

   .service-grid {
      grid-template-columns: repeat(2, 1fr);
   }

   .stats-grid {
      grid-template-columns: repeat(2, 1fr);
      row-gap: 30px;
      padding: 34px 26px;
   }

   .stat:nth-child(3) {
      border-left: 0;
      padding-left: 0;
   }

   .care-grid {
      gap: 28px;
   }

   .contact-grid {
      gap: 30px;
   }
}

@media (max-width: 767.98px) {
   /* Castración en móvil: título → gatito → pasos, todo en la pantalla fijada */
   .care-grid {
      grid-template-columns: 1fr;
      grid-template-rows: auto minmax(0, 1fr) auto;
      gap: 10px;
      align-items: stretch;
   }

   .care-copy {
      display: contents;
   }

   #cuidado .section-head {
      order: -1;
      margin-bottom: 0;
   }

   .cat-stage {
      height: auto;
      min-height: 200px;
   }

   .peek-anchor {
      right: 6%;
      width: 160px;
      height: 130px;
   }

   /* El perrito tiene su propio hueco entre el título y el panel */
   .services-panel {
      margin-top: 135px;
   }

   #servicios .section-head {
      margin-bottom: 0;
   }
}

@media (max-width: 599.98px) {
   .container {
      padding: 0 18px;
   }

   .proto-ribbon {
      gap: 10px;
      font-size: 11px;
   }

   .hide-sm {
      display: none;
   }

   .site-header {
      padding-top: 10px;
   }

   .hero {
      min-height: 0;
      padding-bottom: 40px;
   }

   .hero h1 {
      margin: 18px 0;
   }

   .lead {
      font-size: 16.5px;
   }

   .hero-stage {
      height: 380px;
   }

   .bg-hero .blob-a {
      width: 340px;
      height: 320px;
      right: -90px;
      top: auto;
      bottom: 4%;
   }

   .stage-badge {
      padding: 9px 12px;
      font-size: 11px;
   }

   .stage-badge strong {
      font-size: 12.5px;
   }

   .badge-a {
      top: 2%;
   }

   .badge-b {
      bottom: 16%;
   }

   #servicios .marquee {
      margin-bottom: 60px;
   }

   .service-grid {
      grid-template-columns: 1fr;
   }

   .service-card {
      padding: 20px;
   }

   .stat {
      padding: 6px 16px;
   }

   .stat span {
      font-size: 13px;
   }

   #cuidado .section-head h2 {
      margin-top: 8px;
      font-size: 1.9rem;
   }

   #cuidado .step {
      padding: 5px 0;
      gap: 16px;
   }

   #cuidado .step-dot {
      flex-basis: 38px;
      width: 38px;
      height: 38px;
      font-size: 15px;
   }

   #cuidado .steps::before,
   #cuidado .steps::after {
      left: 18px;
      top: 24px;
   }

   #cuidado .steps::before {
      bottom: 24px;
   }

   #cuidado .steps::after {
      height: calc((100% - 48px) * var(--steps-p, 0));
   }

   #cuidado .step h3 {
      font-size: 1.08rem;
      margin-bottom: 0;
   }

   #cuidado .step p {
      font-size: 13px;
      line-height: 1.35;
   }

   .heal-meter {
      bottom: 0;
      padding: 7px 12px;
   }

   .form-wrap {
      padding-top: 140px;
   }

   .contact-pet {
      right: 4px;
      top: -8px;
      width: 270px;
      height: 150px;
   }

   .field-row {
      grid-template-columns: 1fr;
   }

   .contact-form {
      padding: 24px 20px;
      border-radius: 22px;
   }

   .bg-contact {
      border-radius: 28px 28px 0 0;
   }

   .footer-inner {
      flex-direction: column;
      text-align: center;
   }

   .footer-nav {
      justify-content: center;
   }
}

@media (prefers-reduced-motion: reduce) {
   html {
      scroll-behavior: auto;
   }

   .reveal,
   .step {
      filter: none;
      transform: none;
      transition: opacity 0.4s ease;
   }

   .split .w > span {
      transform: none;
      transition: none;
   }

   .blob,
   .paw-trail,
   .marquee-track,
   .stage-badge,
   .stage-hint,
   .kicker .dot::after,
   .pulse::after {
      animation: none;
   }
}
