/* ════════════════════════════════════════════════════════
   SECTECH V9 — Stella IA Immersive Experience
   Camada visual premium: cinematic hero, motion, responsividade e AI UX.
═════════════════════════════════════════════════════════ */
:root {
  --cyan: #00f2fe;
  --blue: #4facfe;
  --violet: #7c3aed;
  --purple: #b45cff;
  --green: #19e6b0;
  --ink: #020617;
  --card: rgba(8, 15, 30, .68);
}

body.menu-open { overflow: hidden; }

.skip-link {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 4000;
  transform: translateY(-150%);
  background: #e6fbff;
  color: #020617;
  padding: .75rem 1rem;
  border-radius: 999px;
  font-weight: 900;
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.cinematic-shell {
  position: relative;
  min-height: 100vh;
  padding-top: 132px;
  overflow: hidden;
}
.cinematic-shell::before {
  content: "";
  position: absolute;
  inset: -15% -10% auto -10%;
  height: 72%;
  background:
    radial-gradient(circle at 28% 20%, rgba(0, 242, 254, .23), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(124, 58, 237, .28), transparent 35%),
    linear-gradient(180deg, rgba(2, 6, 23, .15), rgba(2, 6, 23, 0));
  filter: blur(6px);
  pointer-events: none;
  z-index: -1;
}
.cinematic-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, rgba(0, 242, 254, .06) 49.8%, rgba(0, 242, 254, .16) 50%, rgba(0, 242, 254, .06) 50.2%, transparent 100%),
    linear-gradient(180deg, transparent 0%, rgba(2,6,23,.45) 68%, #020617 100%);
  mask-image: radial-gradient(circle at 70% 24%, black, transparent 58%);
  -webkit-mask-image: radial-gradient(circle at 70% 24%, black, transparent 58%);
  opacity: .62;
}

.hero-v9 {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-bottom: 90px;
  position: relative;
  z-index: 1;
}
.hero-v9 h1 {
  margin: 1.2rem 0 0;
  max-width: 980px;
  font-size: clamp(3.3rem, 9vw, 8.9rem);
  line-height: .82;
  letter-spacing: -.087em;
  font-weight: 950;
}
.hero-lede-v9 {
  max-width: 760px;
  margin: 1.55rem 0 0;
  color: #b9cce1;
  font-size: clamp(1.06rem, 1.7vw, 1.34rem);
  line-height: 1.82;
}
.hero-actions-v9 {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.command-bar {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: .75rem;
  max-width: 880px;
}
.command-bar article {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  border-radius: 22px;
  padding: 1rem;
  background: linear-gradient(145deg, rgba(15,23,42,.76), rgba(2,6,23,.48));
  border: 1px solid rgba(125,211,252,.16);
}
.command-bar article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(0,242,254,.22), transparent 35%);
  opacity: 0;
  transition: opacity .22s ease;
}
.command-bar article:hover::before { opacity: 1; }
.command-bar strong {
  position: relative;
  display: block;
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 950;
  color: #fff;
  letter-spacing: -.04em;
}
.command-bar span {
  position: relative;
  display: block;
  margin-top: .4rem;
  color: #87a8c4;
  font-size: .78rem;
  line-height: 1.35;
}

.stella-stage {
  position: relative;
  min-height: 620px;
  border-radius: 42px;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: linear-gradient(145deg, rgba(15,23,42,.62), rgba(2,6,23,.74));
  border: 1px solid rgba(125,211,252,.18);
  box-shadow: 0 32px 120px rgba(0,0,0,.52), 0 0 90px rgba(0,242,254,.08);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  backdrop-filter: blur(28px) saturate(1.35);
  overflow: hidden;
  isolation: isolate;
}
.stella-stage::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,242,254,.72), rgba(79,172,254,.15), rgba(180,92,255,.68));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.stella-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 35%, rgba(0,242,254,.17), transparent 28%),
    radial-gradient(circle at 68% 66%, rgba(124,58,237,.18), transparent 34%),
    linear-gradient(180deg, transparent 0%, rgba(0,242,254,.035) 50%, transparent 100%);
}
.orb-system {
  position: absolute;
  inset: 55px 20px auto 20px;
  height: 360px;
  display: grid;
  place-items: center;
  perspective: 1000px;
}
.orb-core-v9 {
  width: clamp(132px, 14vw, 190px);
  height: clamp(132px, 14vw, 190px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0%, #dffaff 12%, var(--cyan) 34%, #2563eb 62%, rgba(2,6,23,.96) 100%);
  box-shadow: 0 0 42px rgba(0,242,254,.74), 0 0 120px rgba(79,172,254,.22), inset -18px -18px 40px rgba(2,6,23,.48);
  animation: orbBreath 4.2s ease-in-out infinite;
}
.orb-ring-v9 {
  position: absolute;
  width: min(78%, 440px);
  aspect-ratio: 1;
  border: 1px solid rgba(0,242,254,.28);
  border-radius: 50%;
  transform-style: preserve-3d;
  animation: rotateOrb 14s linear infinite;
}
.orb-ring-v9.r2 { width: min(62%, 350px); border-color: rgba(180,92,255,.28); animation-duration: 20s; animation-direction: reverse; transform: rotateX(70deg) rotateY(25deg); }
.orb-ring-v9.r3 { width: min(92%, 520px); border-color: rgba(79,172,254,.14); animation-duration: 26s; transform: rotateX(58deg) rotateZ(35deg); }
@keyframes orbBreath { 0%,100% { transform: scale(1); filter: saturate(1); } 50% { transform: scale(1.06); filter: saturate(1.35); } }
@keyframes rotateOrb { to { transform: rotateX(68deg) rotateZ(360deg); } }

.hud-stack {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: .8rem;
}
.hud-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .85rem;
  align-items: center;
  min-height: 78px;
  border-radius: 22px;
  padding: .9rem;
  background: rgba(2,6,23,.58);
  border: 1px solid rgba(125,211,252,.15);
}
.hud-card i { color: var(--cyan); }
.hud-card strong { display: block; color: #fff; font-size: .95rem; }
.hud-card span { display: block; margin-top: .2rem; color: #7f9ab3; font-size: .74rem; line-height: 1.35; }
.hud-badge {
  color: #98f7ff;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.cinema-rail {
  position: relative;
  overflow: hidden;
  padding: 32px 0;
  border-block: 1px solid rgba(125,211,252,.1);
  background: rgba(2,6,23,.42);
}
.cinema-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: railMove 38s linear infinite;
}
.cinema-rail:hover .cinema-track { animation-play-state: paused; }
.cinema-frame {
  position: relative;
  overflow: hidden;
  width: clamp(260px, 32vw, 440px);
  aspect-ratio: 16 / 10;
  border-radius: 28px;
  border: 1px solid rgba(125,211,252,.18);
  background: rgba(15,23,42,.65);
}
.cinema-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(1.08) brightness(.72);
  transform: scale(1.05);
  transition: transform .6s ease, filter .6s ease;
}
.cinema-frame:hover img { transform: scale(1.12); filter: contrast(1.16) saturate(1.18) brightness(.92); }
.cinema-frame span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  right: 16px;
  color: #fff;
  font-weight: 950;
  text-shadow: 0 8px 30px rgba(0,0,0,.9);
}
@keyframes railMove { to { transform: translateX(calc(-50% - 9px)); } }

.ai-native-section .two-col { align-items: stretch; }
.ai-native-panel {
  border-radius: 34px;
  min-height: 560px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}
.ai-native-head {
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid rgba(125,211,252,.14);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.ai-native-title { display: flex; align-items: center; gap: .75rem; }
.ai-native-title .orb-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #00f2fe 50%, #2563eb 100%);
  box-shadow: 0 0 22px rgba(0,242,254,.65);
}
.ai-native-title strong { display: block; color: #fff; }
.ai-native-title span { color: #7dd3fc; font-size: .72rem; font-weight: 700; }
.ai-native-log {
  padding: 1.1rem;
  display: grid;
  align-content: start;
  gap: .8rem;
  max-height: 440px;
  overflow: auto;
}
.ai-bubble {
  max-width: 88%;
  border-radius: 18px;
  padding: .85rem 1rem;
  line-height: 1.62;
  font-size: .9rem;
}
.ai-bubble.bot {
  justify-self: start;
  background: rgba(0,242,254,.07);
  border: 1px solid rgba(0,242,254,.14);
  color: #dff8ff;
  border-bottom-left-radius: 6px;
}
.ai-bubble.user {
  justify-self: end;
  color: white;
  background: linear-gradient(135deg, #2563eb, #00b8d9);
  border-bottom-right-radius: 6px;
}
.ai-native-form {
  padding: 1rem;
  border-top: 1px solid rgba(125,211,252,.14);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
}
.ai-native-form .field { min-height: 54px; }
.typing-dots { display: flex; gap: 4px; }
.typing-dots i { width: 6px; height: 6px; background: var(--cyan); border-radius: 50%; animation: dotPulse 1.1s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotPulse { 0%,100% { opacity: .28; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

.system-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.system-node {
  min-height: 170px;
  border-radius: 28px;
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}
.system-node::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,242,254,.18), transparent 68%);
}
.system-node h3 { margin: .9rem 0 .5rem; color: #fff; font-size: 1.05rem; }
.system-node p { margin: 0; color: #8ea9bf; line-height: 1.62; font-size: .86rem; }

.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }

.magnetic { will-change: transform; }

@media (max-width: 1100px) {
  .hero-v9 { grid-template-columns: 1fr; }
  .stella-stage { min-height: 560px; }
  .system-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cinematic-shell { padding-top: 112px; }
  .hero-v9 h1 { font-size: clamp(3rem, 16vw, 4.7rem); letter-spacing: -.075em; }
  .hero-actions-v9 .btn, .hero-actions .btn { width: 100%; }
  .command-bar { grid-template-columns: 1fr 1fr; }
  .stella-stage { min-height: 520px; border-radius: 30px; }
  .orb-system { inset: 34px 12px auto 12px; height: 290px; }
  .hud-stack { left: 12px; right: 12px; bottom: 12px; }
  .hud-card { grid-template-columns: auto 1fr; }
  .hud-badge { display: none; }
  .system-map { grid-template-columns: 1fr; }
  .ai-native-form { grid-template-columns: 1fr; }
  .ai-native-form .btn { width: 100%; }
}
@media (max-width: 480px) {
  .command-bar { grid-template-columns: 1fr; }
  .cinema-frame { width: 250px; border-radius: 22px; }
  .hero-v9 { gap: 2rem; }
  .stella-stage { min-height: 500px; padding: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .orb-core-v9, .orb-ring-v9, .cinema-track { animation: none !important; }
  .reveal-up { opacity: 1; transform: none; }
}
