/* ============================================
   MvF Devices — components.css
   Reusable UI components
   ============================================ */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-size: var(--text-base);
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.btn--primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

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

.btn--secondary:hover {
  border-color: var(--accent);
  background-color: var(--accent-glow);
}

.btn--ghost {
  background: none;
  color: var(--accent);
  padding: 0.5rem 1rem;
}

.btn--ghost:hover {
  background-color: var(--accent-glow);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-lg);
  border-radius: var(--border-radius-lg);
}

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

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

.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--text-lg);
}

.site-header__logo {
  height: 36px;
  width: 36px;
}

.site-header__logo svg {
  width: 100%;
  height: 100%;
  fill: var(--accent);
}

.site-header__brandname {
  letter-spacing: 0.02em;
}

/* Desktop nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.site-nav__link {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link--active {
  color: var(--text-primary);
}

.site-nav__link--active {
  border-bottom-color: var(--accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

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

/* Mobile nav panel */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    gap: 0;
    background-color: var(--bg-deep);
    padding: var(--space-xl);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav__link {
    font-size: var(--text-xl);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
}

/* Spacer to offset fixed header */
.header-spacer {
  height: var(--header-height);
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: var(--space-2xl) 0 var(--space-3xl);
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 0;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.hero__logo {
  width: 140px;
  height: 140px;
  margin: 0 auto var(--space-lg);
  filter: drop-shadow(0 0 30px var(--accent-glow));
}

.hero__logo svg {
  width: 100%;
  height: 100%;
  fill: var(--accent);
}

.hero__title {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  max-width: 50ch;
  margin: 0 auto var(--space-sm);
}

.hero__byline {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin: 0 auto var(--space-md);
}


/* Product page hero */
.hero--product {
  text-align: left;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero--product .hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero--product .hero__tagline {
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

.hero--product__desc {
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero--product .hero__image {
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.hero--product .hero__image img {
  width: 100%;
  height: auto;
}

/* Wide hero image: spans full width below the text+image grid */
.hero--product .hero__image--wide {
  grid-column: 1 / -1;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}


@media (max-width: 767px) {
  .hero__logo {
    width: 100px;
    height: 100px;
  }

  .hero--product {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero--product .hero__content {
    align-items: center;
  }
}

/* --- Product Cards --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.product-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
}

.product-card__image {
  width: 100%;
  aspect-ratio: 3.59 / 1;
  overflow: hidden;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: 4px;
}

.product-card__body {
  padding: var(--space-xl);
}

.product-card__name {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

.product-card__desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.product-card__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: var(--space-lg);
}

.product-card__badge--ableton {
  background-color: rgba(212, 168, 67, 0.15);
  color: var(--accent);
}

.product-card__badge--new {
  background-color: var(--accent);
  color: var(--bg-deep);
  font-weight: 700;
  border: 1px solid var(--accent-hover);
  animation: pulse-glow 2s ease-in-out infinite;
}

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

/* --- About Section --- */
.about {
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
}

.about__portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-accent);
  flex-shrink: 0;
}

.about__text p {
  margin-bottom: var(--space-md);
}

.about__link {
  font-size: var(--text-sm);
}

@media (max-width: 639px) {
  .about {
    flex-direction: column;
    text-align: center;
  }

  .about__text p {
    margin-inline: auto;
  }
}

/* --- Countdown Timer --- */
.countdown {
  display: flex;
  justify-content: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.countdown__value {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-xs);
}

.countdown__notify {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-md);
}

.countdown--launched .countdown__value {
  color: var(--success);
}

/* Coming Soon badge */
.product-card__badge--soon {
  background-color: rgba(212, 168, 67, 0.15);
  color: var(--accent);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@media (max-width: 639px) {
  .countdown {
    gap: var(--space-md);
  }

  .countdown__value {
    font-size: var(--text-2xl);
  }

  .countdown__unit {
    min-width: 48px;
  }
}

/* --- Press Quotes --- */
.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.press-quote {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.press-quote__text {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.press-quote__text::before {
  content: '\201C';
  color: var(--accent-muted);
  font-size: var(--text-3xl);
  line-height: 0;
  vertical-align: -0.3em;
  margin-right: 0.1em;
}

.press-quote__source {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.press-quote__rating {
  color: var(--accent);
  font-size: var(--text-sm);
  margin-top: var(--space-xs);
}

@media (max-width: 1023px) {
  .press-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-inline: auto;
  }
}

/* --- Demo Teaser (placeholder until Phase 3) --- */
.demo-teaser {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-3xl);
  text-align: center;
}

.demo-teaser__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  border: 2px dashed var(--border-accent);
  border-radius: var(--border-radius);
  color: var(--text-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-xl);
}

.demo-teaser__text {
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 auto var(--space-lg);
}

/* --- Video --- */
.video-container {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--bg-deep);
}

.video-container video,
.video-container iframe {
  width: 100%;
  display: block;
}

.video-container--yt {
  aspect-ratio: 16 / 9;
  cursor: pointer;
  position: relative;
}

.video-container--yt iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* YouTube facade: thumbnail + play button */
.yt-facade {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-facade__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-facade__play {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.yt-facade:hover .yt-facade__play {
  background: var(--accent);
  transform: scale(1.1);
}

.yt-facade__play svg {
  width: 28px;
  height: 28px;
  fill: white;
  margin-left: 4px;
}

/* YouTube consent overlay */
.yt-consent {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(26, 23, 20, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-xl);
  text-align: center;
}

.yt-consent__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 40ch;
  line-height: 1.6;
}

.yt-consent__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 639px) {
  .yt-consent__actions {
    flex-direction: column;
  }
}

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

.feature-item {
  padding: var(--space-lg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  background-color: var(--bg-elevated);
}

.feature-item__title {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.feature-item__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

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

/* --- Legal Pages (subtle styling) --- */
.legal h1 {
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.legal h2 {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-secondary);
}

.legal p,
.legal li {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

.legal a {
  color: var(--accent-muted);
}

.legal strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.legal h2 + p,
.legal h2 + ul {
  margin-top: var(--space-sm);
}

/* --- Requirements --- */
.requirements-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  max-width: 500px;
  margin: 0 auto;
}

.requirements-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.requirements-list li {
  color: var(--text-secondary);
  padding-left: var(--space-lg);
  position: relative;
}

.requirements-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-muted);
}

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) 0;
}

.faq-item__question {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.faq-item__answer {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.footer-social {
  display: flex;
  gap: var(--space-lg);
}

.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.footer-social__link:hover {
  color: var(--accent);
  background-color: var(--accent-glow);
}

.footer-social__link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
  font-size: var(--text-sm);
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

/* --- Cookie Consent --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background-color: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: var(--space-lg);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.cookie-banner__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 60ch;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .cookie-banner .container {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Gumroad button override --- */
.gumroad-button,
a.gumroad-button,
a.gumroad-button:link,
a.gumroad-button:visited {
  all: unset !important;
  background-color: #d4a843 !important;
  color: #1a1714 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 1.125rem !important;
  font-weight: 500 !important;
  padding: 1rem 2.25rem !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease, transform 0.2s ease !important;
}

.gumroad-button:hover,
a.gumroad-button:hover {
  background-color: #e0ba5a !important;
  transform: translateY(-1px) !important;
}

/* --- Price Display --- */
.price {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.price__current {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
}

.price__original {
  font-size: var(--text-lg);
  color: var(--text-muted);
  text-decoration: line-through;
}

.price__label {
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 500;
}

/* --- Screenshot Gallery --- */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.screenshot-gallery__item {
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.screenshot-gallery__item {
  aspect-ratio: 4.07 / 1;
}

.screenshot-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

@media (max-width: 639px) {
  .screenshot-gallery {
    grid-template-columns: 1fr;
  }
}
