/* =========================================================
   RAAF Premium — base.css
   Reset, tipografia base, utilitários fundamentais
   ========================================================= */

/* ---- Reset moderno ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--clr-text-primary);
  background-color: var(--clr-white);
  overflow-x: hidden;
}

body.is-front-page {
  padding-top: 0;
}

/* ---- Tipografia base ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--clr-text-primary);
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl)); font-weight: 800; }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); font-weight: 700; }
h3 { font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl)); }
h4 { font-size: clamp(var(--text-xl), 2vw, var(--text-2xl)); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  line-height: var(--leading-relaxed);
  color: var(--clr-text-secondary);
}

p + p {
  margin-top: var(--space-4);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--clr-accent);
}

strong, b {
  font-weight: 600;
  color: var(--clr-text-primary);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
}

ul, ol {
  list-style: none;
}

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---- Seleção de texto ---- */
::selection {
  background-color: var(--clr-accent);
  color: var(--clr-black);
}

/* ---- Scrollbar (webkit) ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--clr-gray-light); }
::-webkit-scrollbar-thumb { background: var(--clr-gray-mid); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-accent); }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.container--sm  { max-width: var(--container-sm);  }
.container--md  { max-width: var(--container-md);  }
.container--lg  { max-width: var(--container-lg);  }
.container--2xl { max-width: var(--container-2xl); }
.container--max { max-width: var(--container-max); }

/* ---- Section base ---- */
.section {
  padding-block: var(--section-padding-y);
}

.section--white     { background-color: var(--clr-white); }
.section--light     { background-color: var(--clr-off-white); }
.section--dark      { background-color: var(--clr-black); color: var(--clr-text-invert); }
.section--graphite  { background-color: var(--clr-graphite); color: var(--clr-text-invert); }
.section--accent    { background-color: var(--clr-gray-light); color: var(--clr-text-primary); }

/* ---- Section header ---- */
.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-header--center {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background-color: currentColor;
  flex-shrink: 0;
}

.section-label--light {
  color: var(--clr-accent-lite);
}

.section-title {
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
  color: inherit;
}

.section-subtitle {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--clr-text-secondary);
  max-width: 60ch;
}

.section--dark  .section-subtitle,
.section--graphite .section-subtitle {
  color: var(--clr-text-invert-muted);
}

/* ---- Grid ---- */
.grid { display: grid; }
.flex { display: flex; }

/* ---- Visibilidade 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: 0;
}

/* ---- Utilitários de texto ---- */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

.text-accent  { color: var(--clr-gray-dark); }
.text-muted   { color: var(--clr-text-muted); }
.text-invert  { color: var(--clr-text-invert); }
.text-white   { color: var(--clr-white); }

.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }
.font-light   { font-weight: 300; }

.uppercase    { text-transform: uppercase; }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-widest { letter-spacing: var(--tracking-widest); }

/* ---- Utilitários de layout ---- */
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.w-full   { width: 100%; }
.h-full   { height: 100%; }

/* ---- WordPress essencials ---- */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--text-sm); color: var(--clr-text-muted); margin-top: var(--space-2); }
.alignnone, .aligncenter, .alignright, .alignleft { max-width: 100%; height: auto; }
.aligncenter { display: block; margin-inline: auto; }
.alignright  { float: right; margin-left: var(--space-6); }
.alignleft   { float: left; margin-right: var(--space-6); }

/* ---- Acessibilidade: focus ---- */
:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
