/* ═══════════════════════════════════════════════════════════
   RESET & BASE
   Reset moderno + estilos base do body, links, mídia.
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens de safe-area (iPhone notch / Dynamic Island / Android cutouts) ── */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* CRÍTICO: html herda mesma cor do body, elimina faixa branca no topo mobile
     (safe-area do iOS, ou quando a barra de URL do Android Chrome encolhe) */
  background: var(--color-deep-forest);
  /* Suporte a notch/dynamic island (iOS) — sem afetar Android */
  background-color: var(--color-deep-forest);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  background: var(--color-deep-forest);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* min-height inteligente: usa svh quando disponível (não pula com URL bar do Safari) */
  min-height: 100vh;
  min-height: 100svh;
}

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

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

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

ul,
ol {
  list-style: none;
}

code,
pre {
  font-family: var(--font-mono);
}

/* ── Acessibilidade ── */
:focus-visible {
  outline: 2px solid var(--color-electric-green);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--color-electric-green);
  color: var(--color-white);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
