/* ═══════════════════════════════════════════════════════════
   ElfAi Technologies — Design System
   Navy + Orange | Dark Theme | Glassmorphism
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Tokens ── */
:root {
  --bg: #0a0a0b;
  --surface: #131314;
  --surface2: #1e1e20;
  --surface3: #252528;
  --border: #2a2a2e;
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #f0f0f0;
  --muted: #8a8a8e;
  --navy: #1a3a6b;
  --navy-light: #2a5a9b;
  --orange: #FF6B4A;
  --coral: #FF8F70;
  --gold: #F0C27F;
  --purple: #7B4FBF;
  --gradient-brand: linear-gradient(135deg, var(--navy), var(--orange));
  --gradient-accent: linear-gradient(135deg, var(--coral), var(--orange));
  --gradient-warm: linear-gradient(135deg, var(--orange), var(--gold));
  --gradient-hero: linear-gradient(135deg, var(--navy), var(--purple), var(--orange));
  --gradient-flame: linear-gradient(90deg, #ff1a1a, #ff6a00, #ffcc00);
  --carbon-pattern: repeating-linear-gradient(45deg, #18191c 0, #18191c 2px, #1a1b1e 2px, #1a1b1e 4px);
  --caraiwon-blue: #0f4c81;
  --caraiwon-red: #d32f2f;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 60px rgba(255, 107, 74, 0.15);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --glass-bg: rgba(19, 19, 20, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: blur(24px);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--orange); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--coral); }

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

/* ── Typography ── */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-warm {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-hero {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-flame {
  background: var(--gradient-flame);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.bg-carbon {
  background: var(--carbon-pattern);
  box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ══════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  overflow: visible;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-med);
}

nav.scrolled {
  background: rgba(10, 10, 11, 0.95);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.footer-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  margin: -10px 0;
}

.logo:hover img {
  opacity: 0.9;
  transform: scale(1.03);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color var(--transition-fast);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--orange);
}

/* Language Selector */
.lang-selector {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-med);
}
.lang-selector:hover { border-color: var(--border-hover); }
.lang-selector option { background: #121212; color: #fff; }

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  padding: 4px;
}

/* ══════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 160px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(26, 58, 107, 0.25) 0%, rgba(255, 107, 74, 0.1) 40%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 32px;
  position: relative;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 107, 74, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(255, 107, 74, 0); }
}

.hero h1 {
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 1.05;
  margin-bottom: 24px;
  position: relative;
}

.hero p {
  font-size: 19px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 44px;
  position: relative;
  line-height: 1.6;
}

/* CTA Buttons */
.cta-group {
  display: flex;
  gap: 16px;
  align-items: center;
  position: relative;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(255, 107, 74, 0.35);
  color: #fff;
}

.cta-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.cta-btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════
   SECTION HEADERS
   ══════════════════════════════════════════════ */
.section-header {
  text-align: center;
  padding: 100px 24px 48px;
}

.section-header h2 {
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--muted);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════
   CARDS & GRIDS
   ══════════════════════════════════════════════ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: border-color var(--transition-med), transform var(--transition-med), box-shadow var(--transition-med);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0;
  transition: opacity var(--transition-med);
}

.card:hover {
  border-color: rgba(255, 107, 74, 0.3);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 24px;
}

.card h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

/* Product Card (special) */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  transition: all var(--transition-med);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: rgba(255, 107, 74, 0.3);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  color: inherit;
}

.product-card-header {
  padding: 40px 32px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.product-card-header--centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.product-card-header .product-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex-shrink: 0;
}

.product-card-header .product-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  display: block;
}

#product-decorai .product-logo {
  height: 48px;
}

#product-caraiwon .product-logo {
  height: 56px;
}

.product-card-header h3 {
  font-size: 24px;
  font-weight: 800;
}

.product-card-header .tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange);
  margin-top: 4px;
}

.product-card-body {
  padding: 0 32px 32px;
  flex: 1;
}

.product-card-body p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.product-card-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card-footer span {
  color: var(--orange);
  font-weight: 700;
  font-size: 14px;
}

.product-card-footer .arrow {
  color: var(--orange);
  font-size: 20px;
  transition: transform var(--transition-fast);
}

.product-card:hover .arrow {
  transform: translateX(4px);
}

/* ══════════════════════════════════════════════
   COMING SOON BADGE
   ══════════════════════════════════════════════ */
.product-card--coming-soon {
  position: relative;
}

.product-card--coming-soon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 11, 0.35);
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
  transition: background var(--transition-med);
}

.product-card--coming-soon:hover::after {
  background: rgba(10, 10, 11, 0.15);
}

.coming-soon-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.9), rgba(255, 143, 112, 0.9));
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(255, 107, 74, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 107, 74, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset; }
  50% { box-shadow: 0 4px 30px rgba(255, 107, 74, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15) inset; }
}

/* ══════════════════════════════════════════════
   STATS ROW
   ══════════════════════════════════════════════ */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 80px;
  padding: 80px 24px;
  position: relative;
}

.stats-row::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.stats-row::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.stat-item {
  text-align: center;
}

.stat-item .number {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 4px;
}

.stat-item .label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════
   MISSION / ABOUT
   ══════════════════════════════════════════════ */
.mission-section {
  padding: 100px 24px;
  position: relative;
}

.mission-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.mission-content h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  line-height: 1.15;
}

.mission-content p {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ══════════════════════════════════════════════
   TECH PILLARS
   ══════════════════════════════════════════════ */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 48px auto 0;
  padding: 0 24px;
}

.pillar {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--transition-med);
}

.pillar:hover {
  border-color: rgba(255, 107, 74, 0.2);
  transform: translateY(-4px);
}

.pillar-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.pillar h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pillar p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════
   CTA SECTION
   ══════════════════════════════════════════════ */
.cta-section {
  padding: 120px 24px;
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 74, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  position: relative;
}

.cta-section p {
  color: var(--muted);
  font-size: 18px;
  max-width: 500px;
  margin: 0 auto 40px;
  position: relative;
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 60px 40px 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-brand .footer-logo {
  height: 60px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  transition: color var(--transition-fast);
  opacity: 0.7;
}

.footer-col a:hover {
  color: var(--orange);
  opacity: 1;
}

.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: var(--muted);
  font-size: 13px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  color: var(--muted);
  font-size: 18px;
  transition: color var(--transition-fast);
}

.social-links a:hover {
  color: var(--orange);
}

/* ══════════════════════════════════════════════
   SCROLL ANIMATIONS
   ══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════
   PARTICLES CANVAS
   ══════════════════════════════════════════════ */
#particles-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-content { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  nav { padding: 8px 20px; }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(10, 10, 11, 0.98);
    backdrop-filter: var(--glass-blur);
    padding: 24px;
    flex-direction: column;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }

  .hero { padding: 140px 20px 60px; }
  .hero h1 { letter-spacing: -1.5px; }

  .grid-3, .pillars { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  .stats-row {
    flex-direction: column;
    gap: 32px;
    padding: 48px 24px;
  }

  .footer-content { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .cta-group { flex-direction: column; }
}

@media (max-width: 480px) {
  .logo img { height: 80px; margin: -16px 0; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 16px; }
  .section-header h2 { font-size: 28px; }
}
