/* =========================================================
   R+F SpA — Estilos de la página
   Los colores de la marca están definidos una sola vez aquí
   abajo (en :root). Si cambia uno, cambia en toda la página.
   ========================================================= */

:root {
  /* Colores del logo */
  --azul: #003970;
  --azul-oscuro: #012B58;
  --azul-profundo: #00203F;
  --naranjo: #FD6106;
  --naranjo-fuerte: #D4460E;   /* botones y textos naranjos (más legible sobre blanco) */
  --naranjo-hover: #B83A0A;
  --amarillo: #FC9A03;
  --amarillo-suave: #FFF3E0;

  /* Neutros */
  --texto: #28343B;
  --texto-suave: #55636C;
  --fondo: #FFFFFF;
  --fondo-suave: #F4F7FB;
  --borde: #E2E8F0;

  /* WhatsApp */
  --whatsapp: #25D366;
  --whatsapp-boton: #138A48;
  --whatsapp-hover: #0E7139;

  --radio: 18px;
  --sombra: 0 18px 40px -20px rgba(0, 32, 63, 0.35);
  --ancho-maximo: 1160px;

  color-scheme: light;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--azul);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 800;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

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

:focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 3px;
  border-radius: 6px;
}

.contenedor {
  width: 100%;
  max-width: var(--ancho-maximo);
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 640px) {
  .contenedor {
    padding-inline: 28px;
  }
}

/* Enlace oculto para quienes navegan con teclado */
.saltar {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--azul);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.saltar:focus {
  top: 12px;
}

/* ---------- Textos reutilizables ---------- */

.etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--naranjo-fuerte);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.etiqueta::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--naranjo), var(--amarillo));
}

/* El nombre de la empresa conserva siempre su escritura "R+F SpA" */
.nombre {
  text-transform: none;
  letter-spacing: 0.06em;
}

.etiqueta--clara {
  color: var(--amarillo);
}

.texto-grande {
  font-size: 1.15rem;
  color: var(--texto);
}

.bajada {
  font-size: 1.15rem;
  color: var(--texto-suave);
  margin-top: 14px;
}

/* Marca para datos que faltan o hay que revisar */
.pendiente {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border: 1px dashed #D99A00;
  border-radius: 6px;
  background: #FFF3C4;
  color: #6E4400;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ---------- Botones ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.boton:hover {
  transform: translateY(-2px);
}

.boton--primario {
  background: var(--naranjo-fuerte);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(212, 70, 14, 0.7);
}

.boton--primario:hover {
  background: var(--naranjo-hover);
}

.boton--secundario {
  border-color: var(--azul);
  color: var(--azul);
  background: transparent;
}

.boton--secundario:hover {
  background: var(--azul);
  color: #fff;
}

.boton--whatsapp {
  background: var(--whatsapp-boton);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 10px 22px -10px rgba(19, 138, 72, 0.7);
}

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

.boton--chico {
  min-height: 42px;
  padding: 9px 18px;
  font-size: 0.92rem;
}

/* ---------- Encabezado ---------- */

.encabezado {
  position: relative;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--borde);
}

.encabezado__barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding-block: 10px;
}

.encabezado__logo img {
  width: auto;
  height: 46px;
  mix-blend-mode: multiply; /* hace invisible el fondo blanco del logo */
}

/* En celular el menú va en una segunda fila, deslizable hacia el lado */
.menu {
  order: 3;
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

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

.menu a {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--fondo-suave);
  color: var(--texto);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}

.menu a:hover {
  color: var(--naranjo-fuerte);
}

@media (min-width: 900px) {
  .encabezado {
    position: sticky;
    top: 0;
    backdrop-filter: saturate(1.4) blur(8px);
  }

  .encabezado__barra {
    flex-wrap: nowrap;
    padding-block: 12px;
  }

  .encabezado__logo img {
    height: 56px;
  }

  .menu {
    order: 0;
    width: auto;
    margin-left: auto;
    gap: 2px;
    overflow: visible;
    padding: 0;
  }

  .menu a {
    background: transparent;
    font-size: 0.95rem;
  }

  .menu a:hover {
    background: var(--fondo-suave);
  }
}

/* Espacio para que el encabezado fijo no tape los títulos al saltar a una sección */
section[id] {
  scroll-margin-top: 12px;
}

@media (min-width: 900px) {
  section[id] {
    scroll-margin-top: 84px;
  }
}

/* ---------- 1. Portada ---------- */

.portada {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 100% 0%, rgba(252, 154, 3, 0.12), transparent 70%),
    linear-gradient(180deg, var(--fondo-suave) 0%, #fff 100%);
}

.portada__flechas {
  position: absolute;
  right: 0;
  bottom: 96px;
  width: min(900px, 90%);
  height: auto;
  opacity: 0.14;
  pointer-events: none;
}

.portada__grilla {
  position: relative;
  display: grid;
  gap: 40px;
  padding-block: 44px 52px;
}

.portada__texto h1 {
  margin-bottom: 20px;
}

.resaltado {
  color: var(--naranjo-fuerte);
}

.punto {
  margin-left: -0.08em;
}

.portada__bajada {
  max-width: 34ch;
  margin-bottom: 30px;
  color: var(--texto-suave);
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
}

.portada__botones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (min-width: 900px) {
  .portada__grilla {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 64px;
    padding-block: 88px 100px;
  }
}

/* Tarjeta de cobertura */
.cobertura {
  position: relative;
  overflow: hidden;
  padding: 30px 28px;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--azul) 0%, var(--azul-profundo) 100%);
  color: #fff;
  box-shadow: var(--sombra);
}

.cobertura::after {
  /* Detalle decorativo con los colores del logo */
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 22px solid transparent;
  background: linear-gradient(135deg, var(--naranjo), var(--amarillo)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.9;
}

.cobertura__titulo {
  margin-bottom: 18px;
  color: var(--amarillo);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cobertura__lista {
  position: relative;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

/* Línea que une las zonas (como una ruta) */
.cobertura__lista::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 22px;
  bottom: 30px;
  width: 2px;
  background: linear-gradient(var(--naranjo), var(--amarillo));
}

.cobertura__lista li {
  position: relative;
  padding: 10px 0 10px 34px;
}

.cobertura__lista li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--amarillo);
  border-radius: 50%;
  background: var(--azul);
}

.cobertura__region {
  display: block;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}

.cobertura__comunas {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
}

.cobertura__pie {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.cobertura__pie strong {
  color: #fff;
}

/* Franja de cifras destacadas */
.cifras {
  position: relative;
  background: var(--azul-oscuro);
  color: #fff;
}

.cifras__lista {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  padding-block: 30px;
  list-style: none;
}

.cifras__lista li {
  padding-left: 18px;
  border-left: 3px solid var(--naranjo);
}

.cifras strong {
  display: block;
  color: var(--amarillo);
  font-size: clamp(1.4rem, 2.2vw, 1.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.cifras span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.97rem;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .cifras__lista {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 32px;
    padding-block: 36px;
  }
}

@media (min-width: 1000px) {
  .cifras__lista {
    grid-template-columns: 0.7fr 0.95fr 1.3fr 1.05fr;
    gap: 28px;
  }
}

/* ---------- Secciones generales ---------- */

.seccion {
  padding-block: 72px;
}

.seccion--suave {
  background: var(--fondo-suave);
}

@media (min-width: 900px) {
  .seccion {
    padding-block: 108px;
  }
}

.encabezado-seccion {
  max-width: 720px;
  margin-bottom: 44px;
}

/* ---------- 2. Quiénes somos ---------- */

.nosotros {
  display: grid;
  gap: 40px;
}

.nosotros__principal h2 {
  margin-bottom: 22px;
}

.nosotros__principal p:not(.texto-grande):not(.etiqueta) {
  color: var(--texto-suave);
}

.dedicamos {
  padding: 30px 28px;
  border: 1px solid var(--borde);
  border-top: 4px solid var(--naranjo);
  border-radius: var(--radio);
  background: #fff;
  box-shadow: var(--sombra);
}

.dedicamos h3 {
  margin-bottom: 12px;
}

.dedicamos p {
  color: var(--texto-suave);
}

.marcas {
  margin-top: 28px;
}

.marcas__titulo {
  margin-bottom: 12px;
  color: var(--texto-suave);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marcas__lista {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.marcas__lista li {
  padding: 8px 16px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--fondo-suave);
  color: var(--azul);
  font-size: 0.95rem;
  font-weight: 700;
}

@media (min-width: 900px) {
  .nosotros {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 72px;
    align-items: start;
  }
}

/* ---------- 3. Servicios (tarjetas) ---------- */

.servicios {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.servicio {
  position: relative;
  flex: 1 1 100%;
  padding: 30px 28px;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: #fff;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.servicio::before {
  /* Línea de color que aparece al pasar el mouse */
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 4px;
  border-radius: var(--radio) var(--radio) 0 0;
  background: linear-gradient(90deg, var(--naranjo), var(--amarillo));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.servicio:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--sombra);
}

.servicio:hover::before {
  transform: scaleX(1);
}

.servicio__icono {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--amarillo-suave);
  color: var(--naranjo-fuerte);
}

.servicio h3 {
  margin-bottom: 10px;
}

.servicio p {
  color: var(--texto-suave);
}

/* 4 servicios: grilla de 2 x 2 desde tablet hacia arriba */
@media (min-width: 640px) {
  .servicio {
    flex: 0 1 calc(50% - 10px);
  }
}

/* ---------- 4. ¿Por qué elegirnos? ---------- */

.razones {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 65% at 100% 0%, rgba(0, 90, 170, 0.45), transparent 70%),
    var(--azul-profundo);
  color: #fff;
}

.razones h2 {
  color: #fff;
}

.razones .bajada {
  color: rgba(255, 255, 255, 0.8);
}

.razones__grilla {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radio);
  background: rgba(255, 255, 255, 0.12);
  list-style: none;
}

.razon {
  padding: 30px 28px;
  background: var(--azul-profundo);
  transition: background-color 0.25s;
}

.razon:hover {
  background: #062a50;
}

.razon__numero {
  display: block;
  margin-bottom: 14px;
  color: var(--amarillo);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.razon h3 {
  margin-bottom: 10px;
  color: #fff;
}

.razon p {
  color: rgba(255, 255, 255, 0.76);
}

@media (min-width: 700px) {
  .razones__grilla {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .razones__grilla {
    grid-template-columns: repeat(3, 1fr);
  }

  .razon {
    padding: 36px 32px;
  }
}

/* ---------- 5. Contacto ---------- */

.contacto {
  display: grid;
  gap: 44px;
}

.contacto__llamado h2 {
  margin-bottom: 18px;
}

.contacto__llamado .texto-grande {
  margin-bottom: 30px;
  color: var(--texto-suave);
}

.datos {
  margin: 0;
  padding: 6px 26px;
  border: 1px solid var(--borde);
  border-radius: 22px;
  background: var(--fondo-suave);
  list-style: none;
}

.dato {
  display: flex;
  gap: 16px;
  padding-block: 20px;
  border-bottom: 1px solid var(--borde);
}

.dato:last-child {
  border-bottom: 0;
}

.dato__icono {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  background: #fff;
  color: var(--naranjo-fuerte);
}

.dato__etiqueta {
  display: block;
  margin-bottom: 2px;
  color: var(--texto-suave);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dato__valor {
  display: block;
  color: var(--texto);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

a.dato__valor {
  color: var(--azul);
  text-decoration: none;
}

a.dato__valor:hover {
  text-decoration: underline;
}

.dato__enlace {
  display: inline-block;
  margin-top: 6px;
  color: var(--naranjo-fuerte);
  font-size: 0.92rem;
  font-weight: 700;
}

@media (min-width: 900px) {
  .contacto {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
  }
}

/* ---------- Pie de página ---------- */

.pie {
  padding-block: 28px;
  background: var(--azul-profundo);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

.pie__barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  /* Espacio para que el botón flotante de WhatsApp no tape el texto */
  padding-right: 88px;
}

.pie p {
  margin: 0;
}

.pie a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.pie a:hover {
  text-decoration: underline;
}

/* ---------- Botón flotante de WhatsApp ---------- */

.whatsapp-flotante {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 10px 26px -6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s;
}

.whatsapp-flotante:hover {
  transform: scale(1.07);
}

/* ---------- Menos movimiento para quien lo prefiera ---------- */

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ---------- Página de error 404 ---------- */

.pagina-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 16px;
  background: #fff;
  text-align: center;
}

.pagina-error__logo img {
  width: auto;
  height: 72px;
  margin-bottom: 36px;
  mix-blend-mode: multiply;
}

.pagina-error h1 {
  margin-bottom: 14px;
}

.pagina-error__texto {
  max-width: 36ch;
  margin-bottom: 30px;
  color: var(--texto-suave);
  font-size: 1.15rem;
}
