:root {
  --ink: #0f172a;
  --sub: #475569;
  --brand: #6366f1;
  --brand-hover: #4f46e5;
  --bg: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.7);
  --border: #e2e8f0;
  --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] {
  --ink: #f8fafc;
  --sub: #94a3b8;
  --bg: #020617;
  --card-bg: rgba(15, 23, 42, 0.6);
  --border: #1e293b;
  --brand: #818cf8;
  --brand-hover: #6366f1;
  --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
body { 
  font-family: 'Outfit', Inter, Segoe UI, Arial, sans-serif; 
  margin: 0; 
  line-height: 1.6; 
  color: var(--ink); 
  background: var(--bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

header, main section, footer { max-width: 1100px; margin: auto; padding: 40px 24px; }
header { padding: 24px; }

.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.logo { height: 58px; width: auto; transition: transform 0.2s ease; }
.logo:hover { transform: scale(1.05); }

nav a { margin-right: 20px; text-decoration: none; color: var(--ink); font-weight: 500; transition: color 0.2s ease; }
nav a:last-child { margin-right: 0; }
nav a:hover { color: var(--brand); }

h1, h2, h3 { color: var(--ink); font-weight: 600; }

.hero { 
  text-align: center; padding: 80px 24px; border-radius: 20px;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}
.hero h2 { margin: 0 0 16px; font-size: 3rem; letter-spacing: -0.02em; }
.hero p { color: var(--sub); font-size: 1.25rem; max-width: 600px; margin: 0 auto 32px; }

.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 24px; border-radius: 10px; text-decoration: none; font-weight: 600; transition: all 0.2s ease; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

.value-prop { text-align: center; }
.value-prop h2 { margin-bottom: 40px; font-size: 2rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 32px; }
.feature { padding: 24px; }
.feature .icon, .feature-img { font-size: 3rem; margin-bottom: 16px; max-width: 120px; height: auto; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.feature h3 { margin-bottom: 12px; }
.feature p { color: var(--sub); font-size: 1rem; }

#products h2 { text-align: center; font-size: 2rem; margin-bottom: 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card { 
  border: 1px solid var(--border); border-radius: 16px; padding: 24px; 
  background: var(--card-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--glass-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1); border-color: var(--brand); }
.card h3 { margin-top: 0; font-size: 1.25rem; }
.card p { color: var(--sub); flex-grow: 1; margin-bottom: 24px; }
.cta { display: inline-block; color: var(--brand); text-decoration: none; font-weight: 600; margin-top: auto; transition: color 0.2s ease; }
.cta::after { content: '→'; margin-left: 4px; transition: margin-left 0.2s ease; }
.cta:hover::after { margin-left: 8px; }

footer { border-top: 1px solid var(--border); margin-top: 60px; text-align: center; color: var(--sub); font-size: 14px;}

.contact-form { max-width: 640px; display: grid; gap: 16px; margin: 0 auto; }
.contact-form input, .contact-form textarea { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: transparent; color: var(--ink); transition: border-color 0.2s ease; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand); }
.contact-form textarea { min-height: 120px; }

[data-theme="dark"] .logo { content: url('logo-azlabs-dark.svg'); }

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  margin-left: 10px;
  transition: transform 0.2s ease;
  color: var(--ink);
  line-height: 1;
}
#theme-toggle:hover {
  transform: scale(1.1);
}
