/* Animal Clinic — v2: una toma a pantalla completa movida por scroll. */
:root {
  --noche: #06181c;       /* fondo de la película */
  --marino: #0a2a30;      /* azul del logo, oscurecido */
  --marino-2: #2e4474;    /* azul marino del logo */
  --tinta: #f4f6f8;
  --suave: #a9c6c6;
  --aqua: #8ed1cb;        /* muros de la clínica */
  --aqua-tinta: #0b1730;
  --ambar: #f0b45e;        /* la luz de los cuadros */
  --ambar-tinta: #1d1204;
  --hueso: #f6f2ea;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --titulo: clamp(2.9rem, 13.5vw, 8rem);
  --margen: 20px;
  --barra: 60px;
}
@media (min-width: 900px) { :root { --margen: 40px; --barra: 72px; } }

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--noche); color: var(--tinta); font: 400 1.0625rem/1.5 var(--sans); overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; }
::selection { background: var(--ambar); color: var(--ambar-tinta); }

/* ── Barra: nombre y un solo botón ── */
.barra { position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--barra); padding: 0 var(--margen); display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.barra a { pointer-events: auto; text-decoration: none; }
.barra__marca { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -0.01em; }
.pildora { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ambar); color: var(--ambar-tinta); font-weight: 600; text-decoration: none; transition: background-color 0.2s ease, transform 0.2s ease; }
.pildora:hover { background: var(--hueso); }
.pildora:active { transform: scale(0.96); }
.pildora__largo { display: none; }
@media (min-width: 600px) { .pildora__largo { display: inline; } }
.pildora--grande { min-height: 58px; padding: 0 28px; font-size: 1.125rem; }
.pildora--linea { background: none; color: var(--tinta); box-shadow: inset 0 0 0 2px var(--tinta); }
.pildora--linea:hover { background: var(--tinta); color: var(--noche); }

/* ── La película ── */
.pelicula { position: relative; height: 100svh; overflow: hidden; background: var(--noche); }
.pelicula__lienzo { position: absolute; inset: 0; width: 100%; height: 100%; }
/* velo neutro para que el texto se lea sobre la foto */
.pelicula__velo { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to top, rgba(4, 20, 24, 0.94) 0%, rgba(4, 20, 24, 0.62) 34%, rgba(4, 20, 24, 0) 62%),
  linear-gradient(to bottom, rgba(4, 20, 24, 0.7) 0%, rgba(4, 20, 24, 0) 16%); }

.tomas { position: absolute; inset: 0; pointer-events: none; }
.toma { position: absolute; left: var(--margen); right: calc(var(--margen) + 26px); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
.toma > * { will-change: transform, opacity; }
.toma__num { font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--ambar); margin-bottom: 12px; }
.toma__num span { margin-left: 14px; color: var(--tinta); font-variant-numeric: tabular-nums; }
.toma h1, .toma h2 { font-family: var(--serif); font-weight: 400; font-size: var(--titulo); line-height: 0.96; letter-spacing: -0.02em; text-wrap: balance; }
.toma__linea { margin-top: 18px; font-size: 1.125rem; line-height: 1.35; max-width: 30ch; display: flex; gap: 12px; align-items: flex-start; }
.toma__ginebra { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.toma__pista { margin-top: 22px; display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ambar); }
.toma__pista i { width: 11px; height: 11px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(45deg); animation: baja 1.4s ease-in-out infinite; }
@keyframes baja { 0%, 100% { translate: 0 -3px; } 50% { translate: 0 4px; } }
.toma__acciones { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; pointer-events: auto; }
@media (min-width: 900px) {
  .toma { right: auto; width: min(64vw, 1100px); bottom: 48px; }
  .toma__linea { font-size: 1.375rem; max-width: 34ch; margin-top: 24px; }
  .toma__num { font-size: 2rem; }
}

/* índice de capítulos, a la izquierda: cambia con la escena */
.puntos { position: absolute; left: var(--margen); top: calc(var(--barra) + 20px); display: grid; gap: 2px; z-index: 5; }
.puntos button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 24px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tinta); }
.puntos button i { width: 14px; height: 2px; background: currentColor; opacity: 0.5; transition: width 0.3s ease, opacity 0.3s ease, background-color 0.3s ease; }
.puntos button span { opacity: 0; transform: translateX(-6px); transition: opacity 0.3s ease, transform 0.3s ease; white-space: nowrap; text-shadow: 0 1px 12px rgba(4, 20, 24, 0.7); }
.puntos button b { font-weight: 600; color: var(--ambar); margin-right: 4px; }
.puntos button em { font-style: normal; opacity: 0.75; margin-left: 6px; font-variant-numeric: tabular-nums; }
.puntos button.es-actual i { width: 30px; opacity: 1; background: var(--ambar); }
.puntos button.es-actual span { opacity: 1; transform: none; }
.puntos button:focus-visible { outline: 2px solid var(--ambar); outline-offset: 2px; }
@media (min-width: 900px) {
  .puntos { top: calc(var(--barra) + 7vh); gap: 4px; }
  .puntos button { min-height: 28px; font-size: 0.875rem; }
  .puntos button span { opacity: 0.5; transform: none; }
  .puntos button:hover span { opacity: 0.9; }
}

.cargando { position: absolute; inset: 0; display: grid; place-items: center; background: var(--noche); font-family: var(--serif); font-size: 1.75rem; transition: opacity 0.5s ease, visibility 0.5s; z-index: 6; }
.cargando.fuera { opacity: 0; visibility: hidden; }
.depura { position: absolute; left: var(--margen); top: calc(var(--barra) + 4px); z-index: 5; padding: 6px 10px; background: var(--noche); color: var(--ambar); font: 600 0.75rem/1.2 var(--sans); font-variant-numeric: tabular-nums; pointer-events: none; }

/* ── Sin movimiento: una foto fija por escena ── */
.quieto .pelicula { height: auto; overflow: visible; }
.quieto .pelicula__lienzo, .quieto .pelicula__velo, .quieto .puntos, .quieto .cargando, .quieto .depura { display: none; }
.quieto .tomas { position: static; }
.quieto .cuadro { position: relative; min-height: 100svh; overflow: hidden; }
.quieto .cuadro > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quieto .cuadro::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 20, 24, 0.94) 0%, rgba(4, 20, 24, 0.55) 40%, rgba(4, 20, 24, 0.15) 100%); }
.quieto .toma { z-index: 1; pointer-events: auto; }
.quieto .toma + .toma { bottom: auto; top: 96px; }

/* ── Cierre: bloque normal después de la película ── */
.cierre { position: relative; background: var(--marino); padding: 88px var(--margen) calc(64px + env(safe-area-inset-bottom, 0px)); }
.cierre__frase { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 8.4vw, 6.5rem); line-height: 0.98; letter-spacing: -0.02em; }
.cierre__frase span { display: block; }
.cierre__cols { margin-top: 56px; display: grid; gap: 44px; }
.cierre__col h3 { font: 600 0.875rem/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ambar); }
.cierre__col p { margin-top: 12px; font-size: 1.125rem; line-height: 1.45; }
.cierre__tel a { font-family: var(--serif); font-size: clamp(2.4rem, 10vw, 3.5rem); line-height: 1; letter-spacing: -0.01em; text-decoration: none; }
.cierre__col .cierre__acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cierre .pildora--linea { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cierre__redes { list-style: none; padding: 0; margin-top: 22px; display: grid; gap: 8px; font-size: 1.0625rem; }
.cierre__redes a { text-decoration: none; font-weight: 600; }
.cierre__redes a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cierre__redes span { font-weight: 400; color: var(--suave); margin-left: 6px; }
@media (min-width: 900px) {
  .cierre { padding-top: 150px; padding-bottom: 110px; }
  .cierre__frase { font-size: clamp(4rem, 7.2vw, 7.5rem); }
  .cierre__cols { grid-template-columns: 1.1fr 1fr 1fr; column-gap: 48px; margin-top: 110px; }
}

.sin-js { padding: 96px var(--margen); font-size: 1.25rem; max-width: 40ch; }

@media (prefers-reduced-motion: reduce) {
  .toma__pista i { animation: none; }
  .pildora, .cargando, .puntos button::before { transition: none; }
}

.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* titular enorme de la apertura */
.toma--grande h2 { font-size: clamp(4.2rem, 20vw, 13rem); line-height: 0.88; letter-spacing: -0.03em; }
@media (min-width: 900px) { .toma--grande { width: auto; right: var(--margen); } .toma--grande h2 { font-size: clamp(6rem, 12.5vw, 10.5rem); } }

/* dónde va el texto de una escena (guion.js → lado) */
.toma--arriba { bottom: auto; top: calc(var(--barra) + 28px); }
.toma--arriba h2, .toma--derecha h2 { text-shadow: 0 2px 28px rgba(4, 20, 24, 0.55); }
@media (min-width: 900px) {
  .toma--derecha { left: auto; right: calc(var(--margen) + 44px); width: min(44vw, 720px); }
  .toma--derecha h2 { font-size: clamp(3.5rem, 6.4vw, 7rem); }
}
.llamada:empty { display: none; }

/* ── Flujo: la frase va siempre en el mismo lugar (cambia la frase, no la posición) ── */
.toma, .toma--arriba, .toma--derecha { left: var(--margen); right: var(--margen); bottom: auto; top: 59svh; width: auto; }
.toma h2, .toma--grande h2, .toma--derecha h2 { font-size: clamp(3.2rem, 14.5vw, 9rem); line-height: 0.94; letter-spacing: -0.025em; text-shadow: 0 2px 30px rgba(4, 20, 24, 0.5); }
@media (min-width: 900px) {
  .toma, .toma--arriba, .toma--derecha { top: 54vh; right: auto; width: min(66vw, 1100px); }
  .toma h2, .toma--grande h2, .toma--derecha h2 { font-size: clamp(5rem, 10vw, 9rem); }
}
.pelicula__velo { background:
  linear-gradient(to top, rgba(4, 20, 24, 0.9) 0%, rgba(4, 20, 24, 0.62) 30%, rgba(4, 20, 24, 0.28) 52%, rgba(4, 20, 24, 0) 72%),
  linear-gradient(to bottom, rgba(4, 20, 24, 0.7) 0%, rgba(4, 20, 24, 0) 18%),
  linear-gradient(to right, rgba(4, 20, 24, 0.4) 0%, rgba(4, 20, 24, 0) 34%); }

/* ── v2 «about»: frase + línea chica + tres puntos de contacto ── */
.toma h1, .toma h2, .toma--grande h2, .toma--derecha h2 { font-size: clamp(2.6rem, 12vw, 7rem); line-height: 0.94; }
.toma--abre h1 { font-size: clamp(3.6rem, 19.5vw, 11rem); line-height: 0.88; letter-spacing: -0.03em; text-shadow: 0 2px 30px rgba(4, 20, 24, 0.5); }
.toma__bajada { margin-top: 12px; font-family: var(--serif); font-size: clamp(1.5rem, 6.4vw, 2.25rem); line-height: 1.06; letter-spacing: -0.01em; max-width: 15ch; text-wrap: balance; text-shadow: 0 1px 18px rgba(4, 20, 24, 0.6); }
.toma__chica { margin-top: 14px; font-weight: 600; font-size: 1rem; line-height: 1.35; max-width: 30ch; text-wrap: balance; text-shadow: 0 1px 14px rgba(4, 20, 24, 0.75); }
.toma__pista { margin-top: 18px; min-height: 16px; }
.pildora svg { flex: none; }
.pildora--linea { background: rgba(6, 24, 28, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1.5px rgba(244, 246, 248, 0.85); }

/* escena final: WhatsApp a todo el ancho y los otros dos debajo, a la par */
.toma--contacto .toma__acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.toma--contacto .toma__acciones .pildora { justify-content: center; min-height: 54px; padding: 0 14px; font-size: 1.0625rem; }
.toma--contacto .toma__acciones .pildora:first-child { grid-column: 1 / -1; min-height: 58px; }

/* celular: la frase arranca un poco más abajo para dejar ver al sujeto del cuadro */
@media (max-width: 899px) { .toma, .toma--arriba, .toma--derecha { top: 62svh; } }
@media (max-width: 899px) and (max-height: 700px) { .toma__pista { display: none; } }
/* barra de arriba: los tres botones solo en escritorio */
.barra__contacto { display: none; gap: 8px; pointer-events: auto; }
/* barra fija de abajo: los tres botones, solo en celular */
.abajo { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
.abajo .pildora { flex: 1 1 auto; justify-content: center; gap: 6px; min-height: 50px; padding: 0 10px; font-size: 0.9375rem; white-space: nowrap; }
.abajo .pildora svg { width: 18px; height: 18px; }
.abajo:empty, .barra__contacto:empty { display: none; }

@media (min-width: 900px) {
  /* el tamaño también se mide contra el alto, para que la frase y los botones quepan en pantallas bajas */
  .toma h1, .toma h2, .toma--grande h2, .toma--derecha h2 { font-size: clamp(3.5rem, min(8.6vw, 14vh), 8.5rem); }
  .toma--abre h1 { font-size: clamp(4.5rem, min(11vw, 19vh), 10.5rem); }
  /* escritorio: la frase ocupa la columna izquierda (dos renglones) y deja libre al sujeto del cuadro */
  .toma h2 { max-width: 5.5em; }
  .toma--abre h1 { max-width: 3.6em; }
  .toma__bajada { margin-top: 14px; font-size: clamp(2rem, 3vw, 3rem); max-width: none; }
  .toma__chica { margin-top: 18px; font-size: 1.1875rem; max-width: 44ch; }
  .toma--contacto .toma__acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
  .toma--contacto .toma__acciones .pildora, .toma--contacto .toma__acciones .pildora:first-child { min-height: 60px; padding: 0 28px; font-size: 1.125rem; }
  .barra__contacto { display: flex; }
  .barra__contacto .pildora { min-height: 44px; padding: 0 18px; font-size: 1rem; }
  .abajo { display: none; }
}
/* sin movimiento, en celular: la barra fija de abajo se queda, así que la escena final no repite los botones */
@media (max-width: 899px) { .quieto .toma--contacto .toma__acciones { display: none; } }

/* línea chica con liga (opiniones → ficha de Google Maps) */
.toma__chica a { pointer-events: auto; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.toma__chica a:hover { color: var(--ambar); }
/* pantallas bajas: la frase sube un poco y los botones de la escena final se compactan, para que todo quepa */
@media (max-width: 899px) and (max-height: 700px) {
  .toma, .toma--arriba, .toma--derecha { top: 57svh; }
  .toma--contacto .toma__acciones { margin-top: 14px; }
  .toma--contacto .toma__acciones .pildora, .toma--contacto .toma__acciones .pildora:first-child { min-height: 48px; }
}
@media (min-width: 900px) and (max-height: 700px) { .toma, .toma--arriba, .toma--derecha { top: 47vh; } }
/* sin movimiento, en celular: la barra fija se queda, el cierre le deja lugar */
@media (max-width: 899px) { .quieto .cierre { padding-bottom: 120px; } }
