/* ==========================================================================
   BTCMP STRATA — base.css
   Reset moderno + Design Tokens + Tipografia base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Lenis assume o controle quando ativo (evita conflito com smooth nativo) */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* clip (em vez de hidden) corta o transbordo horizontal sem criar
     scroll container — preserva o position: sticky do card viajante */
  overflow-x: clip;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

strong,
b {
  font-weight: 700;
  color: var(--text-strong);
}

::selection {
  background: var(--ice-300);
  color: var(--bg);
}

/* ---------- Design Tokens ---------- */
:root {
  /* Cores base */
  --bg: #01080e;
  --bg-elev: #061119;
  --bg-soft: #08131d;

  /* Tons de gelo (extraídos do logo / iceberg) */
  --ice-50:  #f7fcff;
  --ice-100: #eaf3f9;
  --ice-200: #c9d8e2;
  --ice-300: #91a9b8;
  --ice-400: #5f7b8c;
  --ice-500: #46667a;

  /* Dourado premium (extraído do card) */
  --gold:      #e6c77e;
  --gold-soft: #f0dca6;
  --gold-deep: #c9a24b;

  /* Texto */
  --text:        #d7e2ea;
  --text-strong: #f4f9fc;
  --text-muted:  #8ea2b1;
  --text-dim:    #5c707e;

  /* Tipografia */
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-body: clamp(1rem, 0.96rem + 0.3vw, 1.125rem);

  /* Espaçamento / layout */
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(5rem, 12vw, 11rem);

  /* Raios */
  --radius-pill: 999px;
  --radius-lg: 22px;

  /* Sombras / brilhos */
  --shadow-soft: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --glow-ice: 0 18px 60px -16px rgba(95, 184, 230, 0.45);
  --glow-gold: 0 18px 60px -16px rgba(230, 199, 126, 0.35);

  /* Transições */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Camadas (z-index scale) */
  --z-base: 1;
  --z-overlay: 10;
  --z-content: 20;
  --z-header: 40;
  --z-progress: 50;

  /* Mantém a UI estável quando a barra de rolagem some (Lenis) */
  scrollbar-gutter: stable;
}

/* ---------- Tipografia base ---------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

p {
  text-wrap: pretty;
}

/* ---------- Utilidades ---------- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--ice-50);
  color: var(--bg);
  font-weight: 600;
  border-radius: 10px;
  transition: top 0.25s var(--ease-out);
}
.skip-link:focus {
  top: 1rem;
}

/* Foco visível e consistente para navegação por teclado */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--ice-200);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Preferência por menos movimento ---------- */
@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;
    scroll-behavior: auto !important;
  }
}
