/* ============================================
   CEO DESIGN — Folha de Estilos Principal
   Tema escuro premium com acentos vermelhos
   ============================================ */

/* ----- Variáveis de Design ----- */
:root {
  /* Paleta de cores */
  --bg-darker: #050505;
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --brand-accent: #E60023;
  --brand-secondary: #FF3366;
  --brand-gradient: linear-gradient(135deg, #E60023, #FF3366);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-light: rgba(255, 255, 255, 0.1);

  /* Tipografia */
  --font-main: 'Montserrat', sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;

  /* Espaçamento */
  --section-padding: 120px;
  --container-max: 1280px;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-full: 9999px;

  /* Transições */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-reveal: 0.9s cubic-bezier(0.16, 1, 0.3, 1);

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(230, 0, 35, 0.3);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: var(--font-weight-regular);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Impedir scroll quando modal ou menu mobile estiver aberto */
body.no-scroll {
  overflow: hidden;
}

/* ----- Scrollbar Personalizada ----- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-accent);
  border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-secondary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--brand-accent) var(--bg-darker);
}

/* ----- Seleção de Texto ----- */
::selection {
  background-color: var(--brand-accent);
  color: var(--text-primary);
}

::-moz-selection {
  background-color: var(--brand-accent);
  color: var(--text-primary);
}

/* ----- Links Base ----- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}


/* ============================================
   TIPOGRAFIA
   ============================================ */

/* Texto com gradiente vermelho → rosa */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Texto com contorno / outline para títulos grandes */
.text-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text-primary);
  text-stroke: 1.5px var(--text-primary);
  transition: all var(--transition-base);
}

.text-outline:hover {
  -webkit-text-stroke: 1.5px var(--brand-accent);
  text-stroke: 1.5px var(--brand-accent);
}

/* Rótulo de seção: pequeno, maiúsculo, espaçado */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--brand-accent);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2rem;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 2px;
  background: var(--brand-accent);
}


/* ============================================
   ANIMAÇÕES DE SCROLL REVEAL
   ============================================ */

/* Revelar de baixo para cima (padrão) */
.reveal {
  opacity: 0;
  transform: translateY(50px) scale(0.97);
  transition: opacity var(--transition-reveal),
              transform var(--transition-reveal);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Revelar da esquerda */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity var(--transition-reveal),
              transform var(--transition-reveal);
  will-change: opacity, transform;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Revelar da direita */
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity var(--transition-reveal),
              transform var(--transition-reveal);
  will-change: opacity, transform;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Revelar com escala */
.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-reveal),
              transform var(--transition-reveal);
  will-change: opacity, transform;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Atrasos escalonados para grupos de elementos */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }


/* ============================================
   GLASSMORPHISM
   ============================================ */

.glass-panel {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-md);
}


/* ============================================
   EFEITOS NEON / BRILHO
   ============================================ */

/* Brilho de caixa vermelho */
.neon-glow {
  box-shadow: 0 0 15px rgba(230, 0, 35, 0.2),
              0 0 30px rgba(230, 0, 35, 0.1);
  transition: box-shadow var(--transition-base);
}

.neon-glow:hover {
  box-shadow: 0 0 20px rgba(230, 0, 35, 0.4),
              0 0 40px rgba(230, 0, 35, 0.2),
              0 0 60px rgba(230, 0, 35, 0.1);
}

/* Borda animada com gradiente rotativo */
.neon-border {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.neon-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg,
    var(--brand-accent),
    var(--brand-secondary),
    var(--brand-accent),
    var(--brand-secondary)
  );
  background-size: 400% 100%;
  animation: neonGlow 8s linear infinite;
  z-index: -1;
  border-radius: inherit;
}

.neon-border::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--bg-card);
  border-radius: inherit;
  z-index: -1;
}

/* Texto com brilho neon */
.neon-text {
  text-shadow:
    0 0 10px rgba(230, 0, 35, 0.5),
    0 0 20px rgba(230, 0, 35, 0.3),
    0 0 40px rgba(230, 0, 35, 0.15);
}


/* ============================================
   TEXTO ROTATIVO (HERO)
   ============================================ */

.rotating-text-wrapper {
  display: inline-block;
  overflow: hidden;
  height: 1.2em;
  vertical-align: bottom;
  position: relative;
}

.rotating-text {
  display: flex;
  flex-direction: column;
  animation: rotateText 9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.rotating-text span {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
}

@keyframes gradientFloat {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Base Classes */
body { transform: translateY(0); }

@keyframes rotateText {
  0%, 26%    { transform: translateY(0); }
  33%, 59%   { transform: translateY(-33.333%); }
  66%, 92%   { transform: translateY(-66.666%); }
  100%       { transform: translateY(0); }
}


/* ============================================
   MARQUEE / SCROLL INFINITO
   ============================================ */

.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
  display: flex;
  animation: marqueeScroll 25s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Itens dentro do marquee */
.marquee-item {
  display: inline-flex;
  align-items: center;
  padding: 0 2rem;
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--transition-fast);
}

.marquee-item:hover {
  color: var(--brand-accent);
}

/* Separador entre itens do marquee */
.marquee-separator {
  color: var(--brand-accent);
  padding: 0 0.5rem;
  font-size: 1.2rem;
}


/* ============================================
   PARALLAX
   ============================================ */

.parallax-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Fallback para mobile (iOS não suporta background-attachment: fixed) */
@supports (-webkit-touch-callout: none) {
  .parallax-bg {
    background-attachment: scroll;
  }
}


/* ============================================
   SISTEMA DE MODAL
   ============================================ */

/* Overlay escuro com blur */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

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

/* Conteúdo do modal */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

/* Scrollbar customizada dentro do modal */
.modal-content::-webkit-scrollbar {
  width: 4px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(230, 0, 35, 0.4);
  border-radius: var(--border-radius-full);
}

/* Botão de fechar o modal */
.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.8);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  transform: rotate(90deg);
}

/* Cabeçalho do modal */
.modal-header {
  padding: 2.5rem 2.5rem 1.5rem;
}

.modal-body {
  padding: 0 2.5rem 2.5rem;
}

/* Imagem do modal */
.modal-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}


/* ============================================
   ANIMAÇÃO DE CONTADOR
   ============================================ */

.counter {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}


/* ============================================
   CARDS & EFEITOS DE HOVER
   ============================================ */

/* Elevação suave ao passar o mouse */
.card-hover {
  transition: transform var(--transition-smooth),
              box-shadow var(--transition-smooth);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Brilho diagonal que varre o card no hover */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 55%,
    transparent 60%
  );
  transform: translateX(-100%) translateY(-100%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.card-shine:hover::after {
  transform: translateX(30%) translateY(30%);
}

/* Revelação de imagem: P&B → colorida + zoom */
.image-reveal {
  overflow: hidden;
  border-radius: var(--border-radius-md);
}

.image-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transform: scale(1.05);
  transition: filter 0.6s ease, transform 0.6s ease;
}

.image-reveal:hover img {
  filter: grayscale(0%);
  transform: scale(1);
}


/* ============================================
   COLEÇÃO DE KEYFRAMES
   ============================================ */

/* Brilho neon: rotação de gradiente */
@keyframes neonGlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 400% 50%; }
  100% { background-position: 0% 50%; }
}

/* Flutuação suave */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-20px); }
}

/* Pulso vermelho */
@keyframes pulse-red {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(230, 0, 35, 0.4);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(230, 0, 35, 0);
  }
}

/* Deslizar para cima */
@keyframes slideUp {
  0%   { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Fade in */
@keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* Escalar para dentro */
@keyframes scaleIn {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Rotação lenta */
@keyframes spin-slow {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Shimmer / efeito de carregamento */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Piscar cursor (efeito digitação) */
@keyframes blink-caret {
  0%, 100% { border-color: transparent; }
  50%      { border-color: var(--brand-accent); }
}


/* ============================================
   UTILITÁRIOS DE ANIMAÇÃO
   ============================================ */

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spin-slow 8s linear infinite;
}

.animate-pulse-red {
  animation: pulse-red 2s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.6s ease forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


/* ============================================
   UTILITÁRIOS GERAIS
   ============================================ */

/* Cursor do tipo digitação */
.type-cursor::after {
  content: '|';
  animation: blink-caret 0.8s step-end infinite;
  color: var(--brand-accent);
  font-weight: var(--font-weight-light);
}

/* Linha divisória sutil */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
  border: none;
}

/* Destaque de tag / badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--border-radius-full);
  background: rgba(230, 0, 35, 0.15);
  color: var(--brand-accent);
  border: 1px solid rgba(230, 0, 35, 0.25);
}

/* Overlay de gradiente sobre imagens */
.overlay-gradient {
  position: relative;
}

.overlay-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-dark), transparent 60%);
  pointer-events: none;
}


/* ============================================
   RESPONSIVO
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .modal-content {
    max-width: 95%;
    max-height: 90vh;
  }

  .modal-image {
    height: 220px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  html {
    font-size: 15px;
  }

  /* Reduzir efeito de reveal no mobile */
  .reveal {
    transform: translateY(30px) scale(0.98);
  }

  .reveal-left {
    transform: translateX(-30px);
  }

  .reveal-right {
    transform: translateX(30px);
  }

  /* Parallax desativado no mobile */
  .parallax-bg {
    background-attachment: scroll;
  }

  /* Modal em tela cheia no mobile */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  }

  .modal-header {
    padding: 2rem 1.5rem 1rem;
  }

  .modal-body {
    padding: 0 1.5rem 2rem;
  }

  .modal-image {
    height: 180px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  }

  /* Marquee mais compacto */
  .marquee-item {
    font-size: 1.1rem;
    padding: 0 1.2rem;
  }

  /* Texto rotativo menor */
  .rotating-text-wrapper {
    height: 1.15em;
  }
}

/* Mobile pequeno */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .section-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    padding-left: 1.5rem;
  }

  .section-label::before {
    width: 0.8rem;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    top: 1rem;
    right: 1rem;
  }
}

/* Respeitar preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .marquee-track {
    animation: none;
  }
}
