/* ============================================
   Base — Reset, globais, foco, acessibilidade
   ============================================ */

/* === Fontes locais (variáveis) === */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  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: 'Space Grotesk';
  src: url('../fonts/space-grotesk.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  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;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--c-text);
  background-color: var(--c-bg);
  overflow-x: hidden;
  min-height: 100vh;
}

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

img {
  height: auto;
}

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

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

a {
  color: var(--c-blue-soft);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-soft);
}

a:hover {
  color: var(--c-cyan-soft);
}

ul,
ol {
  list-style: none;
}

/* === Foco visível === */
:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* === Seleção === */
::selection {
  background: rgba(124, 77, 255, 0.4);
  color: #fff;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--c-bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--c-violet), var(--c-blue));
  border-radius: var(--radius-full);
}

/* === Skip link === */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: var(--z-header);
  padding: 0.75rem 1.25rem;
  background: var(--c-bg-soft);
  color: var(--c-text-inverse);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  transition: top var(--dur-base) var(--ease);
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* === Acessibilidade === */
.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;
}

[hidden] {
  display: none !important;
}

/* === Texto gradiente === */
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* === Glassmorphism === */
.glass {
  background: var(--c-bg-glass);
  border: 1px solid var(--c-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
}

/* === Reduced motion === */
@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;
  }
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
}
