/* ============================================
   MANGL — Global Styles
   ============================================ */

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

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

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-deep);
}

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul, ol {
  list-style: none;
}

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

/* --- Custom Properties --- */
:root {
  /* Backgrounds */
  --bg-deep: #141417;
  --bg-surface: #1c1c21;
  --bg-elevated: #252529;
  --bg-border: #35353b;

  /* Text */
  --text-primary: #e8e8ec;
  --text-secondary: #8a8a94;

  /* Accent — Teal */
  --accent-teal: #5b9ea6;
  --accent-teal-light: #7bbcc4;

  /* Accent — Orange */
  --accent-orange: #e09040;
  --accent-orange-light: #f0a855;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Layout */
  --container-max: 1400px;
  --container-padding: var(--space-xl);

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ============================================
   Typography
   ============================================ */

.wordmark {
  font-weight: 100;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-style: normal;
}

.heading {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-style: normal;
}

.section-heading {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  font-style: normal;
}

.body-text {
  font-weight: 400;
  line-height: 1.6;
  font-style: normal;
}

.label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-style: normal;
}

.nav-link {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-style: normal;
}

.text-secondary {
  color: var(--text-secondary);
}

/* ============================================
   Layout
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

/* ============================================
   Elevation System
   ============================================ */

.surface {
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
}

.elevated {
  background-color: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--accent-teal);
  box-shadow: 0 0 16px rgba(91, 158, 166, 0.08);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-xl);
  font-size: 0.875rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.btn-primary {
  background-color: var(--accent-orange);
  color: var(--bg-deep);
}

.btn-primary:hover {
  background-color: var(--accent-orange-light);
  box-shadow: 0 0 20px rgba(224, 144, 64, 0.25);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-teal);
  border: 1px solid var(--accent-teal);
}

.btn-secondary:hover {
  background-color: var(--accent-teal);
  color: var(--bg-deep);
}

.btn-secondary:active {
  transform: scale(0.97);
}

/* ============================================
   Links
   ============================================ */

.link-teal {
  color: var(--accent-teal);
  transition: color 0.2s ease;
}

.link-teal:hover {
  color: var(--accent-teal-light);
}

/* ============================================
   Focus Styles (keyboard accessibility)
   ============================================ */

:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

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

/* ============================================
   Scroll Animations
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Disable motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   Site Header
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(20, 20, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-header__wordmark {
  font-size: 1.125rem;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.site-header__wordmark:hover {
  color: var(--accent-teal);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.site-header__nav .nav-link {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.site-header__nav .nav-link:hover {
  color: var(--text-primary);
}

.site-header__nav .nav-link.active {
  color: var(--accent-teal);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  color: var(--text-primary);
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Offset body for fixed header */
body {
  padding-top: 64px;
}

/* ============================================
   Support Page
   ============================================ */

.support__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-2xl);
}

/* Customer Portal callout */
.support__portal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-3xl);
}

.support__portal .section-heading {
  font-size: 0.8125rem;
  color: var(--accent-teal);
  margin-bottom: var(--space-xs);
}

.support__portal .body-text {
  font-size: 0.9375rem;
}

/* Sections */
.support__section {
  margin-bottom: var(--space-3xl);
}

.support__section:last-child {
  margin-bottom: 0;
}

.support__section-title {
  font-size: 0.875rem;
  color: var(--accent-teal);
  margin-bottom: var(--space-xl);
}

/* FAQ accordion */
.faq {
  max-width: 720px;
}

.faq__item {
  border-bottom: 1px solid var(--bg-border);
}

.faq__item:first-child {
  border-top: 1px solid var(--bg-border);
}

.faq__question {
  font-size: 0.8125rem;
  color: var(--text-primary);
  padding: var(--space-lg) 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s ease;
}

.faq__question:hover {
  color: var(--accent-teal);
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: '+';
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: var(--space-lg);
  transition: transform 0.2s ease;
}

.faq__item[open] .faq__question::after {
  content: '\2212';
}

.faq__answer {
  font-size: 0.9375rem;
  padding-bottom: var(--space-lg);
  max-width: 600px;
  line-height: 1.7;
}

/* System Requirements table */
.support__specs-table {
  max-width: 560px;
  overflow: hidden;
}

.support__spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--bg-border);
}

.support__spec-row:last-child {
  border-bottom: none;
}

.support__spec-row .label {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.support__spec-row .body-text {
  font-size: 0.9375rem;
  text-align: right;
}

/* Installation steps */
.install-steps {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.install-steps__item {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.install-steps__number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 50%;
  font-size: 0.75rem;
  color: var(--accent-teal);
  flex-shrink: 0;
}

.install-steps__item .body-text {
  font-size: 0.9375rem;
}

.install-steps__item strong {
  color: var(--text-primary);
}

/* Contact */
.support__contact .body-text {
  margin-bottom: var(--space-lg);
  font-size: 0.9375rem;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .support__portal {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   About Page
   ============================================ */

.about__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-2xl);
}

.about__content {
  max-width: 640px;
  font-size: 1.0625rem;
  color: var(--text-secondary);
}

.about__content p {
  margin-bottom: var(--space-lg);
}

.about__content p:last-child {
  margin-bottom: 0;
}

/* ============================================
   Bottom CTA
   ============================================ */

.bottom-cta {
  border-top: 1px solid var(--bg-border);
}

.bottom-cta__inner {
  text-align: center;
}

.bottom-cta__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-md);
}

.bottom-cta__subtitle {
  font-size: 1.0625rem;
  margin-bottom: var(--space-xl);
}

.bottom-cta__action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
}

.bottom-cta__price {
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* ============================================
   Tech Specs
   ============================================ */

.specs__heading {
  text-align: center;
  font-size: 0.875rem;
  color: var(--accent-teal);
  margin-bottom: var(--space-2xl);
}

.specs__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 560px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.specs__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--bg-border);
}

.specs__item:last-child {
  border-bottom: none;
}

.specs__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.specs__item .body-text {
  font-size: 0.9375rem;
  text-align: right;
}

@media (min-width: 768px) {
  .specs__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .specs__item:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
  }

  .specs__item:nth-child(odd) {
    border-right: 1px solid var(--bg-border);
  }
}

/* ============================================
   Video
   ============================================ */

.video__heading {
  text-align: center;
  font-size: 0.875rem;
  color: var(--accent-teal);
  margin-bottom: var(--space-2xl);
}

.video__wrapper {
  max-width: 840px;
  margin: 0 auto;
}

.video__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.video__embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  color: var(--bg-border);
}

.video__description {
  text-align: center;
  max-width: 560px;
  margin: var(--space-lg) auto 0;
  font-size: 0.9375rem;
}

/* ============================================
   Audio Demos
   ============================================ */

.demos__heading {
  text-align: center;
  font-size: 0.875rem;
  color: var(--accent-teal);
  margin-bottom: var(--space-2xl);
}

.demos__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: 720px;
  margin: 0 auto;
}

.demo-pair__label {
  font-size: 0.75rem;
  margin-bottom: var(--space-md);
}

.demo-pair__players {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.demo-player {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.demo-player__tag {
  font-size: 0.625rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 48px;
}

.demo-player__tag--output {
  color: var(--accent-teal);
}

.demo-player__controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
}

.demo-player__play {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background-color: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: 50%;
  flex-shrink: 0;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.demo-player__play:hover {
  color: var(--accent-teal);
  border-color: var(--accent-teal);
}

.demo-player__play.playing svg {
  display: none;
}

.demo-player__play.playing::after {
  content: '';
  width: 10px;
  height: 10px;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

.demo-player__waveform {
  flex: 1;
  height: 4px;
  background-color: var(--bg-elevated);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.demo-player__waveform::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress, 0%);
  background-color: var(--accent-teal);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.demo-player__time {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: 32px;
  text-align: right;
}

/* ============================================
   Features
   ============================================ */

.features__heading {
  text-align: center;
  font-size: 0.875rem;
  color: var(--accent-teal);
  margin-bottom: var(--space-2xl);
}

.card__icon-placeholder {
  width: 40px;
  height: 40px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
}

.card__title {
  font-size: 0.8125rem;
  margin-bottom: var(--space-sm);
}

.card .body-text {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xl);
}

.hero__text {
  text-align: center;
  max-width: 600px;
}

.hero__title {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: var(--space-md);
}

.hero__lead {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.hero__tagline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.hero__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
}

.hero__price {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.hero__image {
  width: 100%;
}

.hero__image-render {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.hero__image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/*
   Hero Layout Variants
   Switch by changing the class on <section>:
     hero--split    → 40/60 proportional side-by-side (current favorite)
     hero--stacked  → centered text above, wide image below
     hero--fixed    → fixed-width text left, image fills remaining space
   ------------------------------------------------ */

/* Layout A: stacked — text above, image below */
@media (min-width: 1024px) {
  .hero--stacked .hero__inner {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
  }

  .hero--stacked .hero__text {
    text-align: center;
    max-width: 600px;
  }

  .hero--stacked .hero__image {
    max-width: 900px;
  }
}

/* Layout B: split — proportional 40/60 side-by-side */
@media (min-width: 1024px) {
  .hero--split .hero__inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3xl);
  }

  .hero--split .hero__text {
    text-align: left;
    flex: 2 1 0%;
    max-width: none;
  }

  .hero--split .hero__cta {
    justify-content: flex-start;
  }

  .hero--split .hero__image {
    flex: 3 1 0%;
  }
}

/* Layout C: fixed — fixed text column, image fills the rest */
@media (min-width: 1024px) {
  .hero--fixed .hero__inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3xl);
  }

  .hero--fixed .hero__text {
    text-align: left;
    flex: 0 0 auto;
    max-width: 420px;
  }

  .hero--fixed .hero__cta {
    justify-content: flex-start;
  }

  .hero--fixed .hero__image {
    flex: 1 1 auto;
  }
}

/* ============================================
   Site Footer
   ============================================ */

.site-footer {
  border-top: 1px solid var(--bg-border);
  padding: var(--space-xl) 0;
}

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

.site-footer__copyright {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.site-footer__contact {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.site-footer__contact:hover {
  color: var(--accent-teal);
}

/* ============================================
   404 Page
   ============================================ */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: var(--space-3xl) var(--container-padding);
}

.not-found__code {
  font-size: clamp(4rem, 15vw, 6rem);
  font-weight: 800;
  color: var(--bg-border);
  line-height: 1;
  margin-bottom: var(--space-md);
}

.not-found__message {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* ============================================
   Responsive Breakpoints (mobile-first)
   ============================================ */

/* Mobile */
@media (max-width: 767px) {
  :root {
    --space-2xl: 3rem;
    --space-3xl: 4rem;
  }

  .menu-toggle {
    display: flex;
  }

  .site-footer .container {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .demo-player__tag {
    width: 40px;
    font-size: 0.5625rem;
  }

  .site-header__nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background-color: rgba(20, 20, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bg-border);
    padding: var(--space-md) 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .site-header__nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-header__nav .nav-link {
    display: block;
    padding: var(--space-md) var(--space-lg);
    font-size: 0.875rem;
  }
}

/* Tablet */
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}