/* STTIE — hoja de estilos única. Sin recursos externos. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colores del logotipo */
  --red: #e02424;
  --blue: #1a56db;
  --green: #0e9f6e;
  --yellow: #f5a623;
  --sky: #8cabed;
  /* Texto y fondos */
  --ink: #13233b;
  --ink-soft: #46526a;
  --paper: #ffffff;
  --paper-2: #f4f2ec;
  --rule: #ddd8cc;
  --link: #1446b8;
  --focus: #c81e1e;
  --measure: 40rem;
  --wide: 90rem;
  --space: clamp(1rem, 3vw, 2.5rem);
  --stripe: repeating-linear-gradient(90deg,
    var(--red) 0 2rem, var(--blue) 2rem 4rem, var(--green) 4rem 6rem, var(--yellow) 6rem 8rem);
}

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

html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-padding-top: 6.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

img, svg, canvas { max-width: 100%; height: auto; }

a { color: var(--link); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.16em; }

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

.skip-link {
  position: absolute; left: 1rem; top: -10rem; z-index: 10;
  background: var(--ink); color: #fff; padding: 0.75rem 1rem; font-weight: 700; border-radius: 4px;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--space); }

/* ---------- Encabezado ---------- */
.stripe { height: 6px; background: var(--stripe); }
.site-header { background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
@supports (backdrop-filter: blur(6px)) { .site-header { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(6px); } }
@media (max-width: 52rem) { .site-header { position: static; } html { scroll-padding-top: 1rem; } }
.header-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem;
  padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.5rem; letter-spacing: 0.08em;
  margin-right: auto; border-radius: 8px;
}
.brand img { width: 44px; height: 44px; border-radius: 8px; display: block; }
.brand:hover, .brand.is-projecting { color: var(--link); }

.site-nav ul, .lang-switch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.site-nav ul { gap: 0.25rem 1.25rem; }
.site-nav a { color: var(--ink); text-decoration: none; display: inline-block; padding: 0.35rem 0; }
.site-nav a:hover { text-decoration: underline; }

.lang-switch ul { gap: 0.4rem; }
.lang-switch a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.55rem; border: 2px solid transparent; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem;
}
.lang-switch a:hover { border-color: var(--rule); }
.lang-switch a[aria-current="page"] { border-color: var(--ink); }
.flag { width: 1.6rem; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px rgba(19, 35, 59, 0.25); display: block; }

@media (max-width: 52rem) {
  .header-row { gap: 0.5rem 1rem; }
  .site-nav { order: 3; width: 100%; }
}

/* ---------- Portada ---------- */
.hero {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  background-color: #faf8f3;
  background-image: radial-gradient(circle, #e2dccd 1.6px, transparent 1.8px);
  background-size: 22px 22px;
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 72rem) { .hero-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 3.5rem; } }
.eyebrow {
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.9rem;
  color: var(--ink-soft); margin: 0 0 1rem;
}
.hero h1 { font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.12; margin: 0 0 1.5rem; max-width: 22ch; }
.lede { font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.45; max-width: 40ch; margin: 0; }
.lede strong { color: var(--link); }


/* Modelo 3D */
.stage { margin: 0; background: #ffffff; box-shadow: 0 1px 0 var(--rule); padding: 1rem 1rem 1.5rem; border-top: 6px solid transparent; border-image: var(--stripe) 1; }
.stage-view { width: 100%; aspect-ratio: 100 / 40; display: grid; place-items: center; }
@media (max-width: 40rem) { .stage-view { aspect-ratio: 100 / 55; } }
.stage-view svg { width: 50%; }
.stage-view canvas { display: block; cursor: grab; touch-action: pan-y; border-radius: 12px; }
.stage-view canvas:active { cursor: grabbing; }
.stage figcaption { padding: 0 0.5rem; }
.words { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 0.5rem; }
.words li + li::before { content: "·"; color: var(--ink-soft); margin-right: 0.5rem; font-size: 1.4rem; }
.words li { display: flex; align-items: center; }
.word {
  font: inherit; font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 700; letter-spacing: 0.02em;
  background: none; border: 0; color: var(--ink); padding: 0.3rem 0.55rem; cursor: pointer; border-radius: 2px;
}

/* Elementos que se proyectan en el modelo */
.projectable { transition: color 0.15s ease, background-color 0.15s ease; }
.projectable:hover, .projectable.is-projecting { color: var(--link); }
.word:hover, .word.is-projecting { background: #e3eafb; }
h1.projectable { cursor: default; }
h1.projectable:hover, h1.projectable.is-projecting { color: var(--link); }
@media (prefers-reduced-motion: reduce) { .projectable { transition: none; } }

/* ---------- Secciones ---------- */
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.alt { background: var(--paper-2); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.2; margin: 0 0 1.25rem; }
h2 .bar { display: block; width: 4.5rem; height: 6px; margin-bottom: 0.9rem; border-radius: 3px;
  background: linear-gradient(90deg, var(--red) 0 25%, var(--blue) 25% 50%, var(--green) 50% 75%, var(--yellow) 75%); }
h3 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 0.5rem; }
.prose { max-width: var(--measure); }
.prose p, .prose ul { margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.4rem; }

.split { display: grid; gap: 2.5rem; }
@media (min-width: 64rem) { .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 4rem; align-items: start; } }
.side { display: grid; gap: 1.5rem; }
.figure-stat { background: var(--link); color: #ffffff; padding: 1.75rem 1.75rem 1.5rem; margin: 0; }
.figure-stat .source { color: #dbe4fb; margin-top: 0.75rem; }
.commit { background: var(--paper-2); padding: 1.5rem 1.75rem; border-left: 6px solid var(--yellow); }
.commit h3 { margin-top: 0; }
.commit p { margin: 0; }
.figure-stat p { margin: 0; }
.figure-stat .num { display: block; font-size: clamp(2.4rem, 4.5vw, 3.4rem); font-weight: 700; line-height: 1.05; color: #ffffff; margin-bottom: 0.35rem; }
.figure-stat p { margin: 0; font-size: 1.2rem; }
.source { font-size: 0.95rem; color: var(--ink-soft); }

/* Trayectoria: línea de tiempo */
.timeline-section { background: var(--ink); color: #ffffff; }
.timeline-section h2 { color: #ffffff; }
.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 2rem; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 0.7rem; top: 0.4rem; bottom: 0.4rem; width: 6px;
  background: linear-gradient(180deg, var(--red), var(--blue), var(--green), var(--yellow));
}
.timeline li { position: relative; padding-left: 2.75rem; }
.timeline .node {
  position: absolute; left: 0.2rem; top: 0.1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 5px var(--ink);
}
.timeline li:nth-child(2) .node { background: var(--green); }
.timeline li:nth-child(3) .node { background: var(--yellow); }
.timeline .when { display: block; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); margin-bottom: 0.3rem; }
.timeline .what { display: block; max-width: 28rem; color: #e9edf5; }
.timeline .what strong { color: #ffffff; font-size: 1.2rem; }
@media (min-width: 52rem) {
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; padding-top: 2.75rem; }
  .timeline::before { left: 0; right: 0; top: 0.7rem; bottom: auto; width: auto; height: 6px;
    background: linear-gradient(90deg, var(--red), var(--blue), var(--green), var(--yellow)); }
  .timeline li { padding-left: 0; }
  .timeline .node { left: 0; top: -2.75rem; }
}

/* Resultados */
.outcomes { list-style: none; padding: 0; margin: 2rem 0 2.25rem; display: grid; gap: 2rem 3rem; max-width: 60rem; }
@media (min-width: 48rem) { .outcomes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 80rem) { .outcomes { grid-template-columns: repeat(4, 1fr); max-width: none; gap: 2.5rem; } }
.outcomes li { border-top: 4px solid var(--red); padding-top: 1rem; }
.outcomes li:nth-child(2) { border-top-color: var(--blue); }
.outcomes li:nth-child(3) { border-top-color: var(--green); }
.outcomes li:nth-child(4) { border-top-color: var(--yellow); }
.outcomes h3 { display: flex; align-items: center; gap: 0.75rem; }
.bnum { width: 3.2rem; height: auto; flex: none; color: var(--red); }
.outcomes li:nth-child(2) .bnum { color: var(--blue); }
.outcomes li:nth-child(3) .bnum { color: #0b7a55; }
.outcomes li:nth-child(4) .bnum { color: #a3640a; }
#que-hace, #what-it-does, #was-sttie-leistet { background: #eef3fd; }
.outcomes h3 { margin-top: 0; }
.outcomes p { margin: 0; }

/* Equipo */
.team { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); align-items: start; }
.member { background: #faf8f3; box-shadow: inset 0 0 0 1px var(--rule); border-bottom: 4px solid var(--red); display: flex; flex-direction: column; }
.member:nth-child(2) { border-bottom-color: var(--blue); }
.member:nth-child(3) { border-bottom-color: var(--green); }
.member:nth-child(4) { border-bottom-color: var(--yellow); }
.photo { position: relative; aspect-ratio: 1 / 1; background: #e4e1d8; overflow: hidden; display: grid; place-items: center; }
.photo .ph { width: 45%; height: auto; filter: grayscale(1); opacity: 0.35; }
.photo .real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member-text { padding: 1rem 1.1rem 0.5rem; flex: 1; display: flex; flex-direction: column; }
.member h3 { margin: 0 0 0.15rem; min-height: 2.6em; }
@media (max-width: 40rem) { .member h3 { min-height: 0; } }
.member .role { margin: 0; font-weight: 700; color: var(--link); }
.member details { margin-top: auto; padding-top: 0.25rem; }
.member summary { list-style: none; display: flex; justify-content: flex-end; cursor: pointer; padding: 0.25rem 0 0.4rem; color: var(--ink); }
.member summary::-webkit-details-marker { display: none; }
.member summary .chev { transition: transform 0.2s ease; }
.member details[open] summary .chev { transform: rotate(180deg); }
.member .bio { padding-bottom: 0.75rem; }
.member .bio p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .member summary .chev { transition: none; } }

/* Noticias: tarjetas con vista previa */
.cards { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.cards-social { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--paper); border: 1px solid var(--rule); overflow: hidden;
  color: var(--ink); text-decoration: none;
}
.card:hover { border-color: var(--ink); }
.card:hover .card-title { text-decoration: underline; }
.thumb { display: block; aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-gen { display: flex; align-items: flex-end; justify-content: space-between; padding: 1rem 1.1rem; position: relative; }
.thumb .real { position: absolute; inset: 0; }
.thumb-label { font-weight: 700; font-size: 1.35rem; line-height: 1.1; color: #fff; }
.thumb-cell { display: grid; grid-template-columns: repeat(2, 0.7rem); gap: 0.35rem; align-self: flex-start; }
.thumb-cell i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: rgba(255, 255, 255, 0.9); }
.thumb-cell i:nth-child(2), .thumb-cell i:nth-child(5) { background: rgba(255, 255, 255, 0.28); }
.tone-blue { background: var(--blue); }
.tone-red { background: #c81e1e; }
.tone-darkred { background: #7f1d1d; }
.tone-ink { background: var(--ink); }
.tone-yellow { background: var(--yellow); }
.tone-yellow .thumb-label { color: var(--ink); }
.tone-yellow .thumb-cell i { background: rgba(19, 35, 59, 0.85); }
.tone-yellow .thumb-cell i:nth-child(2), .tone-yellow .thumb-cell i:nth-child(5) { background: rgba(19, 35, 59, 0.25); }
.card-body { display: block; padding: 0.9rem 1.1rem 1.1rem; }
.card .meta { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.3rem; }
.card-title { display: block; font-weight: 700; line-height: 1.35; color: var(--link); }

/* Contacto */
.contact-mail { font-size: clamp(1.3rem, 3vw, 2.2rem); font-weight: 700; word-break: break-word; }
.contact-band { background: var(--link); color: #ffffff; }
.contact-band .prose { max-width: none; }
.contact-band h2 .bar { background: #ffffff; }
.contact-band a { color: #ffffff; }
.contact-band :focus-visible { outline-color: #ffffff; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #f3f1ea; padding: 2.5rem 0; font-size: 1rem; border-top: 6px solid transparent; border-image: var(--stripe) 1; }
.footer-row { display: flex; gap: 1.5rem; align-items: flex-start; }
.footer-row img { border-radius: 10px; flex: none; }
.site-footer a { color: #ffffff; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer p { margin: 0 0 0.5rem; max-width: 48rem; }
.site-footer :focus-visible, .skip-link:focus-visible, .team li.lead :focus-visible { outline-color: #ffffff; }

/* ---------- Páginas legales ---------- */
.legal { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 0.5rem; }
.legal .updated { color: var(--ink-soft); margin: 0 0 2rem; }
.legal h2 { font-size: 1.4rem; margin-top: 2.25rem; }

@media print {
  .site-header nav, .skip-link, .stage { display: none; }
  a::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* Columnas fijas en pantallas anchas */
@media (min-width: 64rem) {
  .team { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .cards-social { grid-template-columns: repeat(3, 1fr); max-width: 75%; }
}
