/* ============================================================================
   base.css — reset, element typography, layout primitives
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; padding: 0; }
[hidden] { display: none !important; }   /* beat component display rules (e.g. form done state) */
::selection { background: var(--t-terracotta); color: var(--t-cream); }
.surface--terra ::selection,
.surface--brick ::selection { background: var(--t-gold); color: var(--t-ink); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- HEADINGS ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--fg); }

.display, .h1, .h2, .h3 { font-family: var(--font-display); overflow-wrap: break-word; hyphens: manual; text-wrap: balance; }

.display {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  font-weight: 600;
  font-optical-sizing: auto;
}
.h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); font-weight: 600; }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); letter-spacing: var(--tracking-tight); font-weight: 600; }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-head); letter-spacing: var(--tracking-tight); font-weight: 600; }
.h4 { font-family: var(--font-serif); font-size: var(--fs-h4); line-height: var(--lh-head); font-weight: 600; }
.h5 { font-family: var(--font-serif); font-size: var(--fs-h5); line-height: var(--lh-head); font-weight: 600; }
.h6 { font-family: var(--font-sans); font-size: var(--fs-h6); line-height: var(--lh-head); font-weight: 600; letter-spacing: var(--tracking-tight); }

/* The signature editorial italic moment ("próximo nível", "estratégico"). */
.serif        { font-family: var(--font-serif); }
.italic       { font-style: italic; }
.serif-em     { font-family: var(--font-serif); font-style: italic; font-weight: 500; }
.display .serif-em,
.h2 .serif-em,
.h1 .serif-em { font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: 0; }

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--fg-soft);
  font-weight: 400;
}
.muted { color: var(--fg-muted); }
.accent-text { color: var(--accent); }
.gold-text { color: var(--t-gold); }

strong, b { font-weight: 700; color: inherit; }
.surface--terra strong, .surface--brick strong { color: var(--t-cream); }

/* ---- EYEBROW / KICKER (deco-condensed wordmark feel, faithful to deck) --- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: clamp(20px, 4vw, 44px);
  height: var(--bw-line);
  background: currentColor;
  display: inline-block;
  transform-origin: left;
}
.eyebrow--center { justify-content: center; }
.eyebrow--plain::before { display: none; }
/* On dark surfaces gold-on-terracotta text fails contrast (1.9:1); use cream for the
   label and keep only the short decorative dash gold (non-text, exempt). */
.surface--terra .eyebrow, .surface--brick .eyebrow { color: var(--t-cream); }
.surface--terra .eyebrow::before, .surface--brick .eyebrow::before { background: var(--t-gold); }

/* ---- LAYOUT PRIMITIVES --------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--md { max-width: var(--container-md); }
.container--sm { max-width: var(--container-sm); }
.container--xs { max-width: var(--container-xs); }

.section { position: relative; padding-block: var(--section-y); overflow: clip; scroll-margin-top: 4.75rem; }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.section--flush-top { padding-top: 0; }

.stack > * + * { margin-top: var(--flow, 1.25rem); }
.stack-sm { --flow: 0.7rem; }
.stack-lg { --flow: 2rem; }

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

.measure { max-width: 62ch; }
.measure-sm { max-width: 46ch; }
.center { text-align: center; }
.center-x { margin-inline: auto; }

.split {
  display: grid;
  gap: clamp(2rem, 1rem + 5vw, 5rem);
  align-items: center;
  grid-template-columns: 1fr 1fr;
}
.split--media-right { grid-template-columns: 1.05fr 0.95fr; }
.split--media-left  { grid-template-columns: 0.95fr 1.05fr; }

/* Generic responsive collapse */
@media (max-width: 900px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .split, .split--media-right, .split--media-left { grid-template-columns: 1fr; }
  .split--reverse-mobile > :first-child { order: 2; }
}
@media (max-width: 560px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .cols-2.keep-mobile, .cols-3.keep-mobile, .cols-4.keep-mobile { grid-template-columns: repeat(2, 1fr); }
}

/* utility */
.relative { position: relative; }
.z-content { position: relative; z-index: var(--z-content); }
.hide-mobile { }
.show-mobile { display: none; }
@media (max-width: 760px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: revert; }
}
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); } .gap-6 { gap: var(--sp-6); }
.wrap { flex-wrap: wrap; }
.mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); } .mt-7 { margin-top: var(--sp-7); }
.full-bleed { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
