/* ============================================================
   Base — reset, tipografia e componentes compartilhados
   ============================================================ */

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

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select, button { font: inherit; }
ul { list-style: none; padding: 0; }

::selection { background: var(--brand); color: var(--on-brand); }

:focus-visible {
  outline: 2.5px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.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 helpers ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container-wide { width: min(100% - 2.5rem, var(--container-wide)); margin-inline: auto; }
.stack > * + * { margin-top: var(--space-3); }

/* ---------- Tipografia ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand-bright);
}
.eyebrow::before {
  content: ""; width: 1.8em; height: 2px; background: var(--brand); border-radius: 2px;
}

h1, h2, h3 { line-height: 1.05; font-weight: 800; letter-spacing: -0.01em; }

.display {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

.lead { font-size: var(--step-1); color: var(--muted); font-weight: 400; max-width: 46ch; }

/* ---------- Brand bar (topo) — troca entre os 3 perfis ---------- */
.brandbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  padding: 0.85rem 0;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.brandbar__inner {
  width: min(100% - 2.5rem, var(--container-wide));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.brandbar__home {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 800; letter-spacing: -0.01em; font-size: var(--step--1);
  text-transform: uppercase;
}
.brandbar__home img { width: 26px; height: 26px; }
.brandbar__home span { opacity: 0.85; }
.switch { display: flex; align-items: center; gap: 0.4rem; }
.switch__chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.85rem; border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: var(--step--1); font-weight: 700;
  color: var(--muted);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.switch__chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.switch__chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); transform: translateY(-1px); }
.switch__chip[aria-current="page"] { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.switch__chip--joao { --c: #e87520; }
.switch__chip--wellington { --c: #f5a800; }
.switch__chip--msa { --c: #4F8BFF; }
.switch__chip .dot { background: var(--c, currentColor); }

/* ---------- Link cards (núcleo do link-in-bio) ---------- */
.links { display: grid; gap: var(--space-2); }
.link-card {
  position: relative; display: flex; align-items: center; gap: var(--space-3);
  padding: 1.05rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  overflow: hidden;
  transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  isolation: isolate;
}
.link-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%);
  opacity: 0; transition: opacity var(--t);
}
.link-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); }
.link-card:hover::before { opacity: 1; }
.link-card__icon {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 20%, transparent);
  color: var(--brand-bright);
}
.link-card__icon svg { width: 22px; height: 22px; }
.link-card__body { flex: 1; min-width: 0; }
.link-card__label { font-weight: 700; font-size: var(--step-0); letter-spacing: -0.01em; }
.link-card__sub { font-size: var(--step--1); color: var(--muted); margin-top: 0.1rem; }
.link-card__arrow { flex: none; color: var(--muted); transition: transform var(--t), color var(--t-fast); }
.link-card__arrow svg { width: 20px; height: 20px; }
.link-card:hover .link-card__arrow { transform: translateX(4px); color: var(--brand-bright); }
.link-card--featured {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}
.link-card--featured .link-card__icon { background: var(--brand); color: var(--on-brand); }
.link-card__tag {
  align-self: flex-start; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand-bright);
  border: 1px solid color-mix(in srgb, var(--brand) 50%, transparent);
  padding: 0.15rem 0.5rem; border-radius: var(--radius-pill);
}

/* ---------- Social row ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.social-btn {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.social-btn svg { width: 21px; height: 21px; }
.social-btn:hover {
  transform: translateY(-3px);
  background: var(--brand); border-color: var(--brand); color: var(--on-brand);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.8rem 1.4rem; border-radius: var(--radius-pill);
  font-weight: 700; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-bright); transform: translateY(-2px); }

/* ---------- Rule / divisor com a "linha que sobe" (motivo MSA) ---------- */
.rule {
  height: 2px; border: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), transparent);
  margin: var(--space-5) 0;
}

/* ---------- Ecosystem (rodapé) — os 3 conversam entre si ---------- */
.ecosystem { padding: var(--space-7) 0 var(--space-6); }
.ecosystem__head { text-align: center; margin-bottom: var(--space-5); }
.ecosystem__title { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.02em; }
.ecosystem__sub { color: var(--muted); margin-top: 0.4rem; }
.ecosystem__grid {
  display: grid; gap: var(--space-3);
  grid-template-columns: repeat(3, 1fr);
}
.eco-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 230px; padding: var(--space-4);
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  color: #fff;
  background: var(--eco-bg, #222) center/cover no-repeat;
  transition: transform var(--t), box-shadow var(--t);
}
.eco-card::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--eco-overlay, linear-gradient(180deg, transparent, rgba(0,0,0,0.8)));
}
.eco-card > * { position: relative; z-index: 1; }
.eco-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.eco-card__role { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--eco-accent, #fff); }
.eco-card__name { font-size: var(--step-2); font-weight: 900; letter-spacing: -0.02em; line-height: 1; margin-top: 0.2rem; }
.eco-card__go { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.7rem; font-weight: 700; font-size: var(--step--1); }
.eco-card__go svg { width: 18px; height: 18px; flex: none; transition: transform var(--t); }
.eco-card:hover .eco-card__go svg { transform: translateX(5px); }
.eco-card--current { outline: 2px solid var(--eco-accent); outline-offset: -2px; }

.footer-note {
  text-align: center; color: var(--muted); font-size: var(--step--1);
  padding: var(--space-4) 0 var(--space-5);
  border-top: 1px solid var(--line);
}
.footer-note a { color: var(--brand-bright); font-weight: 600; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 720px) {
  .ecosystem__grid { grid-template-columns: 1fr; }
  .brandbar__home span { display: none; }
}
