/* Par de Lentes Labs — una cartilla de la vista y un lente: el estudio hace software para ver el negocio
   con claridad. Tinta azul noche sobre papel clínico; el rojo es el de la línea 20/20 y se usa poco. */

@property --x {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 50%;
}

@property --y {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 40%;
}

:root {
  color-scheme: light dark;
  --papel: #f3f5f8;
  --superficie: #ffffff;
  --superficie-2: #e8edf3;
  --tinta: #0e1b2c;
  --tinta-suave: #4a596d;
  --linea: #d6dde7;
  --acento: #d23a2c;
  --acento-texto: #b3261b;
  --boton: #0e1b2c;
  --boton-texto: #ffffff;
  --sombra: 0 24px 48px -28px rgba(14, 27, 44, 0.45);
  --radio: 14px;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --texto: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papel: #0a111c;
    --superficie: #101a28;
    --superficie-2: #172334;
    --tinta: #e8edf4;
    --tinta-suave: #a2afc0;
    --linea: #25334a;
    --acento: #ff6a5c;
    --acento-texto: #ff8b80;
    --boton: #e8edf4;
    --boton-texto: #0a111c;
    --sombra: 0 24px 48px -28px rgba(0, 0, 0, 0.75);
  }
}

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

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

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

.contenedor {
  width: min(1160px, 100%);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.visualmente-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.saltar {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--boton);
  color: var(--boton-texto);
  font-weight: 700;
}

.saltar:focus {
  top: 12px;
}

section[id] {
  scroll-margin-top: 72px;
}

/* ── Barra ─────────────────────────────────────────────────────────────── */

.barra {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--papel) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--linea);
}

.barra-interior {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 800;
  font-stretch: 105%;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.marca-nombre span {
  color: var(--acento-texto);
}

.marca-lentes {
  width: 40px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.menu {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  font-size: 0.95rem;
  font-weight: 600;
}

.menu a:not(.boton) {
  color: var(--tinta-suave);
  text-decoration: none;
}

.menu a:not(.boton):hover {
  color: var(--tinta);
}

.menu-boton {
  display: none;
}

@media (max-width: 760px) {
  .menu-boton {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--linea);
    border-radius: 10px;
    background: var(--superficie);
    color: var(--tinta);
    cursor: pointer;
  }

  .menu-icono,
  .menu-icono::before,
  .menu-icono::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
  }

  .menu-icono {
    position: relative;
  }

  .menu-icono::before {
    position: absolute;
    top: -6px;
  }

  .menu-icono::after {
    position: absolute;
    top: 6px;
  }

  .menu {
    position: absolute;
    inset: 64px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px clamp(16px, 4vw, 32px) 18px;
    background: var(--papel);
    border-bottom: 1px solid var(--linea);
  }

  .menu.abierto {
    display: flex;
  }

  .menu a:not(.boton) {
    padding: 13px 0;
    border-bottom: 1px solid var(--linea);
  }

  .menu .boton {
    justify-content: center;
    margin-top: 14px;
  }
}

/* ── Botones y títulos ─────────────────────────────────────────────────── */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--boton);
  border-radius: 999px;
  background: var(--boton);
  color: var(--boton-texto);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}

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

.boton-borde {
  background: transparent;
  color: var(--tinta);
}

.boton-chico {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.antetitulo {
  margin-bottom: 14px;
  color: var(--acento-texto);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.seccion {
  padding-block: clamp(56px, 8vw, 104px);
}

.cabecera {
  max-width: 780px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.cabecera h2,
.producto-cabecera h2,
.contacto h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  font-weight: 800;
  font-stretch: 96%;
  letter-spacing: -0.015em;
}

.bajada {
  max-width: 62ch;
  margin-top: 16px;
  color: var(--tinta-suave);
  font-size: 1.1rem;
}

/* ── Portada y cartilla ────────────────────────────────────────────────── */

.portada {
  padding-block: clamp(40px, 7vw, 96px) clamp(24px, 4vw, 48px);
}

.portada-grilla {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.portada h1 {
  font-size: clamp(2.35rem, 5vw, 3.9rem);
  font-weight: 800;
  font-stretch: 96%;
  letter-spacing: -0.02em;
}

.portada-bajada {
  max-width: 58ch;
  margin-top: 20px;
  color: var(--tinta-suave);
  font-size: 1.14rem;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

@media (max-width: 900px) {
  .portada-grilla {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cartilla {
  margin: 0;
}

.cartilla-hoja {
  --r: clamp(56px, 8vw, 84px);
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3.2vw, 36px) clamp(16px, 3vw, 32px) clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  background: var(--superficie);
  box-shadow: var(--sombra);
  touch-action: pan-y;
  transition: --x 1.5s cubic-bezier(0.2, 0.75, 0.15, 1), --y 1.5s cubic-bezier(0.2, 0.75, 0.15, 1);
}

.cartilla-hoja.siguiendo {
  transition: none;
}

.lineas {
  display: grid;
  gap: clamp(6px, 1.1vw, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lineas li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.6rem;
  align-items: center;
  gap: 10px;
}

.letras {
  justify-self: center;
  color: var(--tinta);
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

.agudeza {
  color: var(--tinta-suave);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-align: right;
}

.l1 .letras { font-size: clamp(3.3rem, 8vw, 6rem); }
.l2 .letras { font-size: clamp(2.2rem, 5vw, 3.7rem); }
.l3 .letras { font-size: clamp(1.45rem, 3.1vw, 2.2rem); }
.l4 .letras { font-size: clamp(1.02rem, 2.2vw, 1.6rem); }
.l5 .letras { font-size: clamp(0.8rem, 1.55vw, 1.12rem); }

.l5 {
  padding-bottom: 10px;
  border-bottom: 3px solid var(--acento);
}

.lineas-borrosas {
  filter: blur(2.4px);
  opacity: 0.8;
}

.lineas-nitidas {
  position: absolute;
  inset: 0;
  padding: inherit;
  clip-path: circle(var(--r) at var(--x) var(--y));
}

/* El lente: el borde por fuera del círculo nítido, y un puente, como una mitad de anteojos. */
.lente {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--r) * 2 + 14px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 7px solid var(--tinta);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 30%),
    radial-gradient(circle at 72% 78%, rgba(72, 190, 160, 0.14), rgba(72, 190, 160, 0) 48%);
  box-shadow: 0 16px 30px -14px rgba(14, 27, 44, 0.5);
  pointer-events: none;
}

.lente::before {
  position: absolute;
  top: 34%;
  right: 100%;
  width: 22px;
  height: 7px;
  margin-right: 5px;
  border-radius: 4px;
  background: var(--tinta);
  content: "";
}

.cartilla-pie {
  margin-top: 12px;
  color: var(--tinta-suave);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: center;
}

/* ── Qué hacemos ───────────────────────────────────────────────────────── */

.servicios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 48px);
  row-gap: clamp(36px, 4.5vw, 52px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.servicio {
  padding-top: 22px;
  border-top: 2px solid var(--tinta);
}

.servicio h3 {
  margin: 14px 0 8px;
  font-size: 1.22rem;
  font-weight: 750;
}

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

.icono {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--acento-texto);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 900px) {
  .servicios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .servicios {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Gestión Galería ───────────────────────────────────────────────────── */

.producto {
  border-block: 1px solid var(--linea);
  background: var(--superficie);
}

.producto-cabecera {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(16px, 4vw, 56px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.producto-cabecera h2 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  font-stretch: 100%;
}

.bajada-grande {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.5;
}

.bajada-grande + p {
  margin-top: 14px;
  color: var(--tinta-suave);
}

.producto-cuerpo {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

@media (max-width: 980px) {
  .producto-cabecera,
  .producto-cuerpo {
    grid-template-columns: minmax(0, 1fr);
  }
}

.subtitulo {
  margin-bottom: 22px;
  font-size: 1.35rem;
  font-weight: 800;
}

.ciclo {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}

.ciclo li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 16px;
  counter-increment: paso;
}

/* Cada paso en un lente. */
.ciclo li::before {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--tinta);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 800;
  font-stretch: 120%;
  content: counter(paso);
}

.ciclo h4 {
  margin: 4px 0 4px;
  font-size: 1.1rem;
  font-weight: 750;
}

.ciclo p {
  color: var(--tinta-suave);
}

/* La ventana de ejemplo imita al sistema, que es claro: guarda sus colores en los dos temas. */
.ventana {
  overflow: hidden;
  border: 1px solid #d3dbe6;
  border-radius: var(--radio);
  background: #f6f8fb;
  color: #0e1b2c;
  box-shadow: var(--sombra);
}

.ventana-barra {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid #dfe5ee;
  background: #e9eef5;
}

.ventana-puntos {
  display: flex;
  gap: 6px;
}

.ventana-puntos i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c4cedb;
}

.ventana-direccion {
  color: #4a596d;
  font-family: var(--mono);
  font-size: 0.74rem;
}

.ventana-cuerpo {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  min-height: 330px;
}

.ventana-menu {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 14px 8px;
  background: #173a6b;
  color: #d9e4f5;
  font-size: 0.8rem;
  font-weight: 600;
}

.ventana-menu span {
  padding: 8px 10px;
  border-radius: 8px;
}

.ventana-menu .activo {
  background: #ffffff;
  color: #173a6b;
}

.ventana-contenido {
  min-width: 0;
}

.pestanas {
  display: flex;
  gap: 4px;
  padding: 10px 12px 0;
  border-bottom: 1px solid #dfe5ee;
}

.pestanas button {
  padding: 8px 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #4a596d;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.pestanas button[aria-selected="true"] {
  border-bottom-color: #d23a2c;
  color: #0e1b2c;
}

.panel {
  padding: 14px;
}

.panel:focus-visible {
  outline-offset: -3px;
}

.panel-titulo {
  margin-bottom: 10px;
  font-size: 0.92rem;
  font-weight: 700;
}

.tabla-envoltura {
  overflow-x: auto;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  background: #ffffff;
}

.ventana table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.ventana th {
  padding: 8px;
  border-bottom: 1px solid #dfe5ee;
  color: #4a596d;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.ventana td {
  padding: 9px 8px;
  border-bottom: 1px solid #eef2f7;
  white-space: nowrap;
}

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

.ventana .num {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: right;
}

.ventana th.num {
  font-family: inherit;
  font-size: 0.7rem;
}

.ventana .mono {
  font-family: var(--mono);
  font-size: 0.8rem;
}

.ventana .centro {
  text-align: center;
}

.marca-x {
  color: #800000;
  font-weight: 800;
}

.ventana .desmarcada td {
  background: #f1f3f6;
  color: #6b7686;
}

.estado {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.estado-cobrado { background: #e1f3ea; color: #17754f; }
.estado-cuenta { background: #fbefd6; color: #7a5000; }
.estado-pendiente { background: #e3ebfb; color: #2152b8; }
.estado-apagado { background: #e8ebf0; color: #5b6778; }

.panel-pie {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: #4a596d;
  font-size: 0.84rem;
}

.panel-pie strong {
  color: #0e1b2c;
}

.demo-nota {
  margin-top: 12px;
  color: var(--tinta-suave);
  font-size: 0.8rem;
  text-align: right;
}

/* La barra lateral de la ventana solo entra en pantalla ancha: en las demás le quita espacio a la tabla. */
@media (max-width: 1199.98px) {
  .ventana-cuerpo {
    grid-template-columns: minmax(0, 1fr);
  }

  .ventana-menu {
    display: none;
  }
}

.modulos {
  margin-top: clamp(56px, 7vw, 88px);
}

.modulos-lista {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--linea);
  border-left: 1px solid var(--linea);
}

.modulos-lista li {
  padding: clamp(18px, 2.4vw, 26px);
  border-right: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
}

.modulos-lista h4 {
  margin-bottom: 6px;
  font-size: 1.1rem;
  font-weight: 750;
}

.modulos-lista p {
  color: var(--tinta-suave);
  font-size: 0.98rem;
}

@media (max-width: 900px) {
  .modulos-lista {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .modulos-lista {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Cómo trabajamos ───────────────────────────────────────────────────── */

.proceso {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: etapa;
}

.proceso li {
  padding-top: 18px;
  border-top: 2px solid var(--tinta);
  counter-increment: etapa;
}

.etapa {
  color: var(--acento-texto);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.etapa::before {
  content: counter(etapa, decimal-leading-zero) " · ";
}

.proceso h3 {
  margin: 10px 0 8px;
  font-size: 1.22rem;
  font-weight: 750;
}

.proceso p:not(.etapa) {
  color: var(--tinta-suave);
}

@media (max-width: 900px) {
  .proceso {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .proceso {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Contacto y pie ────────────────────────────────────────────────────── */

.contacto {
  padding-block: clamp(56px, 8vw, 96px);
  background: #102440;
  color: #f2f5f9;
}

.contacto :focus-visible {
  outline-color: #ff8b80;
}

.contacto-interior {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.contacto p {
  margin-top: 12px;
  color: #c5d0de;
  font-size: 1.1rem;
}

.contacto .boton {
  border-color: #ffffff;
  background: #ffffff;
  color: #102440;
}

.contacto-accion {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.contacto-correo {
  color: #c5d0de;
  font-family: var(--mono);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .contacto-interior {
    grid-template-columns: minmax(0, 1fr);
  }

  .contacto-accion {
    justify-items: start;
  }
}

.pie {
  padding-block: 28px;
  color: var(--tinta-suave);
  font-size: 0.9rem;
}

.pie-interior {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

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

  .cartilla-hoja,
  .boton {
    transition: none;
  }

  .lineas-borrosas {
    filter: none;
    opacity: 1;
  }
}
