/* Sistema de la propuesta B: tokens, ventanas, detección, botones, escritorios, diálogo, pie y barra de tareas.
   Lo comparten la portada y las demás páginas; lo propio de cada página va en su <style>. */
:root {
  --base: #f9f8f8; --base-2: #efedec; --gris: #e2dfdf; --gris-3: #ccc6c6;
  --tinta: #1d1b1f; --tinta-2: #4a4650; --tinta-3: #6b6670;
  --azul: #3e5879; --azul-2: #6e8cb4; --azul-3: #bdcbdd;
  --ambar: #8a6c43; --ambar-2: #b89a71; --ambar-3: #d4c2aa;
  --violeta: #7f5a93;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --ancho: 1360px;
  --barra-tareas: 38px; --bt: 28px;
  --sombra-ventana: 0 1px 2px rgb(29 27 31 / 0.14), 0 22px 44px -18px rgb(29 27 31 / 0.42);
  --f-texto: "Albert Sans", system-ui, sans-serif;
  color-scheme: light;
  interpolate-size: allow-keywords;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: rgb(127 90 147 / 0.18); scrollbar-color: var(--azul-2) var(--base-2); }
[id] { scroll-margin-top: 32px; }
body { margin: 0; padding-bottom: calc(var(--barra-tareas) + env(safe-area-inset-bottom, 0px)); background: var(--base); color: var(--tinta); font: 400 1.0625rem/1.55 var(--f-texto); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
::selection { background: var(--violeta); color: var(--base); }
:focus-visible { outline: 2px solid var(--violeta); outline-offset: 3px; }
input { caret-color: var(--violeta); }
.salto { position: absolute; left: var(--gutter); top: -60px; z-index: 60; background: var(--tinta); color: var(--base); padding: 10px 14px; }
.salto:focus { top: 12px; }
.envoltura { width: min(var(--ancho), 100% - 2 * var(--gutter)); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }

/* ── El paisaje: una foto real, tres horas del día ───────── */
.paisaje { position: fixed; inset: 0; z-index: -1; background: #dcdde3; }
.paisaje img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 10% 0%; }
.paisaje .amanecer { z-index: 2; }
.paisaje .atardecer { z-index: 1; opacity: 0; }

/* ── Ventanas del sistema ────────────────────────────────── */
.ventana { position: relative; background: var(--base); border: 1px solid var(--azul); border-radius: 5px; box-shadow: var(--sombra-ventana); min-width: 0; } /* taste-skill-ignore: ventana flotante del sistema: borde y sombra son el contrato B */
.ventana.frente { z-index: 5; }
.barra { display: flex; align-items: center; gap: 10px; min-height: 30px; padding: 7px 10px; border-bottom: 1px solid var(--azul); border-radius: 4px 4px 0 0; background: var(--base-2); font: 500 0.78rem/1 var(--f-texto); color: var(--tinta-2); user-select: none; } /* taste-skill-ignore: barra de título de ventana */
.barra svg { width: 14px; height: 14px; flex: none; stroke: var(--azul); fill: none; stroke-width: 1.4; }
.barra b { font-weight: 600; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Agarradera: rayado fino, como las barras de título de los sistemas de los 90; dice «se arrastra aquí» */
.barra .agarre { flex: 1; min-width: 24px; height: 9px; background: repeating-linear-gradient(to bottom, var(--azul-3) 0 1px, transparent 1px 3px); } /* taste-skill-ignore: rayado de agarre: dice «arrastrar aquí» */
.ventana.frente .barra .agarre { background: repeating-linear-gradient(to bottom, var(--azul-2) 0 1px, transparent 1px 3px); } /* taste-skill-ignore: rayado de agarre de la ventana activa */
.arrastrable .barra { cursor: grab; }
.arrastrable .barra:active { cursor: grabbing; }
.estado { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--gris-3); color: var(--tinta-3); font-size: 0.78rem; } /* taste-skill-ignore: barra de estado de ventana */
.cuerpo { padding: 18px; }

/* ── Detección: marco con esquinas que nombra lo que mira ── */
.deteccion { position: fixed; left: 0; top: 0; z-index: 40; width: 80px; height: 50px; pointer-events: none; opacity: 0; transition: opacity 200ms ease; }
.deteccion.visible { opacity: 1; }
.deteccion i { position: absolute; width: 12px; height: 12px; border: 0 solid var(--base); }
.deteccion i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }
.deteccion i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }
.deteccion i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.deteccion i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.deteccion.sobre-ventana i { border-color: var(--violeta); }
.deteccion span { position: absolute; left: 6px; bottom: 6px; padding: 3px 7px; background: var(--tinta); color: var(--base); font: 600 0.68rem/1.3 var(--f-texto); letter-spacing: 0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }

.marca { grid-column: 1 / -1; justify-self: start; text-decoration: none; font: 300 1.15rem/1 var(--f-texto); letter-spacing: 0.01em; padding: 6px 0; }
.marca:not(.pie .marca) { display: block; width: fit-content; }   /* la firma de arriba, en bloque en todas las pestañas: si fuera en línea perdería sus 6 px de padding y quedaría más alta que en la portada */
.marca img, .marca .firma-sji { display: block; height: 52px; width: auto; aspect-ratio: 876.6 / 256; overflow: visible; } /* firma del Nodo: marca/identidad/logo */
/* ── Firma animada (comun/marca/marca.js): la red arranca y el nombre llega letra a letra; 1,75 s en total ──
   Hoja 0–380 ms · nervio 280–760 · ramas desde que el nervio pasa por su cruce · nodos al llegar cada línea ·
   SANJUAN desde 420 ms, una letra cada 45 ms, con un destello violeta · INDUSTRIES se abre desde el centro a los 900 ms */
.firma-sji.espera { visibility: hidden; }
.firma-sji .hoja { transform-box: fill-box; transform-origin: 20% 80%; }
.firma-sji .n, .firma-sji .l { transform-box: fill-box; transform-origin: center; }
.firma-sji.anima .hoja { animation: sji-hoja 380ms var(--ease-out) both; }
.firma-sji.anima .v { stroke-dasharray: 1; animation: sji-vena 480ms cubic-bezier(0.65, 0, 0.35, 1) 280ms both; }
.firma-sji.anima .v2 { animation-duration: 220ms; animation-delay: 460ms; }
.firma-sji.anima .v1 { animation-duration: 220ms; animation-delay: 560ms; }
.firma-sji.anima .n { animation: sji-nodo 280ms var(--ease-out) both; }
.firma-sji.anima .n2 { animation-delay: 680ms; } .firma-sji.anima .n0 { animation-delay: 760ms; } .firma-sji.anima .n1 { animation-delay: 780ms; }
.firma-sji.anima .nombre .l { animation: sji-letra 420ms var(--ease-out) calc(420ms + var(--i) * 45ms) both; }
.firma-sji.anima .nombre .l path { animation: sji-destello 520ms linear calc(420ms + var(--i) * 45ms) both; }
.firma-sji.anima .ind .l { animation: sji-abre 620ms var(--ease-out) calc(900ms + var(--i) * 18ms) both; }
@keyframes sji-hoja { from { opacity: 0; transform: scale(0.82) rotate(-10deg); } }
@keyframes sji-vena { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sji-nodo { from { transform: scale(0); } } /* taste-skill-ignore: el nodo es un agujero que se abre desde nada; no hay opacidad en una máscara */
@keyframes sji-letra { from { opacity: 0; transform: translateY(26px); } }
@keyframes sji-destello { 0%, 45% { fill: var(--violeta); } }
@keyframes sji-abre { from { opacity: 0; transform: translateX(var(--dx)); } }
/* Después, al pasar el ratón por la firma, los tres nodos laten en el orden en que se encendieron */
@media (hover: hover) and (pointer: fine) {
  .marca:hover .firma-sji:not(.anima) .n { animation: sji-latido 520ms var(--ease-out); }
  .marca:hover .firma-sji:not(.anima) .n0 { animation-delay: 120ms; } .marca:hover .firma-sji:not(.anima) .n1 { animation-delay: 240ms; }
}
@keyframes sji-latido { 40% { transform: scale(1.45); } }
@media (prefers-reduced-motion: reduce) { .firma-sji * { animation: none !important; } .firma-sji.espera { visibility: visible; } }

.campo { display: grid; gap: 6px; margin-top: 14px; }
.campo label { font-size: 0.85rem; font-weight: 600; color: var(--tinta-2); }
.campo input { width: 100%; padding: 12px 13px; border: 1px solid var(--gris-3); border-radius: 3px; background: #fff; font: 400 1rem/1.2 var(--f-texto); color: var(--tinta); }
.campo input::placeholder { color: #75707a; }
.campo input:focus-visible { outline-offset: 0; border-color: var(--violeta); }
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 20px; border: 0; border-radius: 3px; background: var(--ambar-2); color: var(--tinta); font: 700 0.95rem/1 var(--f-texto); text-decoration: none; cursor: pointer; transition: background-color 160ms ease, transform 120ms var(--ease-out); }
.boton:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .boton:hover { background: var(--ambar-3); } }
.boton svg { width: 18px; height: 10px; }

/* ── Escritorios (secciones) ─────────────────────────────── */
.escritorio { position: relative; padding-block: clamp(96px, 14vw, 180px) 0; }
/* Rótulo de escritorio: texto sobre su propio fondo, como el nombre de un icono seleccionado */
/* Titular de sección: su propia ventana, el «léeme» de cada escritorio */
.rotulo { width: fit-content; max-width: min(52rem, 100%); margin: 0 0 clamp(36px, 5vw, 64px); }
.rotulo .cuerpo { padding: 20px 24px 22px; }
.rotulo h2 { margin: 0; font: 800 clamp(2rem, 4.8vw, 4.2rem)/1.04 var(--f-texto); letter-spacing: -0.035em; text-wrap: balance; }
.rotulo p { max-width: 52ch; margin: 12px 0 0; color: var(--tinta-2); }

.secundario { padding: 10px 16px; border: 1px solid var(--azul); border-radius: 3px; background: var(--base); color: var(--tinta); font: 600 0.9rem/1 var(--f-texto); cursor: pointer; transition: background-color 160ms ease, transform 120ms var(--ease-out); } /* taste-skill-ignore: botón secundario del sistema */
.secundario:active { transform: scale(0.97); }
.idioma { white-space: nowrap; }
/* Solo para lectores de pantalla: encabezados de páginas cuyo título visible es un dibujo */
.solo-lector { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.secundario:disabled { border-color: var(--gris-3); color: var(--tinta-3); cursor: default; }
@media (hover: hover) and (pointer: fine) { .secundario:not(:disabled):hover { background: #fff; } }

/* Cierre: diálogo */
.dialogo { max-width: 760px; margin: clamp(96px, 14vw, 180px) auto 0; }
.dialogo .cuerpo { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 28px 28px 26px; }
.dialogo .cuerpo > svg { width: 56px; height: 56px; stroke: var(--azul); fill: none; stroke-width: 1.4; }
.dialogo h2 { margin: 0 0 10px; font: 800 clamp(1.9rem, 4.2vw, 3.2rem)/1.04 var(--f-texto); letter-spacing: -0.035em; text-wrap: balance; }
.dialogo p { margin: 0 0 22px; color: var(--tinta-2); max-width: 46ch; }
.dialogo .acciones { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.enlace { font-weight: 600; }

/* Pie */
.pie { margin-top: clamp(96px, 14vw, 180px); padding-block: 40px 28px; background: var(--base); border-top: 1px solid var(--azul); color: var(--tinta-2); font-size: 0.9rem; } /* taste-skill-ignore: borde superior del pie, igual que la barra de tareas */
.pie .envoltura { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.pie h2 { margin: 0 0 12px; font: 700 0.9rem/1.2 var(--f-texto); color: var(--tinta); }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pie a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .pie a:hover { text-decoration: underline; } }
.pie .marca { padding: 0; }
.pie .marca img, .pie .marca .firma-sji { height: 32px; }
.pie .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; color: var(--tinta-3); font-size: 0.82rem; }

/* ── Barra de tareas = navegación ────────────────────────── */
/* Santiago, 23-10: «no me gusta su estilo y la siento muy grande» (medía 52 px); de tres pruebas eligió «el estilo de A [2000]
   con los colores y dinamismo de B [muelle]»: anclada al borde y de 38 px como A (corregido el mismo día: «este anclada al
   borde y tenga el tamano de la opcion A»), en los tonos oscuros de B, botones en relieve de Windows 2000 en tonos oscuros, la
   pestaña abierta hundida con su raya ámbar y la hora en su pozo. */
.tareas { position: fixed; inset: auto 0 0 0; z-index: 50; height: calc(var(--barra-tareas) + env(safe-area-inset-bottom, 0px)); padding: 0 max(6px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(6px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 4px; background: rgb(29 27 31 / 0.96); border-top: 1px solid #000; color: rgb(249 248 248 / 0.7); font-size: 0.78rem; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12); } /* taste-skill-ignore: relieve de la barra de Windows 2000 */
.tareas :is(.inicio, .menu a, .cotizar, .idioma, .tarea, .app, .abrir-menu, .bandeja-msn button) { height: var(--bt); min-height: 0; }
.inicio, .abrir-menu, .tareas .tarea, .tareas .app { border: 0; border-radius: 3px; background: rgb(255 255 255 / 0.07); color: #fff; box-shadow: inset 1px 1px 0 rgb(255 255 255 / 0.16), inset -1px -1px 0 #000; transition: background-color 160ms ease; } /* taste-skill-ignore: botón en relieve de la época */
.inicio { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; padding: 0 10px 0 7px; text-decoration: none; font-weight: 800; letter-spacing: -0.01em; }
.inicio svg { width: 15px; height: 15px; }
.inicio svg path { fill: #fff; }
.tareas :is(.tarea, .app) svg { padding: 1px; border-radius: 3px; background: var(--base-2); }   /* los iconos de color se pierden sobre lo oscuro */
.menu { display: flex; gap: 1px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.menu a { display: flex; align-items: center; padding: 0 9px; border-radius: 3px; text-decoration: none; color: rgb(249 248 248 / 0.68); font-weight: 500; white-space: nowrap; transition: color 160ms ease, background-color 160ms ease; }
/* hundido: la pestaña abierta, la ventana activa y el botón al pulsarlo */
.menu a[aria-current="page"], .inicio:active, .tareas :is(.tarea, .app)[aria-pressed="true"] { color: #fff; font-weight: 700; background: rgb(0 0 0 / 0.35); box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 rgb(255 255 255 / 0.14), inset 0 -2px 0 var(--ambar-3); } /* taste-skill-ignore: botón hundido de la época con la marca ámbar */
.abrir-menu { display: none; padding: 0 10px; font: 600 0.78rem/1 var(--f-texto); cursor: pointer; }
.bandeja { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.bandeja-msn button { color: rgb(249 248 248 / 0.75); }
.reloj { display: flex; align-items: center; gap: 6px; height: var(--bt); padding: 0 9px; border-radius: 3px; line-height: 1; background: rgb(0 0 0 / 0.25); box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 rgb(255 255 255 / 0.12); } /* taste-skill-ignore: pozo de la bandeja */
.reloj b { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.reloj small { order: -1; font-size: 0.66rem; color: rgb(249 248 248 / 0.55); }
.tareas .idioma { padding: 0 8px; border: 0; background: transparent; font: 500 0.76rem/1 var(--f-texto); color: rgb(249 248 248 / 0.68); white-space: nowrap; }
.tareas .idioma b { font-weight: 800; color: #fff; }
.tareas .cotizar { display: inline-flex; align-items: center; padding: 0 12px; border: 0; border-radius: 3px; background: var(--ambar-3); color: var(--tinta); font-weight: 700; text-decoration: none; box-shadow: inset 1px 1px 0 rgb(255 255 255 / 0.55), inset -1px -1px 0 var(--ambar); transition: background-color 160ms ease; } /* taste-skill-ignore: botón en relieve de la época */
.tareas .cotizar:active { box-shadow: inset 1px 1px 0 var(--ambar), inset -1px -1px 0 rgb(255 255 255 / 0.55); } /* taste-skill-ignore: botón hundido al pulsar */
@media (hover: hover) and (pointer: fine) {
  .menu a:not([aria-current]):hover, .bandeja-msn button:hover { color: #fff; background: rgb(255 255 255 / 0.08); }
  .inicio:hover, .abrir-menu:hover, .tareas :is(.tarea, .app):not([aria-pressed="true"]):hover { background: rgb(255 255 255 / 0.13); }
  .tareas .cotizar:hover { background: #fff; }
}

/* Compartido por las páginas interiores */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hueco { display: inline-block; padding: 2px 6px; border: 1px dashed var(--tinta-3); border-radius: 2px; color: var(--tinta-2); font-size: 0.78rem; font-weight: 600; } /* taste-skill-ignore: marca de hueco pendiente de dato */
.campo select, .campo textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--gris-3); border-radius: 3px; background: #fff; font: 400 1rem/1.4 var(--f-texto); color: var(--tinta); }
.campo textarea { min-height: 140px; resize: vertical; }
.campo select:focus-visible, .campo textarea:focus-visible { outline-offset: 0; border-color: var(--violeta); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1180px) {
  .menu { display: none; }
  .menu.abierto { display: grid; position: fixed; left: 10px; bottom: calc(var(--barra-tareas) + env(safe-area-inset-bottom, 0px) + 6px); min-width: 240px; padding: 6px; background: var(--tinta); border: 1px solid #000; border-radius: 5px; box-shadow: var(--sombra-ventana); } /* taste-skill-ignore: menú de inicio: capa real */
  .menu.abierto a { height: 44px; font-size: 1rem; }
  .abrir-menu { display: inline-flex; align-items: center; }
}
@media (max-width: 900px) {
  .pie .envoltura { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .reloj small, .inicio span { display: none; }
  .dialogo .cuerpo { grid-template-columns: 1fr; padding: 22px 18px; }
  .pie .envoltura { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .paisaje .amanecer { opacity: 0; }
}
/* 08-11 (auditoría de uso, nº 6): con el dedo, los enlaces del pie, los créditos y «minimizar» se quedaban por debajo de 24 px
   (WCAG 2.5.8). Una zona de toque invisible que sobresale, como la de .boton-t en Contacto: no cambia nada de lo que se ve. */
@media (pointer: coarse) {
  .pie a, .credito a, .credito-fondo a, .barra .min, .entrar a, .menu-g button { position: relative; }
  .pie a::after, .credito a::after, .credito-fondo a::after, .barra .min::after, .entrar a::after, .menu-g button::after { content: ""; position: absolute; inset: -4px -3px; }   /* -4 px: el pie separa sus enlaces 8 px, así las zonas no se pisan */
}
