/* BRAINMED | base.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  overflow-x: hidden;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text-on-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
address { font-style: normal; }
strong { font-weight: 500; }
::selection { background: var(--warm-gold); color: var(--forest-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--warm-gold); outline-offset: 3px; border-radius: 2px;
}
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 1000; background: var(--warm-gold); color: var(--forest-ink); padding: 10px 18px; border-radius: var(--radius); font-weight: 500; font-size: 14px; transition: top var(--dur-fast); }
.skip-link:focus { top: 16px; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4, .display, .display-xl, .h2, .h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.04; letter-spacing: -0.012em; text-wrap: balance; }
.display-xl { font-size: var(--text-display-xl); line-height: 0.98; letter-spacing: -0.02em; }
h1, .display { font-size: var(--text-display); }
h2, .h2 { font-size: var(--text-h2); }
h3, .h3 { font-size: var(--text-h3); line-height: 1.15; }
h4 { font-family: var(--font-body); font-weight: 500; font-size: 1rem; }
.em { font-style: italic; font-weight: 400; color: var(--accent); }
.on-light .em { color: var(--forest-mid); }
p { max-width: 62ch; text-wrap: pretty; }
.lead { font-size: var(--text-lead); line-height: 1.55; font-weight: 300; color: var(--text-on-dark-soft); max-width: 58ch; }
.on-light .lead { color: var(--text-on-light-soft); }
.small { font-size: var(--text-small); }
.muted { color: var(--text-on-dark-mute); }
.on-light .muted { color: var(--text-on-light-soft); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-body); font-weight: 500; font-size: var(--text-eyebrow);
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent); flex: none; }
.eyebrow { flex-wrap: wrap; row-gap: 6px; }
.eyebrow > span { white-space: nowrap; }
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { content: ''; width: 22px; height: 1px; background: var(--accent); flex: none; }
.numeral { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--accent); font-size: 1.3em; }
.hairline { height: 1px; background: var(--hairline); border: 0; }
.on-light .hairline { background: var(--hairline-light); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.container--wide { max-width: var(--maxw-wide); }
.container--narrow { max-width: 840px; }
.section { position: relative; padding: var(--section-y) 0; overflow: hidden; }
.section--tight { padding: var(--section-y-tight) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 22px; }
.section-head .lead { margin-top: 20px; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }
.stack > * + * { margin-top: 1.2em; }
.grid { display: grid; gap: clamp(18px, 2.4vw, 32px); }
.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: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
@media (max-width: 900px) { .split, .split--wide-left { grid-template-columns: 1fr; } }

/* ---------- Bases de seção (ritmo visual) ---------- */
.bg-forest { background: var(--forest-deep); color: var(--text-on-dark); }
.bg-forest::before { content: ''; position: absolute; inset: 0; background: url('../texturas/deck-verde-nuvem-a.webp') center/cover no-repeat; opacity: 0.55; mix-blend-mode: luminosity; pointer-events: none; }
.bg-forest--b::before { background-image: url('../texturas/deck-verde-nuvem-b.webp'); }
.bg-forest--c::before { background-image: url('../texturas/deck-verde-nuvem-c.webp'); }
.bg-forest > .container, .bg-forest > .container--wide { position: relative; z-index: 1; }
.bg-gradient { background: radial-gradient(120% 90% at 80% 10%, var(--forest-mid) 0%, var(--forest-deep) 55%, var(--forest-ink) 100%); color: var(--text-on-dark); }
.bg-cream { background: var(--warm-cream); color: var(--text-on-light); }
.bg-white { background: var(--warm-white); color: var(--text-on-light); }
.bg-black { background: var(--near-black); color: var(--text-on-dark); }
.bg-photo { color: var(--text-on-dark); background: var(--forest-ink); }
.bg-photo::before { content: ''; position: absolute; inset: 0; background: var(--photo) center/cover no-repeat; opacity: var(--photo-opacity, 0.22); mix-blend-mode: luminosity; pointer-events: none; }
.bg-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27,67,50,0.55) 0%, rgba(18,48,31,0.85) 100%); pointer-events: none; }
.bg-photo > .container, .bg-photo > .container--wide { position: relative; z-index: 1; }
.grain::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); z-index: 0; }
.grain > * { position: relative; z-index: 1; }
.on-light { color: var(--text-on-light); }

/* ---------- Marca d'água (monograma) ---------- */
.wm { position: absolute; pointer-events: none; color: var(--accent); opacity: 0.07; z-index: 0; }
.wm svg { width: 100%; height: auto; fill: currentColor; }
.wm--right { right: -12%; top: -10%; width: min(62vw, 720px); }
.wm--left { left: -14%; bottom: -18%; width: min(62vw, 720px); }
.wm--stroke svg { fill: none; stroke: currentColor; stroke-width: 6; }

/* ---------- Botões ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 28px; border-radius: 2px; font-family: var(--font-body); font-weight: 500; font-size: 0.86rem; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1; white-space: nowrap; overflow: hidden; transition: color var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast); }
.btn--gold { border: 1px solid var(--warm-gold); color: var(--gold-light); background: transparent; }
.btn--gold::after { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(100deg, transparent 0%, rgba(212,165,116,0.35) 50%, transparent 100%); transform: skewX(-18deg); transition: left 0s; }
.btn--gold:hover { background: var(--warm-gold); color: var(--forest-ink); }
.btn--gold:hover::after { left: 160%; transition: left 0.7s var(--ease); }
.btn--cream { background: var(--warm-cream); color: var(--forest-ink); border: 1px solid var(--warm-cream); }
.btn--cream:hover { background: var(--warm-white); transform: translateY(-1px); }
.btn--forest { background: var(--forest-deep); color: var(--warm-cream); border: 1px solid var(--forest-deep); }
.btn--forest:hover { background: var(--forest-mid); border-color: var(--forest-mid); }
.btn--ghost { color: var(--text-on-dark); padding-left: 0; padding-right: 0; border-bottom: 1px solid var(--hairline-strong); border-radius: 0; }
.btn--ghost:hover { color: var(--gold-light); border-color: var(--warm-gold); }
.on-light .btn--ghost { color: var(--forest-deep); border-color: var(--hairline-light); }
.btn--lg { padding: 19px 36px; font-size: 0.9rem; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-body); font-weight: 500; font-size: 0.86rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-light); }
.link-arrow svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-fast); }
.link-arrow:hover svg { transform: translateX(4px); }
.on-light .link-arrow { color: var(--forest-mid); }
@media (prefers-reduced-motion: reduce) { .btn--gold::after { display: none; } }

/* ---------- Reveal on scroll ---------- */
.js .reveal, .js .reveal-group > * { opacity: 0; transform: translateY(26px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js .reveal.is-visible, .js .reveal-group.is-visible > * { opacity: 1; transform: none; }
.js .reveal--fade { transform: none; }
.js .reveal-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.08em 0.06em 0.26em; margin: -0.08em -0.06em -0.26em; }
.js .reveal-words.is-visible .w { overflow: visible; transition: overflow 0s linear 1.6s; }
.js .reveal-words .w > span { display: inline-block; transform: translateY(110%); transition: transform 0.9s var(--ease-out); }
.js .reveal-words.is-visible .w > span { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal-group > *, .js .reveal-words .w > span { opacity: 1; transform: none; transition: none; }
}
