@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('fonts/source-serif-4-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('fonts/source-serif-4-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-blue: #0075de;
  --color-blue-hover: #005bb0;
  --color-link: #0068c4;
  --color-canvas: #f6f5f4;
  --color-white: #ffffff;
  --color-ink: #000000;
  --color-graphite: #615d59;
  --color-stone: #6b6b6b;
  --color-sky-tint: #e6f3fe;
  --color-peach: #f6d5b8;
  --color-marigold: #ffb110;
  --color-coral: #f64932;
  --color-sky-wash: #62aef0;
  --color-midnight: #02093a;
  --hairline: rgba(0, 0, 0, 0.08);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --radius-small: 4px;
  --radius-button: 8px;
  --radius-card: 12px;
  --radius-pill: 9999px;
  --wrap: 1120px;
  --measure: 760px;
  --ease: 200ms ease;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--color-canvas);
  color: rgba(0, 0, 0, 0.95);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

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

a {
  color: var(--color-link);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-blue-hover);
}

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

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

.muted {
  color: var(--color-stone);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-button);
  background: var(--color-white);
}

.skip:focus {
  left: 8px;
}

/* ---------- Encabezado */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(246, 245, 244, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  box-shadow: 0 0.7px 1.462px rgba(0, 0, 0, 0.015), 0 3px 9px rgba(0, 0, 0, 0.03);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
}

.brand img {
  display: block;
  width: auto;
  height: 32px;
}

.nav__menu > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-button);
  color: rgba(0, 0, 0, 0.8);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.nav__menu > summary::-webkit-details-marker {
  display: none;
}

.nav__menu > summary::after {
  content: '▾';
  margin-left: 6px;
  font-size: 12px;
}

.nav__menu[open] > summary {
  background: var(--color-white);
}

.nav__menu ul {
  position: absolute;
  right: 16px;
  left: 16px;
  margin: 8px 0 0;
  padding: 8px;
  list-style: none;
  background: var(--color-white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav--desktop ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__menu li a,
.nav--desktop a,
.langs button {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-button);
  color: rgba(0, 0, 0, 0.6);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--ease), background var(--ease);
}

.nav__menu li a:hover,
.nav--desktop a:hover,
.langs button:hover {
  color: var(--color-ink);
}

.nav__menu li a[aria-current='page'],
.nav--desktop a[aria-current='page'],
.langs button[aria-pressed='true'] {
  color: var(--color-blue-hover);
  background: var(--color-sky-tint);
}

.langs {
  display: flex;
  gap: 2px;
}

.langs button {
  flex: none;
  justify-content: center;
  min-width: 44px;
  padding: 0 8px;
  font-size: 14px;
}

.langs[hidden] {
  display: none;
}

.langs button {
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

/* ---------- Idioma: una sola URL, el bloque visible depende de html[data-lang] */
html:not([data-lang='pt']) [data-l='pt'],
html:not([data-lang='en']) [data-l='en'],
html[data-lang='pt'] [data-l='es'],
html[data-lang='en'] [data-l='es'] {
  display: none !important;
}

/* ---------- Documento */
.page {
  padding-top: 48px;
}

.doc {
  max-width: var(--measure);
}

.doc__header {
  margin-bottom: 32px;
}

.doc h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--color-ink);
}

.doc__lead {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--color-graphite);
}

.doc__updated {
  margin: 12px 0 0;
  color: var(--color-stone);
  font-size: 14px;
}

.prose {
  font-size: 17px;
}

.prose h2 {
  margin: 48px 0 12px;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

.prose h3 {
  margin: 32px 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-ink);
}

.prose h2 .anchor,
.prose h3 .anchor {
  margin-left: 8px;
  color: var(--color-stone);
  text-decoration: none;
  opacity: 0;
  transition: opacity var(--ease);
}

.prose h2:hover .anchor,
.prose h3:hover .anchor {
  opacity: 1;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

.prose li {
  margin: 6px 0;
}

.prose blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--color-peach);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  background: var(--color-white);
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--color-graphite);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  padding: 2px 6px;
  border-radius: var(--radius-small);
  background: rgba(0, 0, 0, 0.05);
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--color-midnight);
  color: #e8ecff;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--color-white);
  font-weight: 600;
}

.prose hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.ext {
  margin-left: 2px;
  font-size: 0.8em;
}

.back {
  margin-bottom: 24px;
}

.pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-peach);
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Tarjetas e índices */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 24px 0;
}

.card-link {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--color-white);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--ease), transform var(--ease);
}

.card-link:hover {
  color: inherit;
  border-color: rgba(0, 117, 222, 0.4);
  transform: translateY(-1px);
}

.card-link h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--color-ink);
}

.card-link p {
  margin: 0;
  color: var(--color-graphite);
  font-size: 15px;
}

.card-link__go {
  display: inline-block;
  margin-top: 10px;
  color: var(--color-blue-hover);
  font-weight: 500;
  font-size: 15px;
}

.panel {
  padding: 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--color-white);
}

/* ---------- Avance y colaboradores en vivo */
.live {
  display: grid;
  gap: 8px;
}

.live__more {
  font-size: 15px;
}

.milestone {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-button);
  color: var(--color-ink);
  text-decoration: none;
  transition: background var(--ease);
}

.milestone:hover {
  color: var(--color-ink);
  background: var(--color-canvas);
}

.milestone__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
}

.milestone__title {
  font-weight: 600;
}

.milestone__count {
  color: var(--color-stone);
  font-size: 14px;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--color-sky-tint);
}

.bar span {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-blue);
}

.contributor {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: var(--radius-button);
  color: var(--color-ink);
  text-decoration: none;
}

.contributor:hover {
  color: var(--color-ink);
  background: var(--color-canvas);
}

.contributor img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
}

.contributor small {
  margin-left: auto;
  color: var(--color-stone);
}

/* ---------- Perfiles del equipo */
.profiles {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.profile {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--color-white);
}

.profile img {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--color-sky-tint);
}

.profile h3 {
  margin: 0;
  font-size: 18px;
  color: var(--color-ink);
}

.profile__meta {
  margin: 2px 0 8px;
  color: var(--color-stone);
  font-size: 14px;
}

.profile__body p {
  margin: 0 0 8px;
  font-size: 16px;
}

.profile__links {
  margin: 8px 0 0;
  font-size: 14px;
}

/* ---------- Novedades */
.update {
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
}

.update h2 {
  margin-top: 4px;
}

.update__date {
  margin: 0;
  color: var(--color-stone);
  font-size: 14px;
}

/* ---------- Pie */
.footer {
  margin-top: 80px;
  padding: 32px 0 104px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--radius-button);
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--color-ink);
  background: var(--color-white);
}

.footer p {
  margin: 4px 0;
}

.footer p a {
  display: inline-block;
  padding: 10px 0;
  color: rgba(0, 0, 0, 0.8);
}

.footer .footer__learn a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  color: var(--color-link);
}

@media (min-width: 900px) {
  .wrap {
    padding: 0 32px;
  }

  .nav--mobile {
    display: none;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 899px) {
  .nav--desktop {
    display: none;
  }

  .topbar__inner {
    gap: 4px;
  }

  .nav__menu > summary {
    padding: 0 10px;
  }

  .langs {
    gap: 0;
  }
}

@media (max-width: 420px) {
  .brand img {
    height: 24px;
  }

  .langs button {
    min-width: 44px;
    padding: 0 4px;
  }
}

/* ---------- Formulario de contacto */
.contact-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
  margin: 24px 0 32px;
  padding: 24px;
  background: var(--color-white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}

.contact-form[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-button);
  background: var(--color-white);
  color: var(--color-ink);
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 1px;
}

.field__hint,
.contact-form__notice,
.contact-form__recaptcha {
  margin: 0;
  color: var(--color-stone);
  font-size: 14px;
}

.contact-form__warning {
  margin: 0;
  font-weight: 600;
}

.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 44px;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: none;
}

.contact-form .button {
  justify-self: start;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--color-link);
  color: var(--color-white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.contact-form .button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.contact-form__status {
  margin: 0;
  min-height: 1.5em;
}

.contact-form__status[data-kind='error'] {
  color: #b42318;
}

.contact-form__status[data-kind='ok'] {
  color: #067647;
}

/* El sello de reCAPTCHA va oculto a propósito: Google lo permite si el aviso legal
   (.contact-form__recaptcha) se muestra junto al formulario. No volver a mostrarlo. */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* ---------- Botón flotante de GitHub */
.fab-github {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1f2328;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  transition: transform var(--ease), background var(--ease);
}

.fab-github:hover {
  color: #ffffff;
  background: #000000;
  transform: translateY(-2px);
}

.fab-github:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .fab-github {
    width: 48px;
    height: 48px;
  }

  .fab-github svg {
    width: 24px;
    height: 24px;
  }
}

@media print {
  .topbar,
  .footer,
  .fab-github,
  .skip {
    display: none;
  }

  body {
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }

  .fab-github:hover {
    transform: none;
  }
}
