/* Menglobe Informática · capa de estilo del campus (menglobe.online/entrar)
   Se carga después de styles.css y solo redefine colores, tipografía y controles.
   Valores tomados del campus: tokens.css (tema claro y oscuro) y su pantalla de acceso. */

@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans.ttf') format('truetype'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: 'Spectral'; src: url('/fonts/Spectral-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Spectral'; src: url('/fonts/Spectral-SemiBoldItalic.ttf') format('truetype'); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/JetBrainsMono.ttf') format('truetype'); font-weight: 100 800; font-display: swap; }

:root {
  /* Campus · tema claro */
  --c-accent: #6a9a42;          /* --theme-midground */
  --c-primary: #4a752c;         /* --theme-primary: botón principal (AA con blanco) */
  --c-on-primary: #ffffff;
  --c-base: #1b2019;            /* --theme-foreground */
  --c-page: #f3f0e9;            /* crema de la pantalla de acceso */
  --c-card: #fffefb;            /* fondo de los campos */
  --c-field-border: #d5cebe;
  --c-dark: #0a2d25;            /* panel verde bosque del campus */

  --bg: var(--c-page);
  --surface: #fbfaf6;
  --surface-2: color-mix(in srgb, var(--c-accent) 10%, #ece8de);
  --border: color-mix(in srgb, var(--c-accent) 16%, color-mix(in srgb, var(--c-base) 9%, transparent));
  --border-strong: color-mix(in srgb, var(--c-accent) 24%, color-mix(in srgb, var(--c-base) 16%, transparent));
  --text: color-mix(in srgb, var(--c-base) 94%, transparent);
  --muted: color-mix(in srgb, var(--c-base) 62%, transparent);
  --brand: var(--c-primary);
  --green: var(--c-accent);
  --green-dark: var(--c-primary);
  --ok: var(--c-primary);
  --forest: var(--c-dark);
  --panel: var(--c-dark);
  --lime: #b8e08f;              /* verde claro del campus en lugar del lima chillón */
  --cursor-bg: color-mix(in srgb, var(--c-accent) 35%, #ffffff);
  --red: #cf2d56;
  --red-soft: color-mix(in srgb, #cf2d56 12%, #ffffff);
  --star: #c08532;
  --flame: #c08532;

  --radius: 14px;
  --font: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-accent: #93c572;
    --c-primary: #93c572;
    --c-on-primary: #10190a;
    --c-base: #e8ede6;
    --c-page: #0f1310;
    --c-card: #161a16;
    --c-field-border: #2b3329;
    --c-dark: #070907;
    --bg: var(--c-page);
    --surface: #141914;
    --surface-2: #1c231b;
    --lime: #93c572;
    --cursor-bg: color-mix(in srgb, #93c572 40%, transparent);
    --red: #e75e78;
    --red-soft: color-mix(in srgb, #e75e78 20%, transparent);
    --star: #e0b04a;
    --flame: #e0b04a;
  }
  .brand-logo { background: #fff; }
}

body { font-family: var(--font); font-size: 15px; }

/* Títulos en Spectral, con el acento en cursiva verde como «Entra en Menglobe» */
h1, h2, h3, .display { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 em, h2 em, h3 em, .display em { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--c-accent); }
.hero h1 em, .auth-aside h2 em { color: #b8e08f; }

/* Etiqueta pequeña en mono con guion, como «— TU CUENTA» */
.eyebrow { font-family: var(--mono); font-weight: 500; letter-spacing: .16em; font-size: .7rem; color: var(--c-primary); }
.eyebrow::before { width: 22px; height: 1px; }
.eyebrow-lime { color: #b8e08f; }

/* Botones del campus: redondeados, sin mayúsculas */
.btn {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: .95rem;
  padding: .7em 1.4em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn:hover { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 8%, transparent); }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--c-primary) 88%, var(--c-base)); border-color: transparent; box-shadow: none; color: var(--c-on-primary); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }
.btn-lg { font-size: 1rem; padding: .85em 1.6em; }
.btn-sm { font-size: .82rem; padding: .45em 1em; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--c-accent) 70%, transparent); outline-offset: 2px; }

.card { border-radius: var(--radius); box-shadow: 0 1px 2px color-mix(in srgb, var(--c-base) 6%, transparent); }
.brand-tag { background: var(--c-primary); color: var(--c-on-primary); font-family: var(--mono); font-weight: 500; letter-spacing: .14em; }
.topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.row-icon { background: color-mix(in srgb, var(--c-accent) 18%, transparent); color: var(--c-primary); }
.row-title { font-family: var(--serif); font-weight: 600; }
.node-current { background: var(--c-accent); border-color: var(--c-accent); color: #fff; box-shadow: 0 0 0 8px color-mix(in srgb, var(--c-accent) 25%, transparent); }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--c-accent) 10%, transparent); } }
.node-done { background: var(--c-dark); color: #b8e08f; }
.toc-current { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.toc-done { background: var(--c-dark); border-color: var(--c-dark); color: #b8e08f; }
.leaderboard li.me { background: color-mix(in srgb, var(--c-accent) 16%, transparent); }
.avatar { background: var(--c-dark); color: #b8e08f; }

/* Aviso (límite de invitado) */
.notice {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--c-accent) 35%, transparent);
  background: color-mix(in srgb, var(--c-accent) 10%, transparent);
  color: var(--text);
  font-size: .92rem;
}
.notice a { color: var(--c-primary); font-weight: 600; }
.node-login { color: var(--muted); }

/* ---------- Acceso: mismo diseño que menglobe.online/entrar ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - 70px); }
.auth-aside {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(32px, 6vw, 72px);
  background: radial-gradient(circle at 80% 15%, rgba(147, 197, 114, .16), transparent 55%), #0a1a14;
  color: #fff;
}
.auth-aside h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.05; margin-bottom: .5em; }
.auth-aside p:not(.eyebrow) { color: rgba(255, 255, 255, .82); max-width: 30em; font-size: 1.02rem; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--c-page); }
.auth-card { width: 100%; max-width: 440px; display: block; text-align: left; padding: 0; margin: 0; background: none; border: 0; box-shadow: none; }
.auth-card h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin: 6px 0 8px; }
.auth-card .auth-logo { width: 150px; height: auto; margin: 0 0 28px; }
.auth-card .muted { margin-bottom: 18px; }

.form { gap: 16px; margin: 18px 0 12px; }
.form label { text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 600; color: var(--text); gap: 8px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-row a { color: var(--c-primary); font-weight: 600; font-size: .88rem; text-decoration: none; }
.form input, .input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--c-field-border);
  background: var(--c-card);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  box-shadow: inset 0 1px 1px #0000000f;
}
.form input:focus, .input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--c-accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 16%, transparent), inset 0 1px 1px #0000000f;
}
.form .btn-block { height: 52px; margin-top: 4px; }
.auth-card .small a { color: var(--c-primary); font-weight: 600; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-aside { display: none; }
  .auth-main { padding: 28px 18px 48px; }
}

/* ---------- Banner de portada: mismo lenguaje que la portada de menglobe.online ---------- */
@font-face { font-family: 'Spectral'; src: url('/fonts/Spectral-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
.hero.hero-campus {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(460px, 68vh, 640px);
  max-width: none; margin: 0; border-radius: 0;
  padding: clamp(56px, 8vw, 96px) max(20px, calc((100vw - 1140px) / 2)) clamp(48px, 7vw, 84px);
  background: #04100b; color: #f3f1ea; isolation: isolate; overflow: hidden;
}
.hero.hero-campus::after { display: none; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero-bg img { transform: scale(1.06); animation: hero-in 2.4s cubic-bezier(.16, 1, .3, 1) forwards; }
@keyframes hero-in { to { transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(#04100b9e 0%, #04100b1a 34%, #04100bdb 100%), linear-gradient(90deg, #04100bd1 0%, #04100b52 58%, #04100b00 100%); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(#ffffff0d 1px, #0000 1px), linear-gradient(90deg, #ffffff0d 1px, #0000 1px); background-size: 88px 88px; -webkit-mask-image: radial-gradient(70% 70% at 25% 70%, #000 20%, #0000 75%); mask-image: radial-gradient(70% 70% at 25% 70%, #000 20%, #0000 75%); }
.hero-content { position: relative; max-width: 760px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0; font: 500 12px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #b9dd95; }
.hero-pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #93c572; }
.hero-pulse::after { content: ''; position: absolute; inset: -5px; border: 1px solid #93c572; border-radius: 50%; animation: hpulse 2.4s cubic-bezier(.16, 1, .3, 1) infinite; }
@keyframes hpulse { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }
.hero.hero-campus h1.hero-title { font-family: var(--serif); font-weight: 600; color: #fff; font-size: clamp(2.8rem, 7vw, 6.4rem); line-height: .94; letter-spacing: -.035em; margin: 24px 0 20px; max-width: 14ch; }
.hero.hero-campus h1.hero-title em { font-style: italic; font-weight: 400; color: #b9dd95; letter-spacing: -.02em; }
.hero-slogan { display: flex; align-items: center; gap: 16px; margin: 0 0 24px; font: 500 12.5px/1 var(--mono); letter-spacing: .34em; text-transform: uppercase; color: #93c572; }
.hero-slogan::before { content: ''; width: 52px; height: 1px; background: currentColor; }
.hero-lead { max-width: 560px; margin: 0; color: #f3f1eac2; font-size: clamp(1.02rem, 1.5vw, 1.25rem); line-height: 1.55; }
.hero-campus .hero-actions { margin-top: 30px; gap: 12px; }
.btn-light, .btn-glass { min-height: 52px; padding: 0 22px 0 26px; font-size: 15.5px; font-weight: 600; letter-spacing: -.005em; border-radius: 999px; }
.btn-light { background: #f4f1ea; color: #0b2e25; border-color: transparent; }
.btn-light:hover { background: #fff; color: #0b2e25; border-color: transparent; }
.btn-glass { background: #ffffff14; color: #f3f1ea; border: 1px solid #ffffff3d; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-glass:hover { background: #ffffff29; border-color: #ffffff3d; color: #fff; }
.hero-meta { margin: 36px 0 0; font: 500 11px/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: #f3f1ea85; }
.hero-credit { position: absolute; right: max(20px, calc((100vw - 1140px) / 2)); bottom: 14px; margin: 0; font-size: 11px; color: #f3f1ea85; }
.hero-credit a { color: inherit; }
@media (max-width: 720px) {
  .hero.hero-campus { min-height: 560px; }
  .hero-campus .hero-actions .btn { width: 100%; }
  .hero-credit { left: 20px; right: auto; }
}
@media (prefers-reduced-motion: reduce) { .hero-bg img, .hero-pulse::after { animation: none; transform: none; } }
