:root {
  --bg-main: #0a0e17;
  --bg-surface: #111827;
  --bg-surface-hover: #1f2937;
  --border: #1f293d;
  --border-focus: #6366f1;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #22c55e;
  --warning: #f59e0b;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body.light {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #4f46e5;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

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

.logo-box {
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.logo-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.1;
}

.logo-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

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

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}

.theme-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

/* Open Demo Primary Buttons */
.btn-demo-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-demo-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-demo-primary .sparkle {
  color: #fef08a;
}

/* Hero */
.hero-section {
  text-align: center;
  padding: 20px 0 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.hero-title {
  font-size: 54px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
}

/* Hero CTA Group */
.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transition: all 0.15s ease;
}

.hero-btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.hero-btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

.hero-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.hero-btn-ghost:hover {
  color: var(--text-primary);
}

/* Showcase Card */
.showcase-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  text-align: left;
}

.showcase-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.showcase-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-pill {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

.showcase-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.persona-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.image-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: 12px;
}

.image-viewport img,
.image-viewport video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Floating overlay card */
.overlay-card {
  position: absolute;
  bottom: 24px;
  left: 24px;
  max-width: 440px;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 16px;
  padding: 16px 20px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.overlay-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #818cf8;
  margin-bottom: 4px;
}

.overlay-card h4 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.overlay-card p {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
  margin-bottom: 12px;
}

.overlay-link {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.overlay-link:hover {
  color: #fff;
  text-decoration: underline;
}

.showcase-footer {
  padding: 16px 24px;
  background: var(--bg-surface-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mono-meta {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.footer-cta-btn {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.footer-cta-btn:hover {
  text-decoration: underline;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 64px 0;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 28px 24px;
  border-radius: 20px;
}

.icon-bubble {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.icon-bubble.accent { background: rgba(99, 102, 241, 0.15); }
.icon-bubble.success { background: rgba(34, 197, 94, 0.15); }
.icon-bubble.warning { background: rgba(245, 158, 11, 0.15); }
.icon-bubble.purple { background: rgba(168, 85, 247, 0.15); }

.feature-box h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
}

.feature-box p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Bottom CTA Banner */
.banner-cta {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 60px;
}

.banner-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.banner-content p {
  font-size: 14px;
  color: var(--text-secondary);
}

.btn-demo-primary.large {
  padding: 14px 28px;
  font-size: 15px;
}

/* Footer */
.footer {
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

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

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
}

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

@media (max-width: 768px) {
  .hero-title { font-size: 36px; }
  .header { flex-direction: column; gap: 16px; align-items: flex-start; }
  .nav-links { display: none; }
  .overlay-card { left: 12px; bottom: 12px; right: 12px; max-width: none; }
}

/* 3D Billboard Perspective Homography Overlay */
.billboard-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 380px;
  height: 260px;
  transform-origin: 0 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.95), 0 0 15px rgba(99, 102, 241, 0.4);
}

.billboard-ad-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.billboard-lighting-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.ad-creative {
  width: 100%;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 25px rgba(0,0,0,0.8), inset 0 0 15px rgba(255,255,255,0.15);
  transition: all 0.2s ease;
}

.ad-creative.repbull {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #db0a40 100%);
  color: #ffffff;
  border-color: #db0a40;
}
.ad-creative.repbull .ad-top-pill {
  background: #db0a40;
  color: #fff;
}
.ad-creative.repbull .ad-headline {
  color: #ffffff;
}

.ad-creative.sony {
  background: linear-gradient(135deg, #09090b 0%, #18181b 70%, #ff6600 100%);
  color: #ffffff;
  border-color: #ff6600;
}
.ad-creative.sony .ad-top-pill {
  background: #ff6600;
  color: #fff;
}
.ad-creative.sony .ad-headline {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.ad-creative.mrf {
  background: linear-gradient(135deg, #18181b 0%, #27272a 60%, #d3112a 100%);
  color: #ffffff;
  border-color: #d3112a;
}
.ad-creative.mrf .ad-top-pill {
  background: #d3112a;
  color: #fff;
}

.ad-top-pill {
  align-self: flex-start;
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ad-headline {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.ad-sub {
  font-size: 10px;
  opacity: 0.85;
  font-family: var(--font-mono);
}

/* Draggable Handles Overlay */
.handles-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  display: none;
}

.quad-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #22c55e;
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: grab;
  pointer-events: auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.8);
  transition: transform 0.1s;
}

.quad-handle:hover {
  transform: scale(1.35);
  background: #16a34a;
}

.btn-toggle-handles {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid var(--accent);
  color: #e0e7ff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-toggle-handles:hover {
  background: var(--accent);
  color: #fff;
}

/* Video Section */
.video-section {
  margin: 64px 0;
  text-align: center;
}

.section-header {
  margin-bottom: 32px;
}

.section-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 640px;
  margin: 0 auto;
}

.video-embed-card {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  max-width: 1000px;
  margin: 0 auto;
}

.walkthrough-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.host-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-mono);
  outline: none;
}

.host-input:focus {
  border-color: var(--accent);
}
