/* ==========================================================================
   Intranet Marillac — camada de efeitos "Aurora Marillac"
   Marca d'água, aurora animada, brilhos, ícones vivos e cartões com borda luminosa.
   Tudo é desligado para quem pede menos movimento (fim do arquivo).
   ========================================================================== */

@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* --------------------------------------------------------------------------
   Marca d'água: emblema "M" da escola (recorte do logotipo via CSS)
   -------------------------------------------------------------------------- */
.marca-dagua {
  position: fixed; z-index: 0; pointer-events: none;
  width: min(62vh, 560px); aspect-ratio: 1;
  right: -6vh; bottom: -8vh;
  background: url("../img/marca.png") left center / auto 100% no-repeat;
  opacity: .055;
  filter: saturate(1.3);
  animation: flutuar-dagua 22s ease-in-out infinite alternate;
}
@keyframes flutuar-dagua {
  from { transform: rotate(-8deg) translate3d(0, 0, 0); }
  to { transform: rotate(4deg) translate3d(-18px, -26px, 0); }
}
/* listras da marca, bem suaves, no rodapé da área de conteúdo */
.listras-dagua {
  position: fixed; z-index: 0; pointer-events: none;
  left: 268px; right: 0; bottom: 0; height: 180px;
  background: linear-gradient(115deg, transparent 0 40%, rgba(232, 98, 44, .10) 40% 42%, transparent 42% 44%,
    rgba(93, 143, 214, .10) 44% 49%, rgba(43, 63, 143, .07) 49% 53%, transparent 53% 56%, rgba(232, 98, 44, .08) 56% 57.5%, transparent 57.5%);
  -webkit-mask-image: linear-gradient(0deg, #000, transparent);
  mask-image: linear-gradient(0deg, #000, transparent);
}
.principal { position: relative; z-index: 1; }

/* aurora clara no fundo do conteúdo */
.layout-painel { position: relative; isolation: isolate; }
.layout-painel::before {
  content: ''; position: fixed; inset: 0 0 0 268px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vw 30vw at 85% 10%, rgba(93, 143, 214, .16), transparent 70%),
    radial-gradient(30vw 26vw at 10% 90%, rgba(232, 98, 44, .10), transparent 70%),
    radial-gradient(36vw 30vw at 50% 50%, rgba(61, 83, 168, .07), transparent 70%);
  background-size: 140% 140%;
  animation: aurora-fundo 18s ease-in-out infinite alternate;
}
@keyframes aurora-fundo {
  0% { background-position: 0% 0%, 100% 100%, 50% 50%; }
  100% { background-position: 30% 20%, 70% 60%, 40% 70%; }
}

/* --------------------------------------------------------------------------
   Lateral: logo com brilho passando, ícones vivos, marca d'água
   -------------------------------------------------------------------------- */
.lateral { overflow-x: hidden; }
.lateral::after {
  content: ''; position: absolute; left: -40px; bottom: 70px; width: 230px; aspect-ratio: 1; pointer-events: none;
  background: url("../img/marca-branca.png") left center / auto 100% no-repeat;
  opacity: .05; transform: rotate(-12deg);
}
.lateral > .marca { position: relative; overflow: hidden; border-radius: 10px; }
.lateral > .marca::after, .entrada > .marca::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  animation: brilho-varre 7s ease-in-out infinite;
  mix-blend-mode: overlay;
}
.entrada > .marca { position: relative; overflow: hidden; }
@keyframes brilho-varre {
  0%, 72% { left: -60%; }
  100% { left: 130%; }
}

.nav-link .ic { transition: transform .35s var(--ease-mola), filter .25s; }
.nav-link:hover .ic, .nav-link[aria-current="page"] .ic { filter: drop-shadow(0 0 6px rgba(247, 164, 125, .75)); }
.nav-link[aria-current="page"] .ic { color: #F7A47D; }
.nav-link[aria-current="page"]::before { box-shadow: 0 0 12px 1px rgba(232, 98, 44, .8); }
.nav-link:hover .ic { animation: ic-pulo .6s var(--ease-mola); }
.nav-link[data-rota="perfis"]:hover .ic { animation: ic-pulsar .9s ease-in-out; }
.nav-link[data-rota="auditoria"]:hover .ic { animation: ic-girar .8s var(--ease); }
.nav-link[data-rota="usuarios"]:hover .ic { animation: ic-balanco .7s ease-in-out; }

@keyframes ic-pulo { 0% { transform: none; } 35% { transform: translateY(-4px) scale(1.12); } 65% { transform: translateY(1px) scale(.96); } 100% { transform: none; } }
@keyframes ic-pulsar { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.22); } 60% { transform: scale(.94); } }
@keyframes ic-girar { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
@keyframes ic-balanco { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

/* --------------------------------------------------------------------------
   Saudação: aurora escura, estrelas piscando, emblema gigante, relógio
   -------------------------------------------------------------------------- */
.saudacao-intra { isolation: isolate; min-height: 220px; display: grid; align-content: center; }
.saudacao-intra .aurora { position: absolute; inset: -40%; z-index: 0; pointer-events: none; filter: blur(40px) saturate(1.2); }
.saudacao-intra .aurora i {
  position: absolute; border-radius: 50%; mix-blend-mode: screen; opacity: .75;
  animation: aurora-blob 12s ease-in-out infinite alternate;
}
.saudacao-intra .aurora i:nth-child(1) { width: 46%; height: 60%; left: 8%; top: 18%; background: radial-gradient(circle, #3D53A8, transparent 65%); }
.saudacao-intra .aurora i:nth-child(2) { width: 38%; height: 52%; left: 48%; top: 28%; background: radial-gradient(circle, #E8622C, transparent 65%); opacity: .55; animation-duration: 15s; animation-delay: -4s; }
.saudacao-intra .aurora i:nth-child(3) { width: 40%; height: 50%; left: 28%; top: 45%; background: radial-gradient(circle, #5D8FD6, transparent 65%); animation-duration: 10s; animation-delay: -7s; }
@keyframes aurora-blob {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(8%, -10%, 0) scale(1.15); }
  100% { transform: translate3d(-6%, 8%, 0) scale(.92); }
}
/* emblema gigante girando devagar (marca d'água do banner) */
.saudacao-intra .emblema {
  position: absolute; z-index: 0; right: 4%; top: 50%; width: 260px; aspect-ratio: 1; pointer-events: none;
  background: url("../img/marca-branca.png") left center / auto 100% no-repeat;
  opacity: .12; transform: translateY(-50%);
  animation: emblema-gira 40s linear infinite;
}
@keyframes emblema-gira { to { transform: translateY(-50%) rotate(360deg); } }
/* brilho que atravessa o banner */
.saudacao-intra .varredura {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; border-radius: inherit;
}
.saudacao-intra .varredura::before {
  content: ''; position: absolute; top: -20%; bottom: -20%; width: 30%; left: -40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent);
  transform: skewX(-20deg);
  animation: brilho-varre 9s ease-in-out infinite 1.5s;
}
/* estrelas */
.saudacao-intra .estrelas { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.estrela {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, .7);
  opacity: 0; animation: piscar var(--d, 3s) ease-in-out infinite var(--a, 0s);
}
.estrela.grande { width: 10px; height: 10px; background: none; box-shadow: none; }
.estrela.grande::before, .estrela.grande::after {
  content: ''; position: absolute; left: 50%; top: 50%; background: #fff; border-radius: 2px;
  box-shadow: 0 0 8px 2px rgba(247, 164, 125, .9); transform: translate(-50%, -50%);
}
.estrela.grande::before { width: 2px; height: 100%; }
.estrela.grande::after { width: 100%; height: 2px; }
@keyframes piscar {
  0%, 100% { opacity: 0; transform: scale(.4) rotate(0); }
  50% { opacity: 1; transform: scale(1) rotate(45deg); }
}
/* nome com brilho dourado passando */
.nome-brilho {
  background: linear-gradient(100deg, #fff 0 40%, #F7A47D 50%, #fff 60% 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: texto-brilho 5s ease-in-out infinite;
}
@keyframes texto-brilho { 0%, 55% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
.saudacao-intra .relogio-hero {
  position: absolute; z-index: 2; right: 32px; top: 24px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.saudacao-intra .relogio-hero strong { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.saudacao-intra .relogio-hero > span { font-size: 12.5px; color: rgba(255, 255, 255, .72); }
.relogio-hero .dois-pontos { display: inline-block; margin: 0 1px; animation: piscar-pontos 2s ease-in-out infinite; }
@keyframes piscar-pontos { 50% { opacity: .45; } }
.saudacao-intra .pilula { backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .18); }

/* --------------------------------------------------------------------------
   Cartões de módulo: borda luminosa girando, ícone flutuando, holofote, brilho
   -------------------------------------------------------------------------- */
.modulo {
  position: relative; isolation: isolate; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid transparent;
  background-clip: padding-box;
  transform-style: preserve-3d;
  transition: transform .25s var(--ease), box-shadow .25s;
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
}
/* borda em gradiente cônico girando */
.modulo::before {
  content: ''; position: absolute; inset: -1px; z-index: -2; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--ang), rgba(232, 98, 44, .0), rgba(232, 98, 44, .9), rgba(93, 143, 214, .9), rgba(43, 63, 143, .0) 60%, rgba(232, 98, 44, .0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .35; transition: opacity .3s;
  animation: borda-gira 6s linear infinite;
}
@keyframes borda-gira { to { --ang: 360deg; } }
/* holofote que segue o mouse + brilho que varre */
.modulo::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(260px circle at var(--mx) var(--my), rgba(93, 143, 214, .18), transparent 60%),
    linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%);
  background-size: 100% 100%, 250% 100%;
  background-position: 0 0, 140% 0;
  background-repeat: no-repeat;
  animation: cartao-brilho 8s ease-in-out infinite var(--atraso, 0s);
}
@keyframes cartao-brilho { 0%, 80% { background-position: 0 0, 140% 0; } 100% { background-position: 0 0, -60% 0; } }
.modulo:hover { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-4px); box-shadow: 0 22px 40px -18px rgba(27, 42, 107, .45); }
.modulo:hover::before { opacity: 1; animation-duration: 2.5s; }

/* ícone flutuando com halo pulsante */
.modulo .icone-modulo { position: relative; animation: flutuar 4.5s ease-in-out infinite var(--atraso, 0s); box-shadow: 0 10px 20px -8px rgba(27, 42, 107, .6); }
.modulo .icone-modulo.laranja { box-shadow: 0 10px 20px -8px rgba(194, 65, 12, .6); }
.modulo .icone-modulo::after {
  content: ''; position: absolute; inset: -6px; border-radius: 18px; border: 2px solid currentColor; color: rgba(93, 143, 214, .55);
  animation: halo 3s ease-out infinite var(--atraso, 0s);
}
.modulo .icone-modulo.laranja::after { color: rgba(232, 98, 44, .55); }
@keyframes flutuar { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes halo { 0% { opacity: .9; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.35); } }
.modulo:hover .icone-modulo { animation: ic-pulo .7s var(--ease-mola); }
.modulo:hover .icone-modulo .ic { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)); }
/* barras do gráfico "crescendo" no ícone de boletins */
.modulo[data-modulo="boletins"]:hover .ic path:nth-child(n+2) { animation: barra-cresce .8s var(--ease-mola) both; transform-origin: bottom; transform-box: fill-box; }
.modulo[data-modulo="boletins"]:hover .ic path:nth-child(3) { animation-delay: .08s; }
.modulo[data-modulo="boletins"]:hover .ic path:nth-child(4) { animation-delay: .16s; }
@keyframes barra-cresce { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.modulo[data-modulo="auditoria"]:hover .icone-modulo .ic { animation: ic-girar 1s var(--ease); }

/* --------------------------------------------------------------------------
   Toques gerais: botões primários com brilho, KPIs e blocos
   -------------------------------------------------------------------------- */
.btn-primario { overflow: hidden; }
.btn-primario::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 45%; left: -70%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease);
}
.btn-primario:hover::before { left: 130%; }
.cartao-login .btn-primario::before { animation: brilho-varre 6s ease-in-out infinite 2s; }

.perfil-cartao, .bloco { transition: box-shadow .25s, transform .25s var(--ease); }
.perfil-cartao:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
.perfil-cartao:hover h3 .ic { animation: ic-pulsar .9s ease-in-out; color: var(--orange-500); }

/* login: estrelas sobre as listras e emblema d'água atrás do título */
body.tela-entrada .entrada-hero { position: relative; }
body.tela-entrada .entrada-hero::before {
  content: ''; position: absolute; z-index: -1; left: -80px; top: 50%; width: 520px; aspect-ratio: 1; pointer-events: none;
  background: url("../img/marca-branca.png") left center / auto 100% no-repeat;
  opacity: .06; transform: translateY(-50%) rotate(-10deg);
  animation: flutuar-dagua 20s ease-in-out infinite alternate;
}
.palco .estrela { z-index: 1; }

/* --------------------------------------------------------------------------
   Menos movimento: tudo parado (marca d'água continua, sem animar)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .marca-dagua, .layout-painel::before, .saudacao-intra .aurora i, .saudacao-intra .emblema,
  .saudacao-intra .varredura::before, .estrela, .nome-brilho, .modulo::before, .modulo::after,
  .modulo .icone-modulo, .modulo .icone-modulo::after, .lateral > .marca::after, .entrada > .marca::after,
  .cartao-login .btn-primario::before, body.tela-entrada .entrada-hero::before, .relogio-hero .dois-pontos {
    animation: none !important;
  }
  .estrela { opacity: .6; }
  .nome-brilho { color: #fff; background: none; }
  .modulo:hover { transform: translateY(-2px); }
}

@media (max-width: 960px) {
  .listras-dagua { left: 0; }
  .layout-painel::before { inset: 0; }
  .saudacao-intra .relogio-hero { position: static; text-align: left; margin-bottom: 8px; }
  .saudacao-intra .emblema { width: 180px; right: -30px; }
}
