/* =============================================
   IFC Tools — Global Stylesheet
   Identidade Visual IFCTools
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:          #f2f2f2;
  --bg-subtle:   #e8e8e8;
  --bg-card:     #FFFFFF;
  --border:      #E2E8F0;
  --border-hover:#CBD5E1;

  /* Roxo — destaque, CTAs, botões principais */
  --accent:      #6465F0;
  --accent-dark: #4F50CC;
  --accent-light:#EEF0FF;
  --accent-glow: rgba(100,101,240,0.15);

  /* Roxo — cor primária da marca (igual ao accent) */
  --primary:     #6465F0;
  --primary-dark:#4F50CC;
  --primary-light:#EEF0FF;

  /* Lavanda — cor de apoio */
  --lavender:    #AEB8FF;

  /* Navy — texto e elementos escuros */
  --navy:        #0D1846;

  --text-primary:  #0D1846;
  --text-secondary:#4A5275;
  --text-muted:    #8A93B8;
  --text-on-accent:#FFFFFF;

  --success: #10B981;
  --warning: #F59E0B;
  --danger:  #EF4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(13,24,70,0.08), 0 1px 2px rgba(13,24,70,0.04);
  --shadow-md: 0 4px 16px rgba(13,24,70,0.08), 0 2px 6px rgba(13,24,70,0.04);
  --shadow-lg: 0 10px 40px rgba(13,24,70,0.10), 0 4px 12px rgba(13,24,70,0.06);

  --font: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ── Layout Helpers ── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(100,101,240,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }

.btn-google {
  background: var(--bg);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  gap: 10px;
}
.btn-google:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-google .google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-accent { background: var(--accent-light); color: var(--accent); }
.badge-success { background: #ECFDF5; color: #059669; }
.badge-warning { background: #F97316; color: #FFFFFF; }
.badge-muted { background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}
.card-interactive:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

/* Fallback: logo-mark e logo-text mantidos para compatibilidade */
.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.logo-text span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-subtle); }
.nav-links a.active { color: var(--accent); background: var(--accent-light); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ── Footer ── */
.footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Toast Notification ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--text-primary);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}
.toast.success { background: var(--success); }
.toast.warning { background: var(--warning); }
.toast.error   { background: var(--danger); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  animation: scaleIn 0.25s ease;
}

.modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.modal-header .logo-mark {
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
  margin: 0 auto 16px;
}

.modal-header h2 { font-size: 1.5rem; margin-bottom: 8px; }
.modal-header p  { color: var(--text-secondary); font-size: 0.95rem; }

.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.modal-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.modal-footer a { color: var(--accent); }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* ── Utility ── */
.text-center { text-align: center; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background var(--transition);
  flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--bg-subtle); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav overlay ── */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,24,70,0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 499;
}
.nav-mobile-overlay.open { display: block; }

/* ── Mobile nav drawer ── */
.nav-mobile-menu {
  /* Hidden by default — shown only when .open is toggled via JS */
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 88vw;
  height: 100%;
  height: 100dvh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 500;
  flex-direction: column;
  padding: 20px 20px 32px;
  gap: 4px;
  box-shadow: -8px 0 40px rgba(13,24,70,0.12);
  overflow-y: auto;
}
.nav-mobile-menu.open { display: flex; }

.nav-mobile-close {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: background var(--transition), color var(--transition);
}
.nav-mobile-close:hover { background: var(--bg-subtle); color: var(--text-primary); }

.nav-mobile-link {
  display: block;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.nav-mobile-link:hover { color: var(--text-primary); background: var(--bg-subtle); }

.nav-mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.nav-mobile-menu .btn { width: 100%; justify-content: center; margin-top: 4px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section    { padding: 64px 0; }
  .section-sm { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav-links   { display: none; }
  .nav-cta-desktop { display: none; }
  .nav-hamburger   { display: flex; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  /* Modal: reduce padding on mobile */
  .modal { padding: 28px 20px; }
  /* Toast: anchor to bottom edges on mobile */
  .toast-container { left: 16px; right: 16px; bottom: 16px; width: auto; }
  .toast { min-width: unset; }
}
