/* ============================================================
   Fernando Nóbrega — Design System (CSS puro)
   Tokens, tipografia, utilitários e animações globais.
============================================================ */

/* ─── Fontes Google ─── */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Fraunces:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap");

/* ─── Tokens ─── */
:root {
  /* Cores base */
  --background: #ffffff;
  --background-alt: #fafafa;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-deep: #0a0a0b;

  --foreground: #0a0a0b;
  --text-1: #0a0a0b;
  --text-2: #52525b;
  --text-3: #71717a;
  --muted: #71717a;
  --muted-strong: #52525b;

  --border: rgba(10, 10, 11, 0.08);
  --border-strong: rgba(10, 10, 11, 0.14);
  --border-1: rgba(10, 10, 11, 0.06);
  --border-2: rgba(10, 10, 11, 0.12);

  /* Acentos iris */
  --iris-1: #6366f1;
  --iris-2: #a855f7;
  --iris-3: #ec4899;
  --iris-4: #fb923c;
  --accent-solo: #6366f1;
  --cyan: #06b6d4;
  --emerald: #10b981;

  /* Tipografia */
  --font-display: "Geist", system-ui, -apple-system, sans-serif;
  --font-body: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
  --font-serif: "Fraunces", "Times New Roman", Georgia, serif;

  /* Escala tipográfica */
  --text-meta: 0.6875rem;
  --text-caption: 0.75rem;
  --text-body-sm: 0.875rem;
  --text-body: 1rem;
  --text-body-lg: 1.125rem;
  --text-display-3: 1.5rem;
  --text-display-2: 2rem;
  --text-display-1: 3.25rem;

  /* Motion */
  --ease-out-quart: cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.5, 0, 0.2, 1);
  --duration-fast: 180ms;
  --duration-base: 300ms;
  --duration-slow: 600ms;
}

/* ─── Reset + base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

html {
  background: var(--background);
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
  font-variant-numeric: tabular-nums;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

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

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

::selection {
  background: var(--iris-2);
  color: white;
}

/* ─── Containers ─── */
.envoltorio-secao {
  width: 100%;
  position: relative;
}
.interior-secao {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .interior-secao {
    padding: 0 2rem;
  }
}

/* ─── Section alt (background alternado) ─── */
.secao-alt {
  background: var(--background-alt);
  position: relative;
}
.secao-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.secao-alt > * {
  position: relative;
  z-index: 1;
}

/* ─── Tipografia ─── */
.fonte-display {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}
.fonte-mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss06";
}
.fonte-serif {
  font-family: var(--font-serif);
}

.display-1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.2vw, var(--text-display-1));
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
}
.display-2 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3.4vw, var(--text-display-2));
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}
.display-3 {
  font-family: var(--font-display);
  font-size: var(--text-display-3);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.serif-acento {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text-2);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Eyebrow */
.sobrancelha {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 600;
  margin: 0;
}
.sobrancelha::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  background: rgba(10, 10, 11, 0.3);
}

/* Caption mono */
.legenda-mono {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin: 0;
  text-transform: lowercase;
}

/* ─── Gradientes em texto ─── */
.texto-iris,
.texto-iris-azul {
  display: inline-block;
  background: linear-gradient(95deg, #06b6d4 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.bg-iris {
  background: linear-gradient(95deg, #06b6d4 0%, #8b5cf6 50%, #ec4899 100%);
}

.texto-appfut {
  display: inline;
  background: linear-gradient(
    95deg,
    #2e9421 0%,
    #66c42a 18%,
    #b4d12a 42%,
    #e8c91c 68%,
    #f5d11a 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  word-break: normal;
  overflow-wrap: break-word;
}

.texto-bichorural-laranja,
.texto-laranja {
  display: inline;
  background: linear-gradient(
    95deg,
    #fdba74 0%,
    #fb923c 30%,
    #f97316 60%,
    #ea580c 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  word-break: normal;
  overflow-wrap: break-word;
}

/* ─── Bento card ─── */
.bento {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition:
    transform 350ms var(--ease-out-quart),
    box-shadow 350ms ease,
    border-color 350ms ease;
}
.bento:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow:
    0 24px 48px -16px rgba(28, 21, 60, 0.15),
    0 0 0 1px rgba(99, 102, 241, 0.15);
}

/* ─── Glass card ─── */
.cartao-vidro {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(10, 10, 11, 0.06);
}

/* ─── Botões ─── */
.botao-primario {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  background: var(--foreground);
  color: var(--background);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 8px;
  transition:
    transform 200ms ease,
    box-shadow 250ms ease,
    background 200ms ease;
  letter-spacing: -0.005em;
}
.botao-primario:hover {
  transform: translateY(-1px);
  box-shadow:
    0 8px 24px -8px rgba(99, 102, 241, 0.5),
    0 0 0 1px rgba(99, 102, 241, 0.4);
}
.botao-primario:focus-visible {
  outline: 2px solid var(--iris-2);
  outline-offset: 3px;
}
.botao-primario:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.botao-fantasma {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--border-strong);
  color: var(--foreground);
  background: var(--surface);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 8px;
  transition:
    transform 200ms ease,
    background 200ms ease,
    border-color 200ms ease;
}
.botao-fantasma:hover {
  transform: translateY(-1px);
  border-color: var(--foreground);
}

/* ─── Pílula mono ─── */
.pilula-mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
}

/* ─── Card lift ─── */
.elevar-cartao {
  transition:
    transform 400ms var(--ease-out-quart),
    box-shadow 400ms ease,
    border-color 400ms ease;
}
.elevar-cartao:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 48px -16px rgba(10, 10, 11, 0.15),
    0 0 0 1px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
}

/* ─── Link com sublinhado animado ─── */
.link-sublinhado {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 280ms ease;
}
.link-sublinhado:hover {
  background-size: 100% 1.5px;
}

/* ─── Pulse dot ─── */
.ponto-pulso {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #a1a1aa;
  display: inline-block;
  color: #a1a1aa;
}
.ponto-pulso::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.2;
  animation: ping-suave 2.4s ease-out infinite;
}

/* ─── Animações globais ─── */
@keyframes ping-suave {
  0% {
    transform: scale(1);
    opacity: 0.35;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes orbita-flutuar {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  33% {
    transform: translate3d(8px, -12px, 0) rotate(2deg);
  }
  66% {
    transform: translate3d(-6px, 10px, 0) rotate(-2deg);
  }
}
.flutuar-1 {
  animation: orbita-flutuar 8s ease-in-out infinite;
}

@keyframes brilho {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.85) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.15) rotate(180deg);
  }
}
.animar-brilho {
  animation: brilho 3.2s ease-in-out infinite;
  display: inline-block;
  filter: drop-shadow(0 0 4px currentColor);
}

@keyframes pulsar-suave {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.animar-pulsar {
  animation: pulsar-suave 2s ease-in-out infinite;
}

@keyframes chapeu-flutuar {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
.animar-flutuar-chapeu {
  animation: chapeu-flutuar 4s ease-in-out infinite;
}

/* ─── FadeIn (controlado por JS via IntersectionObserver) ─── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms var(--ease-out-quart),
    transform 700ms var(--ease-out-quart);
}
.fade-in.visivel {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in {
    opacity: 1;
    transform: none;
  }
}
