/* ============================================================
   SISF — Design System v2
   Dark / Light · Responsivo · Animações
   ============================================================ */
:root {
  --bg: #0B1220;
  --bg-elevated: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --accent: #22D3EE;
  --accent-dim: rgba(34, 211, 238, 0.15);
  --secondary: #6366F1;
  --secondary-dim: rgba(99, 102, 241, 0.15);
  --success: #10B981;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --header-h: 72px;
  --container: 1200px;
  --transition: 0.3s ease;
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-elevated: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --text: #0F172A;
  --text-muted: #475569;
  --text-dim: #64748B;
  --accent: #0891B2;
  --accent-dim: rgba(8, 145, 178, 0.12);
  --secondary: #4F46E5;
  --secondary-dim: rgba(79, 70, 229, 0.12);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  transition: opacity var(--transition);
}
[data-theme="light"] .bg-grid { opacity: 0.5; }

.bg-glow {
  position: fixed; top: -20%; left: 50%; transform: translateX(-50%);
  width: 120%; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(34,211,238,0.08) 0%, rgba(99,102,241,0.05) 40%, transparent 70%);
}
[data-theme="light"] .bg-glow {
  background: radial-gradient(ellipse at center, rgba(8,145,178,0.06) 0%, rgba(79,70,229,0.04) 40%, transparent 70%);
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; font-family: var(--font); font-size: 15px; font-weight: 600;
  border-radius: 12px; border: none; cursor: pointer; transition: all 0.25s ease; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #06B6D4);
  color: #0B1220; box-shadow: 0 0 0 0 rgba(34,211,238,0.4);
}
[data-theme="light"] .btn-primary { color: #fff; background: linear-gradient(135deg, #0891B2, #0E7490); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(34,211,238,0.35); }
.btn-secondary {
  background: transparent; color: var(--text); border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .btn-secondary:hover { background: rgba(0,0,0,0.04); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 100;
  background: rgba(11, 18, 32, 0.8); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); transition: background 0.3s, border-color 0.3s;
}
[data-theme="light"] .site-header { background: rgba(248, 250, 252, 0.85); }
.site-header.scrolled { background: rgba(11, 18, 32, 0.95); }
[data-theme="light"] .site-header.scrolled { background: rgba(255, 255, 255, 0.95); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: #0B1220; font-weight: 800; font-size: 18px;
}
.logo-text { letter-spacing: -0.03em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--text-muted);
  border-radius: 8px; transition: all 0.2s;
}
.nav a:hover, .nav a.active { color: var(--text); background: rgba(255,255,255,0.05); }
[data-theme="light"] .nav a:hover, [data-theme="light"] .nav a.active { background: rgba(0,0,0,0.05); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* Hero */
.hero { padding: calc(var(--header-h) + 60px) 0 80px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero-content { max-width: 560px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  background: var(--accent-dim); border: 1px solid rgba(34,211,238,0.25);
  border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 18px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { font-size: clamp(1rem, 1.8vw, 1.15rem); color: var(--text-muted); margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-card);
  box-shadow: var(--shadow);
}
.hero-visual img, .hero-visual video {
  width: 100%; height: auto; display: block; min-height: 280px; object-fit: cover;
}
.hero-visual .placeholder {
  min-height: 320px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-dim), var(--secondary-dim));
  color: var(--text-dim); flex-direction: column; gap: 12px; padding: 40px;
}
.hero-visual .placeholder i { font-size: 48px; color: var(--accent); opacity: 0.5; }

/* Sections */
.section { padding: 80px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-header .label {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}
.section-header h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; backdrop-filter: blur(12px); transition: all 0.3s ease;
}
.card:hover { border-color: rgba(34,211,238,0.3); transform: translateY(-4px); box-shadow: var(--shadow); }

/* Systems */
.systems-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.system-card .icon-wrap {
  width: 52px; height: 52px; border-radius: 14px; background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--accent); margin-bottom: 18px;
}
.system-card .card-img {
  width: 100%; border-radius: 12px; margin-bottom: 18px; overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 16/10; background: var(--bg-elevated);
}
.system-card .card-img img { width: 100%; height: 100%; object-fit: cover; }
.system-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.system-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; }
.system-card .features { list-style: none; margin-bottom: 20px; }
.system-card .features li {
  display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px;
}
.system-card .features li i { color: var(--accent); margin-top: 3px; font-size: 12px; flex-shrink: 0; }
.system-card .card-footer { display: flex; gap: 10px; flex-wrap: wrap; }

/* Tools */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.tool-card { text-align: center; padding: 32px 24px; }
.tool-card .icon-wrap {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  background: var(--secondary-dim); display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--secondary);
}
.tool-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.tool-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

/* Articles */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.article-card { display: flex; flex-direction: column; }
.article-card .meta { display: flex; gap: 12px; font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.article-card .meta .cat { color: var(--accent); font-weight: 600; }
.article-card h3 { font-size: 1.1rem; margin-bottom: 10px; transition: color 0.2s; }
.article-card:hover h3 { color: var(--accent); }
.article-card p { color: var(--text-muted); font-size: 0.92rem; flex: 1; margin-bottom: 16px; }
.article-card .read-more { font-size: 14px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }

/* CTA */
.cta-section { padding: 60px 0 80px; }
.cta-box {
  background: linear-gradient(135deg, var(--accent-dim), var(--secondary-dim));
  border: 1px solid rgba(34,211,238,0.2); border-radius: 24px; padding: 48px 36px; text-align: center;
}
.cta-box h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 12px; }
.cta-box p { color: var(--text-muted); max-width: 480px; margin: 0 auto 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 12px; max-width: 280px; }
.footer-col h4 {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-dim); margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 0.92rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.contact-list li { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.92rem; }
.contact-list i { color: var(--accent); width: 16px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-dim);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* Page hero */
.page-hero { padding: calc(var(--header-h) + 50px) 0 40px; text-align: center; }
.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 10px; }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font); font-size: 15px; transition: border-color 0.2s;
}
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select { background: #fff; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { min-height: 120px; resize: vertical; }

/* WhatsApp float */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.25s, box-shadow 0.25s;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(37,211,102,0.5); }

/* System detail layout */
.system-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 72px;
}
.system-detail.reverse { direction: rtl; }
.system-detail.reverse > * { direction: ltr; }
.system-detail .visual {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  background: var(--bg-elevated); aspect-ratio: 16/10;
}
.system-detail .visual img { width: 100%; height: 100%; object-fit: cover; }
.system-detail .visual video { width: 100%; height: 100%; object-fit: cover; }

/* Animations (GSAP + CSS fallback) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: rgba(11,18,32,0.98); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--border); gap: 2px;
  }
  [data-theme="light"] .nav { background: rgba(255,255,255,0.98); }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: 12px 16px; }
  .menu-toggle { display: flex; }
  .header-actions .btn-cta-header { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-content { max-width: 100%; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .system-detail { grid-template-columns: 1fr; gap: 28px; }
  .system-detail.reverse { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .cta-box { padding: 36px 20px; }
  .wa-float { bottom: 16px; right: 16px; width: 52px; height: 52px; font-size: 24px; }
  .section { padding: 56px 0; }
  .card { padding: 22px; }
}

@media (max-width: 400px) {
  .systems-grid, .tools-grid, .articles-grid { grid-template-columns: 1fr; }
}
