/* ============================================================
   ATLAS — Base Styles (Reset, Typography, Utilities)
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
}

:not(:defined) {
  opacity: 0;
  visibility: hidden;
}

talos-problem,
talos-pipeline,
talos-hosts,
talos-como-usar,
talos-skills-avulsas,
talos-instalacao,
argus-portal-eco,
argus-feat,
argus-mcp,
argus-como,
hephaestus-problem,
hephaestus-fluxo,
hephaestus-estrutura,
hephaestus-agnostico,
hephaestus-como-usar,
hephaestus-instalacao {
  padding-block: var(--section-y);
}

talos-hero,
hephaestus-hero,
argus-portal-hero,
argus-hero {
  padding-top: var(--hero-y-top);
  padding-bottom: var(--hero-y-bottom);
}

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

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

body {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  background: var(--page);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(15px, 1.8vw, 17px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .7;
  background:
    radial-gradient(120% 90% at 80% -10%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 55%),
    radial-gradient(100% 80% at -10% 100%, color-mix(in oklab, var(--deep) 7%, transparent), transparent 60%);
}

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

/* Foco visível no light DOM (skip-link, lang-switcher, noscript). Nos shadow
   roots a mesma regra entra via FOCUS_CSS em js/utils/reveal.js. */
:where(a, button, [tabindex], summary):focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 200;
  transform: translateY(-200%);
  padding: 10px 18px;
  background: var(--deep-2);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 3px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: var(--text-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: none;
}

.noscript-note {
  padding: var(--space-lg) var(--gutter);
  text-align: center;
  color: var(--text-soft);
  font-size: var(--text-base);
}

.noscript-note a {
  color: var(--accent-strong);
  text-decoration: underline;
}

/* No mobile o switcher some da barra: a troca de idioma passa a viver no menu
   hamburger (.mobile-lang dentro de <argus-nav>). A regra fica aqui e não em
   ::slotted porque o light DOM vence o ::slotted na cascata. */
@media (max-width: 900px) {
  #lang-switcher {
    display: none;
  }
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.cinzel {
  font-family: "Cinzel", serif;
}

.serif {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  gap: .7em;
}

.frieze {
  height: 18px;
  width: 100%;
  background-color: var(--accent);
  -webkit-mask: var(--frieze) repeat-x left center / 28px 18px;
  mask: var(--frieze) repeat-x left center / 28px 18px;
  opacity: .55;
  position: relative;
  z-index: 1;
}

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

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: var(--sec-head-gap);
  flex-wrap: wrap;
}

.sec-head .num {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: .3em;
  color: var(--accent-strong);
}

.sec-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: var(--text-display);
  line-height: 1.04;
  letter-spacing: .005em;
  max-width: 16ch;
}

.sec-sub {
  color: var(--text-soft);
  max-width: 40ch;
  font-size: var(--text-base);
}

.rule {
  height: 1px;
  background: var(--border);
  width: 100%;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal[data-d="1"] {
  transition-delay: .08s;
}

.reveal[data-d="2"] {
  transition-delay: .16s;
}

.reveal[data-d="3"] {
  transition-delay: .24s;
}

@media (prefers-reduced-motion:reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.tabs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--text-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.25s;
}

.tab-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.tab-btn.active {
  background: var(--surface-2);
  color: var(--accent-strong);
  border-color: var(--accent);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: clamp(10px, 1.4vw, 14px) var(--pad-panel);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  font-weight: 600;
  font-size: clamp(13px, 1.5vw, 14.5px);
  color: var(--text);
  transition: .2s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn-ghost svg {
  width: 16px;
  height: 16px;
}

@media(max-width:640px) {
  .sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}