/* ==========================================================
   SystemCorps — Landing de Edututor
   Paleta inspirada en un cuaderno cuadriculado y un resaltador.
   ========================================================== */

:root {
  --tinta: #13203f;        /* texto principal, azul tinta */
  --tinta-suave: #4a5675;  /* texto secundario */
  --papel: #f5f7fc;        /* fondo */
  --linea: #d5ddee;        /* cuadrícula y bordes */
  --bloque: #e3e8f2;       /* bloques ocupados del horario */
  --resaltador: #ffd449;   /* tutorías sugeridas, acento único */
  --azul: #2340b5;         /* acciones */
  --azul-osc: #182d86;

  --fuente: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ancho: 72rem;
  --radio: 6px;
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3 { line-height: 1.12; margin: 0; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 1.125rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

a { color: var(--azul); }

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

.wrap {
  width: min(100% - 2.5rem, var(--ancho));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: .5rem 1rem;
  background: var(--tinta);
  color: #fff;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.4rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--azul);
  border-radius: var(--radio);
  text-decoration: none;
  transition: background-color .15s ease;
}
.btn:hover { background: var(--azul-osc); }
.btn-small { padding: .55rem 1rem; font-size: .95rem; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(245, 247, 252, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linea);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--tinta);
  text-decoration: none;
}
.brand-mark { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  max-width: 16ch;
}
.lead {
  font-size: 1.2rem;
  color: var(--tinta-suave);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.hero-version {
  margin-top: .9rem;
  font-size: .95rem;
  color: var(--tinta-suave);
}

/* ---------- Horario (elemento protagonista) ---------- */
.schedule { margin: 0; }
.schedule-grid {
  --fila: 2.6rem;
  display: grid;
  grid-template-columns: 3.4rem repeat(5, minmax(0, 1fr));
  grid-template-rows: 2rem repeat(8, var(--fila));
  gap: 4px;
  padding: 1rem;
  background-color: #fff;
  background-image:
    linear-gradient(var(--linea) 1px, transparent 1px),
    linear-gradient(90deg, var(--linea) 1px, transparent 1px);
  background-size: 1.3rem 1.3rem;
  background-position: -1px -1px;
  border: 1px solid var(--linea);
  border-radius: 10px;
  box-shadow: 0 1px 0 var(--linea), 0 18px 40px -24px rgba(19, 32, 63, .35);
}
.day, .hour {
  font-size: .8rem;
  font-weight: 700;
  color: var(--tinta-suave);
  background: #fff;
}
.day {
  grid-column: var(--c);
  grid-row: 1;
  display: grid;
  place-items: center;
  border-radius: 4px;
}
.hour {
  grid-column: 1;
  grid-row: var(--r);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding-top: .1rem;
  padding-right: .3rem;
  text-align: right;
  align-self: start;
}
.block {
  grid-column: var(--c);
  grid-row: var(--r) / span var(--h);
  border-radius: 5px;
  padding: .4rem .5rem;
  font-size: .78rem;
  line-height: 1.2;
  overflow: hidden;
}
.busy {
  background: var(--bloque);
  color: var(--tinta-suave);
  border: 1px solid #d3dae8;
}
.match {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  background: var(--resaltador);
  color: var(--tinta);
  border: 1px solid #e8b923;
  box-shadow: 0 6px 14px -8px rgba(160, 120, 0, .7);
  transform-origin: left center;
  animation: resaltar .55s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(.6s + var(--i) * .28s);
}
.match b { font-weight: 800; font-size: .82rem; overflow-wrap: anywhere; hyphens: auto; }
.match small { font-size: .72rem; opacity: .8; }

@keyframes resaltar {
  from { transform: scaleX(0); opacity: .4; }
  to   { transform: scaleX(1); opacity: 1; }
}

.schedule figcaption {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .9rem;
  font-size: .92rem;
  color: var(--tinta-suave);
}
.swatch {
  width: 1.1rem;
  height: .75rem;
  border-radius: 2px;
  background: var(--resaltador);
  border: 1px solid #e8b923;
}

/* ---------- Quiénes somos ---------- */
.about {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--linea);
}
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.about h2 { margin-bottom: 1.25rem; }
.about p { max-width: 38rem; color: var(--tinta-suave); }

.facts {
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 2px solid var(--tinta);
}
.facts div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--linea);
}
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--tinta-suave); }

/* ---------- Qué hace Edututor ---------- */
.product {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--linea);
}
.product h2 { margin-bottom: 2.25rem; }
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem clamp(2rem, 5vw, 4.5rem);
}
.features li {
  padding-left: 1.1rem;
  border-left: 3px solid var(--linea);
}
.features h3 { margin-bottom: .45rem; }
.features p { margin: 0; color: var(--tinta-suave); max-width: 32rem; }

/* ---------- Descarga ---------- */
.download {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  background: var(--tinta);
  color: #e9edf7;
  scroll-margin-top: 4rem;
}
.download:focus { outline: none; }
.download-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.download h2 { color: #fff; margin-bottom: 1.5rem; }
.release-version {
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  margin-bottom: .75rem;
}
.release-version span { color: var(--resaltador); font-variant-numeric: tabular-nums; }
.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  color: #b7c0d8;
  margin-bottom: 2rem;
}
.release-meta span:empty { display: none; }

.btn-download {
  font-size: 1.1rem;
  padding: 1.05rem 1.6rem;
  color: var(--tinta);
  background: var(--resaltador);
}
.btn-download:hover { background: #ffe07a; }
.btn-download svg { width: 1.3rem; height: 1.3rem; }
.btn-download[aria-disabled="true"] {
  background: #5a6787;
  color: #d4d9e6;
  cursor: not-allowed;
}

.download-status {
  min-height: 1.5rem;
  margin: .9rem 0 .25rem;
  font-size: .95rem;
  color: #ffd6d6;
}
.download-status.ok { color: #bfe8cf; }
.file-name { font-size: .9rem; color: #9aa5c2; }
.file-name code {
  font-family: inherit;
  font-weight: 500;
  color: #d6dcec;
  word-break: break-all;
}

.download-details { display: grid; gap: 2rem; }
.detail h3 {
  color: #fff;
  padding-bottom: .6rem;
  margin-bottom: .8rem;
  border-bottom: 1px solid rgba(213, 221, 238, .22);
}
.detail ul,
.detail ol {
  margin: 0;
  padding-left: 1.2rem;
  color: #c9d0e3;
}
.detail li { margin-bottom: .35rem; }
.detail li::marker { color: var(--resaltador); }
.detail code {
  font-size: .9em;
  background: rgba(255, 255, 255, .08);
  padding: .1rem .35rem;
  border-radius: 3px;
}

/* ---------- Pie ---------- */
.site-footer {
  padding: 1.75rem 0;
  font-size: .92rem;
  color: var(--tinta-suave);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
}
.footer-inner p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner,
  .about-inner,
  .download-inner { grid-template-columns: 1fr; }
  .hero h1 { max-width: 20ch; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .features { grid-template-columns: 1fr; }
  .schedule-grid {
    --fila: 2.25rem;
    grid-template-columns: 2.6rem repeat(5, minmax(0, 1fr));
    padding: .6rem;
    gap: 3px;
  }
  .hour { font-size: .68rem; }
  .block { padding: .3rem; font-size: .66rem; }
  .match b { font-size: .68rem; }
  .match small { display: none; }
  .facts div { grid-template-columns: 1fr; gap: .1rem; }
  .btn-small { padding: .5rem .8rem; font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .match { animation: none; }
  .btn { transition: none; }
}
