/* ---------- Marca: lo único que cambia de una óptica a otra ---------- */
:root {
  --marca: #0f70b7; /* color principal del logo: botones */
  --marca-fuerte: #0b5c98; /* el mismo, más oscuro, al pasar el cursor */
  --acento: #dfbd5b; /* color de detalle, solo sobre la portada */
  --portada: #000000; /* fondo de la portada; debe ser el fondo del logo */
}

/* ---------- Colores de la página (claro y oscuro) ---------- */
:root {
  color-scheme: light dark;
  --fondo: #ffffff;
  --superficie: #f4f6f9;
  --texto: #0b1220;
  --texto-suave: #4b5563;
  --borde: #e3e7ed;
  --enlace: var(--marca);
  --foco: var(--marca);

  --radio: 12px;
  --fuente-texto: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fuente-titulos: "Outfit", var(--fuente-texto);
  --curva: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #000000;
    --superficie: #0d1218;
    --texto: #f4f6f9;
    --texto-suave: #a3adba;
    --borde: #1f2731;
    --enlace: #6fb1e4;
    --foco: #6fb1e4;
  }
}

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

/* `hidden` manda siempre, también sobre los elementos con `display` propio (botones, tiras). */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente-texto);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
p,
ol,
dl,
dd {
  margin: 0;
}

h2 {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

a {
  color: var(--enlace);
}

:where(a, button):focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
}

.contenedor {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding-inline: 20px;
}

.icono {
  width: 24px;
  height: 24px;
  flex: none;
  fill: currentColor;
}

.etiqueta {
  margin-bottom: 10px;
  color: var(--texto-suave);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--curva), border-color 200ms var(--curva), color 200ms var(--curva);
}

.boton--ancho {
  display: flex;
  width: 100%;
}

.boton--principal {
  background: var(--marca);
  color: #ffffff;
}

.boton--principal:hover {
  background: var(--marca-fuerte);
}

.boton--contorno {
  border-color: var(--borde);
  color: var(--texto);
}

.boton--contorno:hover {
  border-color: var(--texto);
}

.boton--texto {
  min-height: 48px;
  padding: 0 16px;
  color: var(--texto);
  font-size: 0.9375rem;
}

.boton--texto:hover {
  background: var(--superficie);
}

.boton--texto .icono {
  width: 20px;
  height: 20px;
}

/* ---------- Portada: siempre sobre el fondo del logo ---------- */
.portada {
  background: var(--portada);
  color: #ffffff;
  text-align: center;
  padding-block: 40px 36px;
  --foco: var(--acento);
}

.portada__logo {
  display: block;
  width: 190px;
  height: auto;
  margin-inline: auto;
}

.portada__nombre {
  margin-top: 18px;
  color: var(--acento);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.portada__lema {
  max-width: 18ch;
  margin: 14px auto 0;
  font-family: var(--fuente-titulos);
  font-weight: 500;
  font-size: clamp(1.625rem, 1.2rem + 2.2vw, 2.125rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* La misma línea dorada que subraya el nombre en el logo. */
.portada__linea {
  display: block;
  width: 140px;
  height: 1px;
  margin: 26px auto 28px;
  background: linear-gradient(90deg, transparent, var(--acento), transparent);
}

.acciones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.accion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-radius: var(--radio);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: color 200ms var(--curva);
}

.accion__icono {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  transition: border-color 200ms var(--curva), color 200ms var(--curva);
}

.accion:hover {
  color: #ffffff;
}

.accion:hover .accion__icono {
  border-color: var(--acento);
  color: var(--acento);
}

/* ---------- Secciones ---------- */
.seccion {
  padding-block: 52px;
  border-top: 1px solid var(--borde);
}

.portada + main > .seccion:first-child {
  border-top: 0;
}

/* Servicios */
.servicios {
  margin-top: 22px;
  padding: 0;
  list-style: none;
  counter-reset: servicio;
}

.servicios li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: 8px;
  padding-block: 15px;
  border-bottom: 1px solid var(--borde);
  counter-increment: servicio;
}

.servicios li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.servicios li::before {
  content: counter(servicio, decimal-leading-zero);
  grid-row: span 2;
  padding-top: 3px;
  color: var(--enlace);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.servicios h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.servicios p {
  color: var(--texto-suave);
  font-size: 0.9375rem;
}

/* Galería: tira horizontal que se desliza con el dedo. Todas las fotos ocupan un cuadro igual,
   sin importar su forma o tamaño original; lo que no cabe se recorta por los bordes. */
.galeria {
  display: flex;
  gap: 12px;
  margin: 22px -20px 0;
  padding: 0 20px 4px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
}

.galeria::-webkit-scrollbar {
  display: none;
}

.galeria li {
  flex: none;
  width: min(70vw, 260px);
  scroll-snap-align: start;
}

.galeria figure {
  margin: 0;
}

.galeria a {
  display: block;
  border-radius: 16px;
}

.galeria img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  background: var(--superficie);
}

.galeria figcaption {
  margin-top: 8px;
  color: var(--texto-suave);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

/* Promoción */
.promocion {
  overflow: hidden;
  border-radius: 20px;
  background: var(--portada);
  color: #ffffff;
  --foco: var(--acento);
}

/* La imagen se ve completa (un volante no puede perder texto), pero con un alto máximo:
   si es muy alta se reduce y queda centrada sobre el fondo de la tarjeta. */
.promocion__imagen {
  display: block;
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
}

.promocion__texto {
  padding: 28px 24px;
}

.etiqueta--acento {
  color: var(--acento);
}

.promocion__texto h2,
.promocion__texto p {
  overflow-wrap: anywhere;
}

.promocion__texto p:not(.etiqueta) {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
}

.promocion .boton {
  margin-top: 22px;
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.promocion .boton:hover {
  border-color: var(--acento);
  color: var(--acento);
}

@media (prefers-color-scheme: dark) {
  .promocion {
    background: var(--superficie);
    border: 1px solid var(--borde);
  }
}

/* Visítanos */
.direccion {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  font-weight: 500;
}

.direccion .icono {
  color: var(--enlace);
}

.horarios {
  margin-top: 20px;
  border-top: 1px solid var(--borde);
}

.horarios div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  border-bottom: 1px solid var(--borde);
  font-size: 0.9375rem;
}

.horarios dt {
  color: var(--texto-suave);
}

.horarios dd {
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mapa {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-block: 24px 16px;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
}

/* ---------- Pie ---------- */
.pie {
  padding-block: 28px 40px;
  border-top: 1px solid var(--borde);
  color: var(--texto-suave);
  font-size: 0.875rem;
  text-align: center;
}

.pie .boton {
  margin-bottom: 14px;
}

.pie p + p {
  margin-top: 4px;
}

/* ---------- Pantallas anchas: la tarjeta respira un poco más ---------- */
@media (min-width: 700px) {
  .portada {
    padding-block: 64px 56px;
  }

  .portada__logo {
    width: 220px;
  }

  .seccion {
    padding-block: 72px;
  }
}

/* ---------- Entrada suave de la portada ---------- */
@media (prefers-reduced-motion: no-preference) {
  .portada .contenedor > * {
    animation: entrar 600ms var(--curva) both;
  }

  .portada .contenedor > :nth-child(2) { animation-delay: 80ms; }
  .portada .contenedor > :nth-child(3) { animation-delay: 140ms; }
  .portada .contenedor > :nth-child(4) { animation-delay: 200ms; }
  .portada .contenedor > :nth-child(5) { animation-delay: 260ms; }
  .portada .contenedor > :nth-child(6) { animation-delay: 320ms; }

  @keyframes entrar {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}
