/* Página inicial e documentação da API — estilo próprio, sem dependências externas. */

:root {
  --gold: #bc953d;
  --gold-strong: #a07a26;
  --navy: #111736;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1c2033;
  --muted: #5b6178;
  --border: #e3e6ef;
  --ok: #1f9d55;
  --error: #d64545;
  --info: #3b6fd8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 23, 54, .06), 0 8px 24px rgba(17, 23, 54, .06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1126;
    --surface: #151b38;
    --text: #e8eaf3;
    --muted: #a3a9c2;
    --border: #262e55;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

main { flex: 1; }

a { color: inherit; }

code {
  font-family: var(--mono);
  font-size: .9em;
  padding: .1em .4em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--gold) 14%, transparent);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { color: var(--gold); font-size: 1rem; }
.brand__text small { color: #c9cde0; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

.topbar__nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.topbar__nav a {
  color: #dfe2ee;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .95rem;
  transition: background .2s, color .2s;
}

.topbar__nav a:hover, .topbar__nav a.is-active { background: rgba(255, 255, 255, .08); color: #fff; }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge--version { background: var(--gold); color: var(--navy); }

/* Hero */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--gold) 25%, transparent), transparent 60%),
    linear-gradient(180deg, var(--navy), #1a2150);
  color: #fff;
  padding: 72px 0 96px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 12px 0 16px;
}

.lead { color: #cfd3e6; font-size: 1.1rem; max-width: 56ch; margin: 0 0 28px; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, background .2s, border-color .2s;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .topbar__nav a:focus-visible, .brand:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn--primary { background: var(--gold); color: var(--navy); }
.btn--primary:hover { background: #cfa64a; }
.btn--ghost { border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn--ghost:hover { border-color: #fff; }

.status {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #cfd3e6;
  font-size: .92rem;
}

.status li { display: inline-flex; align-items: center; gap: 8px; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--ok { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.dot--error { background: var(--error); box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 25%, transparent); }
.dot--info { background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent); }

.hero__art { display: flex; justify-content: center; }

.hero__art img {
  width: 100%;
  max-width: 380px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35));
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -48px;
  position: relative;
}

.features h2 { font-size: 1.05rem; margin: 0 0 6px; color: var(--gold-strong); }
.features p { margin: 0; color: var(--muted); font-size: .95rem; }

@media (prefers-color-scheme: dark) {
  .features h2 { color: var(--gold); }
}

/* Endpoints */
.endpoints { padding: 56px 20px 72px; }

.section-head h2 { margin: 0 0 4px; font-size: 1.6rem; }
.section-head p { margin: 0 0 24px; color: var(--muted); }

.endpoint-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.endpoint-group h3 { margin: 0 0 12px; font-size: 1rem; }
.endpoint-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.endpoint-group li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.endpoint-group li code { background: transparent; padding: 0; word-break: break-all; }

.method {
  min-width: 64px;
  text-align: center;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
}

.method--get { background: #3b82f6; }
.method--post { background: #16a34a; }
.method--put { background: #d97706; }
.method--delete { background: #dc2626; }

.lock { color: var(--muted); display: inline-flex; margin-left: auto; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .9rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}

.footer strong { color: var(--text); }

/* Responsivo */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .hero__art img { max-width: 220px; }
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .hero { padding: 48px 0 80px; }
  .features { grid-template-columns: 1fr; }
  .brand__text small { display: none; }
  .footer__inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Acesso restrito à documentação */
.hero--compact { padding: 56px 0 72px; }
.login-card { max-width: 420px; margin: 0 auto; color: var(--text); }
.login-card h1 { margin: 6px 0 4px; font-size: 1.6rem; }
.muted { color: var(--muted); margin: 0 0 20px; }
.form { display: grid; gap: 8px; }
.form label { font-weight: 600; font-size: .9rem; margin-top: 6px; }
.form input {
  font: inherit;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.form input:focus { outline: 3px solid color-mix(in srgb, var(--gold) 45%, transparent); border-color: var(--gold); }
.btn--block { width: 100%; margin-top: 14px; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.alert {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  background: color-mix(in srgb, var(--error) 12%, transparent);
  color: var(--error);
  font-size: .92rem;
}
.restricted { text-align: center; max-width: 560px; margin: 0 auto; }
.restricted h2 { margin: 0 0 6px; }
.restricted p { color: var(--muted); margin: 0 0 18px; }
.inline-form { display: inline; margin: 0; }
.link-button {
  background: none;
  border: 0;
  color: #dfe2ee;
  font: inherit;
  font-size: .95rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.link-button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
