/* ══════════════════════════════════════════════════
   shared.css — Área Pública
   Responsabilidade: estilos comuns a index.html,
   sobre.html, projetos.html, contato.html
   Padrão visual: home_v2.html (DEV-012)
   Fontes: Manrope (headlines) · Inter (body) · Space Grotesk (labels)
   ══════════════════════════════════════════════════ */

/* ── Reset ────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Variáveis ────────────────────────────────── */
:root {
  --primary:           #004ac6;
  --primary-container: #2563eb;
  --primary-fixed-dim: #b4c5ff;
  --on-primary:        #ffffff;

  --secondary:         #006c49;
  --secondary-container: #6cf8bb;

  --error:             #ba1a1a;
  --error-container:   #ffdad6;

  --background:        #f8f9fe;
  --surface:           #f8f9fe;
  --surface-container-lowest: #ffffff;
  --surface-container-low:    #f2f3f8;
  --surface-container:        #edeef3;
  --surface-container-high:   #e7e8ed;
  --surface-container-highest:#e1e2e7;
  --surface-dim:              #d9dadf;
  --surface-bright:           #f8f9fe;

  --on-surface:         #191c1f;
  --on-surface-variant: #434655;
  --outline:            #737686;
  --outline-variant:    #c3c6d7;
  --inverse-surface:    #2e3134;
  --inverse-on-surface: #f0f0f5;
  --surface-tint:       #0053db;

  --nav-h: 80px;
  --radius-sm:  0.125rem;
  --radius-md:  0.25rem;
  --radius-lg:  0.5rem;
  --radius-xl:  0.75rem;
}

/* ── Base ─────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--background);
  color: var(--on-surface);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', sans-serif;
}

.label-tech {
  font-family: 'Space Grotesk', sans-serif;
}

/* ── Navbar ───────────────────────────────────── */
.pub-navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  height: var(--nav-h);
}

.pub-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 2rem;
  gap: 1.5rem;
}

.pub-navbar__logo {
  font-family: 'Manrope', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.pub-navbar__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.pub-navbar__links a {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 0.2s;
}

.pub-navbar__links a:hover,
.pub-navbar__links a.active {
  color: var(--primary);
}

.pub-navbar__links a.active {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 2px;
}

.pub-navbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Botão ghost */
.btn-ghost {
  padding: 0.5rem 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--on-surface-variant);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s;
}

.btn-ghost:hover {
  background: var(--surface-container-low);
  color: var(--primary);
}

/* Botão primário */
.btn-primary {
  padding: 0.625rem 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--on-primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  border: none;
  cursor: pointer;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(0, 74, 198, 0.25);
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover  { opacity: 0.9; }
.btn-primary:active { transform: scale(0.97); }

/* Botão secundário */
.btn-secondary {
  padding: 0.625rem 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--on-surface);
  background: var(--surface-container-high);
  border: none;
  cursor: pointer;
  border-radius: var(--radius-lg);
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover  { background: var(--surface-dim); }
.btn-secondary:active { transform: scale(0.97); }

/* ── Página — espaçamento para navbar fixa ──────── */
.pub-page {
  padding-top: var(--nav-h);
}

/* ── Modal de autenticação ────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-overlay.hidden {
  display: none;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3rem;
  padding: 3rem;
  text-align: center;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Grade de pontos decorativa */
.auth-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.08;
  background-image: radial-gradient(#2563eb 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.auth-card > * { position: relative; z-index: 1; }

.auth-card__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s;
  line-height: 1;
  padding: 0;
}

.auth-card__close:hover { color: #fff; }

.auth-card__icon {
  width: 4rem;
  height: 4rem;
  background: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 74, 198, 0.4);
}

.auth-card__title {
  font-family: 'Manrope', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-style: italic;
  color: #fff;
  margin-bottom: 2rem;
}

/* Inputs do modal */
.auth-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  color: #fff;
  -webkit-text-fill-color: #fff;
  caret-color: #60a5fa;
  font-family: monospace;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 0;
}

.auth-input:focus {
  border-color: var(--primary-container);
  background: rgba(0, 0, 0, 0.65);
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.25);
}

/* Autocomplete do browser — força fundo escuro e texto branco */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0px 1000px rgba(2, 6, 23, 0.95) inset;
  caret-color: #60a5fa;
  border-color: var(--primary-container);
  transition: background-color 5000s ease-in-out 0s;
}

/* Botão submit do modal */
.auth-submit {
  width: 100%;
  background: var(--primary);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 1rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 74, 198, 0.3);
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.25rem;
}

.auth-submit:hover  { background: var(--primary-container); }
.auth-submit:active { transform: scale(0.98); }

/* Mensagem de erro / sucesso */
.auth-message {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  line-height: 1.5;
  text-align: center;
  border: 1px solid transparent;
}

.auth-message.hidden { display: none; }

.auth-message--error {
  color: #f87171;
  background: rgba(186, 26, 26, 0.1);
  border-color: rgba(186, 26, 26, 0.2);
}

.auth-message--success {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

/* Divisor Google */
.auth-divider {
  margin: 1.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* Botão Google */
.auth-google {
  width: 100%;
  background: #fff;
  color: #1e293b;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 1rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, transform 0.15s;
}

.auth-google:hover  { background: #f1f5f9; }
.auth-google:active { transform: scale(0.98); }

/* Links de navegação do modal */
.auth-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.auth-nav-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
  text-underline-offset: 4px;
}

.auth-nav-link:hover { text-decoration: underline; }

.auth-nav-link--primary { color: #60a5fa; }
.auth-nav-link--primary:hover { color: #93c5fd; }

.auth-nav-link--muted { color: rgba(255, 255, 255, 0.3); }
.auth-nav-link--muted:hover { color: rgba(255, 255, 255, 0.6); }

/* ── Modal ATIF ("Assumir Comando") ─────────────── */
.atif-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.atif-overlay.hidden { display: none; }

.atif-card {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #020617;
  border: 4px solid var(--error);
  border-radius: 3rem;
  padding: 4rem;
  text-align: center;
  box-shadow: 0 0 80px rgba(186, 26, 26, 0.4);
}

.atif-card__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s;
  padding: 0;
  line-height: 1;
}

.atif-card__close:hover { color: #fff; }

.atif-card__title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-style: italic;
  color: #fff;
  margin-bottom: 0.5rem;
}

.atif-card__btn {
  margin-top: 2.5rem;
  background: var(--error);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 1.25rem 3rem;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(186, 26, 26, 0.4);
  transition: background 0.2s, transform 0.2s;
}

.atif-card__btn:hover  { background: #c41c1c; }
.atif-card__btn:active { transform: scale(0.96); }

/* ── Footer ───────────────────────────────────── */
.pub-footer {
  background: var(--surface-container-lowest);
  border-top: 1px solid var(--outline-variant);
  padding: 3rem 2rem;
}

.pub-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 1536px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .pub-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.pub-footer__logo {
  font-family: 'Manrope', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--on-surface);
}

.pub-footer__copy {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--outline);
  margin-top: 0.25rem;
}

.pub-footer__links {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.pub-footer__links a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--outline);
  text-decoration: none;
  transition: color 0.2s;
}

.pub-footer__links a:hover { color: var(--primary); }

/* ── Responsividade ───────────────────────────── */

/* Tablet: 768px–1024px */
@media (max-width: 1024px) {
  .pub-navbar__links {
    gap: 1.25rem;
  }
}

/* Mobile: < 768px */
@media (max-width: 768px) {
  .pub-navbar__links {
    display: none;
  }

  .pub-navbar__inner {
    padding: 0 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 2rem;
  }

  .atif-card {
    padding: 2.5rem 1.5rem;
    border-radius: 2rem;
  }
}

/* ── Suprimir URL na barra de status em hover ─── */
/* Links decorativos que não são âncoras de navegação real */
a[data-no-href]:hover { cursor: pointer; }

/* ── Utilitários ──────────────────────────────── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
