/* ════════════════════════════════════════════════════════
   HERO — parallax sticky + notebook animado
════════════════════════════════════════════════════════ */

/* ── Estrutura ── */
.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: var(--z-hero);
}

/* ── Grid de fundo ── */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
  background-size: 60px 60px;
  transition: transform 0.1s linear;
}
.grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, transparent 20%, var(--color-bg) 80%);
}

/* ── Orbs de glow ── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}
.orb1 { width: 500px; height: 500px; background: var(--color-orb1); top: -100px; left: -150px; }
.orb2 { width: 400px; height: 400px; background: var(--color-orb2); bottom: -80px; right: -100px; }

/* ── Conteúdo central ── */
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xl);
  padding: var(--space-xl);
  transform-style: preserve-3d;
  transition: transform 0.1s linear;
}

/* ── Badge ── */
.badge {
  display: inline-block;
  border: 1px solid rgba(79,142,247,0.5);
  background: rgba(79,142,247,0.08);
  color: var(--color-accent);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  opacity: 0;
  animation: fadeUp 0.5s 0s ease forwards;
}

/* ── Heading ── */
.hero-inner h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.08;
  color: var(--color-white);
  opacity: 0;
  animation: fadeUp 0.55s 0.1s ease forwards;
}
.hero-inner h1 span.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Subtítulo ── */
.sub {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: var(--max-width-text);
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.55s 0.2s ease forwards;
}

/* ── CTA ── */
.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.55s 0.3s ease forwards;
}

/* ── Botões ── */
.btn {
  padding: 0.75rem var(--space-xl);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-p {
  background: var(--grad-accent);
  color: var(--color-white);
  border: none;
  box-shadow: var(--shadow-btn);
}
.btn-p:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
}
.btn-o {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-o:hover {
  background: rgba(255,255,255,0.06);
}

/* ── Layout hero desktop ── */
.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xl);
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-layout { flex-direction: row; gap: 5rem; align-items: center; text-align: left; }
  .hero-text   { align-items: flex-start; }
  .hero-cta    { justify-content: flex-start; }
  .sub         { margin: 0; }
}

/* ── Keyframes gerais ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════
   NOTEBOOK — cena
════════════════════════════════════════════════════════ */

.notebook-scene {
  position: relative;
  width: calc(var(--nb-largura) + 40px);
  height: calc(var(--nb-largura) * 0.30 + var(--nb-altura-trapezio) * 1.5 + 80px);
  opacity: 0;
  animation: fadeUp 0.55s 0.4s ease forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* halo de fundo do notebook */
.notebook-scene::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, var(--nb-halo) 0%, transparent 75%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

/* ── Wrapper (recebe animação de entrada e float) ── */
.notebook-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(500px) rotateY(50deg) rotateX(15deg) scale(0.5);
  animation: notebookEntry 1.1s 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
  transform-style: preserve-3d;
}
.notebook-wrapper.float {
  animation: notebookFloat 4s ease-in-out infinite;
}

@keyframes notebookEntry {
  0%   { transform: translateX(500px)  rotateY(50deg)  rotateX(15deg) scale(0.5); }
  55%  { transform: translateX(-60px)  rotateY(-10deg) rotateX(-4deg) scale(1.05); }
  75%  { transform: translateX(20px)   rotateY(5deg)   rotateX(2deg)  scale(0.98); }
  88%  { transform: translateX(-10px)  rotateY(-3deg)  rotateX(-1deg) scale(1.01); }
  100% { transform: translateX(0)      rotateY(0deg)   rotateX(0deg)  scale(1); }
}
@keyframes notebookFloat {
  0%, 100% { transform: translateY(0) rotateX(2deg) rotateY(-2deg); }
  50%       { transform: translateY(-12px) rotateX(-2deg) rotateY(2deg); }
}

/* ── Tela / lid ── */
.tela-container {
  width: var(--nb-largura);
  height: calc(var(--nb-largura) * 0.30);
  position: relative;
  overflow: hidden;
}

.tela-tampa {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: var(--nb-altura-trapezio);
  background: var(--nb-cor-tela);
  clip-path: polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%);
  animation: abrir-tampa 1.1s cubic-bezier(0.4, 0, 0.15, 1) 0.3s forwards;
  border: 2px solid var(--nb-borda-tela);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  box-sizing: border-box;
  box-shadow: 0 -6px 40px var(--nb-glow-tela), inset 0 0 30px rgba(79,142,247,0.05);
}

@keyframes abrir-tampa {
  0%   { clip-path: polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%); height: var(--nb-altura-trapezio); }
  100% { clip-path: polygon(25% 0%, 75% 0%, 75% 100%, 25% 100%); height: 100%; }
}

.tela-screen {
  position: absolute;
  inset: 0;
  background: #060e1f;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: acender-tela 0.4s ease-out 1.4s forwards;
  border-radius: 4px;
  overflow: hidden;
}
@keyframes acender-tela {
  0%   { background: #060e1f; }
  100% { background: linear-gradient(160deg, #0a1230 0%, #060e1f 100%); }
}
.tela-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(79,142,247,0.08) 0%, transparent 70%);
  z-index: 0;
}

.tela-screen-content {
  position: relative;
  z-index: 1;
  text-align: center;
  opacity: 0;
  animation: aparecer-frase 0.5s ease-out 1.9s forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tela-screen-logo {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-accent);
  letter-spacing: 0.08em;
}
.tela-screen-logo::after {
  content: '_';
  opacity: 0;
  animation: piscar 1s step-end 2.4s infinite;
}
.tela-screen-bar {
  width: 60px; height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
}
.tela-screen-lines { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.tela-screen-line  { height: 2px; border-radius: 2px; background: rgba(255,255,255,0.12); }

.tela-camera {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  background: #1a1a1a;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  z-index: 2;
}

@keyframes aparecer-frase {
  0%   { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes piscar {
  0%, 100% { opacity: 0; }
  50%       { opacity: 1; }
}

/* ── Base / teclado ── */
.trapezio-container { position: relative; width: var(--nb-largura); }

.trapezio {
  width: 100%;
  height: var(--nb-altura-trapezio);
  background: var(--nb-cor-corpo);
  clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
  position: relative;
  box-shadow: var(--shadow-nb-base);
}
.trapezio-teclado {
  position: absolute;
  top: calc(var(--nb-altura-trapezio) * 0.08);
  left: 50%; transform: translateX(-50%);
  width: 80%; height: calc(var(--nb-altura-trapezio) * 0.52);
  clip-path: polygon(20% 0%, 80% 0%, 95% 100%, 5% 100%);
}
.teclado-grid {
  position: absolute;
  top: calc(var(--nb-altura-trapezio) * 0.08);
  left: 50%; transform: translateX(-50%);
  width: 80%; height: calc(var(--nb-altura-trapezio) * 0.52);
  pointer-events: none;
}
.trapezio-touchpad {
  position: absolute;
  top: calc(var(--nb-altura-trapezio) * 0.62);
  left: 50%; transform: translateX(-50%);
  width: 40%; height: calc(var(--nb-altura-trapezio) * 0.25);
  background: var(--nb-cor-touchpad);
  clip-path: polygon(15% 0%, 85% 0%, 95% 100%, 5% 100%);
  border-radius: 50px;
}
.base-retangulo {
  width: 100%;
  height: calc(var(--nb-altura-trapezio) * 0.25);
  background: var(--nb-cor-base);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 3px 0 0 rgba(79,142,247,0.3);
}

/* ── Cursor animado ── */
.cursor-anim {
  position: absolute;
  top: 28%; right: 8%;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  animation: cursorAppear 0.3s 1.8s ease forwards;
}
@keyframes cursorAppear { to { opacity: 1; } }

.cursor-svg { animation: cursorMove 0.9s 1.8s ease forwards; }
@keyframes cursorMove {
  0%   { transform: translate(60px, -30px); }
  70%  { transform: translate(0, 0); }
  85%  { transform: translate(2px, 2px); }
  100% { transform: translate(0, 0); }
}
.cursor-click-dot {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(79,142,247,0.3);
  transform: scale(0);
  animation: clickRipple 0.4s 2.5s ease forwards;
}
@keyframes clickRipple {
  0%  { transform: scale(0); opacity: 1; }
  100%{ transform: scale(2.5); opacity: 0; }
}

/* ── Popup ── */
.popup-text {
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: linear-gradient(135deg, rgba(15,20,40,0.95), rgba(25,30,55,0.95));
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-lg);
  padding: 0.9rem var(--space-lg);
  white-space: nowrap;
  opacity: 0;
  box-shadow: var(--shadow-popup);
  animation: popupIn 0.5s 2.8s cubic-bezier(0.34,1.56,0.64,1) forwards;
  z-index: 20;
}
.popup-text p {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--color-white);
}
.popup-text span {
  background: var(--grad-cta-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}
.popup-text::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  width: 10px; height: 10px;
  background: rgba(25,30,55,0.95);
  border-left: 1px solid var(--color-border-accent);
  border-top:  1px solid var(--color-border-accent);
  transform: translateX(-50%) rotate(45deg);
}
@keyframes popupIn { to { opacity: 1; transform: translateX(-50%) scale(1); } }

/* ── Scroll hint ── */
.scroll-hint {
  position: absolute;
  bottom: var(--space-xl); left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  animation: fadeUp 0.5s 3.2s ease forwards;
}
.scroll-hint span {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-mouse {
  width: 22px; height: 34px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 3px; height: 6px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
  animation: scrollWheel 1.5s 3.4s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%,100% { transform: translateY(0); opacity: 1; }
  80%      { transform: translateY(8px); opacity: 0; }
}
