/* Campus ILC · momentos ceremoniales: Acceso, Bienvenida y Mi Camino
   Profundidad por planos independientes. Solo transform y opacity. */

/* ═════════ ACCESO: "El umbral" ═════════ */
body.is-bare { background: #1c0a05; }
.login { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate; color: var(--on-dark); display: grid; grid-template-rows: 1fr auto; }
.login-scene { position: absolute; inset: -4%; z-index: -1; }
.login-plane { position: absolute; inset: 0; will-change: transform; transform: translate3d(calc(var(--mx, 0) * var(--d, 0) * 1px), calc(var(--my, 0) * var(--d, 0) * 1px), 0) scale(var(--s, 1)); transition: transform 900ms var(--ease-out); }
.login-plane img { width: 100%; height: 100%; object-fit: cover; }
.login-plate { --d: -10; --s: 1.04; }
.login-plate img { object-position: 50% 60%; animation: kenburns 38s var(--ease-inout) infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.06) translateY(-1%); } }
.login-students { --d: 22; top: auto; height: 72%; bottom: 0; }
.login-students img { object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 30px 40px rgba(20, 6, 2, .45)); }
.login-veil { position: absolute; inset: 0; background:
    radial-gradient(60% 55% at 50% 45%, rgba(40, 10, 4, .0) 0%, rgba(40, 10, 4, .35) 70%, rgba(25, 6, 2, .75) 100%),
    linear-gradient(180deg, rgba(20, 6, 2, .35) 0%, rgba(20, 6, 2, 0) 30%, rgba(20, 6, 2, 0) 70%, rgba(20, 6, 2, .55) 100%); }
.login-sun { --d: -26; position: absolute; inset: 0; background: radial-gradient(40% 50% at 82% 8%, rgba(255, 214, 160, .38), transparent 70%); mix-blend-mode: screen; pointer-events: none; }
.login-motes { position: absolute; inset: 0; pointer-events: none; }

.login-main { display: grid; place-items: center; padding: 40px 16px 24px; position: relative; z-index: 2; }
.login-panel { position: relative; width: min(440px, 100%); padding: 44px 44px 36px; background: linear-gradient(180deg, rgba(80, 14, 2, .86), rgba(62, 10, 0, .9)); border: 1px solid rgba(255, 220, 200, .16); border-radius: 4px; box-shadow: 0 40px 80px rgba(15, 4, 1, .55), inset 0 1px 0 rgba(255, 255, 255, .12); backdrop-filter: blur(6px) saturate(1.1); -webkit-backdrop-filter: blur(6px) saturate(1.1); overflow: hidden; animation: panelIn 1100ms var(--ease-out) 150ms both; }
.login-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 236, 210, .14) 50%, transparent 65%); transform: translateX(-120%); animation: sheen 2.4s var(--ease-out) 900ms both; pointer-events: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes sheen { to { transform: translateX(120%); } }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 34px; }
.login-brand .brand-escudo { width: 92px; height: 92px; color: #F6E9DF; }
.login-brand-text { border-left: 1px solid rgba(255, 255, 255, .35); padding-left: 16px; }
.login-brand-text .brand-ilc { width: 104px; height: 62px; display: block; margin-bottom: 8px; }
.login-brand-text span { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 0.86rem; line-height: 1.15; letter-spacing: .04em; color: #F6E9DF; }
.login-brand-text em { font-style: italic; font-weight: 700; }
.login h1.sr-only + p { margin: 0; }
.login-field { position: relative; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid rgba(255, 255, 255, .55); padding: 6px 2px; margin-bottom: 26px; transition: border-color var(--d-ui) var(--ease-out); }
.login-field:focus-within { border-color: #fff; }
.login-field svg { width: 22px; height: 22px; color: #F6E9DF; flex: none; }
.login-field input { flex: 1; background: transparent; border: 0; outline: none; color: #fff; font-size: 1.05rem; padding: 8px 0; caret-color: #fff; }
.login-field input::placeholder { color: rgba(255, 240, 230, .82); }
.login-field .reveal-pass { background: none; border: 0; color: rgba(255,255,255,.7); padding: 4px; border-radius: 4px; }
.login-field .reveal-pass:hover { color: #fff; }
.login .btn--light { width: 100%; min-height: 52px; font-size: 1.12rem; margin-top: 8px; border-radius: 8px; }
.login-forgot { display: block; text-align: center; margin-top: 18px; color: #F6E9DF; font-size: 0.92rem; text-decoration: none; }
.login-forgot:hover { color: #fff; text-decoration: underline; }
.login-motto { margin-top: 30px; padding-top: 24px; text-align: center; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .3em; font-size: 0.82rem; line-height: 1.8; color: #F6E9DF; position: relative; }
.login-motto::before, .login-motto::after { content: ""; display: block; width: 44px; height: 1px; background: rgba(255,255,255,.55); margin: 0 auto 18px; }
.login-motto::after { margin: 16px auto 0; }
.login-error { font-size: 0.9rem; color: #FFD9CC; margin: -10px 0 14px; min-height: 1.2em; }
.login-demo { margin-top: 14px; font-size: 0.82rem; color: rgba(255, 236, 225, .8); text-align: center; }

.login-foot { position: relative; z-index: 2; background: rgba(251, 248, 243, .96); color: var(--ink-soft); }
.login-foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; max-width: 1480px; flex-wrap: wrap; padding-block: 12px; }
.login-foot .inst { font-family: var(--font-display); text-transform: uppercase; font-size: 0.82rem; line-height: 1.2; color: var(--ink); letter-spacing: .03em; }
.login-foot .pillars { display: flex; gap: 14px; font-family: var(--font-display); font-style: italic; font-size: 1rem; color: var(--ink-soft); }
.login-foot .pillars span + span::before { content: "|"; margin-right: 14px; color: var(--line-strong); font-style: normal; }
.login-foot .social { display: flex; gap: 6px; }
.login-foot .social a { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink-soft); border-radius: 50%; }
.login-foot .social a:hover { color: var(--burgundy); background: var(--burgundy-50); }
.login-foot .social svg { width: 20px; height: 20px; }
.login-foot .sign { font-family: var(--font-display); font-style: italic; font-size: 0.98rem; color: var(--ink-soft); line-height: 1.2; }

@media (max-width: 1000px) { .login-foot .pillars, .login-foot .sign { display: none; } }
@media (max-width: 760px) {
  .login-students { height: 46%; opacity: .9; }
  .login-panel { padding: 32px 24px 26px; background: linear-gradient(180deg, rgba(80, 14, 2, .9), rgba(62, 10, 0, .94)); }
  .login-brand .brand-escudo { width: 70px; height: 70px; }
  .login-brand-text .brand-ilc { width: 84px; height: 50px; }
  .login-brand-text span { font-size: 0.74rem; }
  .login-foot .wrap { justify-content: center; text-align: center; }
  .login-foot .inst { display: none; }
}

/* ═════════ BIENVENIDA: "La Virgen sale a tu encuentro" ═════════ */
.welcome { position: relative; height: 165vh; }
.welcome-stage { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); min-height: 560px; overflow: hidden; isolation: isolate; background: #241009; color: var(--on-dark); }
.wp { position: absolute; inset: 0; will-change: transform, opacity; pointer-events: none; }
.wp-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; transform: translate3d(0, calc(var(--p, 0) * -4%), 0) scale(calc(1.12 - var(--p, 0) * .08)); filter: brightness(.82) saturate(1.05); }
.wp-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(36, 10, 4, .88) 0%, rgba(36, 10, 4, .62) 34%, rgba(36, 10, 4, .08) 62%, rgba(36, 10, 4, .18) 100%), linear-gradient(0deg, rgba(30, 8, 3, .65) 0%, transparent 32%); }
.wp-rays { mix-blend-mode: screen; opacity: calc(.75 + var(--p, 0) * .25); background:
    linear-gradient(115deg, transparent 40%, rgba(255, 210, 150, .16) 46%, transparent 52%),
    linear-gradient(118deg, transparent 52%, rgba(255, 220, 170, .12) 56%, transparent 61%),
    linear-gradient(112deg, transparent 60%, rgba(255, 205, 140, .10) 65%, transparent 72%);
  transform: translate3d(calc(var(--p, 0) * -3%), 0, 0); animation: raysDrift 14s var(--ease-inout) infinite alternate; }
@keyframes raysDrift { from { filter: blur(6px); opacity: .7; } to { filter: blur(10px); opacity: 1; } }
.wp-statue { display: flex; align-items: flex-end; justify-content: flex-end; padding-right: clamp(16px, 9vw, 180px); }
.wp-statue img { height: 98%; width: auto; max-width: none; transform-origin: 50% 100%; transform: translate3d(0, calc(10% - var(--p, 0) * 9%), 0) scale(calc(.92 + var(--p, 0) * .08)); filter: drop-shadow(-30px 40px 50px rgba(15, 4, 1, .55)) brightness(1.02) contrast(1.03); }
.wp-glow { background: radial-gradient(28% 46% at 74% 42%, rgba(255, 200, 140, .28), transparent 70%); mix-blend-mode: screen; transform: scale(calc(1 + var(--p, 0) * .15)); }
.wp-candles { top: auto; height: 34%; bottom: 0; transform: translate3d(0, calc(16% - var(--p, 0) * 36%), 0); }
.wp-candles img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; filter: blur(2px) saturate(1.1); }
.wp-motes { mix-blend-mode: screen; }
.welcome-copy { position: absolute; z-index: 5; left: 0; right: 0; top: 50%; transform: translate3d(0, calc(-50% - var(--p, 0) * 14vh), 0); opacity: clamp(0, calc(1 - (var(--p, 0) - .42) * 3.2), 1); pointer-events: auto; }
.welcome-copy .wrap { max-width: 1480px; }
.welcome-copy .kicker { display: inline-block; text-transform: uppercase; letter-spacing: .34em; font-size: 0.82rem; font-weight: 600; color: var(--on-dark-soft); padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.welcome-copy h1 { color: #fff; font-size: var(--t-4xl); line-height: 0.98; max-width: 11ch; font-weight: 600; }
.welcome-copy h1 strong { display: block; font-weight: 700; }
.welcome-copy .sub { margin-top: 22px; font-family: var(--font-display); font-style: italic; font-size: clamp(1.25rem, 1rem + .8vw, 1.7rem); color: #F3E3D7; max-width: 30ch; line-height: 1.3; }
.welcome-copy .ctas { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.welcome-second { position: absolute; z-index: 5; left: max(var(--gutter), calc((100vw - 1480px) / 2 + var(--gutter))); bottom: 22%; max-width: 440px; margin: 0; opacity: clamp(0, calc((var(--p, 0) - .55) * 3.4), 1); transform: translate3d(0, calc((1 - var(--p, 0)) * 60px), 0); }
.welcome-second q { display: block; font-family: var(--font-display); font-style: italic; font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.7rem); line-height: 1.25; color: #fff; quotes: "“" "”"; }
.welcome-second cite { display: block; margin-top: 12px; font-style: normal; text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--on-dark-soft); }
.welcome-edge { position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; background: linear-gradient(180deg, transparent, var(--canvas)); z-index: 4; opacity: calc(var(--p, 0) * 1.4); }

@media (max-width: 900px) {
  .welcome { height: 140vh; }
  .wp-statue { justify-content: flex-end; align-items: flex-start; padding: 4% 0 0; }
  .wp-statue img { height: 62%; transform-origin: 50% 0; transform: translate3d(10%, calc(2% - var(--p, 0) * 6%), 0) scale(calc(.96 + var(--p, 0) * .08)); -webkit-mask-image: linear-gradient(180deg, #000 52%, transparent 86%); mask-image: linear-gradient(180deg, #000 52%, transparent 86%); }
  .wp-glow { background: radial-gradient(50% 30% at 70% 25%, rgba(255, 200, 140, .3), transparent 70%); }
  .wp-bg::after { background: linear-gradient(180deg, rgba(36, 10, 4, .55) 0%, rgba(36, 10, 4, .35) 40%, rgba(36, 10, 4, .85) 100%); }
  .welcome-copy { top: auto; bottom: 10%; transform: translate3d(0, calc(var(--p, 0) * -6vh), 0); }
  .welcome-copy h1 { font-size: var(--t-3xl); }
  .welcome-second { left: 16px; right: 16px; bottom: 12%; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome { height: auto; }
  .welcome-stage { position: relative; top: 0; height: 82vh; }
  .wp-rays { animation: none; }
  .login-plate img { animation: none; }
  .login-panel, .login-panel::after { animation: none; }
  .login-plane { transition: none; }
}

/* ═════════ MI CAMINO: el camino se dibuja y se detiene donde estás tú ═════════ */
.camino { position: relative; }
.camino-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.camino-svg .track { fill: none; stroke: var(--sand); stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; }
.camino-svg .walked { fill: none; stroke: var(--burgundy); stroke-width: 4; stroke-linecap: round; }
.camino-svg .walker { fill: var(--burgundy); }
.camino-svg .walker-halo { fill: var(--burgundy); opacity: .18; transform-box: fill-box; transform-origin: center; animation: halo 2.4s var(--ease-out) infinite; }
@keyframes halo { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .camino-svg .walker-halo { animation: none; } }
body.is-bare .page { padding-bottom: 0; min-height: 0; }
