:root {
  --bg: #0b0b12;
  --panel: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #a0a6b3;
  --primary: #ffffff;
  --accent1: #7c8cff;
  --accent2: #00e7ff;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

/* ✨ Fix: kill any horizontal overflow/gaps */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* <- key fix */
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124, 140, 255, 0.25), transparent 40%),
    radial-gradient(1000px 600px at 90% 10%, rgba(0, 231, 255, 0.22), transparent 40%),
    linear-gradient(180deg, #0c0c16 0%, #0b0b12 60%, #0b0b12 100%);
  background-color: var(--bg);
}

/* --- Three.js background (ensure no sub-pixel bleed) --- */
#bg { 
  position: fixed; 
  inset: 0; 
  z-index: -1; 
  overflow: hidden;  /* prevent child canvas bleeding */
}
#bg canvas { 
  display: block; 
  width: 100vw;      /* use viewport units, not percentage of parent */
  height: 100vh; 
  max-width: 100vw; 
  max-height: 100vh;
}

/* Utilities */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.small { font-size: 0.9rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(12,12,22,0.8), rgba(12,12,22,0));
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { display: block; height: 36px; width: auto; }
.nav a { color: var(--text); opacity: 0.85; text-decoration: none; margin-left: 18px; }
.nav a:hover { opacity: 1; }

/* Hero */
.hero { position: relative; padding: 72px 0 48px; }
.hero-grid { display: grid; gap: 28px; grid-template-columns: 1.1fr 0.9fr; }
.hero-copy h1 { font-size: 44px; line-height: 1.1; margin: 0 0 12px; }
.hero-copy p { color: var(--muted); font-size: 18px; margin: 0 0 18px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--primary); color: #0b0b12; }
.btn-primary:hover { filter: brightness(0.95); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

.hero-card .card, .contact .card { background: var(--panel); border: 1px solid var(--border); border-radius: 24px; padding: 20px; }
.card h3 { margin-top: 0; }
.card ul { margin: 10px 0 0 18px; color: var(--muted); }

.bg-blur {
  position: absolute; inset: -10% -10% auto -10%;
  height: 220px; z-index: -1;
  background: radial-gradient(600px 220px at 60% 0%, rgba(124, 140, 255, 0.35), transparent 60%),
              radial-gradient(600px 220px at 40% 20%, rgba(0, 231, 255, 0.28), transparent 55%);
  filter: blur(20px);
}

/* Features */
.features { padding: 24px 0 6px; }
.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.feature { background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 18px; }
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

/* Contact */
.contact { padding: 28px 0 64px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 0.95rem; opacity: 0.9; }
.field input, .field select, .field textarea {
  width: 100%; color: var(--text); background: rgba(255,255,255,0.06);
  border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(255,255,255,0.32); }
.error { color: #ff6b6b; min-height: 1em; }
.hp { display: none; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.actions { margin-top: 8px; }
.form-status { margin-top: 6px; min-height: 24px; color: var(--muted); }
.site-footer { border-top: 1px solid var(--border); padding: 22px 0; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 36px; }
}
