/* ============================================
   AITSQL.com - AI + T-SQL
   Dark theme with blue/tech accent colors
   ============================================ */

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

:root {
  --blue-primary: #0ea5e9;
  --blue-bright: #38bdf8;
  --blue-deep: #0369a1;
  --blue-dark: #0c4a6e;
  --blue-glow: rgba(14, 165, 233, 0.15);
  --blue-glow-strong: rgba(14, 165, 233, 0.3);
  --bg-darkest: #030712;
  --bg-dark: #0a0f1a;
  --bg-card: #0f172a;
  --bg-card-hover: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(14, 165, 233, 0.12);
  --border-hover: rgba(14, 165, 233, 0.3);
  --green-accent: #22c55e;
  --amber-accent: #f59e0b;
  --font-display: 'Sora', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 10px;
  --radius-lg: 16px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-display);
  background: var(--bg-darkest);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 2rem; }

/* ---- Noise overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

body > * { position: relative; z-index: 1; }

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.nav.scrolled { padding: 0.65rem 0; }
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-deep));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0;
}
.logo-text span { color: var(--blue-bright); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links .btn-nav {
  padding: 0.5rem 1.25rem;
  background: var(--blue-primary);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s;
}
.nav-links .btn-nav:hover {
  background: var(--blue-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}

/* Mobile nav */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---- Hero ---- */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(14, 165, 233, 0.08), transparent),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(14, 165, 233, 0.04), transparent);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--blue-glow);
  border: 1px solid var(--border-hover);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue-bright);
  margin-bottom: 2rem;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--green-accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

/* Code decoration in hero */
.hero-code {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
}
.hero-code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.hero-code-bar .dot-r { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.hero-code-bar .dot-y { width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; }
.hero-code-bar .dot-g { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; }
.hero-code-bar span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.hero-code pre {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary);
  overflow-x: auto;
}
.hero-code .kw { color: var(--blue-bright); }
.hero-code .fn { color: #a78bfa; }
.hero-code .str { color: var(--green-accent); }
.hero-code .cm { color: var(--text-muted); font-style: italic; }
.hero-code .num { color: var(--amber-accent); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-deep));
  color: white;
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-outline:hover {
  border-color: var(--blue-primary);
  background: var(--blue-glow);
}

/* ---- Sections ---- */
section { padding: 5rem 0; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.section-label::before {
  content: '//';
  color: var(--text-muted);
}
.section-header {
  margin-bottom: 3.5rem;
}
.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.section-header p {
  color: var(--text-secondary);
  max-width: 560px;
  font-size: 1.05rem;
}
.section-header.center { text-align: center; }
.section-header.center p { margin: 0 auto; }
.section-alt { background: var(--bg-dark); }

/* ---- Feature Cards ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.08);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-glow);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}
.feature-tag {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.2rem 0.6rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--green-accent);
}

/* ---- Tools Section ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}
.tool-card:hover {
  border-color: var(--border-hover);
}
.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.tool-card .tool-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  flex: 1;
}
.tool-card .tool-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.tool-badge {
  padding: 0.2rem 0.6rem;
  background: var(--blue-glow);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--blue-bright);
}

/* ---- Blog Preview ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s;
}
.blog-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.blog-card-body { padding: 1.5rem; }
.blog-card .blog-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.blog-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.blog-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}
.blog-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-primary);
  transition: gap 0.2s;
}
.blog-card:hover .read-more { gap: 0.6rem; }

/* ---- Consulting / Services ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-bright));
  opacity: 0;
  transition: opacity 0.3s;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.service-icon {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
}
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.service-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---- Stats bar ---- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 4rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--blue-bright);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ---- CTA Section ---- */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  background:
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(14, 165, 233, 0.1), transparent);
}
.cta-section h2 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.cta-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* ---- Footer ---- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  font-weight: 600;
  font-size: 0.95rem;
}
.footer-brand span { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; margin-left: 0.75rem; }
.footer-links {
  display: flex;
  gap: 2rem;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); }

/* ---- SQL Sandbox ---- */
.sandbox-section {
  padding: 5rem 0;
  background:
    radial-gradient(ellipse 50% 40% at 30% 50%, rgba(14, 165, 233, 0.06), transparent),
    var(--bg-darkest);
}
.sandbox-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.sandbox-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  transition: all 0.3s;
}
.sandbox-step:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.sandbox-step-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-deep));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}
.sandbox-step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.sandbox-step p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}
.sandbox-pitch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.sandbox-pitch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-bright), #a78bfa);
}
.sandbox-pitch-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.sandbox-pitch-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  max-width: 720px;
}
.sandbox-pitch-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---- Legal Footer ---- */
.footer-legal {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-legal .disclaimer {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  color: #fbbf24;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.footer-legal .disclaimer strong { color: #f59e0b; }
.legal-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.legal-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color 0.2s;
}
.legal-links a:hover { color: var(--blue-bright); }
.legal-divider { color: rgba(255,255,255,0.15); font-size: 0.8rem; }
.copyright {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ---- Legal Modals ---- */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.legal-modal.open {
  opacity: 1;
  visibility: visible;
}
.legal-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
}
.legal-modal.open .legal-modal-content {
  transform: translateY(0);
}
.legal-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.legal-modal-close:hover { color: var(--text-primary); }
.legal-modal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}
.legal-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.legal-text p strong { color: var(--text-primary); }

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
}
.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }
.fade-up-d4 { animation-delay: 0.4s; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-container { flex-wrap: wrap; gap: 0.5rem; }
  .nav-links {
    width: 100%;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; font-size: 0.85rem; }
  .hamburger { display: flex; }

  .hero { padding: 8rem 0 4rem; }
  .hero h1 { font-size: 2.25rem; }
  .hero-sub { font-size: 1rem; }

  .stats-bar { flex-direction: column; gap: 1.5rem; }
  .services-grid { grid-template-columns: 1fr; }
  .sandbox-steps { grid-template-columns: repeat(2, 1fr); }
  .sandbox-pitch-card { padding: 1.75rem; }
  .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 7rem 0 3rem; }
  .hero h1 { font-size: 1.85rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-code { margin: 0 -0.5rem; }
  .sandbox-steps { grid-template-columns: 1fr; }
}
