/* ================================================================
   MARCUS ROLIM — GLOBAL STYLES
   Portal Profissional: marcusrolim.com.br
   ================================================================ */

@import url('variables.css');

/* ----------------------------------------------------------------
   1. RESET & FUNDAÇÃO
   ---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Tecnológico com Textura de Circuitos Oficiais MR e Malha Digital */
.site-bg-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, 
      rgba(18, 18, 18, 0.48) 0%, 
      rgba(18, 18, 18, 0.86) 18%, 
      rgba(18, 18, 18, 0.86) 82%, 
      rgba(18, 18, 18, 0.48) 100%),
    url('../images/background-mr.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0.48;
  pointer-events: none;
  z-index: 0;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 85% 12%, rgba(255, 105, 91, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 10% 35%, rgba(58, 124, 165, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 65%, rgba(255, 105, 91, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 12% 88%, rgba(58, 124, 165, 0.09) 0%, transparent 50%),
    radial-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* Canvas Tecnológico Global fixo que acompanha a rolagem de todos os blocos */
.global-tech-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.72;
}

::selection {
  background-color: var(--color-primary);
  color: #000;
}

/* Barra de rolagem discreta */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ----------------------------------------------------------------
   2. HIERARQUIA TIPOGRÁFICA
   ---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.015em;
}

h1 {
  font-size: var(--text-display);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.75rem, 3.0vw, 2.6rem);
  line-height: 1.15;
}

h3 {
  font-size: clamp(1.35rem, 2.0vw, 1.85rem);
  line-height: 1.25;
}

h4 {
  font-size: var(--text-lg);
  font-weight: 500;
}

p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}
p:last-child { margin-bottom: 0; }

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

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

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ----------------------------------------------------------------
   3. CONTAINERS & LAYOUT ESTRUTURAL
   ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
  position: relative;
  z-index: 2;
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-top: clamp(4.5rem, 8vw, 7.5rem);
  padding-bottom: clamp(4.5rem, 8vw, 7.5rem);
  position: relative;
  border-bottom: 1px solid var(--border-hairline);
}

.section-hero {
  padding-top: calc(var(--header-height) + clamp(2rem, 5vw, 4.5rem));
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  min-height: 88vh;
  display: flex;
  align-items: center;
}

/* ----------------------------------------------------------------
   4. ACESSIBILIDADE & UTILITÁRIOS
   ---------------------------------------------------------------- */
.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;
}

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

.coral-accent {
  color: var(--color-primary);
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-tag);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  border: 1px solid var(--color-primary-border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.tag-badge .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
}

/* ----------------------------------------------------------------
   5. ANIMAÇÕES DISCRETAS & PREFERS-REDUCED-MOTION
   ---------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
