/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --bg-primary: #FAFAF9;
  --bg-secondary: #F0EFED;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #555555;
  --text-muted: #888888;
  --accent: #1565C0;
  --accent-light: #1E88E5;
  --accent-glow: rgba(21, 101, 192, 0.12);
  --border: #E5E5E5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1100px;
  --nav-height: 72px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg-primary: #0A0A0A;
  --bg-secondary: #141414;
  --bg-card: #1A1A1A;
  --text-primary: #EAEAEA;
  --text-secondary: #EAEAEA;
  --text-muted: #666666;
  --accent: #42A5F5;
  --accent-light: #64B5F6;
  --accent-glow: rgba(66, 165, 245, 0.15);
  --border: #2A2A2A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ===== UTILITIES ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: inline-block;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
}
section { padding: 100px 0; }

/* ===== SCROLL ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
[data-theme="dark"] .navbar { background: rgba(10, 10, 10, 0.85); }
.navbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 36px; width: auto; }
.nav-logo span {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem;
  color: var(--text-primary);
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-card); cursor: pointer;
  color: var(--text-secondary); font-size: 1.1rem;
  transition: all var(--transition);
}
.nav-toggle-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); transition: all var(--transition); border-radius: 2px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: var(--nav-height); position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -30%; width: 700px; height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; animation: pulse-glow 6s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-glow); color: var(--accent); padding: 8px 16px;
  border-radius: 100px; font-size: 0.8rem; font-weight: 600; margin-bottom: 28px;
  border: 1px solid rgba(21, 101, 192, 0.2);
}
[data-theme="dark"] .hero-badge { border-color: rgba(66, 165, 245, 0.25); }
.hero-badge .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero h1 {
  font-family: var(--font-heading); font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 24px;
}
.hero h1 .accent-text { color: var(--accent); }
.hero p {
  font-size: 1.1rem; color: var(--text-secondary); max-width: 560px;
  line-height: 1.85; margin-bottom: 40px;
}

/* ===== TYPING SUBTITLE ===== */
.hero .hero-typed-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  line-height: 1.2;
  min-height: 1.6em;
}
.hero-typed-subtitle .accent-text {
  font-weight: 700;
  color: var(--accent);
}
.typing-cursor {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  animation: cursor-blink 0.75s step-end infinite;
  margin-left: 2px;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
  border-radius: 10px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition);
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 16px rgba(21, 101, 192, 0.3);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(21, 101, 192, 0.4); color: #fff; }
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ===== STATS ===== */
.stats { padding: 60px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-item .stat-number {
  font-family: var(--font-heading); font-size: 2.4rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.stat-item .stat-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 8px; line-height: 1.4; }

/* ===== SERVICES ===== */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; }
.service-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px; transition: all var(--transition);
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: scaleX(0); transform-origin: left; transition: transform var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; font-size: 1.5rem;
  background: var(--accent-glow); margin-bottom: 20px;
}
.service-card h3 {
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600;
  margin-bottom: 12px; color: var(--text-primary);
}
.service-card p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; }

/* ===== SHOWCASE ===== */
.showcase-grid { display: flex; flex-direction: column; gap: 40px; margin-top: 48px; }
.showcase-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; align-items: center;
  transition: all var(--transition);
}
.showcase-card:hover { box-shadow: var(--shadow-lg); }
.showcase-card:nth-child(even) .showcase-img { order: -1; }
.showcase-img { border-radius: var(--radius); overflow: hidden; position: relative; }
.showcase-img img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.showcase-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--accent); color: #fff; padding: 4px 12px;
  border-radius: 100px; font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.showcase-badge.coming-soon { background: #F59E0B; }
.showcase-info h3 {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600;
  margin-bottom: 12px;
}
.showcase-info p { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.75; }
.showcase-stats { display: flex; flex-wrap: wrap; gap: 16px; }
.showcase-stat {
  background: var(--bg-secondary); padding: 10px 16px; border-radius: 10px;
  font-size: 0.8rem; font-weight: 600; color: var(--text-primary);
  border: 1px solid var(--border);
}
.showcase-stat span { color: var(--accent); font-size: 1rem; display: block; font-family: var(--font-heading); }
.showcase-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-weight: 600; font-size: 0.9rem; color: var(--accent);
}
.showcase-link:hover { gap: 10px; }

/* ===== FOUNDER ===== */
.founder-grid {
  display: grid; grid-template-columns: 300px 1fr; gap: 60px;
  margin-top: 48px; align-items: start;
}
.founder-photo-wrapper { position: relative; }
.founder-photo {
  width: 100%; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 4px solid var(--bg-card);
}
.founder-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.founder-name-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-top: -30px;
  position: relative; z-index: 1; text-align: center; box-shadow: var(--shadow-md);
}
.founder-name-card h3 { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 4px; }
.founder-name-card p { font-size: 0.85rem; color: var(--text-secondary); }
.founder-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.founder-social-link:hover {
  color: #0A66C2;
  transform: translateY(-2px);
}
[data-theme="dark"] .founder-social-link:hover {
  color: #70B5F9;
}
.founder-pillars { display: flex; flex-direction: column; gap: 28px; }
.pillar {
  padding: 28px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); transition: all var(--transition);
  display: flex; gap: 20px;
}
.pillar:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.pillar-num {
  font-family: var(--font-heading); font-size: 2rem; font-weight: 700;
  color: var(--accent); line-height: 1; min-width: 40px;
}
.pillar h4 { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.pillar p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

/* ===== PARTNERS ===== */
.partners { background: var(--bg-secondary); text-align: center; }
.partners-logos {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 40px; margin-top: 48px;
}
.partner-logo {
  font-size: 1.1rem; font-weight: 700; color: var(--text-muted);
  padding: 16px 28px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all var(--transition);
  opacity: 0.6;
}
.partner-logo:hover { opacity: 1; border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ===== CONTACT ===== */
.contact { text-align: center; }
.contact-cta {
  display: flex; justify-content: center; gap: 20px; margin-top: 36px; flex-wrap: wrap;
}
.contact-info {
  display: flex; justify-content: center; gap: 40px; margin-top: 48px; flex-wrap: wrap;
  color: var(--text-secondary); font-size: 0.9rem;
}
.contact-info-item { display: flex; align-items: center; gap: 8px; }

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0; border-top: 1px solid var(--border);
  text-align: center; font-size: 0.8rem; color: var(--text-muted);
}

/* ===== FAB ===== */
.fab-wrapper { position: fixed; bottom: 28px; right: 28px; z-index: 999; }
.fab-toggle {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 1.5rem;
  cursor: pointer; box-shadow: 0 4px 20px rgba(21, 101, 192, 0.4);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); position: relative; z-index: 2;
}
.fab-toggle:hover { transform: scale(1.08); }
.fab-toggle.active { transform: rotate(45deg); background: #EF4444; box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4); }
.fab-menu { position: absolute; bottom: 70px; right: 0; display: flex; flex-direction: column; gap: 12px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: all var(--transition); }
.fab-menu.active { opacity: 1; pointer-events: all; transform: translateY(0); }
.fab-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 100px; box-shadow: var(--shadow-md);
  white-space: nowrap; font-size: 0.85rem; font-weight: 600;
  color: var(--text-primary); transition: all var(--transition);
}
.fab-item:hover { border-color: var(--accent); color: var(--accent); transform: translateX(-4px); }
.fab-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.fab-zalo { background: #0068FF; color: #fff; }
.fab-whatsapp { background: #25D366; color: #fff; }

/* ===== MOBILE NAV ===== */
.mobile-menu {
  display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: var(--bg-primary); z-index: 998; padding: 40px 24px;
  flex-direction: column; gap: 24px; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.mobile-menu.active { display: flex; opacity: 1; pointer-events: all; }
.mobile-menu a { font-size: 1.2rem; font-weight: 600; color: var(--text-primary); padding: 12px 0; border-bottom: 1px solid var(--border); }

/* ===== INTERACTIVE BACKGROUND (Particles) ===== */
#interactive-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#interactive-background canvas {
  pointer-events: auto;
}

/* ===== CUSTOM CURSOR ===== */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transform: translate(-100px, -100px) translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1.5px solid rgba(21, 101, 192, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  will-change: transform, width, height;
  transform: translate(-100px, -100px) translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
[data-theme="dark"] .cursor-dot {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(66, 165, 245, 0.5);
}
[data-theme="dark"] .cursor-ring {
  border-color: rgba(66, 165, 245, 0.4);
}
.cursor-ring.hovering {
  width: 60px; height: 60px;
  background: rgba(21, 101, 192, 0.06);
  border-color: rgba(21, 101, 192, 0.15);
}
[data-theme="dark"] .cursor-ring.hovering {
  background: rgba(66, 165, 245, 0.06);
  border-color: rgba(66, 165, 245, 0.15);
}
.cursor-dot.hovering {
  transform: translate(var(--cx, -100px), var(--cy, -100px)) translate(-50%, -50%) scale(0.5);
}
.cursor-ring.clicking {
  width: 30px; height: 30px;
  background: rgba(21, 101, 192, 0.2);
  border-color: var(--accent);
}
[data-theme="dark"] .cursor-ring.clicking {
  background: rgba(66, 165, 245, 0.2);
}

/* ===== SPOTLIGHT CARD EFFECT ===== */
.spotlight-card {
  position: relative;
  overflow: hidden;
}
.spotlight-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(21, 101, 192, 0.12), transparent 40%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.spotlight-card:hover .spotlight-layer {
  opacity: 1;
}
[data-theme="dark"] .spotlight-layer {
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(66, 165, 245, 0.1), transparent 40%);
}

/* ===== 3D CARD TILT ===== */
.card-3d {
  will-change: transform;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow var(--transition), border-color var(--transition);
}
.card-3d:hover {
  transition: transform 0.1s linear, box-shadow var(--transition), border-color var(--transition);
}

/* ===== MAGNETIC BUTTON ===== */
.magnetic {
  transition: all var(--transition);
  will-change: transform;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .showcase-card { grid-template-columns: 1fr; }
  .showcase-card:nth-child(even) .showcase-img { order: 0; }
  .founder-grid { grid-template-columns: 1fr; justify-items: center; }
  .founder-photo-wrapper { max-width: 280px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 480px) {
  section { padding: 64px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .contact-info { flex-direction: column; align-items: center; gap: 16px; }
}

/* Hide custom cursor on touch/mobile devices */
@media (max-width: 640px), (hover: none) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
  #interactive-background,
  .cursor-dot,
  .cursor-ring { display: none !important; }
  .card-3d { transform: none !important; transition: none !important; }
  .magnetic { transform: none !important; }
}
