@import url('theme.css');

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Kanit', sans-serif;
  background: var(--gradient-body);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated background */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: floatOrb 18s ease-in-out infinite;
}
.orb-1 { width: 520px; height: 520px; background: #7c3aed; top: -10%; left: -8%; animation-delay: 0s; }
.orb-2 { width: 420px; height: 420px; background: #2563eb; top: 40%; right: -12%; animation-delay: -6s; }
.orb-3 { width: 360px; height: 360px; background: #f97316; bottom: -8%; left: 30%; animation-delay: -12s; }
.orb-4 { width: 280px; height: 280px; background: #10b981; bottom: 20%; right: 20%; animation-delay: -8s; opacity: 0.3; }

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent);
}

/* Nav */
.landing-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 200;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(5, 10, 20, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand-logo-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.brand-logo-block img { height: 36px; width: auto; object-fit: contain; }
.brand-title { font-weight: 700; font-size: 1.15rem; color: var(--glow); line-height: 1.1; }
.brand-sub { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; transition: color 0.25s; }
.nav-links a:hover { color: white; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.btn-primary {
  background: var(--gradient-btn);
  color: white;
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(99, 102, 241, 0.45); }
.btn-ghost {
  background: transparent;
  color: white;
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
  padding: 7rem 5% 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #93c5fd;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s ease both;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  background: var(--gradient-hero-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 0.8s 0.1s ease both;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; animation: fadeUp 0.8s 0.3s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Video showcase - cinematic hero */
.video-stage {
  position: relative;
  animation: fadeUp 1s 0.4s ease both;
}

.video-main {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.05) inset;
  aspect-ratio: 16/10;
  background: #111;
}

.video-main video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-overlay-ui {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.75));
  pointer-events: none;
}

.video-caption-demo {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: clamp(0.75rem, 2vw, 1rem);
  white-space: nowrap;
  animation: captionPulse 3s ease-in-out infinite;
}
.video-caption-demo .hl { color: #fbbf24; font-weight: 700; }

@keyframes captionPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; transform: translateX(-50%) scale(1.02); }
}

.floating-card {
  position: absolute;
  background: rgba(15, 15, 30, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  animation: floatCard 6s ease-in-out infinite;
}
.floating-card-1 { top: -12px; right: -20px; animation-delay: 0s; }
.floating-card-2 { bottom: 20px; left: -30px; animation-delay: -2s; }
.floating-card-3 { bottom: -16px; right: 10%; animation-delay: -4s; }

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

.floating-card .icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(56, 189, 248, 0.2);
  color: #93c5fd;
}

/* Demo gallery */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.section-head p { color: var(--muted); max-width: 600px; margin: 0 auto; }

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.demo-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
  cursor: pointer;
}
.demo-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 20px 50px rgba(56, 189, 248, 0.2);
}
.demo-card video {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  display: block;
}
.demo-card .info {
  padding: 1.25rem;
}
.demo-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.demo-card p { font-size: 0.85rem; color: var(--muted); }
.demo-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #93c5fd;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.feature-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: transform 0.3s, border-color 0.3s;
}
.feature-item:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
}
.feature-item .fi {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.15);
  color: #93c5fd;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 26px;
}
.feature-item h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature-item p { font-size: 0.9rem; color: var(--muted); }

/* Marquee */
.marquee-wrap {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding: 1.5rem 0;
  background: rgba(255,255,255,0.02);
  margin: 2rem 0;
}
.marquee {
  display: flex;
  gap: 3rem;
  animation: marquee 30s linear infinite;
  width: max-content;
}
.marquee span {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Plan modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.modal-overlay.show { display: flex; opacity: 1; }

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.4s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  background: none; border: none;
  color: var(--muted);
  font-size: 1.75rem;
  cursor: pointer;
}
.modal-close:hover { color: white; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.plan-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s;
}
.plan-card:hover { transform: translateY(-4px); }
.plan-card.featured {
  border-color: #38bdf8;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.2);
  position: relative;
}
.plan-card .price { font-size: 2.2rem; font-weight: 800; margin: 0.5rem 0 1rem; }
.plan-card ul { list-style: none; flex: 1; margin-bottom: 1.5rem; }
.plan-card li {
  display: flex; gap: 0.5rem; align-items: flex-start;
  font-size: 0.9rem; color: var(--muted);
  margin-bottom: 0.65rem;
}
.plan-card li .material-symbols-outlined { font-size: 18px; color: #22c55e; flex-shrink: 0; }

/* Auth modal */
.auth-input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
  outline: none;
}
.auth-input:focus { border-color: var(--primary); }

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 5%;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .demo-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .demo-grid, .feature-grid { grid-template-columns: 1fr; }
  .floating-card { display: none; }
}
