/* ==========================================================================
   DESIGN SYSTEM - OITTO HUB
   Cores:
   - Azul Petróleo (Principal): #013441
   - Coral (Acento/Glow): #EC5F52
   - Marfim (Texto/Secundária): #F6F2E6
   ========================================================================== */

:root {
  --color-petroleo: #013441;
  --color-petroleo-light: #02485a;
  --color-coral: #EC5F52;
  --color-marfim: #F6F2E6;
  --font-brand: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-height: 80px;
}

/* Reset básico e Moderno */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-petroleo);
  color: var(--color-marfim);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  width: 100vw;
}

/* ==========================================================================
   ESTILOS DO PRELOADER
   ========================================================================== */

.preloader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-petroleo);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.8s;
  padding: 20px;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.logo-wrapper {
  width: 150px;
  height: 150px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pulse-glow {
  animation: slowGlow 2.5s ease-in-out infinite;
  will-change: transform, filter, opacity;
}

@keyframes slowGlow {
  0% {
    transform: scale(0.96);
    filter: drop-shadow(0 0 12px rgba(236, 95, 82, 0.35)) opacity(0.8);
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 28px rgba(236, 95, 82, 0.75)) opacity(1);
  }
  100% {
    transform: scale(0.96);
    filter: drop-shadow(0 0 12px rgba(236, 95, 82, 0.35)) opacity(0.8);
  }
}

.loader-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-bar-container {
  width: 85%;
  max-width: 320px;
  height: 6px;
  background-color: rgba(246, 242, 230, 0.12);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(246, 242, 230, 0.05);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--color-coral);
  border-radius: 20px;
  box-shadow: 0 0 12px var(--color-coral);
  transition: width 0.1s linear;
}

.loading-text-container {
  margin-top: 18px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-phrase-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-marfim);
  opacity: 0.75;
  letter-spacing: 0.05em;
  transition: opacity 0.25s ease-in-out;
}

.loading-phrase-text.fade-out {
  opacity: 0;
}

/* ==========================================================================
   TOP BAR (HEADER) - Glassmorphism
   ========================================================================== */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(1, 52, 65, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(246, 242, 230, 0.05);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.top-bar-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  position: relative;
}

/* Onde a logo vai ficar ancorada no final do scroll */
.logo-anchor {
  width: 60px;
  height: 60px;
  visibility: hidden; /* Apenas pra guardar o espaço pro cálculo JS se precisar, ou apenas como guia visual */
}


/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */
.main-layout {
  width: 100%;
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease-in-out;
  position: relative;
}

.section {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
  position: relative;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* PARALLAX LOGO */
.parallax-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001; /* Fica por cima de tudo, incluindo header e sections */
  display: flex;
  align-items: center;
  justify-content: center;
  /* A transição é gerenciada pelo JS para suavidade ou via CSS se for state-based */
  transition: all 0.1s ease-out; 
  pointer-events: none; /* Pra não bloquear cliques no header ou forms */
}

.parallax-content {
  display: flex;
  flex-direction: column; /* Começa como coluna no centro da tela */
  align-items: center;
  gap: 10px;
  transform-origin: center center;
}

.main-illustration {
  width: 250px; /* Definido explicitamente aqui agora */
  height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* HERO SCROLL (Apenas pra dar altura) */
.hero-section {
  justify-content: flex-end; /* Coloca o indicador de scroll no fundo */
}

.scroll-indicator {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0.7;
}

.scroll-text {
  font-family: var(--font-brand);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: lowercase;
}

.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--color-marfim);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--color-coral);
  border-radius: 4px;
  animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(15px); opacity: 0; }
}

/* ABOUT SECTION (TEXTO) */
.about-section {
  background: linear-gradient(180deg, var(--color-petroleo) 0%, rgba(2, 72, 90, 0.4) 100%);
}

.main-title {
  font-family: var(--font-brand);
  font-size: 4rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  color: var(--color-marfim);
  margin-bottom: 8px;
}

.main-title span {
  font-weight: 700;
  color: var(--color-coral);
}

.subtitle {
  font-family: var(--font-brand);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-marfim);
  opacity: 0.9;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.subtitle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-coral);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--color-coral);
}

.description-text {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-marfim);
  opacity: 0.8;
  letter-spacing: 0.02em;
}

/* TEAM SECTION */
.team-section {
  background-color: var(--color-petroleo-light); /* Fundo um pouco mais claro para destacar entre as seções escuras */
  padding: 100px 20px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 50px;
  width: 100%;
}

.team-card {
  background: rgba(246, 242, 230, 0.03);
  border: 1px solid rgba(246, 242, 230, 0.05);
  border-radius: 20px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  border-color: rgba(236, 95, 82, 0.2);
}

.team-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 24px;
  border: 4px solid var(--color-coral);
  box-shadow: 0 10px 20px rgba(236, 95, 82, 0.2);
  transition: transform 0.5s ease;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-card:hover .team-avatar img {
  transform: scale(1.1);
}

.team-info h3 {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-marfim);
  margin-bottom: 5px;
}

.team-role {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-coral);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.team-bio {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-marfim);
  opacity: 0.8;
}

/* PROJECTS SECTION */
.projects-section {
  background-color: var(--color-petroleo);
  padding: 100px 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
  width: 100%;
}

.project-card {
  background: rgba(246, 242, 230, 0.03);
  border: 1px solid rgba(246, 242, 230, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: rgba(236, 95, 82, 0.3);
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: 24px;
  text-align: left;
}

.project-info h3 {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-marfim);
  margin-bottom: 8px;
}

.project-info p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-coral);
  opacity: 0.9;
}

/* CONTACT SECTION */
.contact-section {
  background-color: var(--color-petroleo-light);
  min-height: auto;
  padding: 100px 20px;
}

.section-title {
  font-family: var(--font-brand);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-marfim);
  margin-bottom: 10px;
}

.contact-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: 40px;
}

/* Glassmorphism Form */
.contact-form {
  background: rgba(246, 242, 230, 0.03);
  border: 1px solid rgba(246, 242, 230, 0.1);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .input-group {
  flex: 1;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-family: var(--font-brand);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-marfim);
  opacity: 0.9;
}

.input-group input,
.input-group textarea {
  width: 100%;
  background: rgba(1, 52, 65, 0.5);
  border: 1px solid rgba(246, 242, 230, 0.2);
  border-radius: 10px;
  padding: 16px;
  color: var(--color-marfim);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: rgba(246, 242, 230, 0.3);
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--color-coral);
  background: rgba(1, 52, 65, 0.8);
  box-shadow: 0 0 15px rgba(236, 95, 82, 0.2);
}

.submit-btn {
  background-color: var(--color-coral);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 18px;
  font-family: var(--font-brand);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 10px 20px rgba(236, 95, 82, 0.3);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(236, 95, 82, 0.5);
  background-color: #f07368;
}

/* RODAPÉ */
.footer {
  background-color: var(--color-petroleo);
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid rgba(246, 242, 230, 0.05);
}

.footer-content p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--color-marfim);
  opacity: 0.5;
}

/* REVEAL ANIMATIONS (Intersection Observer) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

/* ==========================================================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 24px;
  }
  
  .main-title {
    font-size: 3rem;
  }
  
  .parallax-logo {
    width: 200px;
    height: 200px;
  }
  
  .contact-form {
    padding: 25px;
  }
}

@media (max-width: 480px) {
  .logo-wrapper {
    width: 120px;
    height: 120px;
  }

  .main-title {
    font-size: 2.2rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .parallax-logo {
    width: 150px;
    height: 150px;
  }
}

@media (min-width: 1200px) {
  .parallax-logo {
    width: 350px;
    height: 350px;
  }
  
  .main-title {
    font-size: 5rem;
  }
}
