/* Payouts de alumnos · misma familia que la landing y el campus (campus-focus/DESIGN.md) */

@font-face { font-family: "Archivo"; font-weight: 400; font-display: swap; src: url("../marca/fuentes/Archivo-400.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url("../marca/fuentes/Archivo-600.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 800; font-display: swap; src: url("../marca/fuentes/Archivo-800.woff2") format("woff2"); }

:root {
  --bg: #080705;
  --panel: #12100B;
  --panel-2: #1B1810;
  --line: #2E2A1B;
  --line-soft: #1F1C13;
  --borde-control: #45402B;
  --text: #FFFFFF;
  --text-2: #D2CBB7;
  --text-3: #9C947D;
  --gold: #F7C536;
  --gold-deep: #B98F14;
  --gold-ink: #0B0903;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --margen: 20px;
  --entre: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  position: relative;
  background-color: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 "Archivo", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* El resplandor dorado de la apertura de las lecciones, en lo alto de la página */
body::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 auto 0; height: 620px; pointer-events: none;
  background-image: radial-gradient(70% 460px at 50% -140px, rgba(247, 197, 54, .18), transparent 72%);
}
::selection { background: var(--gold); color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
.sprite { display: none; }

h1 {
  font-weight: 800; font-size: clamp(38px, 6.4vw, 68px); line-height: 1.04; letter-spacing: -.03em;
  text-wrap: balance; max-width: 16ch;
}
h1 em, .h2-grande em { font-style: normal; color: var(--gold); }
h2 { font-weight: 800; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.h2-grande { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.06; letter-spacing: -.025em; }
.lead { color: var(--text-2); font-size: 17px; line-height: 1.5; max-width: 52ch; margin-top: 14px; }
.meta { color: var(--text-3); font-size: 13.5px; line-height: 1.45; }
.link { color: var(--gold); font-weight: 600; font-size: 15px; text-underline-offset: 4px; }
.link:hover { text-decoration: underline; }

/* Armazón */
.envoltura { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--margen); }
main { display: grid; gap: var(--entre); padding-bottom: var(--entre); }
.seccion { display: grid; gap: 28px; }
.seccion__cab { display: grid; }

/* Cabecera: fondo plano, sin cristal */
.cabecera { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.cabecera__fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.cabecera__logo img { height: 26px; width: auto; }

/* Botones, con el canto de los rótulos de los vídeos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 11px; border: 0;
  font: 800 16px/1 "Archivo", sans-serif; letter-spacing: -.005em; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn--oro { background: var(--gold); color: var(--gold-ink); border-bottom: 3px solid var(--gold-deep); }
.btn--oro:hover { background: #FFD456; }
.btn--oro:active { transform: translateY(2px); border-bottom-width: 1px; }
.btn--linea { background: transparent; color: var(--text); border: 1px solid var(--borde-control); }
.btn--linea:hover { border-color: var(--gold); }
.btn--s { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 9px; }

.rotulo {
  display: inline-flex; align-items: center; justify-self: start; padding: 4px 9px; border-radius: 7px;
  font-weight: 800; font-size: 11.5px; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase;
  background: #211E15; color: var(--text); box-shadow: inset 0 -2px 0 #4A4430; white-space: nowrap;
}


/* 1 · Portada: la cifra va dentro de la frase, no como «número enorme + etiqueta» */
.portada { display: grid; padding-top: 40px; }
.portada__texto { display: grid; justify-items: start; gap: 18px; }
.portada__metodo {
  display: flex; align-items: center; gap: 10px;
  color: var(--gold); font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
}
.portada__metodo img { width: 22px; height: auto; }
.portada .lead { margin-top: 0; }
/* Los tres primeros certificados en abanico, solo en el ordenador (como la imagen al compartir el enlace) */
.portada__certs { display: none; }
.portada__cert {
  position: absolute; width: 66%; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--panel-2); cursor: zoom-in; box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
  transition: transform .25s var(--ease), border-color .18s var(--ease);
}
.portada__cert img { width: 100%; }
.portada__cert:hover { border-color: var(--borde-control); z-index: 2; }
.portada__cert.c1 { left: 0; top: 0; transform: rotate(-6deg); }
.portada__cert.c2 { right: 0; top: 27%; transform: rotate(4deg); }
.portada__cert.c3 { left: 6%; top: 58%; transform: rotate(-2deg); }
.portada__cert.c1:hover { transform: rotate(-6deg) translateY(-6px); }
.portada__cert.c2:hover { transform: rotate(4deg) translateY(-6px); }
.portada__cert.c3:hover { transform: rotate(-2deg) translateY(-6px); }
.cifra { white-space: nowrap; }
.acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }

/* 2 · El muro: cada certificado entero, sin recortar. El JS reparte en columnas
   poniendo cada uno en la más corta, para que el orden se lea de izquierda a derecha */
.muro { --cols: 2; --hueco: 10px; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--hueco); align-items: start; }
.muro__col { display: grid; gap: var(--hueco); }
.muro__boton {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--panel); cursor: zoom-in; color: inherit; text-align: left;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.muro__boton:hover { border-color: var(--borde-control); }
.muro__boton img { width: 100%; background: var(--panel-2); }
.muro__texto {
  display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px 9px;
  font-size: 13px; line-height: 1.3; color: var(--text-3); font-weight: 600;
}
.muro__texto b { color: var(--text); font-weight: 800; white-space: nowrap; }
.muro li.nuevo { animation: aparece .5s var(--ease) both; }
@keyframes aparece { from { opacity: 0; transform: translateY(8px); } }
.muro__pie { display: grid; justify-items: center; gap: 10px; }
.muro__pie[hidden] { display: none; }

/* 4 · Cierre */
.cierre {
  display: grid; justify-items: center; text-align: center; gap: 0; padding-top: 56px; padding-bottom: 8px;
  background: radial-gradient(50% 260px at 50% 0%, rgba(247, 197, 54, .14), transparent 72%);
}
.cierre__chevron { width: 64px; height: auto; margin-bottom: 22px; }
.cierre .btn { margin-top: 28px; }
/* Mientras no se cogen llamadas (Joan, 4/11): un aviso que no se puede pulsar, en el sitio del botón */
.cierre__cerrado { margin-top: 18px; color: var(--text-2); font-size: 17px; line-height: 1.5; }
.cierre__firma { margin-top: 26px; font-weight: 800; font-size: 15px; letter-spacing: .02em; color: var(--text-3); }

/* Botón fijo abajo (móvil) */
.barra-cta {
  position: fixed; z-index: 20; inset: auto 0 0 0; padding: 12px var(--margen) calc(12px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line-soft);
  transform: translateY(110%); transition: transform .35s var(--ease);
}
.barra-cta .btn { width: 100%; }
.barra-cta.visible { transform: none; }

/* Visor de un certificado */
.visor {
  width: min(100vw, 1100px); max-width: none; max-height: none; height: 100dvh; margin: 0 auto; padding: 0;
  border: 0; background: transparent; color: var(--text);
}
.visor::backdrop { background: rgba(8, 7, 5, .94); }
.visor__marco { height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: center; padding: 56px 12px 12px; position: relative; }
.visor__foto { margin: 0; min-height: 0; }
.visor img { max-height: calc(100dvh - 140px); width: auto; margin: 0 auto; border-radius: 10px; }
.visor__pie { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 10px; padding-top: 14px; }
.visor__pie p { text-align: center; color: var(--text-2); font-weight: 600; font-size: 15px; }
.visor__pie p b { color: var(--text); font-weight: 800; }
.visor__flecha, .visor__cerrar {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 11px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
}
.visor__flecha:hover, .visor__cerrar:hover { border-color: var(--gold); }
.visor__flecha svg, .visor__cerrar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.visor__cerrar { position: absolute; top: 4px; right: 12px; }

/* Pie */
.pie { border-top: 1px solid var(--line-soft); padding: 36px 0 calc(96px + env(safe-area-inset-bottom)); }
.pie .envoltura { display: grid; gap: 16px; }
.pie__logo { height: 22px; width: auto; opacity: .8; }
.pie__riesgo { color: var(--text-3); font-size: 13.5px; line-height: 1.5; max-width: 70ch; }
.pie__enlaces { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.pie__enlaces a:hover { color: var(--gold); }

/* Aviso legal y privacidad */
.legal { max-width: 760px; display: grid; gap: 32px; padding-top: 40px; padding-bottom: var(--entre); }
.legal__titulo { font-size: clamp(32px, 5vw, 48px); max-width: none; }
.legal section { display: grid; gap: 12px; }
.legal h2 { font-size: 22px; }
.legal p, .legal li { color: var(--text-2); line-height: 1.6; }
.legal ul { list-style: disc; padding-left: 20px; display: grid; gap: 4px; }
.legal .link { font-size: inherit; }
.pie--corto { padding-bottom: calc(36px + env(safe-area-inset-bottom)); }

/* Página que no existe */
.perdida { min-height: 100dvh; align-content: center; padding-block: 40px; }

@media (min-width: 640px) {
  .muro { --cols: 3; --hueco: 14px; }
}

/* Ordenador */
@media (min-width: 900px) {
  :root { --margen: clamp(28px, 4vw, 60px); --entre: 112px; }
  .cabecera__fila { min-height: 72px; }
  .portada { padding-top: 88px; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; column-gap: 32px; }
  .portada h1 { font-size: clamp(38px, 5.2vw, 60px); }
  .portada__certs { display: block; position: relative; height: clamp(340px, 34vw, 440px); }
  .muro { --cols: 4; --hueco: 16px; }
  .barra-cta { display: none; }
  .pie { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  /* El pie a lo ancho (Joan, 4/11: apilado a la izquierda dejaba la derecha vacía): logo y enlaces en la misma línea,
     el aviso de riesgo debajo de lado a lado y el © al final */
  .pie .envoltura { grid-template-columns: auto 1fr; align-items: center; row-gap: 18px; }
  .pie__logo { grid-column: 1; grid-row: 1; }
  .pie__enlaces { grid-column: 2; grid-row: 1; justify-self: end; }
  .pie__riesgo { grid-column: 1 / -1; max-width: none; padding-top: 18px; border-top: 1px solid var(--line-soft); }
  .pie .meta { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
