
/* SABER+ — camada de movimento e acabamento inspirada em experiências editoriais modernas.
   Mantém a estrutura e os componentes existentes; apenas acrescenta profundidade e movimento. */
:root {
  --motion-purple: #6d3df5;
  --motion-violet: #a855f7;
  --motion-lilac: #d9c8ff;
  --motion-ink: #211443;
  --motion-ease: cubic-bezier(.2,.75,.25,1);
}
html { scroll-behavior: smooth; }
body { isolation: isolate; }
::selection { background: rgba(139,92,246,.24); color: inherit; }

/* Barra de progresso discreta no topo */
.saber-scroll-progress {
  position: fixed; inset: 0 auto auto 0; width: 100%; height: 3px;
  transform: scaleX(0); transform-origin: left center; z-index: 10000;
  background: linear-gradient(90deg,#6d3df5,#a855f7,#e1c8ff);
  box-shadow: 0 0 14px rgba(139,92,246,.5); pointer-events: none;
}

/* Brilhos decorativos que não interferem nos cliques */
.hero, .page-hero, .teacher-cta, .auth-shell, .dashboard-layout, .sp-wrap {
  position: relative;
}
.hero::after, .page-hero::after, .teacher-cta::after {
  content: ""; position: absolute; width: min(42vw,520px); aspect-ratio: 1;
  right: -12%; top: -34%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle,rgba(168,85,247,.17),rgba(109,61,245,.06) 42%,transparent 70%);
  filter: blur(4px); animation: saber-orb-drift 13s ease-in-out infinite alternate;
}
.hero::before {
  animation: saber-orb-drift 16s ease-in-out infinite alternate-reverse;
}
@keyframes saber-orb-drift {
  from { transform: translate3d(0,0,0) scale(.94); }
  to { transform: translate3d(-24px,28px,0) scale(1.08); }
}

/* Hero com entrada em camadas */
.hero-copy > *, .page-hero > *, .teacher-cta > * {
  animation: saber-copy-in .8s var(--motion-ease) both;
}
.hero-copy > :nth-child(1) { animation-delay: .06s; }
.hero-copy > :nth-child(2) { animation-delay: .14s; }
.hero-copy > :nth-child(3) { animation-delay: .22s; }
.hero-copy > :nth-child(4) { animation-delay: .30s; }
.hero-copy > :nth-child(5) { animation-delay: .38s; }
@keyframes saber-copy-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-art { animation: saber-art-in 1s .12s var(--motion-ease) both; }
@keyframes saber-art-in {
  from { opacity: 0; transform: translateY(28px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.art-orbit, .orbit-one, .orbit-two { animation: saber-orbit 24s linear infinite; transform-origin: center; }
@keyframes saber-orbit { to { rotate: 360deg; } }
.art-note { animation: saber-float 5s ease-in-out infinite; }
.art-note-top { animation-delay: -2.2s; }
@keyframes saber-float {
  0%,100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* Revelação ao rolar — ativada por JS quando o elemento entra na tela */
.js-motion [data-reveal] {
  opacity: 0; transform: translateY(26px) scale(.985);
  transition: opacity .75s var(--motion-ease), transform .75s var(--motion-ease);
  transition-delay: var(--reveal-delay,0ms);
}
.js-motion [data-reveal].is-visible { opacity: 1; transform: none; }
.js-motion [data-reveal="left"] { transform: translateX(-28px); }
.js-motion [data-reveal="right"] { transform: translateX(28px); }
.js-motion [data-reveal="scale"] { transform: translateY(14px) scale(.94); }
.js-motion [data-reveal].is-visible { translate: 0 0; }

/* Cartões com profundidade, brilho e resposta mais fluida */
.teacher-card, .info-card, .subject-tile, .page-step, .step,
.auth-card, .dashboard-panel, .dashboard-stat, .booking-item,
.review-item, .notification-item, .admin-user-card, .availability-item,
.sp-card, .stat-card, .material-card, .feature-card {
  transform: translateZ(0);
  transition: transform .42s var(--motion-ease), box-shadow .42s ease,
              border-color .3s ease, background-color .3s ease;
}
.teacher-card:hover, .info-card:hover, .subject-tile:hover, .page-step:hover,
.step:hover, .auth-card:hover, .dashboard-panel:hover, .dashboard-stat:hover,
.booking-item:hover, .review-item:hover, .notification-item:hover,
.admin-user-card:hover, .availability-item:hover, .sp-card:hover,
.stat-card:hover, .material-card:hover, .feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(75,43,160,.13), 0 0 0 1px rgba(139,92,246,.13);
}
.teacher-card::after, .info-card::after, .subject-tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; background: linear-gradient(115deg,transparent 20%,rgba(255,255,255,.23) 48%,transparent 72%);
  transform: translateX(-55%); transition: opacity .25s ease, transform .7s var(--motion-ease);
}
.teacher-card:hover::after, .info-card:hover::after, .subject-tile:hover::after {
  opacity: 1; transform: translateX(55%);
}

/* Botões com brilho deslizante e feedback tátil */
.button, .sp-btn, .search-button, .theme-toggle, .menu-toggle {
  position: relative; overflow: hidden;
  transition: transform .25s var(--motion-ease), box-shadow .25s ease,
              background-color .25s ease, border-color .25s ease;
}
.button::after, .sp-btn::after, .search-button::after {
  content: ""; position: absolute; inset: -80% auto -80% -45%; width: 28%;
  transform: rotate(22deg); background: linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent);
  transition: left .65s var(--motion-ease); pointer-events: none;
}
.button:hover::after, .sp-btn:hover::after, .search-button:hover::after { left: 130%; }
.button:active, .sp-btn:active, .search-button:active { transform: scale(.97); }

/* Navegação com sublinhado animado */
.main-nav a, .dashboard-sidebar nav a, .sp-nav a {
  transition: color .25s ease, background-color .25s ease, transform .25s var(--motion-ease);
}
.main-nav a { position: relative; }
.main-nav a::after {
  content: ""; position: absolute; height: 2px; left: 0; right: 100%; bottom: -8px;
  border-radius: 4px; background: linear-gradient(90deg,#6d3df5,#b36bff);
  transition: right .28s var(--motion-ease);
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { right: 0; }

/* Elementos de marca */
.brand-mark, .sp-brand-mark {
  transition: transform .45s var(--motion-ease), filter .45s ease;
}
.brand:hover .brand-mark, .sp-brand:hover .sp-brand-mark {
  transform: rotate(-9deg) scale(1.08);
  filter: drop-shadow(0 0 12px rgba(139,92,246,.55));
}

/* Formulários, tabelas e modais */
input, select, textarea {
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease, transform .25s ease;
}
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 4px rgba(139,92,246,.12);
}
tbody tr { transition: background .2s ease, transform .2s ease; }
.dialog-panel, .profile-dialog, .app-dialog {
  animation: saber-modal-in .32s var(--motion-ease) both;
}
@keyframes saber-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Elementos pequenos com movimento sutil */
.eyebrow-dot, .status-dot, .online-dot { animation: saber-pulse 2.2s ease-in-out infinite; }
@keyframes saber-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(139,92,246,.25); }
  50% { box-shadow: 0 0 0 7px rgba(139,92,246,0); }
}
.site-footer { overflow: hidden; }
.site-footer::after {
  content: ""; position: absolute; width: 260px; height: 260px; left: -130px; bottom: -170px;
  border: 1px solid rgba(168,139,250,.2); border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(168,139,250,.035),0 0 0 50px rgba(168,139,250,.025);
  pointer-events: none;
}

/* Barra de carregamento de navegação */
body.saber-page-enter::before {
  content: ""; position: fixed; z-index: 9999; top: 0; left: 0; height: 2px; width: 34%;
  background: linear-gradient(90deg,#6d3df5,#c084fc); animation: saber-loading .55s ease-out both;
  pointer-events: none;
}
@keyframes saber-loading { from { width: 0; opacity: 1; } to { width: 100%; opacity: 0; } }

/* Modo escuro */
body.site-dark .teacher-card:hover, body.site-dark .info-card:hover,
body.site-dark .subject-tile:hover, body.site-dark .dashboard-panel:hover,
body.site-dark .dashboard-stat:hover, body.site-dark .sp-card:hover {
  box-shadow: 0 18px 42px rgba(0,0,0,.28), 0 0 0 1px rgba(168,139,250,.2);
}
body.site-dark .hero::after, body.site-dark .page-hero::after {
  background: radial-gradient(circle,rgba(139,92,246,.22),rgba(109,61,245,.07) 42%,transparent 70%);
}

/* Acessibilidade e dispositivos touch */
@media (hover: none) {
  .teacher-card:hover, .info-card:hover, .subject-tile:hover,
  .dashboard-panel:hover, .dashboard-stat:hover { transform: none; }
  .teacher-card::after, .info-card::after, .subject-tile::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js-motion [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================
   SABER+ — MODO EXAGERADO
   Mais personalidade, movimento e impacto sem mudar a estrutura.
   ========================================================== */
:root {
  --sx-purple: #7138f4;
  --sx-violet: #a855f7;
  --sx-pink: #d946ef;
  --sx-glow: rgba(124, 58, 237, .34);
  --sx-spring: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-behavior: smooth; }
body { overflow-x: clip; }

/* Fundo com luzes vivas e textura de cor */
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background:
    radial-gradient(ellipse at 8% 12%, rgba(168,85,247,.12), transparent 32%),
    radial-gradient(ellipse at 92% 36%, rgba(124,58,237,.10), transparent 30%),
    radial-gradient(ellipse at 48% 96%, rgba(217,70,239,.07), transparent 34%);
  animation: sx-background-breathe 12s ease-in-out infinite alternate;
}
@keyframes sx-background-breathe {
  from { opacity: .25; transform: scale(1); }
  to { opacity: .62; transform: scale(1.06); }
}

/* Cabeçalho mais presente */
.site-header, .dashboard-topbar {
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: 0 8px 35px rgba(45, 18, 100, .07);
}
.brand-mark, .sp-brand-mark {
  filter: drop-shadow(0 0 9px rgba(139,92,246,.42));
  animation: sx-logo-float 4s ease-in-out infinite;
}
@keyframes sx-logo-float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }

/* Hero com presença editorial */
.hero, .page-hero, .teacher-cta {
  isolation: isolate;
  overflow: hidden;
}
.hero h1, .page-hero h1, .teacher-cta h2 {
  text-wrap: balance;
  letter-spacing: -.065em;
}
.hero h1 em, .page-hero h1 em, .teacher-cta h2 em {
  color: transparent;
  background: linear-gradient(105deg, var(--sx-purple) 5%, var(--sx-violet) 48%, var(--sx-pink) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 8px 24px rgba(124,58,237,.13));
}
.hero-art { filter: drop-shadow(0 28px 42px rgba(76,29,149,.16)); }
.art-orbit.orbit-one { border-color: rgba(124,58,237,.36); box-shadow: 0 0 55px rgba(124,58,237,.12), inset 0 0 40px rgba(124,58,237,.07); }
.art-orbit.orbit-two { border-color: rgba(217,70,239,.25); }
.art-note { box-shadow: 0 18px 50px rgba(42,19,87,.16); animation-duration: 4s; }
.art-sticker { animation: sx-sticker-spin 12s linear infinite; filter: drop-shadow(0 0 15px rgba(168,85,247,.5)); }
@keyframes sx-sticker-spin { to { rotate: 360deg; } }

/* Gradientes e reflexos nos principais botões */
.button, .sp-btn, .search-button {
  isolation: isolate;
  box-shadow: 0 8px 22px rgba(91,43,180,.13);
}
.button:hover, .sp-btn:hover, .search-button:hover {
  transform: translateY(-4px) scale(1.025);
  box-shadow: 0 14px 34px rgba(109,61,245,.28), 0 0 0 4px rgba(168,85,247,.09);
}
.button::before, .sp-btn::before, .search-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(110deg, transparent 15%, rgba(255,255,255,.26) 48%, transparent 78%);
  transform: translateX(-110%);
}
.button:hover::before, .sp-btn:hover::before, .search-button:hover::before {
  opacity: 1;
  animation: sx-button-sheen .85s var(--sx-spring) both;
}
@keyframes sx-button-sheen { to { transform: translateX(110%); } }

/* Cards com borda luminosa e inclinação controlada pelo ponteiro */
.teacher-card, .info-card, .subject-tile, .dashboard-panel, .dashboard-stat,
.stat-card, .material-card, .feature-card, .sp-card, .auth-card, .booking-item {
  --sx-rx: 0deg;
  --sx-ry: 0deg;
  --sx-lx: 50%;
  --sx-ly: 50%;
  position: relative;
  transform: perspective(1000px) rotateX(var(--sx-rx)) rotateY(var(--sx-ry)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform .45s var(--sx-spring), box-shadow .4s ease, border-color .3s ease;
  box-shadow: 0 10px 30px rgba(37,17,78,.055);
}
.teacher-card::before, .info-card::before, .subject-tile::before,
.dashboard-panel::before, .dashboard-stat::before, .stat-card::before,
.material-card::before, .feature-card::before, .sp-card::before, .auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(280px circle at var(--sx-lx) var(--sx-ly), rgba(168,85,247,.18), transparent 65%);
  transition: opacity .35s ease;
}
.teacher-card:hover::before, .info-card:hover::before, .subject-tile:hover::before,
.dashboard-panel:hover::before, .dashboard-stat:hover::before, .stat-card:hover::before,
.material-card:hover::before, .feature-card:hover::before, .sp-card:hover::before, .auth-card:hover::before { opacity: 1; }
.teacher-card:hover, .info-card:hover, .subject-tile:hover, .dashboard-panel:hover,
.dashboard-stat:hover, .stat-card:hover, .material-card:hover, .feature-card:hover,
.sp-card:hover, .auth-card:hover, .booking-item:hover {
  box-shadow: 0 24px 60px rgba(76,29,149,.16), 0 0 0 1px rgba(168,85,247,.2);
  border-color: rgba(139,92,246,.38);
}

/* Revelações com mais personalidade */
.js-motion [data-reveal] { transition-duration: .95s; }
.js-motion [data-reveal="up"] { transform: translateY(46px) scale(.965); }
.js-motion [data-reveal="left"] { transform: translateX(-48px) rotate(-1deg); }
.js-motion [data-reveal="right"] { transform: translateX(48px) rotate(1deg); }
.js-motion [data-reveal="scale"] { transform: translateY(22px) scale(.88) rotate(-1deg); }
.js-motion [data-reveal].is-visible { transform: none; }

/* Títulos e pequenos detalhes com energia */
.eyebrow { letter-spacing: .16em; }
.eyebrow-dot, .status-dot, .online-dot { box-shadow: 0 0 0 4px rgba(139,92,246,.10); }
.section-heading h2, .results-heading h2 { text-wrap: balance; }
.subject-symbol, .step-icon, .field-icon { transition: transform .5s var(--sx-spring), filter .4s ease; }
.subject-tile:hover .subject-symbol, .step:hover .step-icon { transform: translateY(-7px) rotate(-9deg) scale(1.16); filter: drop-shadow(0 8px 12px rgba(124,58,237,.25)); }

/* Entradas de página e feedbacks */
body.saber-page-enter main { animation: sx-page-arrive .75s var(--sx-spring) both; }
@keyframes sx-page-arrive { from { opacity: .65; filter: blur(5px); } to { opacity: 1; filter: blur(0); } }
.saber-clicked { animation: sx-click-pop .26s ease-out; }
@keyframes sx-click-pop { 50% { scale: .94; } }
.saber-cursor-glow {
  position: fixed; z-index: 0; width: 260px; height: 260px; border-radius: 50%;
  pointer-events: none; opacity: .14; filter: blur(55px);
  background: radial-gradient(circle, #a855f7, transparent 68%);
  transform: translate(-50%,-50%); transition: opacity .3s ease;
}

/* Modo escuro: brilho mais intenso, sem estourar o contraste */
body.site-dark::after { opacity: .55; }
body.site-dark .teacher-card:hover, body.site-dark .info-card:hover,
body.site-dark .subject-tile:hover, body.site-dark .dashboard-panel:hover,
body.site-dark .dashboard-stat:hover, body.site-dark .stat-card:hover,
body.site-dark .material-card:hover, body.site-dark .feature-card:hover,
body.site-dark .sp-card:hover {
  box-shadow: 0 24px 65px rgba(0,0,0,.35), 0 0 28px rgba(139,92,246,.16);
}

@media (max-width: 680px) {
  .hero h1, .page-hero h1 { letter-spacing: -.055em; }
  .teacher-card:hover, .info-card:hover, .subject-tile:hover, .dashboard-panel:hover,
  .dashboard-stat:hover, .stat-card:hover, .material-card:hover, .feature-card:hover,
  .sp-card:hover, .auth-card:hover, .booking-item:hover { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  body::after, .brand-mark, .sp-brand-mark, .art-sticker { animation: none !important; }
  .saber-cursor-glow { display: none !important; }
}
