:root {
  color-scheme: dark;
  --color-background: #040407;
  --color-surface: rgba(20, 20, 24, 0.72);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text-primary: #f5f5f7;
  --color-text-secondary: #a1a3aa;
  --color-accent: #0a84ff;
  --shadow-elevated: 0 32px 80px -32px rgba(0, 0, 0, 0.8);
  --max-content-width: 1200px;
  --section-radius: 32px;
  --transition-duration: 0.9s;
  --transition-curve: cubic-bezier(0.22, 1, 0.36, 1);
  /* Offset where cards rest when sticky */
  --card-sticky-top: 65px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--color-background);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: radial-gradient(circle at 20% 20%, #0f1423, transparent 60%),
    radial-gradient(circle at 80% 0%, #1a2337, transparent 55%),
    var(--color-background);
  color: var(--color-text-primary);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(4, 4, 7, 0.88), rgba(4, 4, 7, 0.44));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max-content-width);
  padding: 18px 32px;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  gap: 20px;
}

.primary-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.primary-nav a:hover,
.primary-nav a:focus {
  color: var(--color-text-primary);
}

.sections {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin: 0 auto;
  max-width: calc(var(--max-content-width) + 600px);
  /* Reduce initial top gap: align close to sticky top */
  padding: 10px 80px 60px;
}

/* Invisible anchors used for navigation placement */
.section-anchor {
  display: block;
  height: 0;
  margin: 0;
  padding: 0;
  position: relative;
  scroll-margin-top: var(--card-sticky-top);
}

.section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* Extend scroll range so sticky cards aren't pushed down by section bottom */
  padding-bottom: 0;
}

.section-card {
  position: relative;
  z-index: 2;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 68px 72px 48px;
  border-radius: var(--section-radius);
  background: rgba(12, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 22px 70px -28px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform-origin: center top;
  transform: perspective(2000px) rotateX(-10deg) translateY(70px);
  transition:
    opacity 240ms linear,
    transform var(--transition-duration) var(--transition-curve);
  /* Make the card slide up and then rest near the top as you scroll */
  position: sticky;
  top: var(--card-sticky-top);
  will-change: transform, opacity;
}

.section.is-visible .section-card {
  opacity: 1;
  transform: perspective(1600px) rotateX(0deg) translateY(0);
}

.section__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.section__eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.section__title {
  margin: 0 0 24px;
  font-size: clamp(2.5rem, 3vw + 1rem, 3.8rem);
  line-height: 1.1;
}

.section__description {
  margin: 0 0 32px;
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  max-width: 520px;
}

.section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms linear;
}

.section.is-visible .section__actions {
  opacity: 1;
  pointer-events: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 14px 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--color-accent);
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    background 0.4s ease;
}

.button:hover,
.button:focus {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(10, 132, 255, 0.35);
}

.button.button--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text-primary);
}

.button.button--ghost:hover,
.button.button--ghost:focus {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.section__media {
  position: relative;
  z-index: 1;
  width: min(100%, 2000px);
  /* Small gap between card and media - no overlap */
  margin: 80px auto 0;
  padding: 0;
  opacity: 0;
  transform: translateY(180px) scale(0.94);
  transform-origin: top center;
  transition:
    opacity calc(var(--transition-duration) + 0.2s) var(--transition-curve),
    transform calc(var(--transition-duration) + 0.2s) var(--transition-curve);
}

.section__media + .section__media {
  margin-top: 120px;
  max-width: 400px;
}

.section.is-visible .section__media {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.section__media-frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 70px 200px -80px rgba(0, 0, 0, 0.92),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.section__media img,
.section__media video {
  display: block;
  width: 100%;
  height: auto;
}

.section__media::before {
  content: '';
  position: absolute;
  inset: 10% 6% -32% 6%;
  background: radial-gradient(circle, rgba(12, 110, 255, 0.22), transparent 85%);
  filter: blur(72px);
  opacity: 0.32;
  z-index: -1;
}

.section__media-placeholder {
  width: 100%;
  height: 340px;
  border-radius: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(36, 45, 70, 0.45), rgba(16, 22, 39, 0.25));
}

.coming-soon-label {
  text-align: center;
  padding: 60px 24px;
}

.coming-soon-label span {
  display: inline-block;
  padding: 16px 48px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.site-footer {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-secondary);
  background: rgba(4, 4, 7, 0.9);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  color: var(--color-text-primary);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.social-link:hover,
.social-link:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.social-username {
  font-size: 0.9rem;
  font-weight: 500;
}

/* FAQ Page Styles */
.faq-container {
  margin: 0 auto;
  max-width: var(--max-content-width);
  padding: 80px 80px 140px;
}

.faq-header {
  text-align: center;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s var(--transition-curve) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-title {
  margin: 0 0 16px;
  font-size: clamp(2.8rem, 4vw + 1rem, 4.2rem);
  line-height: 1.1;
  background: linear-gradient(135deg, var(--color-text-primary), var(--color-text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faq-subtitle {
  margin: 0;
  font-size: 1.2rem;
  color: var(--color-text-secondary);
}

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

.faq-item {
  background: rgba(12, 12, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 36px 40px;
  opacity: 0;
  transform: translateY(40px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  scroll-margin-top: calc(var(--card-sticky-top) + 20px);
}

.faq-item.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.6s var(--transition-curve) forwards;
}

.faq-item:hover {
  background: rgba(12, 12, 20, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
}

.faq-item.highlighted {
  animation: highlight 1.5s ease-out;
}

@keyframes highlight {
  0% {
    background: rgba(10, 132, 255, 0.15);
    border-color: rgba(10, 132, 255, 0.4);
    box-shadow: 0 0 30px rgba(10, 132, 255, 0.3);
  }
  100% {
    background: rgba(12, 12, 20, 0.65);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
  }
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: clamp(1.4rem, 2vw + 0.5rem, 1.8rem);
  line-height: 1.3;
  color: var(--color-text-primary);
}

.faq-anchor-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  color: var(--color-text-secondary);
  opacity: 0;
  transition: opacity 0.3s ease, color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
}

.faq-question:hover .faq-anchor-link,
.faq-anchor-link:focus {
  opacity: 1;
  color: var(--color-accent);
}

.faq-anchor-link:hover {
  transform: scale(1.1);
}

.faq-answer {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.faq-answer p {
  margin: 0 0 16px;
}

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

.faq-answer code {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 0.9em;
  color: var(--color-accent);
}

.faq-answer a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.faq-answer a:hover,
.faq-answer a:focus {
  color: #3d9eff;
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .sections {
    gap: 50px;
    padding: calc(var(--card-sticky-top) + 6px) 48px 100px;
  }

  .section-card {
    padding: 60px 56px 88px;
  }

  .faq-container {
    padding: 60px 48px 100px;
  }

  .faq-header {
    margin-bottom: 60px;
  }

  .faq-item {
    padding: 32px 36px;
  }
}

@media (max-width: 720px) {
  .site-header__inner {
    padding: 16px 24px;
  }

  .primary-nav {
    gap: 14px;
  }

  .sections {
    gap: 40px;
    padding: 10px 24px 60px;
  }

  .section-card {
    padding: 48px 24px 72px;
    border-radius: 28px 28px 20px 20px;
  }

  .section {
    padding-bottom: 0;
  }

  .section__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section__media img,
  .section__media video {
    max-width: 100%;
  }

  .section__media {
    padding: 0;
    margin-top: 80px; /* Small gap between card and media - no overlap */
  }

  .section__media + .section__media {
    margin-top: 120px;
    max-width: 300px;
  }

  .faq-container {
    padding: 48px 24px 72px;
  }

  .faq-header {
    margin-bottom: 48px;
  }

  .faq-item {
    padding: 28px 24px;
    border-radius: 16px;
  }

  .faq-question {
    font-size: 1.4rem;
    gap: 8px;
  }

  .faq-anchor-link {
    width: 28px;
    height: 28px;
  }

  .faq-answer {
    font-size: 1rem;
  }

  .primary-nav a {
    font-size: 0.9rem;
  }
}
