/* ===== DARK THEME (default) ===== */
:root {
  --accent: #8b8fa3;
  --accent-light: #a5a9bc;
  --accent-dark: #6e7285;
  --accent-bg: rgba(139, 143, 163, 0.1);

  --bg-primary: #0a0a0a;
  --bg-secondary: #111118;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222236;

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(139, 143, 163, 0.3);

  --header-bg: rgba(10, 10, 10, 0.85);
  --header-bg-scrolled: rgba(10, 10, 10, 0.95);

  --btn-primary-bg: var(--accent);
  --btn-primary-text: #0a0a0a;
  --btn-primary-hover: var(--accent-light);
  --btn-outline-border: rgba(255, 255, 255, 0.15);
  --btn-outline-hover-bg: rgba(255, 255, 255, 0.05);
  --btn-outline-hover-border: rgba(255, 255, 255, 0.25);

  --section-alt-bg: var(--bg-secondary);
  --hero-glow: rgba(139, 143, 163, 0.08);
  --card-shadow: rgba(0, 0, 0, 0.3);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --accent: #4a4e5c;
  --accent-light: #636778;
  --accent-dark: #36394a;
  --accent-bg: rgba(74, 78, 92, 0.08);

  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f3f5;

  --text-primary: #1a1a2e;
  --text-secondary: #555b6e;
  --text-muted: #8b90a0;

  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(74, 78, 92, 0.25);

  --header-bg: rgba(248, 249, 250, 0.85);
  --header-bg-scrolled: rgba(248, 249, 250, 0.95);

  --btn-primary-bg: var(--accent-dark);
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #2c2f3e;
  --btn-outline-border: rgba(0, 0, 0, 0.15);
  --btn-outline-hover-bg: rgba(0, 0, 0, 0.03);
  --btn-outline-hover-border: rgba(0, 0, 0, 0.25);

  --section-alt-bg: #f0f1f3;
  --hero-glow: rgba(74, 78, 92, 0.06);
  --card-shadow: rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.highlight {
  color: var(--accent);
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}

header.scrolled {
  background: var(--header-bg-scrolled);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-img {
  height: 40px;
  width: auto;
}

[data-theme="dark"] .logo-img {
  filter: invert(1);
}

[data-theme="light"] .logo-img {
  filter: invert(0);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  background: var(--accent-bg);
  border-color: var(--border-hover);
  color: var(--accent);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

#nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--accent-bg);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

#matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

#matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  flex: 0 0 auto;
}

.hero-image img {
  width: 320px;
  height: auto;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

[data-theme="dark"] .hero-image img {
  filter: drop-shadow(0 20px 40px rgba(139, 143, 163, 0.12));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  box-shadow: 0 8px 24px var(--card-shadow);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--btn-outline-border);
}

.btn-outline:hover {
  background: var(--btn-outline-hover-bg);
  border-color: var(--btn-outline-hover-border);
  box-shadow: 0 8px 24px var(--card-shadow);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
  transition: background-color 0.3s;
}

.section-dark {
  background: var(--section-alt-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  margin-bottom: 16px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.about-stats {
  display: grid;
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.3s, transform 0.3s, background-color 0.3s;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px var(--card-shadow);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border-radius: 12px;
  margin-bottom: 20px;
  color: var(--accent);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ===== PRODUCT ===== */
.product-showcase {
  max-width: 900px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px;
  display: flex;
  align-items: center;
  gap: 48px;
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.product-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px var(--card-shadow);
}

.product-image {
  flex: 0 0 220px;
}

.product-image img {
  width: 100%;
  border-radius: 12px;
}

.product-info {
  flex: 1;
}

.product-info h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.product-tagline {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.product-info > p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.product-features {
  list-style: none;
  margin-bottom: 28px;
  display: grid;
  gap: 8px;
}

.product-features li {
  padding-left: 20px;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.product-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== CONTACT ===== */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content > p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.contact-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  transition: border-color 0.3s;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
}

.js-loaded .animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-loaded .animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-inner {
    gap: 40px;
  }

  .hero-image img {
    width: 260px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-card {
    padding: 36px;
    gap: 32px;
  }

  .product-image {
    flex: 0 0 180px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  #nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--header-bg-scrolled);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s, background 0.3s;
  }

  #nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image img {
    width: 200px;
  }

  .section {
    padding: 72px 0;
  }

  .product-card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .product-image {
    flex: 0 0 auto;
  }

  .product-features {
    text-align: left;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}
