/* Pilar Soria · Brandbook 2026 · Sistema de marca
   Siete colores, tres roles. Nunca blanco puro, nunca negro puro. */
:root {
  /* Paleta */
  --bordo: #990000;     /* firma · primario */
  --latte: #FFF8E7;     /* base · fondo por defecto */
  --tinta: #1B1416;     /* estructura · texto */
  --crema: #F6EFE7;     /* superficie · paneles y tarjetas */
  --rosa: #F6D2D0;      /* heritage */
  --celeste: #CFE7FF;   /* acento */
  --verde: #255340;     /* contraste · destaca la última sesión */

  /* Pasos de interacción (no son colores de paleta) */
  --bordo-press: #7A0000;
  --bordo-hover: #C75A5A;
  --wash-bordo: #F3DCDC;
  --wash-verde: #DDE9E3;

  /* Texto y líneas */
  --texto: rgba(27, 20, 22, .74);        /* cuerpo: tinta al 74% */
  --linea: rgba(27, 20, 22, .15);        /* hairline sobre claro */
  --linea-oscuro: rgba(255, 248, 231, .22);

  /* Radios */
  --r-card: 24px;
  --r-statement: 32px;
  --r-input: 12px;

  --ease: cubic-bezier(.2, .7, .3, 1);   /* ease-out calmo */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--latte);
  color: var(--tinta);
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
p { color: var(--texto); }
a { color: var(--bordo); transition: color .3s var(--ease); }
a:hover { color: var(--bordo-hover); }

/* ------- Tipografía (escala web) */
h1, h2, h3 { color: var(--tinta); margin: 0; }
h1 { font-size: clamp(44px, 7vw, 96px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; margin-bottom: 24px; }
h2 { font-size: clamp(30px, 4.4vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 16px; }
h3 { font-size: clamp(24px, 3vw, 36px); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
/* La itálica como firma: una palabra del título, en itálica bordó 800 */
h1 em, h2 em, h3 em { font-style: italic; font-weight: 800; color: var(--bordo); }
.lead { font-size: clamp(20px, 2.4vw, 24px); font-weight: 300; line-height: 1.4; max-width: 600px; margin: 0 0 48px; }

/* Etiqueta: mayúsculas espaciadas, bordó, con puntito bordó */
.etiqueta {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 16px;
  font-size: 12px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; line-height: 1.3;
  color: var(--bordo);
}
.etiqueta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
/* Topline: etiqueta de sección + hairline */
.contenedor > .etiqueta { padding-bottom: 16px; border-bottom: 1px solid var(--linea); margin-bottom: 40px; }

/* ------- Wordmark (headers y pies) */
.wordmark { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; text-decoration: none; color: var(--tinta); }
.wordmark:hover { color: var(--tinta); }
.wordmark b { font-weight: 400; font-size: 18px; letter-spacing: .2em; }
.wordmark small { font-size: 9px; font-weight: 400; letter-spacing: .32em; margin-top: 5px; }
.wordmark.chico b { font-size: 13px; }
.wordmark.chico small { font-size: 7px; margin-top: 4px; }

/* ------- Sello (isologo) recoloreable: tinta, bordó o latte */
.sello {
  display: inline-block; width: 120px; aspect-ratio: 1;
  background-color: var(--tinta);
  -webkit-mask: url(/static/logo.png) center / contain no-repeat;
          mask: url(/static/logo.png) center / contain no-repeat;
}
.sello.latte { background-color: var(--latte); }
.sello.bordo { background-color: var(--bordo); }

/* ------- Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px;
  padding: 20px clamp(16px, 5vw, 88px);
  background: var(--latte);
  border-bottom: 1px solid var(--linea);
}
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--tinta); text-decoration: none; }
.nav a:hover { color: var(--bordo-hover); }
.nav form { margin: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--bordo); cursor: pointer; font-weight: 600; transition: color .3s var(--ease); }
.link:hover { color: var(--bordo-hover); }

/* ------- Contenedores: el aire es innegociable */
.contenedor { max-width: 1200px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) clamp(16px, 5vw, 88px) clamp(64px, 10vw, 120px); }
.angosto { max-width: 760px; }

/* ------- Tarjetas y formularios */
.tarjeta {
  background: var(--crema);
  border-radius: var(--r-card);
  padding: clamp(24px, 4vw, 40px);
  display: grid; gap: 24px;
}
label { display: grid; gap: 8px; font-size: 15px; font-weight: 600; color: var(--tinta); }
input, select {
  width: 100%;
  font: inherit; font-weight: 400; font-size: 16px; letter-spacing: .01em;
  color: var(--tinta);
  padding: 12px 16px;
  border: 1px solid var(--linea);
  border-radius: var(--r-input);
  background: var(--latte);
  transition: border-color .3s var(--ease);
}
input:focus, select:focus { outline: none; border-color: var(--bordo); }
input[type=file] { padding: 10px 12px; }
input[type=file]::file-selector-button {
  font: inherit; font-size: 14px; font-weight: 600;
  margin-right: 12px; padding: 6px 16px;
  border: 1px solid var(--tinta); border-radius: 999px;
  background: transparent; color: var(--tinta); cursor: pointer;
}
.check { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; }
.check input { width: auto; margin-top: 6px; accent-color: var(--bordo); }
.ayuda { font-size: 14px; font-weight: 400; color: var(--texto); }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ------- Botones: primario bordó con texto latte; secundario con borde */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--bordo); border-radius: 999px;
  background: var(--bordo); color: var(--latte);
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: .01em;
  padding: 12px 28px; cursor: pointer; text-decoration: none;
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.boton:hover { color: var(--latte); transform: translateY(-2px); }
.boton:active { background: var(--bordo-press); border-color: var(--bordo-press); transform: translateY(0) scale(.98); }
.boton:disabled { opacity: .6; cursor: wait; transform: none; }
.boton.secundario { background: transparent; color: var(--bordo); }
.boton.secundario:hover { background: var(--wash-bordo); color: var(--bordo); }
.boton.secundario:active { color: var(--bordo-press); }
.boton.chico { padding: 6px 16px; font-size: 13px; }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 32px; }

/* ------- Mensajes */
.alerta, .ok { border-radius: 16px; padding: 16px 20px; font-size: 15px; color: var(--tinta); }
.alerta { background: var(--wash-bordo); }
.alerta p { margin: 0; color: var(--tinta); }
.alerta p + p { margin-top: 4px; }
.ok { background: var(--wash-verde); margin: 0 0 32px; word-break: break-word; }
.ok a { color: var(--verde); font-weight: 600; }
.oculto { display: none; }

/* ------- Tabla admin */
.tabla-wrap { overflow-x: auto; background: var(--crema); border-radius: var(--r-card); }
.tabla { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 600px; }
.tabla th {
  text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: var(--bordo); padding: 20px 24px; border-bottom: 1px solid var(--linea);
}
.tabla td { padding: 16px 24px; border-bottom: 1px solid var(--linea); vertical-align: middle; color: var(--texto); }
.tabla tr:last-child td { border-bottom: 0; }
.tabla td a { text-decoration: none; }
.tabla td b { color: var(--tinta); font-weight: 700; }
.tabla small { color: var(--texto); font-size: 13px; }
.tabla .num { text-align: center; }
.tabla .der { text-align: right; }
.vacio { text-align: center; padding: 48px 24px !important; }

/* ------- Tiles de sesiones (página de cada mentee) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.tile {
  display: flex; flex-direction: column;
  min-height: 240px; padding: 32px;
  border-radius: var(--r-card);
  text-decoration: none; color: var(--tinta);
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.tile:hover { transform: translateY(-2px); color: var(--tinta); }
.tile:focus-visible { outline: 2px solid var(--bordo); outline-offset: 4px; }
.tile .etiqueta { margin-bottom: auto; }
.tile-num { font-size: clamp(30px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; margin: 32px 0 8px; }
.tile-fecha { font-size: 15px; color: var(--texto); }
.tile-ver { margin-top: 24px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--bordo); }

.tile.crema { background: var(--crema); border: 1px solid var(--linea); }
.tile.crema:hover { background: var(--wash-bordo); }
.tile.rosa { background: var(--rosa); }
.tile:not(.ultima) { box-shadow: 0 6px 18px rgba(27, 20, 22, .06); }
/* La última sesión, siempre en verde con texto latte */
.tile.ultima { background: var(--verde); color: var(--latte); }
.tile.ultima:hover { color: var(--latte); }
.tile.ultima .etiqueta, .tile.ultima .tile-fecha, .tile.ultima .tile-ver { color: var(--latte); }
.tile.ultima .tile-fecha { opacity: .8; }

.vacio-tiles { background: var(--crema); border-radius: var(--r-card); padding: 48px 32px; max-width: 680px; }
.vacio-tiles p { margin: 4px 0; }
.vacio-tiles b { color: var(--tinta); }

/* ------- Login: portada con bloque bordó a sangre y círculos en las esquinas */
.pagina-login .pie { display: none; }
.login { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 100vh; }
.login-arte {
  position: relative; overflow: hidden;
  background: var(--bordo); color: var(--latte);
  padding: clamp(40px, 7vw, 96px) clamp(16px, 6vw, 88px);
  display: flex; flex-direction: column; justify-content: center;
}
.login-arte::after { /* círculo rosa abajo a la izquierda */
  content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%;
  background: var(--rosa); left: -80px; bottom: -80px;
}
.login-arte .sello { width: 104px; margin-bottom: 48px; position: relative; z-index: 1; }
.login-arte h1 { color: var(--latte); font-weight: 700; font-size: clamp(40px, 5vw, 72px); position: relative; z-index: 1; }
.login-arte h1 em { color: var(--rosa); }
.login-arte .lead { color: var(--latte); opacity: .9; margin: 0; position: relative; z-index: 1; }
.login-form {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 16px;
}
.login-form::before { /* círculo bordó arriba a la derecha */
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: var(--bordo); right: -110px; top: -110px;
}
.login-form .tarjeta { width: 100%; max-width: 420px; position: relative; }
.login-form h2 { font-size: clamp(30px, 3.6vw, 40px); margin-bottom: 0; }

/* ------- Modal */
.modal {
  border: 0; border-radius: var(--r-card); padding: 40px;
  max-width: 500px; width: calc(100% - 32px);
  background: var(--latte); color: var(--tinta);
  box-shadow: 0 24px 48px rgba(27, 20, 22, .18);
}
.modal[open] { animation: aparecer .3s var(--ease); }
.modal::backdrop { background: rgba(27, 20, 22, .55); }
.modal h2 { font-size: 32px; }
.modal .acciones { margin: 24px 0 0; justify-content: flex-end; }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

.pie { display: flex; justify-content: center; padding: 32px 16px 40px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar { position: static; }
  .login { grid-template-columns: 1fr; min-height: auto; }
  .login-arte { padding: 48px 16px 64px; }
  .login-arte .sello { width: 80px; margin-bottom: 32px; }
  .login-form::before { display: none; }
  .dos { grid-template-columns: 1fr; }
  .tile { min-height: 200px; padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
