/* ============================================
   PHANTOM AUDIO — Design System
   ============================================ */

:root {
  --bg: #050505;
  --bg-card: rgba(255, 255, 255, 0.03);
  --accent: #FF8C00;
  --accent-dark: #FF6B00;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --glow: rgba(255, 140, 0, 0.4);
  --glow-strong: rgba(255, 140, 0, 0.6);
  --font-display: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Spacing — 8dp rhythm */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);

  /* Typography scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 32px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px var(--glow);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Grain / noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  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)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  opacity: 1;
}

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

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10001;
  padding: 12px 24px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* Focus styles — visible ring on keyboard nav */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

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

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

.section {
  position: relative;
  padding: var(--space-3xl) 0;
}

/* ---- Custom Cursor ---- */
#cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  mix-blend-mode: difference;
}

#cursor-dot.hover {
  transform: scale(3);
  opacity: 0.5;
}

#cursor-dot.hidden {
  display: none;
}

/* ---- Navigation ---- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 12px 4px;
  touch-action: manipulation;
  transition: color var(--duration-normal) var(--ease-out);
}

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

.nav-links a:active {
  opacity: 0.7;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---- Hero ---- */
#hero-wrapper {
  position: relative;
  height: 350vh;
}

#hero {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#hero-fallback {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(255, 140, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 60px 40px;
  transition: opacity 0.1s linear;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.5) 0%, transparent 70%);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 90px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.7);
}

.hero-cta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-xl);
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #000;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--glow);
}

.hero-cta:active {
  transform: scale(0.97);
}

/* ---- Section Labels ---- */
.section-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

/* ---- Features ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: var(--space-lg) var(--space-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.feature-card:active {
  transform: translateY(0);
  border-color: var(--accent);
}

/* Animated glowing border — feature cards only */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--border-angle),
    transparent 60%,
    var(--accent) 78%,
    var(--accent-dark) 82%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotate-border 4s linear infinite;
  pointer-events: none;
}

@keyframes rotate-border {
  to { --border-angle: 360deg; }
}

.feature-icon {
  color: var(--accent);
  margin-bottom: 24px;
  filter: drop-shadow(0 0 8px var(--glow));
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 45ch;
}

/* ---- Specs ---- */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.specs-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.specs-img {
  max-width: 90%;
  animation: float 6s ease-in-out infinite;
}

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

.specs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.spec-item:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.spec-value {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ---- Design Section ---- */
#design {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.design-parallax {
  position: absolute;
  inset: -20% 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.design-bg-img {
  width: 60%;
  max-width: 700px;
  object-fit: contain;
  opacity: 0.3;
}

.design-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    rgba(5, 5, 5, 0.4) 40%,
    rgba(5, 5, 5, 0.4) 60%,
    var(--bg) 100%
  );
  z-index: 1;
}

.design-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
  padding: 0 20px;
}

.design-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.design-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 60ch;
  margin: 0 auto;
}

/* ---- Pricing ---- */
#cta {
  text-align: center;
}

.pricing-header {
  margin-bottom: var(--space-xl);
}

.pricing-header .section-label {
  margin-bottom: var(--space-sm);
}

.pricing-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  align-items: stretch;
}

/* Card */
.pricing-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(to bottom right, rgba(255,255,255,0.02), rgba(255,255,255,0.04));
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: border-color var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}

.pricing-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
}

/* Featured card */
.pricing-card--featured {
  border-color: var(--accent);
  background: linear-gradient(to bottom right, rgba(255, 140, 0, 0.06), rgba(255, 140, 0, 0.02));
  box-shadow: 0 0 40px rgba(255, 140, 0, 0.08);
}

.pricing-card--featured:hover {
  border-color: var(--accent);
  box-shadow: 0 0 60px rgba(255, 140, 0, 0.15);
}

/* Card head */
.pricing-card-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pricing-tier {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pricing-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  font-variant-numeric: tabular-nums;
}

.pricing-card--featured .pricing-price {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-best-for {
  font-size: var(--text-sm);
  background: linear-gradient(to bottom right, rgba(255,255,255,0.7), rgba(255,255,255,0.4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

/* Benefits list */
.pricing-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg) 0;
  flex: 1;
}

.pricing-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
}

.pricing-benefit--checked {
  color: rgba(255, 255, 255, 0.8);
}

.pricing-benefit--unchecked {
  color: rgba(255, 255, 255, 0.3);
}

.benefit-icon {
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.benefit-icon--check {
  background: var(--accent);
  color: #000;
}

.benefit-icon--x {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
}

/* CTA buttons */
.pricing-cta {
  display: block;
  width: 100%;
  padding: 14px 24px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: all var(--duration-normal) var(--ease-out);
}

.pricing-cta--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #000;
  border: none;
}

.pricing-cta--primary:hover {
  box-shadow: 0 0 30px var(--glow);
  transform: translateY(-2px);
}

.pricing-cta--primary:active {
  transform: scale(0.97);
}

.pricing-cta--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-cta--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.pricing-cta--ghost:active {
  transform: scale(0.97);
}

/* Stagger pricing cards reveal */
.pricing-card.reveal:nth-child(1) { transition-delay: 0s; }
.pricing-card.reveal:nth-child(2) { transition-delay: 0.06s; }
.pricing-card.reveal:nth-child(3) { transition-delay: 0.12s; }

/* ---- Footer ---- */
#footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-primary);
}

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

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-secondary);
  transition: color 0.25s ease-out;
  touch-action: manipulation;
}

.footer-socials a:hover {
  color: var(--accent);
}

.footer-socials a:active {
  transform: scale(0.9);
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
}

/* ---- Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered feature cards — 40ms per item per skill guideline */
.feature-card.reveal:nth-child(1) { transition-delay: 0s; }
.feature-card.reveal:nth-child(2) { transition-delay: 0.04s; }
.feature-card.reveal:nth-child(3) { transition-delay: 0.08s; }

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---- Responsive ---- */

/* Tablet */
@media (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .specs-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .specs-image {
    order: -1;
  }

  .specs-img {
    max-width: 60%;
    margin: 0 auto;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .pricing-card--featured {
    order: -1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .section {
    padding: var(--space-2xl) 0;
  }

  .container {
    padding: 0 20px;
  }

  /* Nav mobile */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transition: right 0.4s ease;
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 16px;
  }

  /* Hamburger open state */
  body.nav-open .nav-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  body.nav-open .nav-hamburger span:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .nav-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero mobile — scroll animation works on mobile too */
  #hero-wrapper {
    height: 300vh;
  }

  #hero {
    height: 100vh;
    height: 100dvh;
  }

  .hero-glow {
    width: 100%;
    height: 100%;
  }

  .hero-title {
    font-size: clamp(32px, 10vw, 48px);
  }

  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }

  .hero-content {
    padding: 40px 20px;
  }

  /* Pricing mobile */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .pricing-card--featured {
    order: -1;
  }

  /* Design parallax off on mobile */
  .design-parallax {
    inset: 0;
  }

  .design-bg-img {
    width: 80%;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .section {
    padding: var(--space-xl) 0;
  }

  .container {
    padding: 0 var(--space-sm);
  }

  #navbar {
    padding: var(--space-sm) 20px;
  }

  .feature-card {
    padding: var(--space-lg) var(--space-md);
  }

  .section-label {
    margin-bottom: var(--space-lg);
  }
}

