/* === Reset + base dark luxury (Brito · TRUSS) === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Anchor sections compensam altura da nav fixed */
section[id], main[id] { scroll-margin-top: 80px; }

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

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

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-display);
  margin: 0;
}

ul { list-style: none; }

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

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

/* === Sistema de bordas === */
:root {
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-pill: 999px;
}

/* === Utilidades globais === */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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)' opacity='0.85'/%3E%3C/svg%3E");
}

/* Cursor: dot pequeno + blob grande com warp */
.cursor-dot, .cursor-blob {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.cursor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg);
  z-index: 998;
  mix-blend-mode: difference;
  transition: width .25s var(--ease-out), height .25s var(--ease-out), opacity .2s;
}
.cursor-blob {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(232,220,196,0.12);
  backdrop-filter: blur(4px) saturate(130%);
  -webkit-backdrop-filter: blur(4px) saturate(130%);
  border: 1px solid rgba(232,220,196,0.2);
  z-index: 997;
  transition:
    width .45s var(--ease-out),
    height .45s var(--ease-out),
    border-radius .45s var(--ease-out),
    background .35s,
    border-color .35s,
    opacity .25s;
}
.cursor-dot.is-hover { width: 0; height: 0; }
.cursor-blob.is-hover {
  width: 56px; height: 56px;
  border-radius: 36% 64% 58% 42% / 52% 48% 52% 48%;
  background: rgba(232,220,196,0.2);
  border-color: rgba(232,220,196,0.4);
}
.cursor-blob.is-hover-text {
  width: 3px; height: 24px;
  border-radius: 2px;
  background: var(--accent);
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
@media (hover: none) { .cursor-dot, .cursor-blob { display: none; } }

.reveal-mask { overflow: hidden; display: inline-block; }
.reveal-mask > * { display: inline-block; will-change: transform; }

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

.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;
}

/* Skip link — visível apenas em foco via teclado */
.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--display);
  font-weight: var(--fw-bold);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  transform: translateY(-200%);
  transition: transform .25s var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }
