/* ===== Estudio Contable Ratti ===== */

:root {
  --dorado: #C8AE6A;
  --dorado-claro: #E9DDBA;
  --dorado-texto: #7A6630;   /* dorado legible sobre fondo claro */
  --crema: #F8F6EE;
  --tinta: #2B2720;
  --texto: #4A453B;
  --linea: #E6E0CF;
  --blanco: #FFFFFF;
  --whatsapp: #25D366;

  --serif: "Alice", Georgia, "Times New Roman", serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ancho: 1160px;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(43, 39, 32, .08);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--texto);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--tinta);
  line-height: 1.2;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.5rem; }
p  { margin: 0 0 1em; }

a { color: inherit; }

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 24px;
}

.etiqueta {
  display: block;
  font-family: var(--sans);
  line-height: 1.65;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dorado-texto);
  margin-bottom: .9em;
}

/* ----- Botones ----- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .85em 1.5em;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.boton:hover { transform: translateY(-1px); }
.boton svg { width: 1.25em; height: 1.25em; }

.boton--oscuro { background: var(--tinta); color: var(--blanco); }
.boton--oscuro:hover { background: #000; }

.boton--borde { border-color: var(--tinta); color: var(--tinta); }
.boton--borde:hover { background: var(--tinta); color: var(--blanco); }

/* ----- Cabecera ----- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 70;   /* por encima de los botones flotantes, para que el menú abierto los tape */
  background: var(--dorado);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.cabecera__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
}
.cabecera__logo img { width: 112px; height: auto; }

/* Píldoras: fondo suave al pasar el mouse, oscuro en la sección actual */
.menu { display: flex; align-items: center; gap: 6px; }
.menu a {
  color: var(--tinta);
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  padding: .55em 1.15em;
  border-radius: 999px;
  transition: background-color .2s ease, color .2s ease;
}
.menu a:hover { background: rgba(255, 255, 255, .35); }
.menu a.activo { background: var(--tinta); color: var(--blanco); }

.menu-boton {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 10px;
  cursor: pointer;
}
.menu-boton span {
  display: block;
  height: 2px;
  background: var(--tinta);
  margin: 5px 0;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-boton[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-boton[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-boton[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Portada ----- */
.portada {
  background: var(--crema);
  padding: 72px 0 88px;
}
.portada__grilla {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.portada__bajada { font-size: 1.15rem; max-width: 34em; }
.portada__botones { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.portada__imagen { position: relative; }
.portada__imagen::before {           /* marco dorado desplazado */
  content: "";
  position: absolute;
  inset: 22px -22px -22px 22px;
  border: 2px solid var(--dorado);
  border-radius: var(--radio);
}
.portada__imagen img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}

/* ----- Destacados ----- */
.destacados__grilla {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.destacado { padding: 44px 32px; }
.destacado + .destacado { border-left: 1px solid var(--linea); }
.destacado svg {
  width: 34px; height: 34px;
  fill: none;
  stroke: var(--dorado);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 14px;
}
.destacado h3 { font-size: 1.35rem; margin-bottom: .35em; }
.destacado p { margin: 0; font-size: .97rem; }

/* ----- Secciones ----- */
.seccion { padding: 104px 0; }
.seccion--crema { background: var(--crema); }

.encabezado { max-width: 640px; margin-bottom: 52px; }
.encabezado p:last-child { font-size: 1.1rem; margin: 0; }

/* ----- Servicios ----- */
.servicios {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.servicio {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s ease, transform .25s ease;
}
.servicio:hover { box-shadow: var(--sombra); transform: translateY(-3px); }
.servicio img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.servicio__cuerpo { padding: 30px 32px 32px; display: flex; flex-direction: column; flex: 1; }
.servicio__cuerpo h3 { margin-bottom: .3em; }
.servicio ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}
.servicio li {
  position: relative;
  padding-left: 22px;
  font-size: .97rem;
  line-height: 1.4;
}
.servicio li::before {
  content: "";
  position: absolute;
  left: 2px; top: .38em;
  width: 9px; height: 5px;
  border-left: 2px solid var(--dorado);
  border-bottom: 2px solid var(--dorado);
  transform: rotate(-45deg);
}

/* ----- Clientes (dentro de Cómo trabajamos) ----- */
.clientes-bloque {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--linea);
}
.clientes__titulo {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--tinta);
  margin-bottom: 18px;
}
.clientes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.clientes li {
  background: var(--blanco);
  border: 1px solid var(--dorado-claro);
  border-radius: 999px;
  padding: .6em 1.3em;
  font-weight: 700;
  color: var(--tinta);
}

/* ----- Pasos ----- */
.pasos {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  counter-reset: none;
}
.pasos li { position: relative; }
.pasos__numero {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--dorado);
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--tinta);
  margin-bottom: 18px;
}
.pasos h3 { font-size: 1.4rem; }
.pasos p { margin: 0; }

/* ----- Opiniones ----- */
.opiniones__encabezado {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.opiniones__encabezado .encabezado { margin-bottom: 0; }

.estrellas { color: #E0A82E; letter-spacing: .12em; }

.calificacion {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--blanco);
  border: 1px solid var(--dorado-claro);
  border-radius: 999px;
  padding: .65em 1.3em;
  text-decoration: none;
  color: var(--tinta);
}
.calificacion .estrellas { font-size: 1.15rem; }
.calificacion:hover { border-color: var(--dorado); }

.opiniones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.opinion {
  margin: 0;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.opinion::before {                  /* comilla decorativa */
  content: "“";
  position: absolute;
  top: 6px; right: 24px;
  font-family: var(--serif);
  font-size: 5rem;
  line-height: 1;
  color: var(--dorado-claro);
}
.opinion blockquote {
  margin: 14px 0 22px;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--tinta);
  flex: 1;
}
.opinion figcaption { font-weight: 700; color: var(--texto); }
.opinion figcaption::after {
  content: " · Opinión en Google";
  font-weight: 400;
  color: #8A8270;
}

.opiniones__mas { margin: 40px 0 0; text-align: center; }

/* ----- Ubicación ----- */
.ubicacion {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 56px;
  align-items: center;
}
.ubicacion address {
  font-style: normal;
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 28px;
  color: var(--tinta);
}
.ubicacion__botones { display: flex; flex-wrap: wrap; gap: 12px; }
.ubicacion__mapa iframe {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  display: block;
}

/* ----- Pie ----- */
.pie { background: var(--tinta); color: #CFC8B6; padding: 48px 0; font-size: .95rem; }
.pie__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.pie img { width: 110px; height: auto; }
.pie p { margin: .2em 0; }
.pie a { color: var(--dorado); text-decoration: none; }
.pie a:hover { text-decoration: underline; }

/* ----- WhatsApp flotante ----- */
.whatsapp-flotante {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 60;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: var(--blanco);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transition: transform .2s ease;
}
.whatsapp-flotante:hover { transform: scale(1.07); }
.whatsapp-flotante svg { width: 34px; height: 34px; }

/* ----- Volver arriba (encima del botón de WhatsApp) ----- */
.subir {
  position: fixed;
  right: 32px; bottom: 100px;
  z-index: 60;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--blanco);
  border: 1.5px solid var(--dorado);
  color: var(--tinta);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .2s ease;
}
.subir.visible { opacity: 1; visibility: visible; transform: none; }
.subir:hover { background: var(--crema); }
.subir svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Texto solo para lectores de pantalla y buscadores (no se ve) */
.solo-lectores {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Foco visible al navegar con teclado */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--tinta);
  outline-offset: 3px;
}

/* ===== Tablet ===== */
@media (max-width: 960px) {
  .portada__grilla { grid-template-columns: 1fr; gap: 48px; }
  .portada__imagen { max-width: 620px; }
  .servicios { grid-template-columns: 1fr; }
  .opiniones { grid-template-columns: 1fr; max-width: 620px; }
  .ubicacion { grid-template-columns: 1fr; gap: 32px; }
}

/* ===== Celular ===== */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .contenedor { padding: 0 20px; }

  .menu-boton { display: block; }
  .menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--dorado);
    padding: 8px 16px 18px;
    box-shadow: 0 12px 20px rgba(0,0,0,.08);
    display: none;
  }
  .menu.abierto { display: flex; }
  .menu a { padding: 13px 18px; border-radius: 12px; font-size: 1rem; }
  .cabecera__fila { min-height: 68px; }
  .cabecera__logo img { width: 92px; }

  .portada { padding: 44px 0 64px; }
  .portada__imagen::before { inset: 14px -10px -14px 10px; }
  .portada__botones .boton { flex: 1 1 100%; }

  .destacados__grilla { grid-template-columns: 1fr; }
  .destacado { padding: 28px 0; }
  .destacado + .destacado { border-left: 0; border-top: 1px solid var(--linea); }

  .seccion { padding: 72px 0; }
  .encabezado { margin-bottom: 36px; }
  .servicio__cuerpo { padding: 24px; }
  .servicio ul { grid-template-columns: 1fr; }

  .pasos { grid-template-columns: 1fr; gap: 32px; }
  .clientes-bloque { margin-top: 44px; padding-top: 32px; }


  .ubicacion__mapa iframe { height: 300px; }
  .ubicacion__botones .boton { flex: 1 1 100%; }

  .whatsapp-flotante { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .subir { right: 22px; bottom: 84px; width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
