/* Rubin Proyectos – colores tomados del logo */
:root {
  --azul: #294c8c;          /* azul del logo */
  --azul-oscuro: #1c3666;
  --azul-claro: #e9eef7;
  --cobre: #c3803c;         /* cobre del logo */
  --cobre-oscuro: #a86a2c;
  --cobre-claro: #f7ede2;
  --texto: #1f2937;
  --texto-suave: #5b6474;
  --fondo: #ffffff;
  --fondo-alt: #f6f7fa;
  --borde: #e3e7ee;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(28, 54, 102, .10);
  --ancho: 1180px;
  --fuente: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

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

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--azul-oscuro); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }

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

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

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.6em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.boton:hover { transform: translateY(-1px); }
.boton:focus-visible { outline: 3px solid var(--cobre); outline-offset: 3px; }
.boton:disabled { opacity: .7; cursor: wait; transform: none; }

.boton--cobre { background: var(--cobre); color: #fff; }
.boton--cobre:hover { background: var(--cobre-oscuro); }

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

.boton--claro { border-color: rgba(255, 255, 255, .8); color: #fff; }
.boton--claro:hover { background: #fff; color: var(--azul); }

.boton--pequeno { padding: .6em 1.2em; font-size: .95rem; }

/* ---------- Etiquetas ---------- */
.etiqueta {
  display: inline-block;
  margin: 0 0 .9em;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
}
.etiqueta--cobre { color: var(--cobre); }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
}
.cabecera__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 116px;
}
.cabecera__logo img { height: 92px; width: auto; }

.menu { display: flex; align-items: center; gap: 28px; }
.menu a:not(.boton) {
  color: var(--azul-oscuro);
  font-weight: 600;
  text-decoration: none;
}
.menu a:not(.boton):hover { color: var(--cobre); }

/* ---------- Portada ---------- */
.portada {
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: var(--azul);
}
.portada__foto {                /* foto de fondo (images/portada.jpg) */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.portada::before {              /* degradado azul para que el texto se lea */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(28, 54, 102, .92) 0%, rgba(41, 76, 140, .72) 42%, rgba(41, 76, 140, .10) 75%);
  z-index: 1;
}
.portada::after {               /* franja cobre inferior */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--cobre);
  z-index: 2;
}
.portada__contenido {
  position: relative;
  z-index: 2;
  padding-top: clamp(80px, 12vw, 150px);
  padding-bottom: clamp(80px, 12vw, 150px);
  max-width: var(--ancho);
}
.portada h1 { color: #fff; max-width: 13em; }
.portada__texto { max-width: 36em; font-size: 1.15rem; color: rgba(255, 255, 255, .92); }
.portada__botones { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2em; }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(64px, 9vw, 110px) 0; }
.seccion__cabecera { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.seccion__cabecera p:last-child { color: var(--texto-suave); }

.seccion--azul { background: var(--azul); color: #fff; }
.seccion--azul h2,
.seccion--azul h3 { color: #fff; }

/* ---------- Servicios ---------- */
.rejilla {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.tarjeta {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.tarjeta:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(28, 54, 102, .16); }

.tarjeta__foto {
  aspect-ratio: 10 / 7;
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 100%);
  border-bottom: 4px solid var(--cobre);
  overflow: hidden;
}
.tarjeta__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tarjeta:hover .tarjeta__foto img { transform: scale(1.05); }

.tarjeta__foto--icono {
  display: grid;
  place-items: center;
  color: var(--cobre);
  background:
    radial-gradient(circle at 70% 30%, rgba(195, 128, 60, .18), transparent 55%),
    linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 100%);
}

.tarjeta__cuerpo { padding: 22px 24px 26px; }
.tarjeta__cuerpo p { color: var(--texto-suave); margin: 0; font-size: .98rem; }

/* ---------- Pasos ---------- */
.pasos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.pasos li {
  padding: 30px 28px;
  border-radius: var(--radio);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .15);
}
.pasos__num {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--cobre);
  margin-bottom: 14px;
}
.pasos p { color: rgba(255, 255, 255, .85); margin: 0; }

/* ---------- Contacto ---------- */
.contacto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.contacto__texto p:last-child { color: var(--texto-suave); font-size: 1.1rem; }

.contacto__tarjeta {
  background: var(--fondo-alt);
  border: 1px solid var(--borde);
  border-top: 5px solid var(--cobre);
  border-radius: var(--radio);
  padding: 32px;
  display: grid;
  gap: 22px;
}
.dato { display: flex; align-items: center; gap: 18px; }
.dato__icono {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--azul-claro);
  color: var(--azul);
}
.dato__cuerpo { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.dato__titulo {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--texto-suave);
}
.dato__valor {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--azul);
  text-decoration: none;
  word-break: break-all;
}
.dato__valor:hover { color: var(--cobre); text-decoration: underline; }

.contacto__aviso { margin: 0; color: #b42318; font-size: .95rem; }
.contacto__aviso:empty { display: none; }

/* ---------- Pie ---------- */
.pie {
  border-top: 1px solid var(--borde);
  background: var(--fondo-alt);
  padding: 28px 0;
}
.pie__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pie__logo { height: 72px; width: auto; }
.pie p { margin: 0; color: var(--texto-suave); font-size: .92rem; }
.pie__credito a { color: var(--azul); font-weight: 600; text-decoration: none; }
.pie__credito a:hover { color: var(--cobre); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .rejilla { grid-template-columns: repeat(2, 1fr); }
  .pasos { grid-template-columns: 1fr; }
  .contacto { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .cabecera__fila { min-height: 84px; }
  .cabecera__logo img { height: 64px; }
  html { scroll-padding-top: 90px; }
  .menu { gap: 14px; }
  .menu a:not(.boton) { display: none; }
  .rejilla { grid-template-columns: 1fr; }
  .contacto__tarjeta { padding: 24px; }
  .portada__botones .boton { flex: 1 1 auto; }
}

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