/* ============================================
   APPKON OFFICIAL WEBSITE — STYLESHEET
   ============================================ */

/* --- Variables --- */
:root {
  --bg-primary:    #080815;
  --bg-secondary:  #0e0e1c;
  --bg-card:       rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border:        rgba(255, 255, 255, 0.08);
  --border-hover:  rgba(255, 255, 255, 0.18);

  --accent:   #6366f1;
  --accent-2: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);

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

  --radius-sm:  8px;
  --radius:     16px;
  --radius-lg:  24px;
  --radius-full: 9999px;

  --shadow:      0 4px 32px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.3);

  --header-height:    72px;
  --container-width:  1200px;
  --section-padding:  96px;

  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* --- Container --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Gradient Text --- */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(8, 8, 21, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px; height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: white;
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 18px; font-weight: 700; line-height: 1; }
.logo-sub  { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1; }

/* Nav */
.nav { display: flex; align-items: center; gap: 4px; }

.nav-item { position: relative; }

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex; align-items: center; gap: 5px;
}
.nav-link::after { content: '▾'; font-size: 9px; opacity: 0.5; }
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  min-width: 180px;
  background: rgba(14, 14, 28, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateX(-50%) translateY(-8px) scale(0.95);
  transform-origin: top center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.dropdown-item {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}
.dropdown-item:hover { color: var(--text-primary); background: var(--bg-card-hover); }

/* Lang toggle */
.lang-toggle {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  margin-left: 8px;
}
.lang-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}
.mobile-menu-btn span {
  display: block; width: 24px; height: 2px;
  background: var(--text-secondary);
  border-radius: 1px; transition: var(--transition);
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu Overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height); left: 0; right: 0; bottom: 0;
  background: var(--bg-primary);
  z-index: 999;
  padding: 32px 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-nav-section { margin-bottom: 32px; }
.mobile-nav-heading {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); margin-bottom: 12px;
}
.mobile-nav-link {
  display: block;
  padding: 14px 0;
  font-size: 17px; font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.mobile-nav-link:hover { color: var(--text-primary); }
.mobile-lang-row {
  margin-top: 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-lang-row span { font-size: 14px; color: var(--text-muted); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(99, 102, 241, 0.18) 0%, transparent 65%),
    linear-gradient(to bottom, transparent 55%, var(--bg-primary) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 24px;
  max-width: 820px;
}

.hero-logo-wrap {
  width: 88px; height: 88px;
  background: var(--accent-gradient);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 900; color: white;
  margin: 0 auto 32px;
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.45);
}

.hero-title {
  font-size: clamp(52px, 10vw, 100px);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: clamp(14px, 2.5vw, 18px);
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-slogan {
  font-size: clamp(22px, 5vw, 44px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 44px;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  z-index: 2;
}
.scroll-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-muted);
  animation: pulse 2s infinite;
}
.scroll-dot:nth-child(2) { animation-delay: 0.25s; }
.scroll-dot:nth-child(3) { animation-delay: 0.5s; }
@keyframes pulse { 0%,100% { opacity: 0.25; } 50% { opacity: 1; } }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 15px; font-weight: 600;
  transition: var(--transition);
  cursor: pointer; border: none; text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-gradient); color: white;
  box-shadow: 0 4px 28px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(99, 102, 241, 0.55);
}
.btn-secondary {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-hover); transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--border); color: var(--text-secondary); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(99,102,241,0.08); }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: var(--section-padding) 0; }

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

.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); margin-bottom: 20px;
}

.section-title {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800; letter-spacing: -0.02em;
  color: var(--text-primary); margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 540px; margin: 0 auto; line-height: 1.75;
}

/* ============================================
   APPS SECTION
   ============================================ */
.apps-section { background: var(--bg-secondary); }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: var(--transition);
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
}
.app-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--card-glow, var(--accent-gradient));
  opacity: 0; transition: var(--transition);
}
.app-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}
.app-card:hover::before { opacity: 0.04; }

.app-icon {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; flex-shrink: 0;
}

.app-name { font-size: 19px; font-weight: 700; }

.app-tagline { font-size: 14px; color: var(--text-secondary); line-height: 1.65; flex: 1; }

.app-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}

.app-platform-tags { display: flex; gap: 6px; }
.platform-tag {
  padding: 3px 10px; border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 11px; font-weight: 500; color: var(--text-muted);
}

.app-arrow {
  font-size: 18px; color: var(--text-muted);
  transition: var(--transition);
}
.app-card:hover .app-arrow { color: var(--text-primary); transform: translateX(5px); }

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section { background: var(--bg-primary); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 18px;
  transition: var(--transition);
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
}
.service-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--srv-gradient, var(--accent-gradient));
  opacity: 0; transition: var(--transition);
}
.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}
.service-card:hover::after { opacity: 1; }

.service-icon-wrap {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}

.service-name { font-size: 22px; font-weight: 700; }

.service-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.75; flex: 1; }

.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-tag {
  padding: 4px 12px; border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
}

.service-learn {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600;
  color: var(--accent); transition: var(--transition);
}
.service-card:hover .service-learn { gap: 10px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}

.footer-top {
  display: grid; grid-template-columns: 1.2fr 2fr;
  gap: 64px; margin-bottom: 48px;
}

.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: var(--text-muted); line-height: 1.75; max-width: 260px; }

.footer-links-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}

.footer-col h4 {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 14px;
  color: var(--text-secondary); margin-bottom: 10px;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 32px; border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 16px;
}

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

.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 13px; color: var(--text-muted); transition: var(--transition); }
.footer-legal a:hover { color: var(--text-secondary); }

.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition); font-size: 15px;
}
.social-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* ============================================
   DETAIL PAGES
   ============================================ */
.page-top {
  padding: calc(var(--header-height) + 72px) 0 72px;
  background: var(--bg-secondary);
  position: relative; overflow: hidden;
}
.page-top::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, var(--page-glow, rgba(99,102,241,0.12)) 0%, transparent 65%);
  pointer-events: none;
}
.page-top .container { position: relative; z-index: 1; }

.page-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}

.page-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-muted);
  margin-bottom: 28px; transition: var(--transition);
}
.page-back:hover { color: var(--text-secondary); }

.page-title {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 900; letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.page-subtitle {
  font-size: 17px; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 32px;
}
.page-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.page-visual {
  display: flex; align-items: center; justify-content: center;
}
.icon-large {
  width: 160px; height: 160px; border-radius: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}

/* Features on detail pages */
.features-section { padding: 80px 0; }
.features-section.alt { background: var(--bg-secondary); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.feature-icon { font-size: 30px; margin-bottom: 14px; }
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }

/* Process steps */
.process-section { padding: 80px 0; background: var(--bg-secondary); }
.process-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.process-step {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  text-align: center;
}
.step-num {
  font-size: 40px; font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 12px;
}
.step-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step-desc  { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* CTA section */
.cta-section { padding: 100px 0; text-align: center; }
.cta-section.alt { background: var(--bg-secondary); }
.cta-title {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.cta-desc {
  font-size: 17px; color: var(--text-secondary);
  max-width: 480px; margin: 0 auto 40px; line-height: 1.75;
}
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Legal pages */
.legal-page { padding: calc(var(--header-height) + 64px) 0 80px; }
.legal-page .container { max-width: 760px; }
.legal-page h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.legal-page .updated { font-size: 14px; color: var(--text-muted); margin-bottom: 48px; }
.legal-page h2 { font-size: 20px; font-weight: 700; margin: 40px 0 12px; }
.legal-page p  { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.legal-page ul { padding-left: 20px; margin-bottom: 16px; }
.legal-page li { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 6px; }

/* ============================================
   FADE IN ANIMATION
   ============================================ */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-links-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-padding: 64px; }

  .nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .mobile-menu { display: block; }

  .apps-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .page-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .page-visual { order: -1; }
  .page-actions { justify-content: center; }
  .page-back { margin: 0 auto 28px; }

  .features-grid { grid-template-columns: 1fr; }
  .process-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero-logo-wrap { width: 72px; height: 72px; font-size: 36px; border-radius: 18px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .process-grid { grid-template-columns: 1fr; }
  .footer-links-grid { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; align-items: center; }
}
