/* ==============================================================================
 * SPO — SITE OFICIAL MARIANA NAIME 2026
 * C00 — OPENING EXPERIENCE (CANDIDATE INDEPENDENT LAYER INTEGRATION)
 * File: frontend/assets/css/c00-opening.css
 * ============================================================================== */

/* ------------------------------------------------------------------------------
 * 1. ROOT VARIABLES & STAGE DEFINITIONS
 * ------------------------------------------------------------------------------ */
:root {
  --c00-text-dark: #0B1D34;
  --c00-text-secondary: #123A63;
  --c00-accent-gold: #FFC107;
  --c00-accent-green: #16894A;
  --c00-bg-light: #F4F7FA;
}

/* Global H1 override within #opening or .c00-stage-wrapper to guarantee Sans-Serif */
section#opening h1,
.c00-stage-wrapper h1,
.c00-title-name {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  font-weight: 800 !important;
  font-style: normal !important;
}

/* ------------------------------------------------------------------------------
 * 2. HEADER INTEGRATION (TRANSPARENT, LIGHT ATMOSPHERE)
 * ------------------------------------------------------------------------------ */
header.c00-header-transparent {
  background-color: transparent !important;
  background-image: none !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-bottom: 1px solid rgba(11, 29, 52, 0.08) !important;
  box-shadow: none !important;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Header nav links */
header a {
  color: var(--c00-text-dark) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

header a:hover {
  color: var(--c00-accent-gold) !important;
}

/* Header quiet CTA button (Gold outline style in C00) */
header a.border-2 {
  background-color: transparent !important;
  color: var(--c00-text-dark) !important;
  border: 2px solid var(--c00-accent-gold) !important;
  box-shadow: none !important;
  font-weight: 800 !important;
}

header a.border-2:hover {
  background-color: var(--c00-accent-gold) !important;
  color: var(--c00-text-dark) !important;
}

/* Header mobile toggle button */
header button {
  color: var(--c00-text-dark) !important;
}

/* Header state when scrolled out of C00 (Sleek light glass) */
header.c00-header-scrolled {
  background-color: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(11, 29, 52, 0.12) !important;
  box-shadow: 0 4px 20px rgba(11, 29, 52, 0.06) !important;
}

/* ------------------------------------------------------------------------------
 * 3. C00 MAIN CONTAINER & CANONICAL CLEAN BACKGROUND (FROZEN BACKGROUND)
 * ------------------------------------------------------------------------------ */
.c00-stage-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  background-image: url('/static/assets/hero_bg_brasilia_clean.jpg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--c00-text-dark);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 10;
  isolation: isolate;
}

/* Stage Atmosphere Layer (Subtle contrast protection for text area) */
.c00-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.35) 45%, transparent 75%);
  animation: c00AtmosphereEntrance 1.2s ease-out forwards;
}

/* Main Content Grid */
.c00-content-container {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 48px 0 clamp(80px, 6vw, 90px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  height: 100%;
}

.c00-text-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 420px;
  z-index: 6;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

/* ------------------------------------------------------------------------------
 * 4. OFFICIAL CAMPAIGN SLOGAN (PROTAGONIST EDITORIAL LOCKUP — V2 BRAND LANGUAGE)
 * ------------------------------------------------------------------------------ */

.c00-slogan-title {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  font-size: clamp(1.75rem, 2.3vw, 2.15rem) !important;
  font-weight: 850 !important;
  font-style: italic !important; /* Dynamic oblique forward-leaning angle */
  line-height: 1.12 !important;
  letter-spacing: -0.035em !important;
  text-transform: uppercase !important;
  margin: 0 0 28px 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  opacity: 0;
  transform: translateY(18px);
  animation: c00TitleEntrance 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  text-shadow: 
    0 2px 3px rgba(7, 22, 42, 0.22),
    0 7px 16px rgba(7, 22, 42, 0.16),
    0 14px 32px rgba(46, 115, 205, 0.10) !important;
  max-width: 420px !important; /* Strict container width guaranteeing 80-120px clearance from candidate */
  width: 100%;
}

.c00-slogan-line {
  display: block !important;
  white-space: nowrap !important;
  transform: skewX(-6.5deg);
  transform-origin: left center;
}

.c00-slogan-blue {
  color: #0B1D34 !important; /* Estrutura: Azul-Marinho Profundo Oficial (#0B1D34) */
  font-weight: 850 !important;
}

.c00-slogan-gold,
.c00-slogan-accent {
  color: #2E73CD !important; /* Destaque: Azul Vivo Oficial da Logomarca (#2E73CD) */
  font-weight: 900 !important;
  font-size: 1.06em !important; /* ~6% mais peso/escala visual */
  display: inline-block !important;
}

/* ------------------------------------------------------------------------------
 * 5. CANDIDATE INDEPENDENT PHOTOGRAPHY LAYER (VISUAL PERSON COUNT = 1)
 * ------------------------------------------------------------------------------ */
.c00-photo-presence {
  position: relative;
  right: 270px;
  z-index: 4;
  height: 100%;
  display: flex !important;
  align-items: flex-end;
  justify-content: center;
  padding-right: 0;
  pointer-events: none;
}

/* Camada Atmosférica Difusa Orgânica e Assimétrica (Sem Bordas, Sem Caixa, Sem Halo Completo) */
.c00-photo-presence::before {
  content: "";
  position: absolute;
  top: 15%;
  left: 38%;
  transform: translate(-50%, -15%);
  width: 140%;
  height: 85%;
  background: radial-gradient(
    ellipse at 35% 30%,
    rgba(255, 195, 60, 0.07) 0%,
    rgba(18, 58, 99, 0.03) 45%,
    transparent 70%
  );
  filter: blur(55px);
  pointer-events: none;
  z-index: 2;
  opacity: 0.75;
}

/* Sombra de Contato Discreta na Base */
.c00-photo-presence::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  height: 18px;
  background: radial-gradient(
    ellipse at center,
    rgba(7, 22, 42, 0.35) 0%,
    rgba(7, 22, 42, 0.12) 50%,
    transparent 80%
  );
  filter: blur(8px);
  pointer-events: none;
  z-index: 3;
}

.c00-candidate-img {
  position: relative;
  z-index: 4;
  display: block !important;
  height: 85vh;
  max-height: 820px;
  width: auto;
  object-fit: contain;
  object-position: bottom center;
  /* Integration Filter Stack: Silhouette Alpha Drop-Shadows (Sunset Warm Left + Cold Navy Right + Grounding Depth) */
  filter: 
    drop-shadow(14px 18px 36px rgba(11, 29, 52, 0.18)) 
    drop-shadow(-14px -6px 28px rgba(255, 195, 60, 0.12)) 
    drop-shadow(-8px -10px 16px rgba(244, 203, 21, 0.08)) 
    drop-shadow(10px 6px 26px rgba(18, 58, 99, 0.07));
  /* Base gradient fade mask */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 100%);
  opacity: 0;
  transform: translateY(20px) scale(0.99);
  animation: c00PhotoEntrance 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

/* ------------------------------------------------------------------------------
 * 6. SCROLL INDICATOR
 * ------------------------------------------------------------------------------ */
.c00-scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 48px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: c00FadeIn 1s ease 1.0s forwards;
  cursor: pointer;
  text-decoration: none;
  color: var(--c00-text-secondary);
}

.c00-scroll-arrow {
  font-size: 1.4rem;
  color: var(--c00-accent-gold);
  animation: c00ArrowBounce 2s infinite ease-in-out;
}

.c00-scroll-text {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c00-text-secondary);
}

/* ------------------------------------------------------------------------------
 * 7. ANIMATIONS
 * ------------------------------------------------------------------------------ */
@keyframes c00AtmosphereEntrance {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes c00FadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes c00TitleEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes c00FadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes c00PhotoEntrance {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes c00PhotoEntranceMobile {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes c00ArrowBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

/* ------------------------------------------------------------------------------
 * 8. FIRST SCROLL PREPARATION
 * ------------------------------------------------------------------------------ */
.c00-stage-wrapper.c00-scrolling-out .c00-text-block {
  transform: translateY(-10px);
  opacity: 0.88;
}

.c00-stage-wrapper.c00-scrolling-out .c00-candidate-img {
  opacity: 0.85;
}

/* ------------------------------------------------------------------------------
 * 9. RESPONSIVE RECOMPOSITION (V9 — INDEPENDENT COMPOSITIONS)
 * ------------------------------------------------------------------------------ */

/* ------------------------------------------------------------------------------
 * 9A. DEDICATED TABLET BREAKPOINT (768x1024 VIEWPORTS — V9 RECOMPOSITION)
 * Recompor proporções e posições especificamente para Tablet.
 * ------------------------------------------------------------------------------ */
@media (min-width: 641px) and (max-width: 1024px) {
  .c00-stage-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100vh !important;
    min-height: 100vh !important;
    background-image: url('/static/assets/hero_bg_brasilia_clean.jpg') !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    box-sizing: border-box !important;
  }

  .c00-atmosphere {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.5) 45%, transparent 85%) !important;
  }


  header span.text-\[\#123A63\] {
    font-size: 0.7rem !important;
    padding: 2px 7px !important;
    margin-left: 4px !important;
  }

  /* Tablet Content Grid & Container */
  .c00-content-container {
    position: relative !important;
    z-index: 5 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    padding: 0 40px 60px 40px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    box-sizing: border-box !important;
    grid-template-columns: none !important;
  }

  /* Tablet Candidate Photography Layer */
  .c00-photo-presence {
    position: absolute !important;
    top: auto !important;
    bottom: 0 !important;
    right: 30px !important;
    left: auto !important;
    width: 50vw !important;
    max-width: 440px !important;
    height: 65vh !important;
    max-height: 640px !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    padding-right: 0 !important;
    pointer-events: none !important;
  }

  .c00-photo-presence::before {
    top: 10% !important;
    left: 45% !important;
    width: 120% !important;
    height: 75% !important;
    background: radial-gradient(
      ellipse at 35% 30%,
      rgba(255, 195, 60, 0.06) 0%,
      rgba(18, 58, 99, 0.03) 45%,
      transparent 70%
    ) !important;
    filter: blur(45px) !important;
    opacity: 0.70 !important;
  }

  .c00-photo-presence::after {
    bottom: -4px !important;
    width: 90% !important;
    height: 14px !important;
    filter: blur(6px) !important;
    opacity: 0.30 !important;
  }

  .c00-candidate-img {
    height: 100% !important;
    width: auto !important;
    object-fit: contain !important;
    object-position: bottom right !important;
    filter: 
      drop-shadow(10px 14px 28px rgba(11, 29, 52, 0.16)) 
      drop-shadow(-10px -4px 22px rgba(255, 195, 50, 0.10)) 
      drop-shadow(-6px -8px 14px rgba(244, 203, 21, 0.06)) 
      drop-shadow(8px 4px 22px rgba(18, 58, 99, 0.06)) !important;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 78%, rgba(0, 0, 0, 0.3) 92%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, #000 0%, #000 78%, rgba(0, 0, 0, 0.3) 92%, transparent 100%) !important;
    animation: c00PhotoEntranceMobile 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards !important;
  }

  .c00-stage-wrapper.c00-scrolling-out .c00-candidate-img {
    transform: translateY(-4px) scale(0.99) !important;
    opacity: 0.92 !important;
  }

  /* Tablet Text Block */
  .c00-text-block {
    position: relative !important;
    z-index: 6 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 !important;
    transform: none !important;
  }

  /* Tablet Official Campaign Slogan */
  .c00-slogan-title {
    font-size: clamp(1.4rem, 3.2vw, 1.95rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 20px !important;
    max-width: 380px !important;
  }

  .c00-scroll-indicator {
    position: absolute !important;
    bottom: 20px !important;
    left: 40px !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 8 !important;
  }
}

/* ------------------------------------------------------------------------------
 * 9B. DEDICATED MOBILE BREAKPOINT (390x844 NARROW VIEWPORTS — V9 RECOMPOSITION)
 * Recomposição completa da cena para Mobile:
 * - Header compacto (MN, Mariana Naime, 2026, hambúrguer)
 * - Candidata no topo/centro-direita (cabeça/cabelo inteiros, sem colisão)
 * - Bloco textual na região inferior/esquerda (MARIANA NAIME em 2 linhas)
 * - Cargo e número abaixo do nome
 * - Scroll visível na primeira viewport sem cortes
 * - Background position ajustado para preservar Brasília
 * ------------------------------------------------------------------------------ */
@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* Compact Header Mobile (52px) */
  header,
  header.c00-header-transparent {
    min-height: 52px !important;
    height: 52px !important;
    max-height: 52px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
  }

  header > div {
    height: 100% !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
  }


  /* Hide Desktop Nav in Mobile Viewport */
  header .hidden.lg\:flex,
  header div.hidden.lg\:flex {
    display: none !important;
  }

  header button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px !important;
  }

  /* Mobile Hero Stage Container (Fits strictly inside 390x844 first viewport) */
  .c00-stage-wrapper {
    height: calc(100vh - 52px) !important;
    min-height: calc(100vh - 52px) !important;
    min-height: calc(100svh - 52px) !important;
    max-height: none !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    background-image: url('/static/assets/hero_bg_brasilia_clean.jpg') !important;
    background-position: 70% center !important; /* Preserva Brasília e a atmosfera no mobile */
    background-size: cover !important;
    background-repeat: no-repeat !important;
  }

  /* Mobile Atmosphere Layer for High Legibility & Contrast */
  .c00-atmosphere {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.40) 0%,
      rgba(255, 255, 255, 0.20) 35%,
      rgba(255, 255, 255, 0.75) 68%,
      rgba(255, 255, 255, 0.95) 100%
    ) !important;
  }

  /* Mobile Main Content Container */
  .c00-content-container {
    position: relative !important;
    z-index: 5 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 12px 18px 44px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    box-sizing: border-box !important;
    grid-template-columns: none !important;
  }

  /* Mobile Candidate Photography Layer (Topo / Centro-Direita, Inteira, Sem Colisão) */
  .c00-photo-presence {
    position: absolute !important;
    right: -8px !important;
    bottom: 110px !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: 54vh !important;
    max-height: 430px !important;
    transform: translateY(-20px) !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    padding-right: 0 !important;
    pointer-events: none !important;
  }

  .c00-photo-presence::before {
    top: 5% !important;
    left: 45% !important;
    width: 110% !important;
    height: 65% !important;
    background: radial-gradient(
      ellipse at 35% 30%,
      rgba(255, 195, 60, 0.05) 0%,
      rgba(18, 58, 99, 0.02) 45%,
      transparent 70%
    ) !important;
    filter: blur(35px) !important;
    opacity: 0.65 !important;
  }

  .c00-photo-presence::after {
    bottom: -2px !important;
    width: 95% !important;
    height: 12px !important;
    filter: blur(5px) !important;
    opacity: 0.25 !important;
  }

  .c00-candidate-img {
    height: 100% !important;
    width: auto !important;
    object-fit: contain !important;
    object-position: top right !important;
    filter: 
      drop-shadow(8px 10px 22px rgba(11, 29, 52, 0.15)) 
      drop-shadow(-8px -3px 18px rgba(255, 195, 50, 0.09)) 
      drop-shadow(-5px -6px 12px rgba(244, 203, 21, 0.05)) 
      drop-shadow(6px 3px 18px rgba(18, 58, 99, 0.05)) !important;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 82%, rgba(0, 0, 0, 0.2) 94%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, #000 0%, #000 82%, rgba(0, 0, 0, 0.2) 94%, transparent 100%) !important;
    animation: c00PhotoEntranceMobile 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards !important;
  }

  /* Mobile Text Block (Inferior / Esquerda) */
  .c00-text-block {
    position: relative !important;
    z-index: 6 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 85% !important;
    margin: 0 !important;
    transform: none !important;
  }

  /* Mobile Official Campaign Slogan */
  .c00-slogan-title {
    font-size: clamp(1.15rem, 4.8vw, 1.45rem) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 14px !important;
    gap: 4px !important;
    max-width: 82% !important;
  }

  .c00-slogan-line {
    white-space: normal !important;
  }

  /* Mobile Scroll Indicator (Visível na 1ª Viewport) */
  .c00-scroll-indicator {
    position: absolute !important;
    bottom: 10px !important;
    left: 18px !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 8 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
  }

  .c00-scroll-arrow {
    font-size: 1.2rem !important;
  }

  .c00-scroll-text {
    font-size: 0.65rem !important;
    letter-spacing: 0.18em !important;
  }
}

/* ------------------------------------------------------------------------------
 * 10. ACCESSIBILITY — REDUCED MOTION
 * ------------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {

  .c00-atmosphere,
  .c00-photo-presence,
  .c00-candidate-img,
  .c00-slogan-title,
  .c00-scroll-indicator {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .c00-scroll-arrow {
    animation: none !important;
  }
}