/* ==========================================================================
   Base — reset contido, textura do templo, tipografia e utilitários
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--color-bg);
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: clamp(15px, 0.55vw + 13px, 17px);
  line-height: 1.66;
  color: var(--color-ink);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(900px 620px at 82% -10%, var(--page-glow-a), transparent 62%),
    radial-gradient(760px 560px at 4% 108%, var(--page-glow-b), transparent 66%),
    url("/assets/img/noise.png");
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: auto, auto, 128px 128px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.005em;
  color: var(--color-ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(38px, 5.4vw, 68px);
}

h2 {
  font-size: clamp(32px, 4.4vw, 58px);
}

h3 {
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.2;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

/* Foco visível em todo o site: anel dourado, nunca removido sem substituto. */
:focus-visible {
  outline: 2px solid var(--color-gold-soft);
  outline-offset: 3px;
}

::selection {
  background: rgba(123, 92, 255, 0.38);
  color: var(--color-ink);
}

/* Barra de rolagem discreta, coerente com o templo. */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 74, 0.35) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(201, 162, 74, 0.28);
  border-radius: 10px;
  border: 3px solid var(--color-bg);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

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

.container--narrow {
  max-width: 820px;
}

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

.section--raised {
  background:
    linear-gradient(180deg, rgba(20, 17, 31, 0.72), rgba(11, 10, 18, 0.2)),
    radial-gradient(620px 420px at 90% 0%, var(--page-glow-c), transparent 70%);
  border-block: 1px solid var(--color-line);
}

.section--flush-top {
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   Tipografia de apoio
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9em;
  margin: 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.eyebrow--center {
  justify-content: center;
}

.rule {
  display: block;
  flex: 1 1 auto;
  max-width: 56px;
  height: 1px;
  background: var(--color-border);
}

.lead {
  font-size: clamp(16px, 1.2vw + 12px, 20px);
  line-height: 1.7;
  color: var(--color-ink-dim);
}

.muted {
  color: var(--color-muted);
}

.gold {
  color: var(--color-gold);
}

.gold-soft {
  color: var(--color-gold-soft);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.measure {
  max-width: 60ch;
}

.section-head {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head__lead {
  max-width: 56ch;
}

/* --------------------------------------------------------------------------
   Utilitários
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--color-gold);
  color: #17110a;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Movimento reduzido
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
