/**
 * Octopus Barbearia — Base CSS & Reset
 * Acessibilidade, foco visível, iluminação ambiente e tipografia base.
 */

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

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Suporte e Estabilização para Lenis Smooth Scroll */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100dvh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Iluminação de Ambiente Quente & Respiração do Ateliê */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 70% 50% at 85% 15%, rgba(197, 160, 89, 0.08) 0%, transparent 65%),
    radial-gradient(ellipse 65% 55% at 15% 85%, rgba(217, 119, 6, 0.06) 0%, transparent 60%),
    radial-gradient(circle at var(--torch-x, 50%) var(--torch-y, 50%), rgba(223, 192, 128, 0.04) 0%, transparent 350px);
  pointer-events: none;
  z-index: 0;
}

/* Foco Acessível (Visível e sem anular teclado) */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Link de Pulo para Conteúdo (A11y) */
.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent-gold);
  color: #000000;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  z-index: var(--z-toast);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Tipografia Base */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.85rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
}

p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.05vw, 1.05rem);
  line-height: 1.7;
}

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: transparent;
}

/* Indicador de Status Vivo / Operação Real */
@keyframes pulse-live {
  0% { transform: scale(0.92); opacity: 0.75; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.92); opacity: 0.75; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.live-indicator__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green-alive);
  box-shadow: 0 0 8px var(--accent-green-alive);
  animation: pulse-live 2.5s infinite;
  display: inline-block;
  flex-shrink: 0;
}

/* Utilitários Visuais */
.text-gold {
  color: var(--accent-gold);
}

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

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