@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;700&display=swap');

/* ========== RESET & VARIABLES ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* IDE Dark Palette - Tailored for Swibase */
  --bg-dark:     #0d1117;
  --bg-card:     #161b22;
  --bg-card-hov: #21262d;
  
  --text-main:   #c9d1d9;
  --text-muted:  #8b949e;
  
  --accent-cyan:   #3b82f6; /* Swibase Blue */
  --accent-purple: #8b5cf6;
  --accent-green:  #10b981;
  --accent-blue:   #3b82f6;
  
  --border:      #30363d;
  --border-hov:  #4b5563;
  
  --radius:      8px;
  --transition:  all 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background pseudo-grid */
.code-bg-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.1;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 80%);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.text-center { text-align: center; }
.highlight-cyan { color: var(--accent-cyan); }
.highlight-purple { color: var(--accent-purple); }

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: #fff; }
.section-head { margin-bottom: 60px; }
.section-title { font-size: 2.5rem; margin-bottom: 16px; letter-spacing: -0.5px; }
.section-sub { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; }

/* ========== NAV ========== */
nav {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  height: 80px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; height: 100%; margin-left: -20px;}
.logo-img { height: 100%; width: auto; max-width: 280px; object-fit: contain; }

.nav-links { display: flex; gap: 8px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.95rem; font-weight: 500;
  padding: 10px 18px; border-radius: 6px;
  transition: var(--transition);
}
.nav-links a:hover { color: #fff; background: var(--bg-card-hov); }

.nav-cta {
  background: transparent !important; color: var(--accent-cyan) !important;
  border: 1px solid var(--accent-cyan); margin-left: 10px;
}
.nav-cta:hover { background: rgba(59, 130, 246, 0.1) !important; box-shadow: 0 0 15px rgba(59, 130, 246, 0.2); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; }
.hamburger span { width: 24px; height: 2px; background: #fff; transition: var(--transition); }

/* ========== HERO ========== */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 140px 0 80px; position: relative; }
.hero-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
  color: var(--text-muted); background: var(--bg-card);
  padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border);
  margin-bottom: 30px; letter-spacing: 1px; text-transform: uppercase;
}
.pulse-dot {
  width: 8px; height: 8px; background: var(--accent-green);
  border-radius: 50%; box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.hero-title { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 24px; }

/* Typewriter Effect */
.typewriter-container { color: var(--accent-cyan); font-family: 'JetBrains Mono', monospace; display: inline-block; white-space: nowrap; }
.cursor { display: inline-block; width: 10px; animation: blink 1s step-end infinite; color: #fff; margin-left: 4px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 40px; max-width: 550px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; font-weight: 600; font-size: 1rem;
  border-radius: var(--radius); text-decoration: none; transition: var(--transition);
  cursor: pointer; border: none; font-family: 'Inter', sans-serif;
}
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #e2e8f0; transform: translateY(-2px); }
.btn-secondary { background: var(--bg-card); color: #fff; border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hov); border-color: var(--text-muted); }

/* ========== IDE GRAPHIC (HERO & CONTACT) ========== */
.ide-window {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}
.ide-header {
  background: #090c10; border-bottom: 1px solid var(--border);
  padding: 12px 16px; display: flex; align-items: center; gap: 16px;
}
.ide-dots { display: flex; gap: 6px; }
.ide-dots span { width: 12px; height: 12px; border-radius: 50%; background: #ff5f56; }
.ide-dots span:nth-child(2) { background: #ffbd2e; }
.ide-dots span:nth-child(3) { background: #27c93f; }
.ide-title { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--text-muted); margin: 0 auto; transform: translateX(-24px); }

.ide-body { padding: 24px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; line-height: 1.6; }
.ide-body pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.kwd { color: #ff7b72; } .func { color: #d2a8ff; } .str { color: #a5d6ff; } .type { color: #79c0ff; } .cnst { color: #79c0ff; }
.term-prompt { color: var(--accent-green); margin-right: 8px; }
.comment { color: #8b949e; font-style: italic; }
.cursor-blink { display: inline-block; width: 8px; height: 1em; background: #fff; animation: blink 1s step-end infinite; vertical-align: bottom; }

/* ========== STATS ========== */
.stats { padding: 40px 0; }
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.platform-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 30px;
  transition: var(--transition); text-align: center;
}
.platform-card:hover { border-color: var(--accent-cyan); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1); }
.plat-icon { font-size: 40px; margin-bottom: 20px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.plat-icon.blue { color: var(--accent-blue); filter: drop-shadow(0 0 10px rgba(59,130,246,0.3)); }
.plat-icon.purple { color: var(--accent-purple); filter: drop-shadow(0 0 10px rgba(167,139,250,0.3)); }
.plat-icon.green { color: var(--accent-green); filter: drop-shadow(0 0 10px rgba(52,211,153,0.3)); }
.platform-card h3 { font-size: 1.25rem; margin-bottom: 16px; }
.platform-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ========== SERVICES ========== */
.services { padding: 100px 0; border-top: 1px solid var(--border); background: #090c10; }
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.svc-item {
  display: flex; gap: 20px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 30px;
  transition: var(--transition);
}
.svc-item:hover { border-color: var(--accent-cyan); background: var(--bg-card-hov); transform: translateY(-3px); }
.svc-icon { font-size: 2rem; background: #0d1117; padding: 15px; border-radius: var(--radius); border: 1px solid var(--border); }
.svc-info h3 { font-size: 1.3rem; margin-bottom: 8px; color: #fff; }
.svc-info p { color: var(--text-muted); font-size: 0.95rem; }

/* ========== CONTACT (TERMINAL) ========== */
.contact { padding: 100px 0; border-top: 1px solid var(--border); background: #050608; }
.contact-container { max-width: 800px; margin: 0 auto; }
.contact-terminal {
  background: #0d1117; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.term-body { padding: 30px; font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; }
.term-line { margin-bottom: 12px; color: #fff; }
.term-line.output { color: var(--text-muted); margin-bottom: 24px; padding-left: 16px; border-left: 2px solid var(--border); }
.contact-form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.contact-form input, .contact-form textarea {
  background: #090c10; border: 1px solid var(--border); color: #fff;
  padding: 16px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;
  transition: var(--transition); width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent-cyan); }
.contact-form button { font-family: 'JetBrains Mono', monospace; width: 100%; }

/* ========== FOOTER ========== */
footer { border-top: 1px solid var(--border); padding: 60px 0 30px; background: #090c10; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.foot-logo-img { height: 40px; margin-bottom: 16px; margin-left: -10px; }
.foot-col h4 { font-size: 1rem; margin-bottom: 20px; color: #fff; }
.foot-col a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 12px; font-size: 0.95rem; transition: var(--transition); }
.foot-col a:hover { color: var(--accent-cyan); }
.foot-desc { color: var(--text-muted); font-size: 0.9rem; max-width: 300px; }
.foot-bottom { border-top: 1px solid var(--border); padding-top: 30px; text-align: center; color: var(--text-muted); font-size: 0.85rem; font-family: 'JetBrains Mono', monospace; }

/* ========== UTILS & REVEAL ========== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-2 { transition-delay: 0.2s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-content { margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
  .ide-window { max-width: 600px; margin: 0 auto; text-align: left; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-inner { padding: 0 16px; height: 70px; }
  .logo-img { max-width: 180px; }
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; background: #161b22; flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  
  .platform-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .svc-item { flex-direction: column; gap: 15px; }
  
  .hero { padding: 120px 0 60px; }
  .hero-title { font-size: 2.2rem; }
  
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .foot-desc { margin: 0 auto; }
  .foot-logo-img { margin-left: 0; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .btn { width: 100%; }
  .term-body { padding: 20px; font-size: 0.85rem; }
}
