/* =============================================================
   Estilos de luismartinezg.com
   Paleta y tipografía tomadas del diseño que hice en v0.
   Orden: 1 tipografía · 2 colores · 3 base · 4 botones · 5 barra
          6 portada · 7 panel de ejemplo · 8 secciones · 9 pie
   ============================================================= */


/* ---------- 1. Tipografía (archivos guardados en sitio/fuentes) ---------- */

@font-face {
  font-family: "Geist";
  src: url("fuentes/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fuentes/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* ---------- 2. Colores y medidas: si cambias algo aquí, cambia en toda la página ---------- */

:root {
  color-scheme: light;

  --fondo: #f9fafc;            /* blanco papel */
  --blanco: #ffffff;
  --tinta: #0e1b2d;            /* texto principal */
  --texto-suave: #5a6472;      /* texto secundario */
  --marino: #102441;           /* color de la marca */
  --marino-claro: #1b3459;     /* marino al pasar el mouse */
  --verde: #097c56;            /* verde contable: lo que ya quedó bien */
  --verde-claro: #daf6e8;
  --ambar: #8a5a00;            /* lo que necesita revisión */
  --ambar-claro: #fff6e0;
  --borde: #dde2e6;
  --gris-claro: #edf0f4;
  --sobre-marino: rgba(249, 250, 252, 0.78);   /* texto secundario sobre fondo marino */
  --linea-sobre-marino: rgba(249, 250, 252, 0.16);

  --ancho-maximo: 72rem;
  --margen-lateral: 1.25rem;
  --espacio-seccion: clamp(4rem, 9vw, 7rem);
}

@media (min-width: 768px) {
  :root {
    --margen-lateral: 2rem;
  }
}


/* ---------- 3. Base ---------- */

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

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

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

ul, ol {
  padding: 0;
  list-style: none;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h2 {
  max-width: 40rem;
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  line-height: 1.15;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(9, 124, 86, 0.45);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Los íconos toman el color del texto que los rodea */
.icono {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Texto que solo leen los lectores de pantalla */
.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* Al saltar a una sección, deja espacio para la barra fija */
section[id] {
  scroll-margin-top: 4rem;
}


/* ---------- 4. Botones y enlaces ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.625rem;
  background: var(--marino);
  color: var(--fondo);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

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

.boton:active {
  transform: translateY(1px);
}

.boton--chico {
  height: 2.25rem;
  padding-inline: 0.875rem;
  font-size: 0.875rem;
}

.boton--grande {
  height: 3rem;
  padding-inline: 1.375rem;
  font-size: 0.9375rem;
}

.enlace {
  color: var(--verde);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.enlace:hover {
  text-decoration-thickness: 2px;
}


/* ---------- 5. Barra superior ---------- */

.barra {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--borde);
  background: rgba(249, 250, 252, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.barra__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.marca {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.marca__logo {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.marca__texto {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.marca__nombre {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.marca__rol {
  font-size: 0.75rem;
  color: var(--texto-suave);
}


/* ---------- 6. Portada ---------- */

.portada {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--borde);
}

/* Cuadrícula de fondo, como de hoja de cálculo, que se desvanece hacia abajo */
.portada::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--borde) 1px, transparent 1px),
    linear-gradient(to bottom, var(--borde) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse at top, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at top, #000 30%, transparent 75%);
  pointer-events: none;
}

.portada__rejilla {
  position: relative;
  display: grid;
  gap: 3.5rem;
  align-items: center;
  padding-block: 4rem 4.5rem;
}

@media (min-width: 1024px) {
  .portada__rejilla {
    grid-template-columns: 1.05fr 1fr;
    gap: 4rem;
    padding-block: 6.5rem 7rem;
  }
}

.portada__texto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.75rem;
}

.pastilla {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--blanco);
  color: var(--texto-suave);
  font-size: 0.8125rem;
  font-weight: 500;
}

.punto {
  width: 0.375rem;
  height: 0.375rem;
  flex: none;
  border-radius: 50%;
  background: var(--verde);
}

.entrada {
  max-width: 34rem;
  color: var(--texto-suave);
  font-size: 1.125rem;
  line-height: 1.65;
}

.garantias {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  color: var(--texto-suave);
  font-size: 0.875rem;
}

.garantias li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.garantias .icono {
  color: var(--verde);
}


/* ---------- 7. Panel de ejemplo: así se ve una cobranza automatizada ---------- */

.panel {
  padding: 0.5rem;
  border: 1px solid var(--borde);
  border-radius: 1rem;
  background: var(--blanco);
  box-shadow: 0 24px 60px -30px rgba(16, 36, 65, 0.35);
}

.panel__encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--borde);
}

.panel__titulo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.panel__ejemplo {
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background: var(--gris-claro);
  color: var(--texto-suave);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Los cuatro pasos del flujo: lista compacta en celular, cajas en pantallas anchas */
.flujo {
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
}

.flujo__paso {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.flujo__icono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 0.5rem;
  background: var(--marino);
  color: var(--fondo);
}

/* Línea punteada entre pasos: vertical en celular, horizontal en pantallas anchas */
.flujo__paso:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(1rem - 1px);
  width: 2px;
  height: 0.5rem;
  background-image: linear-gradient(to bottom, var(--verde) 50%, transparent 50%);
  background-size: 2px 8px;
}

@media (min-width: 640px) {
  .flujo {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1.5rem 1rem;
  }

  .flujo__paso {
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    min-height: 7.25rem;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--borde);
    border-radius: 0.75rem;
    background: var(--fondo);
    font-size: 0.8125rem;
    text-align: center;
  }

  .flujo__icono {
    width: 2.25rem;
    height: 2.25rem;
  }

  .flujo__paso:not(:last-child)::after {
    top: 50%;
    left: 100%;
    width: 0.75rem;
    height: 2px;
    background-image: linear-gradient(to right, var(--verde) 50%, transparent 50%);
    background-size: 8px 2px;
  }
}

/* Tabla tipo libro contable */
.libro {
  width: 100%;
  border: 1px solid var(--borde);
  border-radius: 0.75rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--fondo);
  font-size: 0.875rem;
}

.libro th {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--borde);
  color: var(--texto-suave);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: left;
}

.libro td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--borde);
  font-weight: 500;
  vertical-align: middle;
}

.libro tbody tr:last-child td {
  border-bottom: 0;
}

.libro td.libro__ref,
.libro td.libro__importe {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.libro td.libro__ref {
  color: var(--texto-suave);
  font-weight: 400;
}

.libro .libro__importe,
.libro .libro__estado {
  text-align: right;
  white-space: nowrap;
}

.libro__motivo {
  display: block;
  color: var(--ambar);
  font-size: 0.75rem;
  font-weight: 400;
}

.libro__fila--revisar td {
  background: var(--ambar-claro);
}

.estado {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.estado .icono {
  width: 0.875rem;
  height: 0.875rem;
}

.estado--aplicado {
  color: var(--verde);
}

.estado--revisar {
  color: var(--ambar);
}

/* Movimiento: los pagos se aplican uno por uno y el último se detiene.
   Solo si la persona no pidió reducir el movimiento en su equipo. */
@media (prefers-reduced-motion: no-preference) {
  .libro__fila {
    animation: aplicar 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .libro__fila:nth-child(1) { animation-delay: 0.6s; }
  .libro__fila:nth-child(2) { animation-delay: 1.2s; }
  .libro__fila:nth-child(3) { animation-delay: 1.8s; }

  .flujo__paso:not(:last-child)::after {
    animation: fluir-abajo 1.2s linear 3;
  }

  @media (min-width: 640px) {
    .flujo__paso:not(:last-child)::after {
      animation-name: fluir-derecha;
    }
  }
}

@keyframes aplicar {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fluir-derecha {
  to { background-position: 16px 0; }
}

@keyframes fluir-abajo {
  to { background-position: 0 16px; }
}


/* ---------- 8. Secciones ---------- */

.seccion {
  padding-block: var(--espacio-seccion);
}

.seccion--blanca {
  border-block: 1px solid var(--borde);
  background: var(--blanco);
}

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

/* Qué puedo automatizar: cuadrícula con líneas, como un libro contable */
.servicios {
  display: grid;
  gap: 1px;
  margin-top: 3rem;
  overflow: hidden;
  border: 1px solid var(--borde);
  border-radius: 1rem;
  background: var(--borde);
}

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

.servicio--ancho {
  grid-column: 1 / -1;
}

.servicio {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.75rem;
  background: var(--blanco);
}

@media (min-width: 1024px) {
  .servicio {
    padding: 2rem 2.25rem;
  }
}

.servicio__icono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.5rem;
  border-radius: 0.625rem;
  background: var(--verde-claro);
  color: var(--verde);
}

.servicio__icono .icono {
  width: 1.25rem;
  height: 1.25rem;
}

.servicio p {
  max-width: 30rem;
  color: var(--texto-suave);
}

.servicios__nota {
  margin-top: 1.5rem;
  color: var(--texto-suave);
}

.servicios__nota a {
  color: var(--verde);
  font-weight: 500;
  text-underline-offset: 0.25em;
}

/* Un caso real: fondo marino y resultados como estado de cuenta */
.caso {
  display: grid;
  gap: 2.5rem 4rem;
}

@media (min-width: 1024px) {
  .caso {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }

  .testimonio {
    grid-column: 1 / -1;
  }
}

.caso__intro {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.caso__intro p {
  max-width: 30rem;
  color: var(--sobre-marino);
  font-size: 1.125rem;
}

.resultados {
  border-top: 1px solid var(--linea-sobre-marino);
}

.resultado {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--linea-sobre-marino);
}

.resultado dt {
  order: 0;
  color: var(--sobre-marino);
}

/* Línea de puntos entre el concepto y la cifra */
.resultado::after {
  content: "";
  order: 1;
  flex: 1 1 1.5rem;
  border-bottom: 2px dotted rgba(249, 250, 252, 0.28);
}

.resultado dd {
  order: 2;
  color: var(--blanco);
  font-size: 1.625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@media (max-width: 559px) {
  .resultado {
    flex-direction: column;
    gap: 0.125rem;
  }

  .resultado::after {
    display: none;
  }

  .resultado dd {
    order: -1;
  }
}

.testimonio {
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--linea-sobre-marino);
  border-radius: 0.75rem;
  font-size: 1.125rem;
}

/* Mientras no haya testimonio: caja punteada para ver dónde va */
.testimonio--pendiente {
  border-style: dashed;
  border-color: rgba(249, 250, 252, 0.4);
  color: rgba(249, 250, 252, 0.65);
}

/* Secciones con el título a la izquierda y el contenido a la derecha */
.dos-columnas {
  display: grid;
  gap: 2.5rem 5rem;
}

@media (min-width: 1024px) {
  .dos-columnas {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.dos-columnas__titulo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

/* Por qué trabajar conmigo */
.razones {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.razon {
  display: flex;
  gap: 1rem;
}

.razon__icono {
  padding-top: 0.125rem;
  color: var(--verde);
}

.razon__icono .icono {
  width: 1.5rem;
  height: 1.5rem;
}

.razon h3 {
  margin-bottom: 0.375rem;
}

.razon p {
  max-width: 34rem;
  color: var(--texto-suave);
}

/* Cómo empezamos */
.pasos {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .pasos {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.paso {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.paso__numero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--borde);
  border-radius: 50%;
  background: var(--blanco);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Línea que une un paso con el siguiente (solo en pantallas anchas) */
@media (min-width: 768px) {
  .paso:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.125rem;
    left: 3rem;
    right: -1.25rem;
    height: 1px;
    background: var(--borde);
  }
}

.paso p {
  max-width: 22rem;
  color: var(--texto-suave);
}

/* Preguntas frecuentes */
.preguntas {
  border-top: 1px solid var(--borde);
}

.pregunta {
  border-bottom: 1px solid var(--borde);
}

.pregunta summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
  font-size: 1.0625rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.pregunta summary::-webkit-details-marker {
  display: none;
}

.pregunta summary .icono {
  color: var(--texto-suave);
  transition: transform 0.2s ease;
}

.pregunta[open] summary .icono {
  transform: rotate(45deg);
}

.pregunta p {
  max-width: 38rem;
  padding-bottom: 1.25rem;
  color: var(--texto-suave);
}

/* Cierre */
.cierre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 56rem;
  margin-inline: auto;
  padding: 3.5rem 1.5rem;
  border: 1px solid var(--borde);
  border-radius: 1.5rem;
  background: var(--blanco);
  text-align: center;
  box-shadow: 0 24px 60px -40px rgba(16, 36, 65, 0.4);
}

@media (min-width: 768px) {
  .cierre {
    padding: 5rem 3.5rem;
  }
}

.cierre h2 {
  max-width: 44rem;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
}

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

.cierre .boton {
  margin-top: 0.75rem;
}


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

.pie {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--borde);
  color: var(--texto-suave);
  font-size: 0.875rem;
}

.pie__fila {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .pie__fila {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.pie .marca__nombre {
  color: var(--tinta);
}

.pie__enlaces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.pie__enlaces a {
  text-decoration: none;
}

.pie__enlaces a:hover {
  color: var(--tinta);
  text-decoration: underline;
}

.pie__nota {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
}

.pie__legal {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}


/* ---------- Ajustes para celular ---------- */

@media (max-width: 639px) {
  /* Botones principales a todo lo ancho, fáciles de tocar con el pulgar */
  .portada .boton--grande,
  .cierre .boton {
    width: 100%;
  }

  /* En la tabla de ejemplo solo caben cliente y estado */
  .libro .libro__ref,
  .libro .libro__importe {
    display: none;
  }
}

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