/**
 * MLT UI component styles — bundled single file to minimise HTTP requests.
 * Every component reads exclusively from tokens.css.
 *
 * Components styled here:
 *   .mlt-button          (link or button, primary/secondary/ghost, sm/md/lg)
 *   .mlt-badge           (info/serato/warn/success tone)
 *   .mlt-card            (base card; variants: feature, plan, testimonial)
 *   .mlt-hero            (landing hero slot container)
 *   .mlt-section         (vertical rhythm wrapper)
 *   .mlt-feature-block   (section-interior block)
 *   .mlt-trust-strip     (stars + user count + avatars)
 *   .mlt-form-field      (label + input + error slot)
 *   .mlt-accordion       (collapsible section)
 *
 * Custom elements with their own behaviour (<mlt-sticky-cta>) define their
 * shadow-DOM styles inline in JS — those are NOT duplicated here.
 */

/* ═══════════════════════════════════════════════════════════════════
 *  Button
 * ═══════════════════════════════════════════════════════════════════ */
.mlt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mlt-space-2);
  border-radius: var(--mlt-radius-md);
  font-family: var(--mlt-font-sans);
  font-weight: var(--mlt-weight-semibold);
  line-height: 1;
  letter-spacing: var(--mlt-tracking-normal);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--mlt-duration-base) var(--mlt-ease-standard),
    border-color    var(--mlt-duration-base) var(--mlt-ease-standard),
    transform       var(--mlt-duration-fast) var(--mlt-ease-standard),
    box-shadow      var(--mlt-duration-base) var(--mlt-ease-standard);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px; /* iOS tap target */
}
.mlt-button:active { transform: scale(0.98); }
.mlt-button:focus-visible {
  outline: none;
  box-shadow: var(--mlt-shadow-glow);
}
.mlt-button[aria-disabled='true'],
.mlt-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Sizes */
.mlt-button--sm {
  padding: 0.5rem 0.9rem;
  font-size: var(--mlt-text-sm);
  min-height: 36px;
}
.mlt-button--md {
  padding: 0.875rem 1.25rem;
  font-size: var(--mlt-text-base);
}
.mlt-button--lg {
  padding: 1.125rem 1.5rem;
  font-size: var(--mlt-text-lg);
}

/* Variants */
.mlt-button--primary {
  background: var(--mlt-brand-primary);
  color: var(--mlt-ink-primary);
}
.mlt-button--primary:hover { background: var(--mlt-brand-primary-hover); }

.mlt-button--secondary {
  background: var(--mlt-surface-1);
  color: var(--mlt-ink-primary);
  border-color: var(--mlt-border-default);
}
.mlt-button--secondary:hover {
  background: var(--mlt-surface-hover);
  border-color: var(--mlt-border-strong);
}

.mlt-button--ghost {
  background: transparent;
  color: var(--mlt-ink-primary);
}
.mlt-button--ghost:hover {
  background: var(--mlt-surface-hover);
}

.mlt-button--success {
  background: var(--mlt-success);
  color: var(--mlt-ink-inverse);
}
.mlt-button--success:hover { filter: brightness(0.95); }

/* Full-width modifier — common on mobile landings */
.mlt-button--block {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════
 *  Badge (compatibility pills, tone labels)
 * ═══════════════════════════════════════════════════════════════════ */
.mlt-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--mlt-space-1);
  padding: 0.375rem 0.75rem;
  border-radius: var(--mlt-radius-pill);
  font-size: var(--mlt-text-xs);
  font-weight: var(--mlt-weight-semibold);
  letter-spacing: var(--mlt-tracking-wide);
  text-transform: uppercase;
  border: 1px solid transparent;
  line-height: 1;
}
.mlt-badge--info {
  color: #93c5fd;
  background: var(--mlt-brand-primary-soft);
  border-color: rgba(37, 99, 235, 0.45);
}
.mlt-badge--serato {
  color: #fecaca;
  background: rgba(204, 0, 0, 0.12);
  border-color: rgba(204, 0, 0, 0.5);
}
.mlt-badge--success {
  color: #86efac;
  background: var(--mlt-success-soft);
  border-color: rgba(34, 197, 94, 0.45);
}
.mlt-badge--warn {
  color: #fcd34d;
  background: var(--mlt-warning-soft);
  border-color: rgba(245, 158, 11, 0.45);
}
.mlt-badge--neutral {
  color: var(--mlt-ink-muted);
  background: var(--mlt-surface-subtle);
  border-color: var(--mlt-border-default);
}

/* ═══════════════════════════════════════════════════════════════════
 *  Card
 * ═══════════════════════════════════════════════════════════════════ */
.mlt-card {
  background: var(--mlt-surface-1);
  border: 1px solid var(--mlt-border-subtle);
  border-radius: var(--mlt-radius-lg);
  padding: var(--mlt-space-6);
  color: var(--mlt-ink-secondary);
}
.mlt-card--plan {
  padding: var(--mlt-space-8);
  text-align: center;
}
.mlt-card--plan-featured {
  border-color: var(--mlt-brand-primary);
  box-shadow: var(--mlt-shadow-md);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, var(--mlt-surface-1) 100%);
}
.mlt-card__eyebrow {
  font-size: var(--mlt-text-xs);
  font-weight: var(--mlt-weight-semibold);
  letter-spacing: var(--mlt-tracking-wide);
  text-transform: uppercase;
  color: var(--mlt-ink-muted);
  margin: 0 0 var(--mlt-space-2);
}
.mlt-card__title {
  color: var(--mlt-ink-primary);
  font-size: var(--mlt-text-xl);
  font-weight: var(--mlt-weight-semibold);
  margin: 0 0 var(--mlt-space-2);
  line-height: var(--mlt-leading-tight);
}
.mlt-card__body {
  font-size: var(--mlt-text-base);
  line-height: var(--mlt-leading-body);
  color: var(--mlt-ink-secondary);
}

/* ═══════════════════════════════════════════════════════════════════
 *  Hero
 * ═══════════════════════════════════════════════════════════════════ */
.mlt-hero {
  padding: var(--mlt-space-10) var(--mlt-gutter-mobile) var(--mlt-space-8);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mlt-space-5);
  max-width: var(--mlt-content-max);
  margin-inline: auto;
}
@media (min-width: 768px) {
  .mlt-hero {
    padding: var(--mlt-space-16) var(--mlt-gutter-desktop) var(--mlt-space-12);
    gap: var(--mlt-space-6);
  }
}
.mlt-hero__eyebrow { /* slot: badge */
  display: inline-flex;
}
.mlt-hero__title {
  margin: 0;
  font-size: var(--mlt-text-4xl);
  font-weight: var(--mlt-weight-bold);
  line-height: var(--mlt-leading-tight);
  letter-spacing: var(--mlt-tracking-tight);
  color: var(--mlt-ink-primary);
  text-wrap: balance;
}
.mlt-hero__subtitle {
  margin: 0;
  font-size: var(--mlt-text-lg);
  line-height: var(--mlt-leading-body);
  color: var(--mlt-ink-secondary);
  max-width: 38ch;
  text-wrap: pretty;
}
.mlt-hero__cta {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: var(--mlt-space-3);
}
.mlt-hero__media {
  margin-top: var(--mlt-space-2);
  width: 100%;
  border-radius: var(--mlt-radius-lg);
  overflow: hidden;
  background: var(--mlt-surface-1);
  border: 1px solid var(--mlt-border-subtle);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mlt-hero__media img,
.mlt-hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mlt-hero__trust { /* slot: trust strip */
  margin-top: var(--mlt-space-1);
}
.mlt-hero__fineprint {
  font-size: var(--mlt-text-sm);
  color: var(--mlt-ink-muted);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════
 *  Section + feature block
 * ═══════════════════════════════════════════════════════════════════ */
.mlt-section {
  padding: var(--mlt-space-12) var(--mlt-gutter-mobile);
}
@media (min-width: 768px) {
  .mlt-section { padding: var(--mlt-space-20) var(--mlt-gutter-desktop); }
}
.mlt-section__inner {
  max-width: var(--mlt-content-wide);
  margin-inline: auto;
}
.mlt-section--narrow .mlt-section__inner { max-width: var(--mlt-content-max); }
.mlt-section__eyebrow {
  font-size: var(--mlt-text-xs);
  font-weight: var(--mlt-weight-semibold);
  letter-spacing: var(--mlt-tracking-wide);
  text-transform: uppercase;
  color: var(--mlt-ink-muted);
  margin: 0 0 var(--mlt-space-3);
}
.mlt-section__title {
  font-size: var(--mlt-text-3xl);
  font-weight: var(--mlt-weight-bold);
  line-height: var(--mlt-leading-tight);
  letter-spacing: var(--mlt-tracking-tight);
  color: var(--mlt-ink-primary);
  margin: 0 0 var(--mlt-space-4);
  text-wrap: balance;
}
.mlt-section__lede {
  font-size: var(--mlt-text-lg);
  color: var(--mlt-ink-secondary);
  line-height: var(--mlt-leading-relaxed);
  margin: 0 0 var(--mlt-space-8);
  max-width: 60ch;
}
.mlt-feature-block + .mlt-feature-block {
  margin-top: var(--mlt-space-10);
}
.mlt-feature-block__title {
  font-size: var(--mlt-text-xl);
  font-weight: var(--mlt-weight-semibold);
  color: var(--mlt-ink-primary);
  margin: 0 0 var(--mlt-space-3);
}
.mlt-feature-block__body {
  font-size: var(--mlt-text-base);
  line-height: var(--mlt-leading-relaxed);
  color: var(--mlt-ink-secondary);
}
.mlt-feature-block__body ul,
.mlt-feature-block__body ol {
  padding-left: 1.25em;
  margin: var(--mlt-space-3) 0 0;
}
.mlt-feature-block__body li + li { margin-top: var(--mlt-space-2); }

/* Simple responsive grid used by feature/card layouts. */
.mlt-grid { display: grid; gap: var(--mlt-space-4); }
.mlt-grid--2 { grid-template-columns: 1fr; }
.mlt-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .mlt-grid--2 { grid-template-columns: repeat(2, 1fr); gap: var(--mlt-space-6); }
  .mlt-grid--3 { grid-template-columns: repeat(3, 1fr); gap: var(--mlt-space-6); }
}

/* ═══════════════════════════════════════════════════════════════════
 *  Trust strip
 * ═══════════════════════════════════════════════════════════════════ */
.mlt-trust-strip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--mlt-space-2) var(--mlt-space-4);
  font-size: var(--mlt-text-sm);
  color: var(--mlt-ink-muted);
}
.mlt-trust-strip__stars {
  color: #facc15;
  letter-spacing: 0.05em;
}
.mlt-trust-strip__count {
  color: var(--mlt-ink-secondary);
  font-weight: var(--mlt-weight-semibold);
}
.mlt-trust-strip__avatars {
  display: inline-flex;
  align-items: center;
}
.mlt-trust-strip__avatars img {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--mlt-surface-0);
  object-fit: cover;
  margin-left: -6px;
}
.mlt-trust-strip__avatars img:first-child { margin-left: 0; }

/* ═══════════════════════════════════════════════════════════════════
 *  Form field
 * ═══════════════════════════════════════════════════════════════════ */
.mlt-form-field { display: block; }
.mlt-form-field + .mlt-form-field { margin-top: var(--mlt-space-4); }
.mlt-form-field__label {
  display: block;
  font-size: var(--mlt-text-sm);
  font-weight: var(--mlt-weight-medium);
  color: var(--mlt-ink-secondary);
  margin: 0 0 var(--mlt-space-2);
}
.mlt-form-field__label-hint {
  color: var(--mlt-ink-muted);
  font-weight: var(--mlt-weight-regular);
  margin-left: var(--mlt-space-2);
}
.mlt-form-field__input,
.mlt-form-field__textarea,
.mlt-form-field__select {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: inherit;
  font-size: var(--mlt-text-base); /* 16 → prevents iOS zoom */
  color: var(--mlt-ink-primary);
  background: var(--mlt-surface-1);
  border: 1px solid var(--mlt-border-default);
  border-radius: var(--mlt-radius-md);
  transition:
    border-color var(--mlt-duration-base) var(--mlt-ease-standard),
    box-shadow   var(--mlt-duration-base) var(--mlt-ease-standard);
}
.mlt-form-field__input:focus,
.mlt-form-field__textarea:focus,
.mlt-form-field__select:focus {
  outline: none;
  border-color: var(--mlt-border-focus);
  box-shadow: var(--mlt-shadow-glow);
}
.mlt-form-field__input::placeholder { color: var(--mlt-ink-disabled); }
.mlt-form-field__help {
  font-size: var(--mlt-text-xs);
  color: var(--mlt-ink-muted);
  margin: var(--mlt-space-2) 0 0;
}
.mlt-form-field__error {
  font-size: var(--mlt-text-sm);
  color: #fca5a5;
  margin: var(--mlt-space-2) 0 0;
  display: none;
}
.mlt-form-field[data-invalid='true'] .mlt-form-field__error { display: block; }
.mlt-form-field[data-invalid='true'] .mlt-form-field__input { border-color: var(--mlt-danger); }

/* Password reveal button inside a field */
.mlt-form-field__affix {
  position: relative;
}
.mlt-form-field__affix .mlt-form-field__input { padding-right: 4.5rem; }
.mlt-form-field__toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--mlt-brand-primary);
  font-size: var(--mlt-text-sm);
  font-weight: var(--mlt-weight-medium);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: var(--mlt-radius-sm);
}
.mlt-form-field__toggle:hover { background: var(--mlt-brand-primary-soft); }

/* ═══════════════════════════════════════════════════════════════════
 *  Accordion
 * ═══════════════════════════════════════════════════════════════════ */
.mlt-accordion {
  border-top: 1px solid var(--mlt-border-subtle);
}
.mlt-accordion__item {
  border-bottom: 1px solid var(--mlt-border-subtle);
}
.mlt-accordion__summary {
  all: unset;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--mlt-space-4) 0;
  font-size: var(--mlt-text-base);
  font-weight: var(--mlt-weight-semibold);
  color: var(--mlt-ink-primary);
  cursor: pointer;
  list-style: none;
}
.mlt-accordion__summary::-webkit-details-marker { display: none; }
.mlt-accordion__summary::after {
  content: '+';
  font-size: var(--mlt-text-xl);
  font-weight: var(--mlt-weight-regular);
  color: var(--mlt-ink-muted);
  transition: transform var(--mlt-duration-base) var(--mlt-ease-standard);
}
.mlt-accordion__item[open] .mlt-accordion__summary::after {
  content: '−';
  color: var(--mlt-ink-primary);
}
.mlt-accordion__body {
  padding: 0 0 var(--mlt-space-5);
  color: var(--mlt-ink-secondary);
  font-size: var(--mlt-text-base);
  line-height: var(--mlt-leading-relaxed);
}

/* ═══════════════════════════════════════════════════════════════════
 *  Divider + rhythm helpers
 * ═══════════════════════════════════════════════════════════════════ */
.mlt-divider {
  height: 1px;
  background: var(--mlt-border-subtle);
  margin: var(--mlt-space-10) 0;
  border: 0;
}

/* Quiet helper — use on pages that need a bottom safe area on mobile
   for the sticky-cta so content isn't hidden under it. */
@media (max-width: 639px) {
  body[data-has-sticky-cta='true'] { padding-bottom: 88px; }
}
