/* ================================================
   LAYOUT — Containers, Grid, Sections
   ================================================ */

/* ——— Reset ——— */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-deep) !important;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep) !important;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ——— Container ——— */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-medium {
  max-width: 900px;
}

/* ——— Sections ——— */
.section {
  padding: var(--section-padding-v) 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
}

/* Section backgrounds — all dark style matching reference */
.section--sobre {
  background: var(--bg-deep);
  color: var(--text-secondary);
}

#problema,
#persona {
  padding: 0;
}

.split-grid__sidebar {
  padding: 60px;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: relative;
}
.section--sobre .section-header h2,
.section--sobre .section-header p,
.section--sobre .section-label {
  color: #ffffff;
}
.section--sobre .section-label {
  color: var(--brand-cyan);
}

.section--modulos {
  background: var(--bg-deep);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
}
.section--modulos .section-header h2 { color: #ffffff; }
.section--modulos .section-label { color: var(--brand-blue); }
.section--modulos .timeline__title { color: #ffffff; }
.section--modulos .timeline__subtitle { color: var(--brand-neon); }
.section--modulos .timeline__desc { color: var(--text-muted); }
.section--modulos .timeline__number { color: rgba(43, 107, 255, 0.08); }
.section--modulos .timeline::before { opacity: 0.4; }
.section--modulos .timeline__item::before { border-color: var(--bg-deep); }
.section--modulos .tag {
  background: rgba(43, 107, 255, 0.1);
  border-color: rgba(43, 107, 255, 0.25);
  color: var(--brand-blue);
}

.section--stack {
  background-color: var(--bg-deep);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
}
.section--stack .section-divider p { color: var(--text-muted); background: var(--bg-deep); }
.section--stack .section-divider::before { border-top-color: var(--border-subtle); }
.section--stack h2 { color: #ffffff; }
.section--stack .section-label { color: var(--brand-blue); }

/* ——— Section: Arquitetura Neon ——— */
.section--arquitetura-neon {
  background-color: #c6ff00;
  position: relative;
  transition: all 0.5s ease;
}
.section--arquitetura-neon::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../vignette.jpg');
  background-size: cover;
  background-position: center;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}
.section--arquitetura-neon .container { position: relative; z-index: 2; }
.section--arquitetura-neon .section-header h2,
.section--arquitetura-neon .section-header p,
.section--arquitetura-neon .section-label,
.section--arquitetura-neon .section-divider p { color: #111111 !important; }
.section--arquitetura-neon .section-divider--white p::before,
.section--arquitetura-neon .section-divider--white p::after { background: rgba(0, 0, 0, 0.2) !important; }

/* ——— Section: Diferenciais (dark bento) ——— */
.section--diferenciais {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  padding: var(--section-padding-v) 0;
  position: relative;
}

/* ——— Physics Container & Tags ——— */
.physics-container {
  position: relative;
  width: 100%;
  height: 500px;
  margin-top: 3rem;
  overflow: hidden;
  cursor: crosshair;
  background-color: transparent;
  border-radius: 2rem;
}

.physics-tag {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #E5E5E5;
  padding: 1rem 1.75rem;
  border-radius: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 500;
  will-change: transform;
  transition: colors 0.2s;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 24px;
  border: 1px solid var(--border-subtle);
  user-select: none;
  backdrop-filter: blur(10px);
}

.physics-tag:active { cursor: grabbing; }

.physics-tag__icon-wrapper {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.physics-tag__icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
}

/* ——— Grid Background Pattern ——— */
.section-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.section-grid-bg--light {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.section-grid-bg--dark {
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  transition: background-position 0.1s ease-out;
}

.section--sobre .container,
.section--modulos .container {
  position: relative;
  z-index: 1;
}

/* ——— Section divider white override ——— */
.section-divider--white p {
  color: rgba(255, 255, 255, 0.6) !important;
  opacity: 1 !important;
}

.section-divider--white p::before,
.section-divider--white p::after {
  background: rgba(255, 255, 255, 0.1);
}

/* ——— Scroll progress bar ——— */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--grad-accent);
  z-index: 9999;
  width: 0%;
  transition: none;
  box-shadow: var(--glow-blue-sm);
}

/* ——— Split Grid Layout (Reference Standard) ——— */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* ——— Solution Split Layout (1.2:0.8) ——— */
.solution-split-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--gap-lg);
  align-items: flex-start;
  margin-top: 40px;
}

.solution-header-col {
  display: flex;
  flex-direction: column;
}

.solution-bullets-col {
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .solution-split-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.split-grid__sidebar {
  padding: 60px;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: relative; /* for markers */
}

.split-grid__content {
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
  .split-grid__sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 40px 24px;
  }
}

/* ═══════════════════════════════════════════
   NAVIGATION — Pill Menu (Reference Style)
   ═══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  background: transparent;
  transition: all var(--duration-med) ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 60px;
  width: auto;
  display: block;
}

.nav__logo span { color: var(--brand-blue); }

/* Centered Pill Menu */
.nav__links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 32px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
}

.nav__link {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  color: #E5E5E5;
  text-transform: none;
  letter-spacing: 0.02em;
  transition: color var(--duration-fast) ease;
  position: relative;
}

.nav__link:hover {
  color: var(--brand-blue);
}

.nav__link::after {
  display: none; /* Remove underline animation for pill style */
}

/* Nav CTA — Aura Spin Button */
.nav__cta {
  position: relative;
  display: inline-flex;
  height: 44px;
  overflow: hidden;
  border-radius: 9999px;
  padding: 1.5px;
  cursor: pointer;
  border: none;
  background: transparent;
  width: fit-content;
}

.nav__cta .aura-spin-bg {
  position: absolute;
  inset: -1000%;
  animation: aura-spin 3s linear infinite;
  background: conic-gradient(from 90deg at 50% 50%, #0f172a 0%, #2B6BFF 40%, #00D4FF 60%, #0f172a 100%);
}

.nav__cta .aura-inner {
  position: relative;
  display: inline-flex;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: #0A0A0A;
  padding: 0 24px;
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 600;
  color: #cbd5e1;
  backdrop-filter: blur(64px);
  transition: all 0.3s ease;
  gap: 10px;
  z-index: 10;
  white-space: nowrap;
}

.nav__cta:hover .aura-inner {
  color: #ffffff;
  background-color: #111;
}

/* ——— Mobile Nav Toggle ——— */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all var(--duration-med) ease;
}

/* ——— Hero ——— */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-void);
  border-bottom: 1px solid var(--border-subtle);
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.3) 0%,
    rgba(10,10,10,0.5) 50%,
    rgba(10,10,10,0.85) 100%
  );
}

/* ——— Hero Slides ——— */
.hero__slide {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero__slide--active {
  opacity: 1;
  pointer-events: auto;
}

.hero__slide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 1000px;
  position: relative;
  z-index: 10;
  margin: 0 auto;
}

.hero__cta-wrapper {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Phase 1 — Main Title */
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: var(--text-hero);
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 30px rgba(43, 107, 255, 0.4);
}

.hero__title .word {
  display: inline-block;
  opacity: 0;
  transform: translateX(-40px);
  filter: blur(8px);
}

.hero__subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-bottom: 2rem;
}

/* Phases 2-6 — Highlight Phrases */
.hero__slide-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
  opacity: 1;
}

.hero__slide-number {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(3rem, 8vw, 6rem);
  color: rgba(255, 255, 255, 0.06);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero__slide-phrase {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(1.4rem, 4vw, 3rem);
  text-transform: uppercase;
  color: var(--brand-neon);
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(198, 255, 0, 0.3);
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: pulseDown 2s ease-in-out infinite;
}

.hero__scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-subtle);
}

.hero__scroll-indicator .arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--brand-blue), transparent);
}

/* ——— Speed streaks ——— */
.speed-streaks {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.speed-streak {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-blue), transparent);
  opacity: 0;
  animation: streakPass linear infinite;
}

/* ——— Grid helpers ——— */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);
}

/* ——— Section headers ——— */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  max-width: 700px;
  margin: 0 auto;
}

/* ——— Section divider ——— */
.section-divider {
  text-align: center;
  padding: 3rem 0;
}

.section-divider p {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  position: relative;
}

.section-divider p::before,
.section-divider p::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: var(--border-subtle);
}

.section-divider p::before { right: calc(100% + 1rem); }
.section-divider p::after  { left: calc(100% + 1rem); }

/* ——— Section Divider Beam (Gradient line between sections) ——— */
.section-divider-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    #2B6BFF 25%,
    #00D4FF 50%,
    #2B6BFF 75%,
    transparent 100%);
  background-size: 200% 100%;
  opacity: 0.6;
  z-index: 10;
  pointer-events: none;
  animation: slide-divider-beam 4s linear infinite;
}

.section-divider-beam.bottom-beam {
  top: auto;
  bottom: 0;
}

/* ——— Grid Markers (+) ——— */
.grid-marker {
  position: absolute;
  z-index: 20;
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  font-family: monospace;
  font-weight: 300;
  pointer-events: none;
}
.marker-top-left    { top: -6px; left: -4px; }
.marker-top-right   { top: -6px; right: -4.5px; }
.marker-bottom-left { bottom: -6px; left: -4px; }
.marker-bottom-right{ bottom: -6px; right: -4.5px; }

/* ——— Border Beam (Animated conic gradient border) ——— */
.border-beam-container {
  position: relative;
  z-index: 1;
}

.border-beam {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--beam-angle, 0deg),
    transparent 0%,
    transparent 20%,
    #2B6BFF 40%,
    #00D4FF 50%,
    #2B6BFF 60%,
    transparent 80%,
    transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: rotate-beam 6s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.border-beam-container:hover .border-beam {
  opacity: 0.8;
  animation-duration: 3s;
}

/* ——— Mobile Adjustments for Stack ——— */
@media (max-width: 768px) {
  .physics-tag {
    padding: 0.65rem 1rem;
    font-size: 1rem;
    gap: 0.65rem;
  }
  
  .physics-tag__icon-wrapper {
    width: 2rem;
    height: 2rem;
  }
  
  .physics-container {
    height: 400px;
  }
}
