/* ==========================================================
   TOPHARMA — Base, Tipografia, Superfícies e Botões
   ========================================================== */

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--gold) 55%, var(--bg-3)) var(--bg);
  accent-color: var(--gold);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--gold) 45%, var(--bg-3));
  border-radius: 10px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}

body.is-loading { overflow: hidden; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { caret-color: var(--gold); }
::selection { background: var(--gold); color: var(--gold-ink); }

/* Foco visível consistente para navegação por teclado */
:is(a, button, input, summary, [tabindex="0"]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

/* Link pular para conteúdo (acessibilidade teclado) */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--r-btn);
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 13px;
  font-weight: 700;
}
.skip-link:focus { top: 14px; }

.container { width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

.section {
  --p: 1;
  position: relative;
  padding: clamp(76px, 11vw, 144px) 0;
}
.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  pointer-events: none;
  width: min(1240px, calc(100% - var(--gutter) * 2));
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold) 38%, transparent) 50%, transparent);
  transform: translateX(-50%) scaleX(calc(.6 + var(--p) * .4));
}
.section > .container { transform: translate3d(0, calc((1 - var(--p)) * 18px), 0); }

/* Tipografia balanceada e prevenção de palavras órfãs */
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

.reg {
  font-size: .42em;
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
  margin-left: .06em;
  color: var(--gold);
  letter-spacing: 0;
}

/* Ouro sólido em texto (elimina anti-pattern gradient-text) */
.gold-text { color: var(--gold-solid); }

.h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(32px, 4.8vw, 60px);
  line-height: 1.06;
  letter-spacing: -.015em;
}
.h2 em { font-style: normal; color: var(--gold-solid); }

/* ---------- Botões (sombra neutra, sem dark-glow) ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 13px 26px;
  border-radius: var(--r-btn);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform .24s var(--ease), box-shadow .28s var(--ease), border-color .24s var(--ease), color .24s var(--ease), background-color .24s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); transition-duration: .1s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .26s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--gold {
  color: var(--gold-ink);
  background: var(--gold);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn--gold:hover {
  background: var(--gold-hi);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .36);
}
.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--fg);
  background-color: color-mix(in srgb, var(--bg-2) 45%, transparent);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background-color: color-mix(in srgb, var(--gold) 8%, transparent);
}
.btn--sm { min-height: 40px; padding: 10px 18px; font-size: 12px; }

.crest { width: 42px; height: 47px; }
.crest--big { width: 64px; height: 72px; margin: 0 auto 20px; }

/* Reveal sem esconder permanentemente */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Movimento reduzido inteligente: interrompe loops decorativos sem matar feedback de estado */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .section > .container { transform: none; }
  .flask__bubbles circle { animation: none !important; }
  .showcase,
  .reel__frame { transform: none !important; }
  .btn, a, button { transition-duration: 120ms; }
}
