/* ============================================================
   supercómputo.cl — laboratorio de infraestructura
   Rediseño 2026-08-07: honesto, sobrio, sin fotografías.
   Estética de página de ingeniería: tipografía, espacio, datos
   en monoespaciada, filetes finos. Un solo acento.
   Claro y oscuro; oscuro por defecto.
   ============================================================ */

:root {
  color-scheme: dark light;

  --bg:            #0b1220;
  --bg-2:          #0e1728;
  --surface:       #121d31;
  --surface-2:     #16233b;
  --border:        #22304a;
  --border-fuerte: #35486c;

  --text:          #e8eef7;
  --muted:         #93a4be;
  --faint:         #62748f;

  --acento:        #38bdf8;   /* un solo acento: cielo/cian */
  --acento-2:      #7dd3fc;
  --acento-ink:    #04121c;
  --acento-glow:   #38bdf833;

  --ok:            #4ade80;
  --warn:          #fbbf24;

  --radio:         12px;
  --radio-sm:      8px;
  --nav-h:         66px;
  --ancho:         1080px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo,
          Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:            #f6f8fc;
    --bg-2:          #eef2f8;
    --surface:       #ffffff;
    --surface-2:     #f2f6fb;
    --border:        #dde5f0;
    --border-fuerte: #c4d0e2;

    --text:          #14213a;
    --muted:         #566681;
    --faint:         #8493aa;

    --acento:        #0284c7;
    --acento-2:      #0369a1;
    --acento-ink:    #ffffff;
    --acento-glow:   #0284c722;

    --ok:            #16a34a;
    --warn:          #b45309;
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }

a { color: var(--acento); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--acento);
}

/* ---------- Fondo ---------- */
.fondo { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.fondo::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 55% at 70% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 70% 0%, #000 0%, transparent 75%);
  opacity: .5;
}
.fondo::after {
  content: ""; position: absolute; top: -20%; right: -10%;
  width: 55vw; height: 55vw; border-radius: 50%;
  background: radial-gradient(circle, var(--acento-glow), transparent 68%);
  filter: blur(30px);
}

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.marca { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 600; }
.marca:hover { text-decoration: none; }
.marca-sig {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--border-fuerte); border-radius: 7px;
  font-family: var(--mono); font-size: .8rem; color: var(--acento);
  background: var(--acento-glow);
}
.marca b { font-weight: 600; }
.marca .tld { color: var(--faint); font-weight: 400; }

.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: .92rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radio-sm);
  font-size: .92rem; font-weight: 600; font-family: var(--sans);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn-solido { background: var(--acento); color: var(--acento-ink); }
.btn-solido:hover { background: var(--acento-2); }
.btn-linea { border-color: var(--border-fuerte); color: var(--text); background: transparent; }
.btn-linea:hover { border-color: var(--acento); }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 72px; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 680; margin: 20px 0 22px;
}
.hero h1 .ac { color: var(--acento); }
.hero .lead { font-size: 1.08rem; color: var(--muted); max-width: 48ch; }
.hero .acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Tarjeta de estado — reemplaza a la foto. */
.status {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radio);
  box-shadow: 0 24px 60px -34px #00000099;
  overflow: hidden;
}
.status-top {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: .82rem; color: var(--muted);
}
.status-top .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 var(--ok); animation: latir 2.6s ease-out infinite;
}
@keyframes latir {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.status-top .sep { margin-left: auto; color: var(--faint); }
.status dl { margin: 0; padding: 8px 4px; }
.status .row {
  display: grid; grid-template-columns: 116px 1fr; gap: 10px;
  padding: 9px 16px; font-family: var(--mono); font-size: .84rem;
}
.status .row dt { color: var(--faint); }
.status .row dd { margin: 0; color: var(--text); }
.status .row dd .ok { color: var(--ok); }

/* ---------- Sección genérica ---------- */
.seccion { padding: 60px 0; border-top: 1px solid var(--border); }
.sec-cab { max-width: 62ch; margin-bottom: 34px; }
.sec-cab h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin: 12px 0 10px; }
.sec-cab p { color: var(--muted); }

/* ---------- Entorno (specs) ---------- */
.specs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radio); overflow: hidden;
}
.spec { background: var(--surface); padding: 18px 20px; }
.spec dt {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 7px;
}
.spec dd { margin: 0; font-size: 1.02rem; font-weight: 600; }
.spec dd small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* ---------- Capacidades ---------- */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 16px; }
.tarjeta {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radio); padding: 24px 22px;
  transition: border-color .18s, transform .18s;
}
.tarjeta:hover { border-color: var(--border-fuerte); transform: translateY(-2px); }
.tarjeta .ic {
  width: 38px; height: 38px; border-radius: var(--radio-sm); margin-bottom: 16px;
  display: grid; place-items: center;
  color: var(--acento); background: var(--acento-glow); border: 1px solid var(--border);
}
.tarjeta .ic svg { width: 20px; height: 20px; }
.tarjeta h3 { font-size: 1.04rem; margin-bottom: 6px; }
.tarjeta p { color: var(--muted); font-size: .92rem; }

/* ---------- Nota de cierre ---------- */
.nota {
  border-left: 2px solid var(--acento); padding: 4px 0 4px 22px;
  max-width: 60ch; color: var(--muted); font-size: 1.05rem;
}
.nota strong { color: var(--text); font-weight: 600; }

/* ---------- Pie ---------- */
.pie { border-top: 1px solid var(--border); padding: 26px 0; }
.pie-in { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
          font-size: .85rem; color: var(--muted); font-family: var(--mono); }
.pie-in .sep { color: var(--faint); }
.pie-in .fin { margin-left: auto; }

/* ---------- Modal de acceso (honeypot) ---------- */
.modal-fondo {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 24px; background: color-mix(in srgb, var(--bg) 78%, #000 22%);
  backdrop-filter: blur(6px);
}
.modal-fondo[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 396px;
  background: var(--surface); border: 1px solid var(--border-fuerte);
  border-radius: var(--radio); padding: 32px 28px 28px;
  box-shadow: 0 30px 80px -30px #000000cc;
}
.modal h2 { font-size: 1.3rem; margin-bottom: 5px; }
.modal-sub { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.modal-x {
  position: absolute; top: 13px; right: 15px; background: none; border: 0;
  color: var(--faint); font-size: 1.55rem; line-height: 1; cursor: pointer; padding: 4px;
}
.modal-x:hover { color: var(--text); }
.modal label {
  display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 6px;
}
.modal input {
  width: 100%; margin-bottom: 16px; padding: 11px 13px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border-fuerte); border-radius: var(--radio-sm);
  font-size: .95rem; font-family: inherit;
}
.modal input::placeholder { color: var(--faint); }
.btn-bloque { width: 100%; margin-top: 4px; }
.modal-error {
  margin-bottom: 14px; padding: 10px 12px;
  background: color-mix(in srgb, #f87171 12%, transparent);
  border: 1px solid #f8717155; border-radius: var(--radio-sm);
  color: #fca5a5; font-size: .85rem;
}
.modal-error[hidden] { display: none; }
.ac-spin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--acento-ink) 40%, transparent);
  border-top-color: var(--acento-ink); animation: giro .7s linear infinite;
}
.ac-spin[hidden] { display: none; }
@keyframes giro { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 52px; }
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
