/* ============================================================
   injs-links — página de links (gestor de tráfego)
   Mobile-first. Tema claro/escuro com variáveis CSS.
   ============================================================ */

:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #1d4ed8;
  --accent-contrast: #ffffff;
  --border: #c9d8f5;
  --btn-bg: #ffffff;
  --btn-text: #1d4ed8;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.10);

  --dot-blue: #2563eb;
  --dot-yellow: #eab308;
  --dot-red: #ef4444;
  --dot-green: #22c55e;

  --radius: 14px;
  --radius-card: 24px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --card: #0f172a;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --accent: #60a5fa;
    --accent-contrast: #0b1220;
    --border: #24344f;
    --btn-bg: #111c33;
    --btn-text: #93c5fd;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --card: #0f172a;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-contrast: #0b1220;
  --border: #24344f;
  --btn-bg: #111c33;
  --btn-text: #93c5fd;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 14px 40px;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

/* ---------- Cartão ---------- */

.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px 18px 24px;
}

@media (min-width: 768px) {
  body { align-items: center; padding: 40px 20px; }
  .card { padding: 26px 26px 30px; }
}

/* ---------- Perfil ---------- */

.profile { text-align: center; }

.profile__photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  background: var(--bg);
}

.profile__name {
  margin: 18px 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
}

.profile__tagline {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Botões de link ---------- */

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.links__fallback { color: var(--muted); font-size: 0.9rem; }

.link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.link:active { transform: scale(0.98); }

.link__icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.link__label { flex: 1; text-align: left; }

.link__arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.75;
}

/* Variante de destaque (CTA principal) */
.link--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ---------- Ações utilitárias ---------- */

.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}

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

.action svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

#btn-theme .icon-sun { display: none; }
:root[data-theme="dark"] #btn-theme .icon-sun { display: block; }
:root[data-theme="dark"] #btn-theme .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #btn-theme .icon-sun { display: block; }
  :root:not([data-theme="light"]) #btn-theme .icon-moon { display: none; }
}

/* ---------- Rodapé ---------- */

.footer {
  margin-top: 24px;
  text-align: center;
}

.footer__text {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dot {
  width: 14px;
  height: 5px;
  border-radius: 999px;
}

.dot--blue { background: var(--dot-blue); }
.dot--yellow { background: var(--dot-yellow); }
.dot--red { background: var(--dot-red); }
.dot--green { background: var(--dot-green); }

/* ---------- Toast (feedback de copiar/compartilhar) ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: var(--text);
  color: var(--card);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 90vw;
  text-align: center;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Acessibilidade ---------- */

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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