/* v3 Design System — POLY-073 */

:root {
  --purple: #a413ec;
  --purple-light: #c44bf0;
  --purple-dim: #7a0fb2;
  --purple-glow: rgba(164, 19, 236, 0.35);
  --bg-deep: #0a0510;
  --bg-surface: #110b18;
  --bg-card: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(164, 19, 236, 0.25);
  --text-primary: #f0ecf4;
  --text-secondary: #9b8ea8;
  --text-dim: #6b5f75;
  --green: #34d399;
  --amber: #fbbf24;
}

/* ── Reset ─────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

html:has(body.v3) {
  overflow-x: hidden;
}

body.v3 {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Container ─────────────────────────────────────────────────────── */

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

/* ── Grain Overlay ─────────────────────────────────────────────────── */

body.v3::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ── Glow Orb ──────────────────────────────────────────────────────── */

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

/* ── Keyframe Animations ───────────────────────────────────────────── */

@keyframes float-up {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 var(--purple-glow);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(164, 19, 236, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(164, 19, 236, 0);
  }
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── Fade-Up ───────────────────────────────────────────────────────── */

.fade-up {
  opacity: 0;
  animation: float-up 0.7s ease forwards;
}

.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }
.fade-up-d4 { animation-delay: 0.4s; }
.fade-up-d5 { animation-delay: 0.5s; }

/* ── Fade-In Directional ───────────────────────────────────────────── */

@keyframes fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-left {
  opacity: 0;
  animation: fade-in-left 0.6s ease forwards;
}

.fade-in-right {
  opacity: 0;
  animation: fade-in-right 0.6s ease forwards;
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.v3-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 24px var(--purple-glow), 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.v3-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px var(--purple-glow), 0 8px 20px rgba(0,0,0,0.4);
}

.v3-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.v3-btn-ghost:hover {
  border-color: var(--border-hover);
  background: rgba(164, 19, 236, 0.05);
}

/* ── Cards ─────────────────────────────────────────────────────────── */

.v3-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.v3-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-dim), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.v3-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

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

/* ── Bento Icon ────────────────────────────────────────────────────── */

.v3-bento-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(164, 19, 236, 0.08);
  border: 1px solid rgba(164, 19, 236, 0.15);
  color: var(--purple-light);
  font-size: 22px;
  flex-shrink: 0;
}

/* ── Tag Pill ──────────────────────────────────────────────────────── */

.v3-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-light);
  border: 1px solid rgba(164, 19, 236, 0.25);
  border-radius: 999px;
  background: rgba(164, 19, 236, 0.06);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Section Headers ───────────────────────────────────────────────── */

.v3-section-label {
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--purple-light);
  margin-bottom: 12px;
}

.v3-section-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}

/* ── Typography ────────────────────────────────────────────────────── */

.v3-display {
  font-family: 'Sora', sans-serif;
}

.v3-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Price Styles ──────────────────────────────────────────────────── */

.v3-price-dollar {
  font-family: 'Sora', sans-serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.v3-price-period {
  font-size: 14px;
  color: var(--text-dim);
}

/* ── Navigation ────────────────────────────────────────────────────── */

.v3-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0;
  margin: 0;
  background: rgba(10, 5, 16, 0.8);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
  overflow-x: hidden;
}

.v3-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  min-height: 0;
  height: auto;
}

.v3-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.v3-nav-logo-img {
  height: 32px;
  width: auto;
}

.v3-nav-logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v3-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

.v3-nav-login {
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
}

.v3-nav-cta {
  background: var(--purple) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 10px 20px !important;
  border-radius: 8px !important;
  box-shadow: 0 0 20px var(--purple-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.v3-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px var(--purple-glow);
  background: var(--purple-light) !important;
}

.v3-nav-mobile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.v3-nav-mobile-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.v3-nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 24px;
  background: rgba(10, 5, 16, 0.95);
  border-bottom: 1px solid var(--border);
}

.v3-nav-mobile a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.v3-nav-mobile a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 768px) {
  .v3-nav-links {
    display: none;
  }

  .v3-nav-mobile-btn {
    display: flex;
  }
}

/* ── Footer ────────────────────────────────────────────────────────── */

.v3-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-deep);
  color: var(--text-secondary);
}

body.v3 .v3-footer * {
  border-color: var(--border);
}

.v3-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.v3-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.v3-footer-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.v3-footer-right a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.v3-footer-right a:hover {
  color: var(--text-secondary);
}

.v3-footer-copy {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 32px;
}

/* Override language selector Tailwind styles inside v3 footer */
.v3-footer button {
  color: var(--text-dim) !important;
}
.v3-footer button:hover {
  color: var(--text-primary) !important;
}
.v3-footer [x-show] {
  background: var(--bg-surface) !important;
  border-color: var(--border) !important;
}
.v3-footer [x-show] button {
  color: var(--text-secondary) !important;
}
.v3-footer [x-show] button:hover {
  background: rgba(164,19,236,0.06) !important;
  color: var(--text-primary) !important;
}

@media (max-width: 640px) {
  .v3-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
