/* =========================================================================
   tokens.css - design system do site (global)
   Porta para o Astro: src/styles/global.css
   - tokens + reset + primitivas (tokens)
   - componentes compartilhados pelas duas páginas (header, hero, stats, footer)
   Fontes: trocar '../assets/fonts/' por '/fonts/' (public/fonts no Astro)
   ========================================================================= */

/* ---------- Fontes self-hosted (sem <link> externo em produção) ---------- */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../assets/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../assets/fonts/bricolage-grotesque-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;

  /* superfícies: tema escuro travado, um só tema no site inteiro.
     Um degrau acima do preto puro para não pesar (contraste verificado). */
  --bg: #0d0e12;
  --surface: #131519;
  --surface-strong: #171a20;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.17);

  /* texto */
  --text: #f2f3f5;
  --text-muted: #a6adb8;
  --text-faint: #7d8590;

  /* acento único: âmbar */
  --accent: #ffb224;
  --accent-hover: #ffc24d;
  --accent-ink: #171003;
  --ok: #4ade80;
  --error: #f87171;

  /* tipografia */
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* forma: cantos retos em tudo */
  --radius: 0;

  /* layout */
  --maxw: 1120px;
  --pad-x: clamp(20px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 120px);
  --z-header: 10;
}

/* ---------- Reset ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* ---------- Foco, seleção, atalho ---------- */

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Primitivas ---------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* faixa de fundo mais larga que o container: agrupa seções por ritmo, não por moldura */
.band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.band-strong {
  background: var(--surface-strong);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section-head {
  margin-bottom: clamp(32px, 4.5vw, 52px);
  max-width: 62ch;
}

/* rótulo mono: cabeçalho de seção, grupo, período, tag. Nunca como enfeite. */
.label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.label-accent {
  color: var(--accent);
}

.title-1 {
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  /* manchete de até ~40 caracteres fecha em 2 linhas no desktop */
  max-width: 28ch;
}

.title-2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.title-3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 60ch;
}

/* ênfase dentro de manchete: mesma família, sem serifa intrusa */
em.accent {
  font-style: normal;
  color: var(--accent);
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.85rem;
}

.link-accent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent);
}

.link-accent:hover {
  color: var(--accent-hover);
}

/* chip de tecnologia, tag e certificação */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* slot de imagem real pendente: área reservada, morna e rotulada, nunca print falso */
.slot {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 178, 36, 0.22);
  background: linear-gradient(155deg, rgba(255, 178, 36, 0.07), rgba(255, 178, 36, 0.02) 55%, rgba(255, 178, 36, 0.05));
  padding: 16px;
}

.slot-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.5;
}

.slot-label strong {
  display: block;
  color: var(--text-muted);
  font-weight: 600;
}

/* foto de identidade: cor preservada, moldura âmbar deslocada.
   P&B sobre fundo escuro lia como memorial, então a cor fica. */
.photo {
  border: 1px solid var(--border-strong);
  box-shadow: 14px 14px 0 rgba(255, 178, 36, 0.9);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================================
   Componentes compartilhados pelas duas páginas
   ========================================================================= */

/* ---------- Header.astro ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(13, 14, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav .nav-mentoria {
  color: var(--text);
}

.site-nav .nav-cta {
  font-family: var(--font-display);
  font-weight: 700;
  padding: 9px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  transition: background 0.2s ease, transform 0.15s ease;
}

.site-nav .nav-cta:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.site-nav .nav-cta:active {
  transform: translateY(1px);
}

/* marcador de versão de layout: existe só na prévia, sai no build final */
.nav-opcao {
  border: 1px solid var(--border-strong);
  padding: 6px 10px;
}

/* ---------- Hero.astro (mesmo esqueleto nas duas páginas) ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(56px, 8vw, 88px);
}

.hero-eyebrow {
  margin-bottom: 20px;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-photo {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 5;
  justify-self: end;
}

/* ---------- StatsBar.astro ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 26px clamp(18px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 24ch;
}

/* ---------- Footer.astro ---------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  padding-bottom: 28px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------- Entrada (uma vez, discreta, só sem reduced-motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }

  .hero-copy > *:nth-child(2) {
    animation-delay: 0.08s;
  }

  .hero-copy > *:nth-child(3) {
    animation-delay: 0.16s;
  }

  .hero-copy > *:nth-child(4) {
    animation-delay: 0.24s;
  }

  .hero-photo {
    animation: rise 0.7s 0.15s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Preferências do usuário ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* o header deixa de ser translúcido quando o usuário pede menos transparência */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    backdrop-filter: none;
    background: var(--bg);
  }
}

/* ---------- Colapso mobile dos componentes compartilhados ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }

  .hero-photo {
    justify-self: start;
    max-width: 300px;
    margin-top: 8px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat:nth-child(3) {
    border-left: none;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 860px) {
  /* linha 1: marca + CTA. linha 2: âncoras com scroll horizontal, sem JS. */
  .site-header .container {
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
    row-gap: 10px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    /* sinaliza que a faixa continua à direita */
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .hero-ctas .btn {
    width: 100%;
  }
}
