/* RT General Services Inc. — base: reset, tipografia, layout */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--warm-white);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: var(--lh-head);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.012em; }
h4 { font-size: var(--fs-h4); font-weight: 700; letter-spacing: -0.005em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

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

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button { font: inherit; color: inherit; }

hr { border: 0; border-top: 1px solid var(--paper-line); margin: var(--sp-6) 0; }

strong, b { font-weight: 700; }

::selection { background: var(--gold); color: var(--ink); }

/* ---------- foco visivel ---------- */

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-light :focus-visible,
.sec--light :focus-visible { outline-color: var(--gold-deep); }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 999;
  background: var(--ink);
  color: var(--gold-hi);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: var(--fs-small);
  text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

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

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: var(--container-wide); }
.wrap--text { max-width: calc(var(--container-text) + var(--gutter) * 2); }

.sec { padding-block: var(--section-y); position: relative; }
.sec--tight { padding-block: var(--section-y-s); }

.sec--light { background: var(--warm-white); color: var(--text-dark); }
.sec--paper { background: var(--white);      color: var(--text-dark); }
.sec--dark  { background: var(--ink);        color: var(--text-light); }
.sec--char  { background: var(--charcoal);   color: var(--text-light); }

.sec--dark h1, .sec--dark h2, .sec--dark h3, .sec--dark h4,
.sec--char h1, .sec--char h2, .sec--char h3, .sec--char h4 { color: var(--white); }

/* ---------- marcador de secao: fio dourado, sem eyebrow ---------- */

.rule {
  width: 52px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: var(--sp-5);
}
.rule--center { margin-inline: auto; }

/* ---------- cabecalho de secao ---------- */

.sec-head { max-width: 62ch; margin-bottom: var(--sp-8); }
.sec-head--center { margin-inline: auto; text-align: center; }
/* cabecalho so de titulo, sem linha de apoio: pesa menos, entao pede menos
   respiro embaixo do que o cabecalho de titulo + paragrafo.
   Mesma expressao do padding-top de .division: o respiro acima do fio que
   separa o cabecalho do primeiro item bate com o respiro abaixo dele. */
.sec-head--plain { margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem); }
.sec-head p {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  margin-top: var(--sp-4);
  margin-bottom: 0;
}
.sec--dark .sec-head p, .sec--char .sec-head p { color: var(--text-light-mut); }

/* ---------- utilitarios de texto ---------- */

.lead { font-size: var(--fs-lead); color: var(--text-muted); }
.sec--dark .lead, .sec--char .lead { color: var(--text-light-mut); }

.muted { color: var(--text-muted); }
.sec--dark .muted, .sec--char .muted { color: var(--text-light-mut); }

.small { font-size: var(--fs-small); }

.gold { color: var(--gold-ink); }
.sec--dark .gold, .sec--char .gold { color: var(--gold); }

.label {
  font-family: var(--font-head);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- grid ---------- */

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* split editorial: texto + imagem, assimetrico */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.split--flip > :first-child { order: 2; }
.split--flip > :last-child  { order: 1; }

/* colunas de altura bem desigual (ex: formulario curto vs. lista + mapa) —
   alinha os dois topos em vez de centralizar */
.split--top { align-items: start; }

@media (max-width: 900px) {
  .split, .split--flip { grid-template-columns: 1fr; gap: var(--sp-7); }
  .split--flip > :first-child, .split--flip > :last-child { order: 0; }
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 70ms; }
.reveal-d2 { transition-delay: 140ms; }
.reveal-d3 { transition-delay: 210ms; }

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