/* Pantalla de entrada del webmail - G-Carma Consulting S.L.
   Rediseno 2026-09-30: pantalla partida con la identidad de la web gcarma.es
   (fondo #0B0F17, degradado #4F8DFF -> #22D3EE, Space Grotesk + Inter), con
   aire cofrade: titulares en Cormorant Garamond y acentos en dorado de orfebreria
   (es el acceso al correo de las hermandades y cofradias).
   Las fuentes se sirven desde aqui mismo (assets/fonts), sin Google Fonts:
   el visitante no deja su IP en terceros.
   El HTML del panel lo inyecta gcarma_branding.php y lo recoloca con JS;
   si ese JS no corre, body no lleva .gc-split y se ve el formulario normal. */

/* Las @font-face estan en fonts.css (compartidas con el interior). */

/* ---------- Tokens ---------- */
body.task-login {
  --gc-ink: #0B0F17;
  --gc-ink-2: #121724;
  --gc-blue: #4F8DFF;
  --gc-cyan: #22D3EE;
  --gc-violet: #A78BFA;
  --gc-text: #F1F5F9;
  --gc-muted: #94A3B8;
  --gc-grad: linear-gradient(135deg, #4F8DFF 0%, #22D3EE 100%);
  --gc-btn: linear-gradient(135deg, #3D7BFF 0%, #1A9FD0 55%, #0E9DB8 100%);
  --gc-ease: cubic-bezier(.16, 1, .3, 1);
  --gc-spring: cubic-bezier(.34, 1.56, .64, 1);
  --gc-serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  /* dorado de orfebreria para los acentos */
  --gc-gold: #D4B06A;
  --gc-gold-grad: linear-gradient(100deg, #F3E3B5 0%, #D4B06A 45%, #B8904A 75%, #EBD6A0 100%);
  --gc-kicker: #9A7535;

  /* mitad derecha, modo claro */
  --gc-page: #F5F7FB;
  --gc-page-2: #EEF2F8;
  --gc-head: #0B1220;
  --gc-body: #475569;
  --gc-field: #FFFFFF;
  --gc-line: #DDE3EC;
  --gc-line-hover: #C6D0DE;
  --gc-icon: #94A3B8;
  --gc-foot: #64748B;
}

html.dark-mode body.task-login {
  --gc-page: #0E131D;
  --gc-page-2: #0B0F17;
  --gc-head: #F1F5F9;
  --gc-body: #94A3B8;
  --gc-field: #151B28;
  --gc-line: #243047;
  --gc-line-hover: #33415C;
  --gc-icon: #64748B;
  --gc-foot: #7C8BA1;
  --gc-kicker: #D4B06A;
}

/* ---------- Estructura partida ---------- */
body.task-login {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--gc-page);
}

/* El tema trabaja a 14px; este diseno esta medido en rem de 16px. */
html.gc-login { font-size: 16px; }

/* El tema fija body{height:100%;overflow:hidden} y #layout{overflow:hidden}
   (pensado para la aplicacion). Aqui la pagina tiene que poder crecer y hacer
   scroll, sobre todo en movil con el panel apilado encima del formulario. */
body.task-login.gc-split {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

body.task-login.gc-split #layout {
  overflow: visible;
  flex: 1 1 auto;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(79, 141, 255, .07), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(34, 211, 238, .06), transparent 60%),
    linear-gradient(180deg, var(--gc-page), var(--gc-page-2));
}

body.task-login.gc-split #layout-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  padding: 3.5rem 1.75rem 6rem;
  text-align: left;
  background: transparent;
  border: 0;
}

/* El logo del tema sobra: el logo va en el panel de marca. */
body.task-login.gc-split #logo { display: none; }

/* ---------- Panel de marca ---------- */
.gc-aside {
  flex: 0 0 52%;
  max-width: 52%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4.5rem);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--gc-ink);
  color: var(--gc-text);
  font-family: 'Inter', system-ui, sans-serif;
  animation: gc-panel 1.1s var(--gc-ease) both;
}

/* filo de luz entre las dos mitades */
.gc-aside::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(79, 141, 255, .55) 35%, rgba(34, 211, 238, .45) 65%, transparent);
  opacity: .8;
}

.gc-aside__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.gc-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  will-change: transform;
}
.gc-orb--a { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; left: -14%; top: -18%;
  background: radial-gradient(circle, rgba(79, 141, 255, .55), transparent 65%);
  animation: gc-float-a 18s ease-in-out infinite alternate; }
.gc-orb--b { width: 36vw; height: 36vw; max-width: 480px; max-height: 480px; right: -12%; top: 30%;
  background: radial-gradient(circle, rgba(34, 211, 238, .38), transparent 65%);
  animation: gc-float-b 22s ease-in-out infinite alternate; }
.gc-orb--c { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; left: 10%; bottom: -16%;
  background: radial-gradient(circle, rgba(212, 176, 106, .26), transparent 65%);
  animation: gc-float-c 26s ease-in-out infinite alternate; }

.gc-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 20%, transparent 75%);
}

.gc-bigmark {
  position: absolute;
  width: 62%;
  max-width: 560px;
  right: -14%;
  bottom: -14%;
  opacity: .09;
  transform: rotate(-14deg);
  animation: gc-drift 30s ease-in-out infinite alternate;
}

.gc-aside__logo { display: inline-block; line-height: 0; }
.gc-aside__logo:focus-visible { outline: 2px solid var(--gc-cyan); outline-offset: 6px; border-radius: 8px; }
.gc-logo { display: block; height: 52px; width: auto; overflow: visible; }

/* entrada del logo: los cuatro cuadrados aparecen uno a uno */
.gc-logo__mark rect { transform-box: fill-box; transform-origin: center; animation: gc-pop .7s var(--gc-spring) both; }
.gc-logo__mark .q1 { animation-delay: .25s; }
.gc-logo__mark .q2 { animation-delay: .35s; }
.gc-logo__mark .q4 { animation-delay: .45s; }
.gc-logo__mark .q3 { animation-delay: .55s; }
.gc-logo__mark .glow { animation: gc-pop .7s var(--gc-spring) .35s both, gc-breathe 4.5s ease-in-out 1.4s infinite; }
.gc-logo__word { animation: gc-slide-in .9s var(--gc-ease) .5s both; }

.gc-aside__body { max-width: 520px; }

.gc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .38rem .8rem .38rem .65rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #CBD5E1;
  animation: gc-rise .9s var(--gc-ease) .55s both;
}
.gc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gc-gold);
  box-shadow: 0 0 0 0 rgba(212, 176, 106, .6);
  animation: gc-ping 2.4s ease-out 1.6s infinite;
}

.gc-title {
  margin: 1.4rem 0 1.2rem;
  font-family: var(--gc-serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 4vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -.012em;
  color: var(--gc-text);
  animation: gc-rise 1s var(--gc-ease) .65s both;
}
.gc-grad {
  font-style: italic;
  font-weight: 500;
  background: var(--gc-gold-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gc-gold);
  animation: gc-sheen 8s ease-in-out 2s infinite alternate;
}

.gc-lead {
  margin: 0 0 2rem;
  max-width: 440px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--gc-muted);
  animation: gc-rise 1s var(--gc-ease) .75s both;
}

.gc-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.gc-feats li {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-size: .93rem;
  color: #CBD5E1;
  animation: gc-rise .9s var(--gc-ease) both;
}
.gc-feats li:nth-child(1) { animation-delay: .9s; }
.gc-feats li:nth-child(2) { animation-delay: 1s; }
.gc-feats li:nth-child(3) { animation-delay: 1.1s; }
.gc-ico {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 141, 255, .18), rgba(34, 211, 238, .10));
  border: 1px solid rgba(79, 141, 255, .28);
}
.gc-ico svg { width: 17px; height: 17px; fill: none; stroke: #7FB0FF; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.gc-aside__foot {
  font-size: .8rem;
  color: #64748B;
  animation: gc-fade 1s ease 1.2s both;
}
.gc-aside__foot a { color: #94A3B8; text-decoration: none; border-bottom: 1px solid rgba(148, 163, 184, .35); transition: color .2s, border-color .2s; }
.gc-aside__foot a:hover { color: var(--gc-text); border-color: var(--gc-cyan); }
.gc-sep { margin: 0 .35rem; opacity: .6; }

/* adorno bajo el titular: filete dorado con rombo, como en las orlas */
.gc-orn { display: flex; align-items: center; gap: .7rem; width: 180px; margin: 0 0 1.4rem; animation: gc-fade 1s ease .85s both; }
.gc-orn span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(212, 176, 106, .75)); }
.gc-orn span:last-child { background: linear-gradient(90deg, rgba(212, 176, 106, .75), transparent); }
.gc-orn i { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--gc-gold); background: rgba(212, 176, 106, .25); }

.gc-intro__kicker {
  display: block;
  margin-bottom: .7rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gc-kicker);
}
.gc-mono { font-weight: 500; color: var(--gc-head); white-space: nowrap; }

/* ---------- Mitad derecha: formulario ---------- */
.gc-intro { margin-bottom: 1.9rem; animation: gc-rise .9s var(--gc-ease) .45s both; }
.gc-intro__title {
  margin: 0 0 .55rem;
  font-family: var(--gc-serif);
  font-weight: 600;
  font-size: 2.35rem;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--gc-head);
}
.gc-intro__title::after {
  content: "";
  display: block;
  width: 44px; height: 3px;
  margin-top: .9rem;
  border-radius: 3px;
  background: var(--gc-gold-grad);
  transform-origin: left;
  animation: gc-bar .9s var(--gc-ease) .9s both;
}
.gc-intro__text { margin: 0; font-size: .96rem; line-height: 1.55; color: var(--gc-body); }

body.task-login.gc-split #login-form {
  position: static;
  top: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  animation: gc-rise .9s var(--gc-ease) .6s both;
}

body.task-login.gc-split #login-form table,
body.task-login.gc-split #login-form tbody { display: block; width: 100%; }
body.task-login.gc-split #login-form tr.form-group { margin: 0 0 .95rem; }
body.task-login.gc-split #login-form td.input { width: 100%; padding: 0; }

/* campo = caja unica (icono + input) con foco en halo azul */
body.task-login.gc-split #login-form .input-group {
  flex-wrap: nowrap;
  align-items: stretch;
  background: var(--gc-field);
  border: 1px solid var(--gc-line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px -12px rgba(15, 23, 42, .18);
  transition: border-color .2s ease, box-shadow .25s ease, transform .25s var(--gc-ease);
}
body.task-login.gc-split #login-form .input-group:hover { border-color: var(--gc-line-hover); }
body.task-login.gc-split #login-form .input-group:focus-within {
  border-color: var(--gc-blue);
  box-shadow: 0 0 0 4px rgba(79, 141, 255, .16), 0 10px 26px -14px rgba(79, 141, 255, .55);
}
body.task-login.gc-split #login-form .input-group-prepend { margin: 0; }
body.task-login.gc-split #login-form .input-group-text {
  width: 50px;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gc-icon);
  font-size: 1rem;
  transition: color .2s ease;
}
body.task-login.gc-split #login-form .input-group:focus-within .input-group-text { color: var(--gc-blue); }
body.task-login.gc-split #login-form .input-group .form-control {
  height: 54px;
  padding: 0 1rem 0 0;
  border: 0;
  border-radius: 0 14px 14px 0;
  background: transparent;
  box-shadow: none;
  color: var(--gc-head);
  font-family: inherit;
  font-size: 1rem;
}
body.task-login.gc-split #login-form .input-group .form-control::placeholder { color: var(--gc-icon); opacity: 1; }
body.task-login.gc-split #login-form .input-group .form-control:focus { outline: 0; box-shadow: none; }
/* autorrelleno de Chrome: sin el fondo amarillo que rompe la caja */
body.task-login.gc-split #login-form .form-control:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px var(--gc-field) inset;
  -webkit-text-fill-color: var(--gc-head);
  caret-color: var(--gc-head);
}

body.task-login.gc-split #login-form .formbuttons { margin: 1.5rem 0 0; padding: 0; }

body.task-login.gc-split #rcmloginsubmit {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--gc-btn);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
  box-shadow: 0 14px 30px -14px rgba(61, 123, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .25s var(--gc-ease), box-shadow .25s ease, filter .2s ease;
}
body.task-login.gc-split #rcmloginsubmit::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-18deg);
  animation: gc-shine 1.3s var(--gc-ease) 1.5s both;
}
body.task-login.gc-split #rcmloginsubmit:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 18px 36px -14px rgba(61, 123, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .2);
}
body.task-login.gc-split #rcmloginsubmit:hover::after { animation: gc-shine .9s var(--gc-ease) both; }
body.task-login.gc-split #rcmloginsubmit:active { transform: translateY(0); filter: brightness(.97); }
body.task-login.gc-split #rcmloginsubmit:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgba(79, 141, 255, .35), 0 14px 30px -14px rgba(61, 123, 255, .85); }

body.task-login.gc-split #login-footer { color: var(--gc-foot); font-size: .82rem; margin-top: 1rem; }
body.task-login.gc-split #login-footer:empty { display: none; }

/* pie: al fondo de la mitad derecha */
.gcarma-brand {
  position: absolute;
  left: 0; right: 0; bottom: 1.6rem;
  padding: 0 1.5rem;
  text-align: center;
  font-size: .8rem;
  color: var(--gc-foot);
  animation: gc-fade 1s ease 1.3s both;
}
.gcarma-brand a { color: inherit; text-decoration: none; }
.gcarma-brand strong { font-weight: 600; color: var(--gc-head); }
.gcarma-brand a:hover strong { background: var(--gc-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Tableta y movil: el panel pasa a cabecera ---------- */
@media (max-width: 960px) {
  body.task-login.gc-split { flex-direction: column; }
  .gc-aside {
    flex: none;
    max-width: none;
    min-height: 0;
    gap: 1.6rem;
    padding: 1.6rem 1.5rem 2.2rem;
    border-radius: 0 0 26px 26px;
    animation-name: gc-panel-top;
  }
  .gc-aside::after {
    top: auto; left: 10%; right: 10%; bottom: 0;
    width: auto; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 141, 255, .6), rgba(34, 211, 238, .5), transparent);
  }
  .gc-logo { height: 42px; }
  .gc-title { font-size: clamp(2rem, 7vw, 2.7rem); margin: 1rem 0 .7rem; }
  .gc-lead { font-size: .94rem; margin-bottom: 0; }
  .gc-feats, .gc-aside__foot { display: none; }
  .gc-bigmark { width: 70%; right: -22%; bottom: -40%; }
  body.task-login.gc-split #layout { min-height: 0; flex: 1 0 auto; align-items: flex-start; }
  body.task-login.gc-split #layout-content { padding: 2.2rem 1.4rem 5.5rem; }
  .gc-intro__title { font-size: 2rem; }
  .gc-orn { margin: 0 0 .9rem; }
}

@media (max-width: 480px) {
  .gc-eyebrow { font-size: .66rem; }
  .gc-lead { display: none; }
  .gc-title { margin-bottom: 0; }
}

@media (max-height: 640px) and (min-width: 961px) {
  .gc-feats { display: none; }
}

/* ---------- Animaciones ---------- */
@keyframes gc-panel     { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes gc-panel-top { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes gc-rise      { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes gc-fade      { from { opacity: 0; } to { opacity: 1; } }
@keyframes gc-slide-in  { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes gc-pop       { from { opacity: 0; transform: scale(.3) rotate(-18deg); } }
@keyframes gc-breathe   { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }
@keyframes gc-ping      { 0% { box-shadow: 0 0 0 0 rgba(212, 176, 106, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(212, 176, 106, 0); } }
@keyframes gc-sheen     { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes gc-bar       { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gc-shine     { from { left: -60%; } to { left: 130%; } }
@keyframes gc-float-a   { to { transform: translate(8%, 10%) scale(1.08); } }
@keyframes gc-float-b   { to { transform: translate(-10%, -8%) scale(1.12); } }
@keyframes gc-float-c   { to { transform: translate(12%, -6%) scale(.94); } }
@keyframes gc-drift     { to { transform: rotate(-8deg) translate(-3%, -4%); } }

@media (prefers-reduced-motion: reduce) {
  body.task-login *, body.task-login *::before, body.task-login *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
