/* ════════════════════════════════════════════════════════════════════════════
   FRR Soluciones — hoja de estilo.

   Los colores viven todos como variables en :root y se redefinen para el modo
   oscuro. Si quieres cambiar la identidad, se cambia ahí arriba y nada más.

   El sistema tipográfico es UNA sola familia en dos voces -IBM Plex Sans y su
   mono-. Esa coherencia es la que se lee como profesional; mezclar una serif de
   revista con una sans se veía editorial, no como una empresa de software.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  /* Blanco de verdad para el fondo. Las bandas alternas llevan un gris frío
     apenas perceptible: separa secciones sin ensuciar. */
  --fondo:        #FFFFFF;
  --superficie:   #FFFFFF;
  --superficie-2: #F4F7F9;
  --tinta:        #0E1B29;
  --tinta-suave:  #5C6E7E;
  --linea:        #E4E9EE;
  --linea-fuerte: #CFD8E0;

  /* UN acento, y nada más. Dos acentos peleando era lo que ensuciaba. Azul
     profundo y poco saturado: se lee institucional, no startup. */
  --acento:       #14539A;
  --acento-claro: #1A67BD;
  --acento-tenue: #EDF3FA;

  --display: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --texto:   'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --dato:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ancho: 1120px;
  --radio: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fondo:        #0B1118;
    --superficie:   #111A23;
    --superficie-2: #0F1721;
    --tinta:        #E8EEF4;
    --tinta-suave:  #92A3B3;
    --linea:        #1F2C39;
    --linea-fuerte: #31414F;
    --acento:       #7FB5EE;
    --acento-claro: #A3CCF6;
    --acento-tenue: #142434;
  }
}
:root[data-theme="dark"] {
  --fondo:        #0B1118;
  --superficie:   #111A23;
  --superficie-2: #0F1721;
  --tinta:        #E8EEF4;
  --tinta-suave:  #92A3B3;
  --linea:        #1F2C39;
  --linea-fuerte: #31414F;
  --acento:       #7FB5EE;
  --acento-claro: #A3CCF6;
  --acento-tenue: #142434;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

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

h1, h2, h3 { font-family: var(--display); line-height: 1.16; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 4.8vw, 3.1rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); font-weight: 600; }
h3 { font-size: 1.16rem; font-weight: 600; letter-spacing: -.012em; }
em { font-style: normal; color: var(--acento); }
p  { margin: 0; }
a  { color: var(--acento); text-underline-offset: 3px; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 3px;
  border-radius: 4px;
}

.salto-contenido {
  position: absolute; left: -9999px;
  background: var(--acento); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 8px 0; z-index: 99;
}
.salto-contenido:focus { left: 0; top: 0; }

/* ── Barra ──────────────────────────────────────────────────────────────── */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  max-width: var(--ancho); margin: 0 auto;
  padding: .9rem 24px;
  background: color-mix(in srgb, var(--fondo) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.barra.pegada { border-bottom-color: var(--linea); }

.marca { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--tinta); margin-right: auto; }
/* El icono de marca. Va a 30px, donde el circuito del fondo se vuelve textura y
   lo que se lee son las letras; por eso no se achica más. */
.marca-glifo {
  width: 30px; height: 30px; border-radius: 7px; display: block;
  object-fit: cover; flex-shrink: 0;
}

.marca-texto { font-size: 1.04rem; font-weight: 600; letter-spacing: -.015em; }
.marca-texto em { color: var(--tinta-suave); font-weight: 400; }

.barra-nav { display: flex; gap: 1.6rem; }
.barra-nav a { color: var(--tinta-suave); text-decoration: none; font-size: .91rem; font-weight: 500; }
.barra-nav a:hover { color: var(--tinta); }
@media (max-width: 720px) { .barra-nav { display: none; } }

.tema {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--linea); border-radius: 8px;
  background: var(--superficie); color: var(--tinta-suave); cursor: pointer;
}
.tema:hover { color: var(--tinta); border-color: var(--linea-fuerte); }
.tema-glifo { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; background: linear-gradient(to right, currentColor 50%, transparent 50%); }

/* ── Portada ────────────────────────────────────────────────────────────── */
.portada { max-width: var(--ancho); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) 24px clamp(2.5rem, 5vw, 4rem); }

.ante, .rotulo {
  font-family: var(--dato); font-size: .73rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-suave);
  margin: 0 0 1.1rem;
}
.rotulo { color: var(--acento); }
.portada h1 { margin-bottom: 1.25rem; }
.entrada { max-width: 58ch; color: var(--tinta-suave); font-size: 1.06rem; }

.portada-acciones { display: flex; flex-wrap: wrap; gap: .7rem; margin: 2rem 0 0; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: 8px;
  font-family: var(--texto); font-size: .94rem; font-weight: 500;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.boton--solido { background: var(--acento); color: #FFFFFF; }
.boton--solido:hover { background: var(--acento-claro); }
:root[data-theme="dark"] .boton--solido { color: #0B1118; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .boton--solido { color: #0B1118; } }
@media (prefers-color-scheme: dark) { :root[data-theme="light"] .boton--solido { color: #FFFFFF; } }

.boton--linea { background: var(--superficie); color: var(--tinta); border-color: var(--linea-fuerte); }
.boton--linea:hover { border-color: var(--tinta-suave); }

.hechos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden;
}
.hechos > div { background: var(--superficie); padding: 1.1rem 1.25rem; border-right: 1px solid var(--linea); }
.hechos > div:last-child { border-right: 0; }
@media (max-width: 700px) {
  .hechos > div { border-right: 0; border-bottom: 1px solid var(--linea); }
  .hechos > div:last-child { border-bottom: 0; }
}
.hechos dt { font-family: var(--dato); font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-suave); margin-bottom: .35rem; }
.hechos dd { margin: 0; font-size: .94rem; font-weight: 500; line-height: 1.45; }

/* ── Bloques ────────────────────────────────────────────────────────────── */
.bloque { padding: clamp(3rem, 7vw, 5rem) 0; }
.bloque--alterno { background: var(--superficie-2); border-block: 1px solid var(--linea); }
.bloque-cabeza { max-width: var(--ancho); margin: 0 auto clamp(2rem, 4vw, 2.75rem); padding-inline: 24px; }
.bloque-entrada { max-width: 60ch; color: var(--tinta-suave); margin-top: .85rem; }

/* ── Las tres formas ────────────────────────────────────────────────────── */
.formas {
  max-width: var(--ancho); margin: 0 auto; padding-inline: 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem;
}
.forma {
  display: flex; flex-direction: column;
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--radio); padding: 1.5rem 1.45rem;
}
/* Solo una lleva peso. Tres tarjetas idénticas no jerarquizan nada. */
.forma--destacado { border-color: var(--acento); box-shadow: 0 0 0 1px var(--acento); }
.forma-etiqueta {
  align-self: flex-start; font-family: var(--dato); font-size: .67rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .5rem; border-radius: 4px;
  background: var(--superficie-2); color: var(--tinta-suave); border: 1px solid var(--linea);
  margin-bottom: .95rem;
}
.forma--destacado .forma-etiqueta { background: var(--acento-tenue); color: var(--acento); border-color: color-mix(in srgb, var(--acento) 30%, transparent); }
.forma h3 { margin-bottom: .55rem; }
.forma-entrada { color: var(--tinta-suave); font-size: .94rem; }
.lista { list-style: none; margin: 1.1rem 0 1.4rem; padding: 0; display: grid; gap: .45rem; font-size: .91rem; }
.lista li { display: grid; grid-template-columns: 15px 1fr; gap: .55rem; align-items: start; line-height: 1.5; }
.lista li::before { content: '✓'; color: var(--acento); font-weight: 600; font-size: .82rem; line-height: 1.6; }
.lista-titulo { font-family: var(--dato); font-size: .67rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-suave); margin: 1.2rem 0 .1rem; }
.no-incluye {
  margin-top: 1rem; padding-top: .95rem; border-top: 1px solid var(--linea);
  font-size: .86rem; color: var(--tinta-suave); line-height: 1.5;
}
.no-incluye strong { font-family: var(--dato); font-size: .67rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }

/* El botón se pega abajo para que las tres tarjetas lo alineen aunque tengan
   distinto texto. Cuidado: cualquier `margin-top` sobre .boton -aunque sea de
   una regla más específica- pisa a este `auto` y las desalinea otra vez. Por eso
   la separación vive en el margen inferior de la lista. */
.forma .boton { margin-top: auto; align-self: stretch; }
.forma .no-incluye + .boton { margin-top: 1.4rem; }

/* ── Catálogo ───────────────────────────────────────────────────────────── */
.catalogo { max-width: var(--ancho); margin: 0 auto; padding-inline: 24px; display: grid; gap: 1.1rem; }

/* La imagen va ARRIBA y a todo el ancho, no en una columna lateral. En una
   columna alta y angosta una captura 16:10 se recorta sin remedio: se veía un
   trozo del menú lateral y nada más. Dándole a la caja la MISMA proporción que
   la imagen, entra completa y sin recortar. */
.ficha {
  display: flex; flex-direction: column;
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--radio); overflow: hidden;
}

.ficha-vista {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: var(--superficie-2); border-bottom: 1px solid var(--linea);
}
.ficha-vista img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ficha-marcador { position: absolute; inset: 0; display: grid; place-items: center; }
.ficha-marcador span {
  font-family: var(--dato); font-size: 1.6rem; font-weight: 500; letter-spacing: .06em;
  color: var(--tinta-suave); opacity: .38;
}
.ficha-estado {
  position: absolute; top: .85rem; left: .85rem;
  font-family: var(--dato); font-size: .65rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: .24rem .55rem; border-radius: 4px; border: 1px solid; background: var(--superficie);
}
.ficha-estado[data-estado="venta"]        { color: var(--acento); border-color: color-mix(in srgb, var(--acento) 35%, transparent); background: var(--acento-tenue); }
.ficha-estado[data-estado="demo"]         { color: var(--acento); border-color: color-mix(in srgb, var(--acento) 35%, transparent); background: var(--acento-tenue); }
.ficha-estado[data-estado="construccion"] { color: var(--tinta-suave); border-color: var(--linea-fuerte); }

.ficha-cuerpo { padding: 1.6rem 1.6rem 1.4rem; display: flex; flex-direction: column; }
.ficha-cuerpo h3 { margin-bottom: .5rem; }
.ficha-resumen { color: var(--tinta-suave); font-size: .94rem; }

.pastillas { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1rem 0 0; }
.pastilla {
  font-family: var(--dato); font-size: .72rem; padding: .18rem .5rem; border-radius: 4px;
  background: var(--superficie-2); border: 1px solid var(--linea); color: var(--tinta-suave);
}

.ficha-columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem 2rem; margin-top: 1.3rem; }
.ficha-columnas .lista { margin-bottom: 0; }

.ficha-pie {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem;
  margin-top: auto; padding-top: 1.4rem; border-top: 1px solid var(--linea);
}
.ficha-columnas + .ficha-pie { margin-top: 1.4rem; }
.ficha-precio { display: grid; gap: .1rem; }
.ficha-precio .rotulo-precio { font-family: var(--dato); font-size: .67rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-suave); }
.ficha-precio .monto { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ficha-precio .monto small { font-size: .8rem; color: var(--tinta-suave); font-weight: 400; letter-spacing: 0; }
.ficha-precio .cotizar { font-size: 1.25rem; font-weight: 500; color: var(--tinta-suave); }

.nota-catalogo { max-width: var(--ancho); margin: 1.8rem auto 0; padding-inline: 24px; color: var(--tinta-suave); font-size: .93rem; }

/* El botón que abre el visor ocupa toda la vista de la ficha. */
.ficha-abrir {
  position: absolute; inset: 0; padding: 0; border: 0; cursor: zoom-in;
  background: var(--superficie-2); display: block; width: 100%; height: 100%;
}
.ficha-abrir img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ficha-lupa {
  position: absolute; right: .7rem; bottom: .7rem;
  font-family: var(--dato); font-size: .67rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .28rem .6rem; border-radius: 5px;
  background: color-mix(in srgb, var(--tinta) 82%, transparent); color: var(--fondo);
  opacity: 0; transition: opacity .18s ease;
}
.ficha-abrir:hover .ficha-lupa, .ficha-abrir:focus-visible .ficha-lupa { opacity: 1; }
/* En táctil no hay hover, así que ahí se muestra siempre: si no, nadie sabría
   que la imagen se puede abrir. */
@media (hover: none) { .ficha-lupa { opacity: 1; } }

/* ── Visor a pantalla completa ──────────────────────────────────────────── */
.visor {
  width: min(96vw, 1500px); max-width: none; height: min(94vh, 1000px); max-height: none;
  padding: 0; border: 0; border-radius: var(--radio); background: transparent;
  overflow: visible;
}
.visor::backdrop { background: rgba(6, 12, 18, .88); backdrop-filter: blur(3px); }
.visor-img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  border-radius: var(--radio); background: var(--superficie);
}
.visor-cerrar, .visor-nav {
  position: absolute; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  background: rgba(14, 22, 30, .72); color: #fff; backdrop-filter: blur(6px);
  line-height: 1; padding: 0;
}
.visor-cerrar { top: -14px; right: -14px; width: 38px; height: 38px; font-size: 1rem; }
.visor-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 1.7rem; }
.visor-nav--ant { left: -22px; }
.visor-nav--sig { right: -22px; }
.visor-cerrar:hover, .visor-nav:hover { background: rgba(14,22,30,.92); border-color: rgba(255,255,255,.5); }
.visor-pie {
  position: absolute; left: 0; right: 0; bottom: -2rem; text-align: center;
  font-family: var(--dato); font-size: .74rem; letter-spacing: .05em;
  color: rgba(255,255,255,.72);
}
/* En pantallas chicas los controles no caben fuera de la imagen: se meten. */
@media (max-width: 760px) {
  .visor { width: 94vw; height: 84vh; }
  .visor-cerrar { top: 8px; right: 8px; }
  .visor-nav--ant { left: 8px; }
  .visor-nav--sig { right: 8px; }
  .visor-pie { bottom: -1.7rem; font-size: .7rem; }
}

/* ── Contacto ───────────────────────────────────────────────────────────── */
.contacto {
  max-width: var(--ancho); margin: 0 auto; padding-inline: 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: start;
}
@media (max-width: 860px) { .contacto { grid-template-columns: 1fr; } }

.wa {
  display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.6rem;
  padding: .72rem 1.25rem; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: .94rem;
  background: var(--superficie); color: var(--tinta); border: 1px solid var(--linea-fuerte);
}
.wa svg { color: #25A85B; }
.wa:hover { border-color: #25A85B; }
.contacto-alterno { margin-top: .95rem; color: var(--tinta-suave); font-size: .92rem; }

.formulario { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.5rem; display: grid; gap: .95rem; }
.campo { display: grid; gap: .3rem; }
.campo label { font-family: var(--dato); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-suave); }
.campo input, .campo select, .campo textarea {
  font-family: var(--texto); font-size: .94rem; color: var(--tinta);
  background: var(--fondo); border: 1px solid var(--linea-fuerte); border-radius: 7px;
  padding: .6rem .7rem; width: 100%; resize: vertical;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--acento); }
.campo .mal { border-color: #C4392C; }
.formulario-estado { font-size: .88rem; color: var(--tinta-suave); min-height: 1.3em; }
.formulario-estado[data-tono="bien"] { color: var(--acento); font-weight: 500; }
.formulario-estado[data-tono="mal"]  { color: #C4392C; }

/* ── Pie ────────────────────────────────────────────────────────────────── */
.pie {
  max-width: var(--ancho); margin: 0 auto; padding: 2rem 24px 2.8rem;
  border-top: 1px solid var(--linea);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: baseline; justify-content: space-between;
}
.pie-marca { font-size: 1rem; font-weight: 600; letter-spacing: -.015em; }
.pie-marca em { color: var(--tinta-suave); font-weight: 400; }
.pie-legal { color: var(--tinta-suave); font-size: .87rem; }
