:root {
  --accent: #818CF8;
  --accent-dark: #6366F1;
  --text: #EEEEEE;
  --text-secondary: #A8A8A8;
  --bg: #1A1A1A;
  --bg-alt: #232323;
  --bg-card: #2A2A2A;
  --border: #3F3F3F;
  --header-bg: rgba(26, 26, 26, 0.9);
  --max-width: 1120px;
}

body.light {
  --accent: #4F46E5;
  --accent-dark: #4338CA;
  --text: #111827;
  --text-secondary: #6B7280;
  --bg: #FFFFFF;
  --bg-alt: #F9FAFB;
  --bg-card: #FFFFFF;
  --border: #E5E7EB;
  --header-bg: rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.nav { display: flex; gap: 28px; }
.nav a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--text); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s;
}
.theme-toggle:hover { color: var(--accent); }

.theme-toggle .icon-sun { display: none; }
body.light .theme-toggle .icon-moon { display: none; }
body.light .theme-toggle .icon-sun { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  text-align: center;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}
.hero-sub {
  max-width: 620px;
  margin: 0 auto 32px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
section { padding: 72px 0; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
}

.products { background: var(--bg-alt); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: box-shadow 0.15s, transform 0.15s, background 0.2s ease, border-color 0.2s ease;
}
.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}
.product-icon { color: var(--accent); margin-bottom: 16px; }
.product-card h3 { font-size: 1.15rem; }
.product-card p { color: var(--text-secondary); font-size: 0.95rem; margin: 0 0 16px; }
.product-link { font-weight: 600; font-size: 0.9rem; }

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.principle h3 { font-size: 1.05rem; }
.principle p { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }

.about-inner {
  max-width: 680px;
  text-align: center;
}
.about-inner p { color: var(--text-secondary); }

.contact { background: var(--bg-alt); }
.contact-inner { text-align: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.footer-brand .logo-img {
  height: 26px;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 16px 0 0;
}

/* Responsive nav */
@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    display: none;
    gap: 16px;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .footer-links {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
}