/* =========================================
   BASE DEL PROYECTO
   Layout, tipografía, controles y accesibilidad.
   ========================================= */

:root {
  --bg: #0c1118;
  --surface: #121a24;
  --surface-2: #182332;
  --text: #edf2f7;
  --muted: #9eabb9;
  --accent: #74d7ff;
  --accent-2: #bba7ff;
  --border: rgba(255,255,255,.10);
  --shadow: 0 18px 50px rgba(0,0,0,.25);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at top, #142133 0%, var(--bg) 38%, #0a0f15 100%);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
a { color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #d8caff; }
.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12,17,24,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { min-height: 68px; display:flex; align-items:center; justify-content:space-between; gap: 24px; }
.brand { font-weight: 800; text-decoration: none; }
nav { display:flex; flex-wrap:wrap; gap: 18px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--text); }

.hero { padding: 88px 0 42px; }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; color: var(--accent); font-weight: 800; }
h1, h2, h3 { line-height: 1.15; margin-top: 0; }
h1 { max-width: 850px; font-size: clamp(2.6rem, 6vw, 5.4rem); margin-bottom: 22px; }
h1 span { color: var(--accent); }
.hero-copy { max-width: 820px; color: var(--muted); font-size: 1.08rem; }
.hero-controls { margin-top: 30px; padding: 18px; display:flex; flex-wrap:wrap; align-items:center; gap: 12px 18px; background: rgba(18,26,36,.76); border:1px solid var(--border); border-radius: var(--radius); }
.hero-controls label { min-width: 160px; }
.hero-controls input[type="range"] { flex: 1 1 180px; accent-color: var(--accent); }

.section { padding: 60px 0; }
.section-last { padding-bottom: 90px; }
.section-heading { max-width: 760px; margin-bottom: 26px; }
.section-heading p:not(.eyebrow) { color: var(--muted); margin-bottom: 0; }

.experiment-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.experiment-card, .info-card { background: linear-gradient(180deg, rgba(24,35,50,.92), rgba(18,26,36,.92)); border:1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.experiment-card { padding: 20px; overflow: hidden; }
.experiment-meta { display:flex; justify-content:space-between; gap: 12px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.experiment-card h3 { margin: 10px 0 8px; font-size: 1.25rem; }
.experiment-card p { min-height: 50px; color: var(--muted); margin: 0 0 14px; }
.stage { min-height: 150px; display:grid; place-items:center; padding: 18px; margin-bottom: 14px; overflow: hidden; background: rgba(5,10,16,.55); border:1px dashed rgba(255,255,255,.12); border-radius: 14px; }
.stage-tall { min-height: 250px; }
.sample { width:min(100%, 300px); min-height:76px; display:grid; place-items:center; padding: 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: linear-gradient(135deg, #2d6f8c, #5e4d9b); box-shadow: 0 12px 28px rgba(0,0,0,.22); font-weight: 800; letter-spacing: .04em; }
.placeholder { color: var(--muted); text-align:center; }
.button { border:0; border-radius: 11px; padding: 10px 14px; background: var(--accent); color: #071018; font-weight: 800; cursor:pointer; }
.button:hover { filter: brightness(1.05); }
.button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.button-secondary { background: var(--surface-2); color: var(--text); border:1px solid var(--border); }
.native-toggle { display:inline-flex; align-items:center; gap:8px; color: var(--muted); }
.native-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.support-note { display:block; min-height: 1.3em; margin-top: 10px; color: var(--muted); font-size: .8rem; }

.diagnostic-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.info-card { padding:18px; }
.info-card h3 { font-size:1rem; margin-bottom:8px; }
.info-card p { margin:0; color:var(--muted); }
.status-box { margin-top: 20px; padding: 14px 16px; border:1px solid var(--border); border-radius: 12px; background: rgba(18,26,36,.7); color: var(--muted); }
.table-wrap { overflow:auto; border:1px solid var(--border); border-radius: var(--radius); }
table { width:100%; border-collapse: collapse; min-width: 760px; background: rgba(18,26,36,.65); }
th, td { padding: 13px 14px; text-align:left; border-bottom:1px solid var(--border); vertical-align:top; }
th { color:var(--text); background:rgba(255,255,255,.03); }
td { color:var(--muted); }
.note { color:var(--muted); margin-top:14px; }
.site-footer { border-top:1px solid var(--border); padding:28px 0 44px; color:var(--muted); }

@media (max-width: 900px) {
  .experiment-grid, .diagnostic-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 62px; }
}

@media (max-width: 640px) {
  .header-inner { align-items:flex-start; flex-direction:column; padding: 14px 0; }
  nav { gap: 10px 14px; }
  .container { width:min(100% - 22px, 1180px); }
  .hero-controls { align-items:stretch; }
  .hero-controls .button { width:100%; }
}

/* =========================================
   ACCESIBILIDAD: REDUCED MOTION
   La información sigue siendo accesible aun sin animaciones.
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
