/* ==========================================================================
   REAL CUSTO — BASE
   Reset, tipografia global e helpers de layout.
   Importar DEPOIS de tokens.css, ANTES de components.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-snug);
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

img, picture, video, svg {
  display: block;
  max-width: 100%;
}

ul, ol { list-style: none; margin: 0; padding: 0; }

button, input, textarea, select {
  font: inherit;
  margin: 0;
}

button { cursor: pointer; border: none; background: none; padding: 0; }

/* --------------------------------------------------------------------------
   TIPOGRAFIA — classes utilitárias
   -------------------------------------------------------------------------- */

/* Headings */
.h1 { font-size: var(--text-6xl); font-weight: var(--weight-black); letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); }
.h2 { font-size: var(--text-5xl); font-weight: var(--weight-bold);  letter-spacing: var(--tracking-snug); line-height: var(--leading-tight); }
.h3 { font-size: var(--text-4xl); font-weight: var(--weight-bold);  letter-spacing: var(--tracking-snug); line-height: var(--leading-snug); }
.h4 { font-size: var(--text-3xl); font-weight: var(--weight-semi);  letter-spacing: var(--tracking-snug); line-height: var(--leading-snug); }
.h5 { font-size: var(--text-2xl); font-weight: var(--weight-semi);  line-height: var(--leading-snug); }
.h6 { font-size: var(--text-xl);  font-weight: var(--weight-semi);  line-height: var(--leading-snug); }

/* Hero específico */
.display { font-size: var(--text-7xl); font-weight: var(--weight-black); letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); }

/* Corpo */
.body-lg  { font-size: var(--text-md);   line-height: var(--leading-relaxed); }
.body-md  { font-size: var(--text-base); line-height: var(--leading-relaxed); }
.body-sm  { font-size: var(--text-sm);   line-height: var(--leading-relaxed); }

/* Label / uppercase */
.label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

/* Cores de texto */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-inverse   { color: var(--text-inverse); }
.text-accent    { color: var(--accent); }
.text-gold      { color: var(--gold); }
.text-navy      { color: var(--brand-navy); }

/* --------------------------------------------------------------------------
   LAYOUT — container e grid
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + var(--container-pad) * 2);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.container-sm {
  max-width: calc(800px + var(--container-pad) * 2);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: var(--grid-gap);
}

.grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--grid-gap); }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--grid-gap); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

/* Flex helpers */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.gap-2  { gap: var(--space-2); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

/* --------------------------------------------------------------------------
   SEÇÕES — superfícies e padding
   -------------------------------------------------------------------------- */
.section {
  padding: var(--section-pad-y) 0;
  position: relative;
}

.section-light    { background: var(--surface-light); }
.section-light-alt { background: var(--surface-light-alt); }
.section-dark     { background: var(--surface-dark); }
.section-darker   { background: var(--surface-darker); }
.section-gradient { background: var(--gradient-hero); }

/* Texto automático em seções escuras */
.section-dark,
.section-darker,
.section-gradient {
  color: var(--text-inverse);
}

.section-dark .text-secondary,
.section-darker .text-secondary,
.section-gradient .text-secondary {
  color: var(--text-inverse-muted);
}

/* --------------------------------------------------------------------------
   ANIMAÇÕES DE SCROLL (via JS — classe adicionada por main.js)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* --------------------------------------------------------------------------
   UTILITÁRIOS
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.no-scroll { overflow: hidden; }

.text-center { text-align: center; }
.text-left   { text-align: left; }

.w-full  { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Visibilidade responsiva */
@media (max-width: 768px)  { .hide-mobile { display: none !important; } }
@media (min-width: 769px)  { .hide-desktop { display: none !important; } }

/* ---- NAV DESKTOP — garante links visíveis acima do breakpoint ---- */
@media (min-width: 1025px) {
  .nav__links { display: flex; align-items: center; gap: var(--space-1); list-style: none; }
}

/* ---- NAV MOBILE ---- */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-md);
}
.nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--neutral-0);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* Animação X ao abrir */
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1024px) {
  .nav__toggle { display: flex; }

  .nav__cta { display: none; }

  .nav__links {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    background: var(--brand-navy);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    z-index: 99;
    padding: var(--space-8);
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { list-style: none; }
  .nav__links .nav__link {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: #ffffff !important;
    letter-spacing: var(--tracking-wide);
    text-shadow: none;
    opacity: 1 !important;
  }
  .nav__links .nav__link--login {
    border: 1px solid rgba(255,255,255,0.60) !important;
    color: #ffffff !important;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--text-md) !important;
  }
}

/* ================================================================
   NAV DROPDOWN — Treinamentos
   ================================================================ */
.nav__item--dropdown { position: relative; }
.nav__dropdown-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  font: inherit; padding: 0; line-height: inherit;
}
.nav__chevron { width: 14px; height: 14px; transition: transform 0.2s ease; flex-shrink: 0; }

.nav__dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 290px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,20,78,0.14);
  padding: 8px;
  list-style: none;
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}
/* ponte invisível p/ o hover não cair no gap */
.nav__item--dropdown::after {
  content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 16px;
}
.nav__item--dropdown:hover .nav__dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav__item--dropdown:hover .nav__chevron { transform: rotate(180deg); }

.nav__dropdown li { list-style: none; }
.nav__dropdown-link {
  display: block; padding: 11px 14px; border-radius: 9px;
  color: var(--text-secondary); text-decoration: none;
  font-size: var(--text-sm); font-weight: var(--weight-medium);
  white-space: nowrap; transition: background 0.15s ease, color 0.15s ease;
}
.nav__dropdown-link:hover { background: var(--neutral-50); color: var(--accent); }

/* ---- DROPDOWN RICO (título + frase de posicionamento) ---- */
.nav__dropdown--rich { min-width: 320px; padding: 10px; }
.nav__dropdown-eyebrow {
  list-style: none;
  font-size: 11px; font-weight: var(--weight-semi); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 6px 14px 8px;
}
.nav__dropdown-link--rich { white-space: normal; padding: 10px 14px; }
.nav__dropdown-title { display: block; font-size: var(--text-sm); font-weight: var(--weight-semi); color: var(--text-primary); }
.nav__dropdown-link--rich:hover .nav__dropdown-title,
.nav__dropdown-link--rich.active .nav__dropdown-title { color: var(--accent); }
.nav__dropdown-desc { display: block; font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; line-height: 1.45; white-space: normal; }

/* ---- DROPDOWN no MOBILE (dentro do menu sanduíche) ---- */
@media (max-width: 1024px) {
  .nav__item--dropdown { width: 100%; }
  .nav__item--dropdown::after { display: none; }
  .nav__dropdown-toggle {
    justify-content: center; width: 100%;
    font-size: var(--text-xl); font-weight: var(--weight-bold);
    color: #fff !important;
  }
  .nav__chevron { width: 18px; height: 18px; }
  .nav__item--dropdown.is-open .nav__chevron { transform: rotate(180deg); }
  .nav__dropdown {
    position: static; transform: none;
    opacity: 1; visibility: visible;
    min-width: auto; background: transparent;
    border: none; box-shadow: none; padding: 0;
    margin-top: 10px;
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
  }
  /* anula o translateX(-50%) do hover de desktop dentro do menu sanduíche */
  .nav__item--dropdown:hover .nav__dropdown { transform: none; }
  .nav__dropdown.is-open { max-height: 420px; }
  .nav__dropdown-link {
    color: rgba(255,255,255,0.70) !important;
    font-size: var(--text-md); text-align: center;
    padding: 10px; white-space: normal;
  }
  .nav__dropdown-link:hover { background: rgba(255,255,255,0.08); color: #fff !important; }

  /* rico no mobile: mostra só o título, esconde eyebrow e descrição */
  .nav__dropdown--rich { min-width: auto; }
  .nav__dropdown-eyebrow, .nav__dropdown-desc { display: none; }
  .nav__dropdown-title { color: inherit; font-weight: var(--weight-medium); }
}

/* --------------------------------------------------------------------------
   QUOTE CARDS — depoimentos escritos (reutilizável em qualquer página)
   -------------------------------------------------------------------------- */
.quotes-strip { padding: var(--space-20) 0; background: var(--surface-light); }
.quotes-strip__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  padding-inline: var(--space-6);
}
.quote-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: background var(--duration-base) var(--ease-out);
}
.quote-card__stars { color: var(--brand-gold, #F8BA00); font-size: var(--text-sm); letter-spacing: 1px; }
.quote-card__text { font-size: var(--text-md); line-height: var(--leading-relaxed); }
.quote-card__text::before { content: '\201C'; color: var(--accent); font-weight: 800; }
.quote-card__text::after  { content: '\201D'; color: var(--accent); font-weight: 800; }
.quote-card__identity { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; }
.quote-card__photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.quote-card__author { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; }
.quote-card__company { font-size: var(--text-xs); }

@media (max-width: 640px) {
  .quotes-strip__grid { grid-template-columns: 1fr; }
}
