:root {
  --bg: #09090b;
  --bg-alt: #101014;
  --bg-raised: #15151b;
  --text: #f3f2f6;
  --text-muted: #a6a3b1;
  --accent: #8b6bf0;
  --accent-2: #35d6c4;
  --accent-soft: rgba(139, 107, 240, 0.16);
  --border: #21212a;
  --radius: 18px;
  --font-display: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Fixed, non-scrolling grain overlay for texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 720px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(9, 9, 11, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent-2); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

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

.nav-links a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:not(.nav-cta):hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--text); }

.nav-cta {
  color: var(--text) !important;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px !important;
  font-weight: 600;
}
.nav-cta:hover { border-color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  padding: 130px 0 110px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -220px;
  left: 55%;
  transform: translateX(-50%);
  width: 900px;
  height: 620px;
  background: radial-gradient(circle, rgba(139, 107, 240, 0.3) 0%, rgba(53, 214, 196, 0.1) 45%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-copy { text-align: left; max-width: 560px; }

.eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.eyebrow-alt { margin-bottom: 16px; }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.14;
  margin: 0 0 24px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 36px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #09090b;
  font-weight: 700;
  padding: 14px 30px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(139, 107, 240, 0.3);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
}
.btn-ghost svg { transition: transform 0.2s ease; }
.btn-ghost:hover svg { transform: translateX(3px); }

/* Hero visual: equalizer bars + rotating dial */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 340px;
}

.eq-bars {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 160px;
  z-index: 1;
}
.eq-bars span {
  width: 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  animation: eq-bounce 1.6s ease-in-out infinite;
  opacity: 0.85;
}
.eq-bars span:nth-child(1) { height: 40%; animation-delay: -1.1s; }
.eq-bars span:nth-child(2) { height: 70%; animation-delay: -0.4s; }
.eq-bars span:nth-child(3) { height: 45%; animation-delay: -1.4s; }
.eq-bars span:nth-child(4) { height: 90%; animation-delay: -0.2s; }
.eq-bars span:nth-child(5) { height: 55%; animation-delay: -0.9s; }
.eq-bars span:nth-child(6) { height: 80%; animation-delay: -0.6s; }
.eq-bars span:nth-child(7) { height: 35%; animation-delay: -1.3s; }
.eq-bars span:nth-child(8) { height: 65%; animation-delay: -0.1s; }

@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.eq-dial {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: conic-gradient(from 0deg, rgba(139,107,240,0.25), transparent 40%, rgba(53,214,196,0.2) 70%, transparent);
  animation: dial-spin 18s linear infinite;
}
.eq-dial::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

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

/* Sections */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.section-dark { background: var(--bg-alt); }

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-align: center;
}

.container-narrow h2 { text-align: left; }

.section-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

.container-narrow .section-intro { text-align: left; margin: 0 0 40px; }

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  transform: translateY(calc(var(--i, 0) * 6px));
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(calc(var(--i, 0) * 6px - 4px));
  border-color: var(--accent);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-bottom: 18px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin: 0 0 12px;
  font-weight: 700;
}

.card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.98rem;
  position: relative;
}

.disclaimer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 40px;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 24px;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-toggle {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.faq-toggle::before,
.faq-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--accent-2);
  transition: transform 0.25s ease;
}
.faq-toggle::before { width: 100%; height: 1.5px; transform: translate(-50%, -50%); }
.faq-toggle::after { width: 1.5px; height: 100%; transform: translate(-50%, -50%); }
.faq-item[open] .faq-toggle::after { transform: translate(-50%, -50%) rotate(90deg) scaleY(0); }

.faq-item p {
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 0.98rem;
}

/* Loudix / about */
.loudix-quote {
  margin: 0;
  padding-left: 24px;
  border-left: 2px solid var(--accent-2);
}
.loudix-quote p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}
.loudix-quote a { color: var(--accent-2); }

/* Social links */
.social-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.social-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.social-link:hover::before { opacity: 1; }
.social-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.social-link svg { color: var(--accent-2); position: relative; }

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

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

.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--text); }

.footer-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

/* Legal pages */
.legal h1 { font-family: var(--font-display); text-align: left; font-size: 2rem; margin-bottom: 32px; }
.legal h2 { font-family: var(--font-display); text-align: left; font-size: 1.25rem; margin-top: 40px; }
.legal p, .legal ul { color: var(--text-muted); }
.legal .container { max-width: 780px; }

/* Scroll animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .eq-bars span, .eq-dial { animation: none; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { height: 240px; order: -1; }
  .eq-dial { width: 200px; height: 200px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 24px 26px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .hero { padding: 90px 0 70px; }
  .section { padding: 64px 0; }
  .faq-item { padding: 4px 18px; }
}
