/* ==========================================================================
   Xeno — Ultra-Fast, SEO-Optimized Dark Glassmorphism Design System
   ========================================================================== */

:root {
  --bg: #000000;
  --bg-raised: #08080a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --surface-active: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #ffffff;
  --text-muted: #a3a3a3;
  --text-faint: #666666;

  --accent-glow: rgba(255, 255, 255, 0.12);
  --ok: #4ade80;
  --cyan: #38bdf8;
  --purple: #c084fc;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --nav-h: 70px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --max-w: 1240px;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 255, 255, 0.02), transparent);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background grid effect */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.wrap-narrow {
  max-width: 860px;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 16px;
  background: #ffffff;
  color: #000000;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease;
}
.brand:hover .brand-icon {
  transform: scale(1.08);
}

.brand-title {
  background: linear-gradient(135deg, #ffffff 40%, #a3a3a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.nav-links a {
  padding: 6px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: #eaeaea;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--border);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

.mobile-toggle {
  display: none;
  padding: 8px;
  color: var(--text);
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(var(--nav-h) + 8px);
    left: 16px;
    right: 16px;
    padding: 12px;
    background: #0d0d10;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
    gap: 4px;
  }
  .nav-links.is-open a {
    width: 100%;
    padding: 10px 16px;
  }
  .mobile-toggle {
    display: block;
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  padding-top: clamp(48px, 9vw, 96px);
  padding-bottom: clamp(40px, 6vw, 72px);
  text-align: center;
  z-index: 10;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  max-width: 900px;
  margin-inline: auto;
  margin-bottom: 20px;
}

.rotator {
  position: relative;
  display: inline-block;
  min-width: 160px;
  text-align: left;
  background: linear-gradient(135deg, #ffffff 30%, #9ca3af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 36px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-fine {
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ==========================================================================
   Stats Strip
   ========================================================================== */
.stats-strip {
  position: relative;
  z-index: 10;
  margin-block: 24px 64px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.stat-item {
  padding: 24px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item:last-child {
  border-right: none;
}

.stat-val {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  background: linear-gradient(180deg, #ffffff 40%, #a3a3a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-head {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ==========================================================================
   Bento Grid (The 4 iconic cards)
   ========================================================================== */
.bento-section {
  position: relative;
  z-index: 10;
  padding-bottom: 80px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-card {
  position: relative;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.bento-card:hover {
  border-color: var(--border-strong);
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 70%);
  pointer-events: none;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #ffffff;
}

.card-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

/* Card 1: External Execution Carousel (Col span 7) */
.card-preview {
  grid-column: span 7;
}

/* Card 2: Performance radar (Col span 5) */
.card-perf {
  grid-column: span 5;
}

/* Card 3: Free & Keyless live feed (Col span 6) */
.card-keyless {
  grid-column: span 6;
}

/* Card 4: 3D Globe (Col span 6) */
.card-globe {
  grid-column: span 6;
}

@media (max-width: 980px) {
  .card-preview, .card-perf, .card-keyless, .card-globe {
    grid-column: span 12;
  }
}

/* Carousel component inside Card 1 */
.carousel-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000000;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-controls {
  position: absolute;
  inset-inline: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.carousel-btn {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}
.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.carousel-dot.active {
  width: 24px;
  background: #ffffff;
}

/* Performance Box inside Card 2 */
.perf-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.radar-spinner {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ffffff;
  animation: spin 1.4s linear infinite;
  display: grid;
  place-items: center;
  position: relative;
}

.radar-spinner::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.perf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
}

.perf-label {
  color: var(--text-muted);
}
.perf-val {
  font-weight: 600;
  color: #ffffff;
}

/* Card 3: Execution Activity list */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.activity-time {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* Card 4: Globe Canvas */
.globe-box {
  position: relative;
  width: 100%;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#globeCanvas {
  max-width: 100%;
  height: 100%;
}

/* ==========================================================================
   Download & Changelog Section
   ========================================================================== */
.download-section {
  position: relative;
  z-index: 10;
  padding-block: 64px;
}

.download-frame {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 5vw, 48px);
  backdrop-filter: blur(20px);
}

.download-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .download-grid {
    grid-template-columns: 1fr;
  }
}

.version-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.version-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.version-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.vt-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.vt-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.vt-badge img {
  width: 18px;
  height: 18px;
}
.vt-score {
  color: var(--ok);
  font-weight: 600;
}

.changelog-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: 100%;
}

.changelog-box h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.changelog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.changelog-list li {
  position: relative;
  padding-left: 20px;
}

.changelog-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: #ffffff;
  font-weight: bold;
}

/* ==========================================================================
   FAQ Section (Accessible HTML details/summary)
   ========================================================================== */
.faq-section {
  position: relative;
  z-index: 10;
  padding-block: 64px 96px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.faq-item:hover, .faq-item[open] {
  border-color: var(--border-strong);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: #ffffff;
}

.faq-answer {
  padding: 0 24px 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 10;
}

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

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

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

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-left: 14px;
  border-left: 1px solid var(--border-strong);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-faint);
}
