/**
 * ART CLEANER — LAYOUT & GRID ARCHITECTURE
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100vw;
}

body {
  overflow-x: clip;
  max-width: 100vw;
  position: relative;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* Containers Estruturais */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  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-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Seções e Ritmo Vertical */
.section {
  padding-top: clamp(3.75rem, 2.5rem + 4vw, 6.5rem);
  padding-bottom: clamp(3.75rem, 2.5rem + 4vw, 6.5rem);
  position: relative;
}

.section-dark {
  background-color: var(--color-surface-base);
  color: var(--color-text-primary);
}

.section-void {
  background-color: var(--color-surface-void);
  color: var(--color-text-primary);
}

.section-alt {
  background-color: var(--color-surface-void);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* =====================================================================
   RITMO CROMÁTICO EDITORIAL (LIGHT & STONE SECTIONS)
   ===================================================================== */
.section-light {
  --color-text-primary: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-muted);
  --color-border-subtle: var(--border-light);
  --color-border-default: var(--border-light-default);
  --color-surface-card: #FFFFFF;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-light-pure {
  --color-text-primary: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-muted);
  --color-border-subtle: var(--border-light);
  --color-border-default: var(--border-light-default);
  --color-surface-card: #FFFFFF;
  background-color: #FFFFFF;
  color: var(--text-primary);
}

.section-stone {
  --color-text-primary: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-muted);
  --color-border-subtle: var(--border-light);
  --color-border-default: var(--border-light-default);
  --color-surface-card: #FFFFFF;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4,
.section-light .heading-xl,
.section-light .heading-lg,
.section-light .heading-md,
.section-light .heading-sm,
.section-stone h1,
.section-stone h2,
.section-stone h3,
.section-stone h4,
.section-stone .heading-xl,
.section-stone .heading-lg,
.section-stone .heading-md,
.section-stone .heading-sm {
  color: var(--text-primary);
}

.section-light p,
.section-light .text-body,
.section-stone p,
.section-stone .text-body {
  color: var(--text-secondary);
}

.section-light .text-muted,
.section-stone .text-muted {
  color: var(--text-muted);
}

.section-light .text-lead,
.section-stone .text-lead {
  color: var(--text-secondary);
}

.section-header {
  margin-bottom: clamp(2.5rem, 1.8rem + 2.5vw, 4rem);
}

.section-header.text-center {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Grids Flexíveis */
.grid {
  display: grid;
  gap: var(--space-24);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 1024px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

/* Utilitários Visuais */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* =====================================================================
   ARCHITECT STRUCTURAL PRIMITIVES & ACCESSIBILITY
   ===================================================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-accent-primary, #EC642B);
  color: #FFFFFF;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.875rem;
  z-index: 99999;
  border-radius: 4px;
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid #000000;
}

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md, 8px);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.responsive-aspect-box {
  aspect-ratio: 16/10;
  width: 100%;
}


.dossier-meta-row { display: flex; gap: 16px; font-size: 0.8125rem; color: var(--color-text-dim, #64748B); padding-top: 12px; border-top: 1px solid var(--color-border-subtle, #E2E8F0); flex-wrap: wrap; }
.dossier-meta-row strong { color: var(--color-text-primary, #0F172A); font-weight: 600; }


/* === REDTEAM-CRITIC ADVERSARIAL VIEWPORT GUARDRAILS === */
html, body {
    overflow-x: clip;
    padding-bottom: 68px; /* Espaço para o dock mobile fixo */
}

img, svg {
    max-width: 100%;
    height: auto;
}
