/* ==========================================================================
   BASE, RESET & UTILITIES — INSTITUTO AMUSI
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
}

/* Background Subtle Gradient & Mesh */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 15% 15%, rgba(255, 90, 54, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(44, 57, 91, 0.18) 0%, transparent 55%),
    radial-gradient(circle at 50% 95%, rgba(212, 175, 55, 0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

/* Selection */
::selection {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-navy-950);
}

::-webkit-scrollbar-thumb {
  background: var(--color-navy-700);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* Imagens e Mídias */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

/* --- CONTAINERS & LAYOUT --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* --- TIPOGRAFIA EDITORIAL --- */
h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.title-huge {
  font-size: var(--text-huge);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.title-section {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-sm);
}

.subtitle-section {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
}

.text-accent {
  color: var(--color-accent);
}

.text-gold {
  color: var(--color-gold);
}

.text-muted {
  color: var(--text-muted);
}

.text-gradient-accent {
  background: linear-gradient(135deg, #FFFFFF 20%, var(--color-accent-light) 60%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Tags e Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
}

.badge-pill.badge-accent {
  background: var(--color-accent-subtle);
  border-color: var(--border-accent);
  color: var(--color-accent-light);
}

.badge-pill.badge-gold {
  background: var(--color-gold-subtle);
  border-color: rgba(212, 175, 55, 0.35);
  color: var(--color-gold);
}

.badge-pill.badge-emerald {
  background: var(--color-emerald-subtle);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--color-emerald);
}

/* Pulse Dot */
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-accent);
  position: relative;
  display: inline-block;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background-color: var(--color-accent);
  opacity: 0.6;
  animation: pulsePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-dot.emerald {
  background-color: var(--color-emerald);
}
.pulse-dot.emerald::after {
  background-color: var(--color-emerald);
}

@keyframes pulsePing {
  0% { transform: scale(0.8); opacity: 0.8; }
  80%, 100% { transform: scale(2.2); opacity: 0; }
}

/* 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-width: 0;
}

/* Cursor Magnético Customizado (Estilo Awwwards) */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor {
    cursor: none;
  }

  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor input,
  body.has-custom-cursor textarea,
  body.has-custom-cursor [role="button"] {
    cursor: none;
  }

  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
  }

  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 90, 54, 0.45);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: width 0.25s, height 0.25s, border-color 0.25s, background-color 0.25s;
  }

  body.cursor-hover .cursor-dot {
    width: 14px;
    height: 14px;
    background-color: #FFFFFF;
  }

  body.cursor-hover .cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--color-accent);
    background-color: rgba(255, 90, 54, 0.12);
  }
}
