/* ==========================================================================
   LAYOUT — Structural Layout, Backgrounds & HUD Frame
   WAR Group — Command Center Interface
   ========================================================================== */

/* --------------------------------------------------------------------------
   HTML & Body — Base Setup
   -------------------------------------------------------------------------- */
html {
  background: var(--bg);
  overflow-x: hidden;
  width: 100%;
}

body {
  background: var(--bg);
  background-image: var(--gradient-bg);
  color: var(--cream);
  font-family: var(--font-family);
  font-weight: var(--fw-regular);
  overflow-x: hidden;
  width: 100%;
}

/* ==========================================================================
   VIEWPORT WRAPPER & PAGE FLOW — Landing Page Layout
   ========================================================================== */
.viewport-wrapper, .page-flow {
  width: 100%;
  position: relative;
  display: block;
}

/* --------------------------------------------------------------------------
   Section — Base
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Cover variant — always full viewport */
.section--cover, .section--hero {
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: center;
}

.section--hero {
  margin-bottom: 15vh;
}

/* Short sections — adjust min-height to content */
.section--simulator,
.section--solucoes {
  min-height: auto;
}

/* --------------------------------------------------------------------------
   Section Content
   -------------------------------------------------------------------------- */
.section__content {
  position: relative;
  z-index: var(--z-card, 2);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: var(--space-xl) var(--margin-x);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TACTICAL BACKGROUND — Global Background, Grid, Vignette & Scanline
   ========================================================================== */
.global-tactical-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg);
  background-image: var(--gradient-bg);
}

.tactical-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Grid pattern */
.tactical-bg::before, .global-tactical-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 32px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 32px
    );
  background-size: 32px 32px;
}

/* Vignette overlay */
.tactical-bg::after, .global-tactical-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  box-shadow: inset 0 0 150px 40px var(--bg);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Tactical Canvas (JS-drawn decorations)
   -------------------------------------------------------------------------- */
.tactical-canvas {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.7;
}
.global-canvas {
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Cursor Spotlight — Mouse Follower (positioned via JS)
   -------------------------------------------------------------------------- */
.cursor-spotlight {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 150, 138, 0.06) 0%,
    rgba(0, 150, 138, 0.02) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 300ms ease;
  will-change: left, top;
}

.cursor-spotlight--hidden {
  opacity: 0;
}

/* ==========================================================================
   HUD FRAME — Persistent Overlay
   ========================================================================== */
.hud-frame {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-hud, 50);
  pointer-events: none;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Corner Brackets — Four L-shaped marks
   -------------------------------------------------------------------------- */

/* Top-Left Corner */
.hud-frame__corner--tl {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 30px;
  height: 30px;
}

.hud-frame__corner--tl::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--teal-light), transparent);
}

.hud-frame__corner--tl::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, var(--teal-light), transparent);
}

/* Top-Right Corner */
.hud-frame__corner--tr {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
}

.hud-frame__corner--tr::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(270deg, var(--teal-light), transparent);
}

.hud-frame__corner--tr::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, var(--teal-light), transparent);
}

/* Bottom-Left Corner */
.hud-frame__corner--bl {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 30px;
  height: 30px;
}

.hud-frame__corner--bl::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--teal-light), transparent);
}

.hud-frame__corner--bl::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(0deg, var(--teal-light), transparent);
}

/* Bottom-Right Corner */
.hud-frame__corner--br {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
}

.hud-frame__corner--br::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(270deg, var(--teal-light), transparent);
}

.hud-frame__corner--br::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(0deg, var(--teal-light), transparent);
}

/* --------------------------------------------------------------------------
   HUD Info — Top-Left System Label
   -------------------------------------------------------------------------- */
.hud-frame__info {
  position: absolute;
  top: 28px;
  left: 58px;
  font-family: var(--font-mono, monospace);
  font-size: var(--fs-hud, 0.625rem);
  color: rgba(0, 150, 138, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Blinking cursor */
.hud-frame__info::after {
  content: '█';
  display: inline-block;
  margin-left: 2px;
  animation: hudCursorBlink 1s steps(1) infinite;
}

@keyframes hudCursorBlink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   HUD Coordinates — Top-Right Readout
   -------------------------------------------------------------------------- */
.hud-frame__coords {
  position: absolute;
  top: 28px;
  right: 58px;
  font-family: var(--font-mono, monospace);
  font-size: var(--fs-hud, 0.625rem);
  color: rgba(0, 150, 138, 0.4);
  letter-spacing: 0.1em;
  text-align: right;
}

/* --------------------------------------------------------------------------
   HUD Status — Bottom-Left Indicator
   -------------------------------------------------------------------------- */
.hud-frame__status {
  position: absolute;
  bottom: 28px;
  left: 58px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: var(--fs-hud, 0.625rem);
  color: rgba(0, 150, 138, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Green pulsing status dot */
.hud-frame__status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00968A;
  box-shadow: 0 0 6px rgba(0, 150, 138, 0.6);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    box-shadow: 0 0 4px rgba(0, 150, 138, 0.4);
    opacity: 0.8;
  }
  50% {
    box-shadow: 0 0 10px rgba(0, 150, 138, 0.8);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   HUD Reticle — Bottom-Right Crosshair
   -------------------------------------------------------------------------- */
.hud-frame__reticle {
  position: absolute;
  bottom: 22px;
  right: 22px;
  width: 24px;
  height: 24px;
}

/* Horizontal crosshair line */
.hud-frame__reticle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  right: 2px;
  height: 1px;
  background: rgba(0, 150, 138, 0.35);
  transform: translateY(-50%);
}

/* Vertical crosshair line */
.hud-frame__reticle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: rgba(0, 150, 138, 0.35);
  transform: translateX(-50%);
}

/* Center dot of crosshair */
.hud-frame__reticle-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal-light);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4px rgba(0, 150, 138, 0.5);
}

/* ==========================================================================
   NAVIGATION PANEL — Fixed Left Sidebar
   ========================================================================== */
.nav-panel {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-control, 100);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
}

.nav-panel__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 20px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: all var(--transition-smooth);
}

/* Left indicator line */
.nav-panel__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0.4);
  width: 2px;
  height: 24px;
  background: rgba(0, 150, 138, 0.3);
  border-radius: 1px;
  transition: all var(--transition-smooth);
}

/* Active state */
.nav-panel__item--active::before {
  background: var(--teal-light);
  transform: translateY(-50%) scaleY(1);
  box-shadow: 0 0 8px rgba(0, 150, 138, 0.5);
}

.nav-panel__label {
  font-family: var(--font-mono, monospace);
  font-size: 0.5625rem;
  color: rgba(166, 169, 170, 0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--transition-smooth);
  white-space: nowrap;
}

.nav-panel__item--active .nav-panel__label {
  color: var(--teal-light);
  text-shadow: 0 0 12px rgba(0, 150, 138, 0.4);
}

.nav-panel__item:hover .nav-panel__label {
  color: var(--cream);
}

.nav-panel__item:hover::before {
  transform: translateY(-50%) scaleY(0.7);
  background: rgba(0, 150, 138, 0.6);
}

/* --------------------------------------------------------------------------
   Legacy Navigation Dots (backward compat)
   -------------------------------------------------------------------------- */
.nav-dots {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-control, 100);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-dots__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all var(--transition-smooth);
  cursor: pointer;
  display: block;
  position: relative;
}

.nav-dots__dot--active {
  background: var(--teal-light);
  border-color: var(--teal-light);
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(0, 150, 138, 0.5);
}

/* Sonar ring on active */
.nav-dots__dot--active::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1px solid rgba(0, 150, 138, 0.3);
  animation: sonarRing 2s ease-out infinite;
}

@keyframes sonarRing {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* ==========================================================================
   HORIZONTAL RULES
   ========================================================================== */
.h-rule {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  margin: var(--space-lg) 0;
}

.h-rule--subtle {
  background: rgba(255, 255, 255, 0.08);
}

.h-rule--teal {
  background: var(--gradient-teal-h);
  height: 2px;
  box-shadow: 0 0 8px rgba(0, 150, 138, 0.2);
}

/* ==========================================================================
   RESPONSIVE — Layout
   ========================================================================== */
@media (max-width: 768px) {

  /* Disable 3D transforms on mobile */
  .viewport-wrapper {
    perspective: none;
  }

  .section {
    transform: none !important;
    opacity: 1 !important;
  }

  .section__content {
    padding: var(--space-xl) var(--space-md);
  }

  /* HUD Frame hidden on mobile */
  .hud-frame {
    display: none;
  }

  /* Nav panel hidden on mobile */
  .nav-panel {
    display: none !important;
  }

  /* Tactical BG and Canvas hidden on mobile for performance */
  .global-tactical-bg, .tactical-canvas {
    display: none !important;
  }

  /* Cursor spotlight off on mobile */
  .cursor-spotlight {
    display: none;
  }
}

/* ==========================================================================
   PRINT STYLES — PDF Generation
   ========================================================================== */
@media print {
  @page {
    size: 1920px 1080px;
    margin: 0;
  }

  html, body {
    background: #002B2A !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    width: 1920px !important;
    height: auto !important;
    min-width: 1920px !important;
    min-height: 100vh !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide UI elements */
  .nav-dots,
  .nav-panel,
  .hud-frame,
  .cursor-spotlight,
  .scanline,
  .tactical-canvas {
    display: none !important;
  }

  .viewport-wrapper {
    perspective: none !important;
  }

  .section {
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    width: 1920px !important;
    height: 1080px !important;
    min-height: 1080px !important;
    max-height: 1080px !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .section:last-of-type {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  .section__content {
    max-width: 1920px !important;
    width: 1920px !important;
    box-sizing: border-box !important;
    height: 1080px !important;
    max-height: 1080px !important;
    padding: 80px 120px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    filter: none !important;
  }

  .hero__eyebrow,
  .hero__title,
  .hero__client {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__bar {
    animation: none !important;
    opacity: 1 !important;
    width: 160px !important;
  }

  .highlight-box {
    animation: none !important;
    opacity: 1 !important;
  }

  ::-webkit-scrollbar {
    display: none;
  }
}

/* --- Premium Grid / Benchmarking Styles --- */

        
          .bm-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 24px;
            width: 100%;
            margin-top: 10px;
          }
          @media (max-width: 1024px) {
            .bm-grid {
              grid-template-columns: 1fr;
              gap: 16px;
            }
          }
          .bm-card {
            background: rgba(27, 43, 65, 0.2);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-top: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 12px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
            position: relative;
            overflow: hidden;
          }
          .bm-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 100%;
            background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
            z-index: 0;
            pointer-events: none;
          }
          .bm-card:hover {
            transform: translateY(-8px);
            border-top: 1px solid rgba(0, 204, 153, 0.4);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 204, 153, 0.1);
          }
          .bm-card-header {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            position: relative;
            z-index: 1;
          }
          .bm-logo-wrapper {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            padding: 4px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
          }
          .bm-logo-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
          }
          .bm-card-header h3 {
            font-family: var(--font-display);
            font-size: 22px;
            color: var(--white);
            margin: 0;
            letter-spacing: 2px;
          }
          .bm-card-body {
            position: relative;
            z-index: 1;
          }
          .bm-card-body h4 {
            color: var(--teal-mid);
            font-size: 10px;
            letter-spacing: 2px;
            margin: 16px 0 8px 0;
            text-transform: uppercase;
          }
          .bm-card-body p {
            font-size: 13px;
            color: var(--silver);
            line-height: 1.5;
            margin-bottom: 12px;
          }
          .bm-card-body p:last-child {
            margin-bottom: 0;
          }
          .bm-footer-box {
            margin-top: 20px;
            background: linear-gradient(90deg, rgba(0, 43, 42, 0.6) 0%, rgba(27, 43, 65, 0.2) 100%);
            border-left: 3px solid var(--teal-mid);
            padding: 20px 24px;
            border-radius: 0 8px 8px 0;
            backdrop-filter: blur(5px);
            display: flex;
            align-items: center;
          }
          .bm-footer-box p {
            margin: 0;
            font-size: 14px;
            color: var(--cream);
            line-height: 1.6;
          }
          .bm-footer-box strong {
            color: var(--white);
            letter-spacing: 1px;
          }
        
/* Logo Perto Studio (Top Corner) */
.perto-top-logo {
  position: absolute;
  top: 40px;
  right: 40px;
  height: 20px;
  z-index: 100;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .perto-top-logo {
    top: 20px;
    right: 20px;
    height: 16px;
  }
}
