/**
 * Static SEO landing pages (/ai-video-generator/, /skapa-video-med-ai/, …)
 * Composes with tokens, base, cards, buttons, style.css (.subpage-*).
 * Scope: .ml-lp — avoid collisions with the SPA shell.
 */

.ml-lp {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ml-lp__inner {
  width: 100%;
  /* Slightly wider than legacy 52rem SEO cap; aligns with main app feel (see --app-max-width) */
  max-width: min(100%, min(96vw, 1320px));
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.75rem);
  box-sizing: border-box;
}

.ml-lp__top {
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: none;
  background: transparent;
}

.ml-lp__top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  position: relative;
}

/* Mobile menu toggle — hidden on desktop */
.ml-lp__nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-glass-bg) 55%, transparent);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.ml-lp__nav-toggle:hover {
  background: color-mix(in srgb, var(--surface-glass-bg) 75%, transparent);
}

.ml-lp__nav-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 2px;
}

.ml-lp__nav-toggle-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.15rem;
}

.ml-lp__nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 1px;
  background: color-mix(in srgb, var(--text) 88%, var(--accent) 12%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ml-lp__nav-toggle[aria-expanded="true"] .ml-lp__nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.ml-lp__nav-toggle[aria-expanded="true"] .ml-lp__nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.ml-lp__nav-toggle[aria-expanded="true"] .ml-lp__nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Same asset and proportions as .app-sidebar__brand-logo / .ml-footer-brand-logo */
.ml-lp__logo img {
  display: block;
  width: auto;
  max-width: 11.5rem;
  height: auto;
}

.ml-lp__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Match public/style.css `.footer a` (accent links; base.css uses color: inherit on raw `a`) */
.ml-lp__nav a,
.ml-lp__nav a:link,
.ml-lp__nav a:visited,
.ml-lp__footer-links a,
.ml-lp__footer-links a:link,
.ml-lp__footer-links a:visited,
.ml-lp__links a,
.ml-lp__links a:link,
.ml-lp__links a:visited {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.ml-lp__nav a:hover,
.ml-lp__footer-links a:hover,
.ml-lp__links a:hover {
  color: color-mix(in srgb, var(--accent) 85%, #fff 15%);
}

.ml-lp__nav a:focus-visible,
.ml-lp__footer-links a:focus-visible,
.ml-lp__links a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
  border-radius: 2px;
}

.ml-lp__main {
  flex: 1;
  padding: clamp(1.35rem, 3.2vw, 2.5rem) 0 clamp(2.25rem, 5vw, 3.25rem);
}

/* Hero: clearer hierarchy, room for longer SEO H1s */
.ml-lp__hero {
  margin-bottom: 0.25rem;
  padding-bottom: 0.35rem;
}

.ml-lp__hero .subpage-title {
  max-width: min(100%, 38rem);
  letter-spacing: -0.022em;
}

.ml-lp__hero-tagline {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--muted) 86%, var(--accent) 14%);
}

.ml-lp__section {
  margin-top: 1.35rem;
}

.ml-lp__section--loose-top {
  margin-top: 1.75rem;
}

.ml-lp__section-head .hint {
  margin: 0;
  max-width: 42rem;
  font-size: 0.82rem;
}

.ml-lp__section h2 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ml-lp__section-head > h2 {
  margin-bottom: 0.3rem;
}

.ml-lp__section p {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 48rem;
}

.ml-lp__section p:last-child {
  margin-bottom: 0;
}

.ml-lp__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

@media (min-width: 720px) {
  .ml-lp__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ml-lp__step {
  padding: 1rem 1.1rem;
}

.ml-lp__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
}

.ml-lp__step h3 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.ml-lp__step p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.ml-lp__usps {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ml-lp__usps li {
  margin: 0;
  padding: 0 0 0 1.1rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
}

.ml-lp__usps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}

.ml-lp__usps li strong {
  color: var(--text);
  font-weight: 600;
}

/* Use-case tiles — light glass band on existing tokens */
.ml-lp__uses-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 640px) {
  .ml-lp__uses-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ml-lp__uses-list li {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm, 8px);
  background: color-mix(in srgb, var(--bg-elevated) 50%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.ml-lp__uses-list strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.ml-lp__related {
  margin-top: 1.05rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.ml-lp__links-intro {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ml-lp__links {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
}

.ml-lp__cta {
  margin-top: 1.65rem;
  text-align: center;
}

.ml-lp__cta.card {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--surface-card-glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
}

.ml-lp__cta .subpage-title {
  margin-bottom: 0.35rem;
}

.ml-lp__cta .subpage-lede {
  margin: 0 auto 0.85rem;
}

/* Base hook (e.g. links); layout overridden below — .ml-lp__section p wins over this alone */
.ml-lp__cta-sub {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Must beat .ml-lp__section p { margin; max-width; font-size } so the line sits centered under CTA buttons */
.ml-lp__section.ml-lp__cta > .ml-lp__cta-sub {
  display: block;
  width: 100%;
  max-width: 26rem;
  margin: 0.75rem auto 0;
  margin-bottom: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  box-sizing: border-box;
}

.ml-lp__cta-sub a,
.ml-lp__cta-sub a:link,
.ml-lp__cta-sub a:visited {
  color: var(--accent);
  font-weight: 600;
}

.ml-lp__cta-sub a:hover {
  color: color-mix(in srgb, var(--accent) 85%, #fff 15%);
}

.ml-lp__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.15rem;
}

.ml-lp__footer {
  margin-top: auto;
  padding: 1.5rem 0 1.75rem;
  border-top: none;
  font-size: 0.8rem;
  color: var(--muted);
}

.ml-lp__footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

.ml-lp__footer-copy {
  margin: 0;
}

.ml-lp__footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
}

/* Guest text→video demo on static landings: more horizontal room, fewer inner scrollbars */
@media (min-width: 900px) {
  /* Scene column slightly wider than preview column */
  .ml-lp #page-text-video .guest-text-video-showcase.text-video-layout {
    grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
  }

  .ml-lp #page-text-video .guest-text-video-showcase__stepper {
    overflow-x: visible;
    flex-wrap: wrap;
    row-gap: 0.45rem;
  }

  .ml-lp #page-text-video .guest-text-video-showcase__textarea {
    min-height: 11rem;
    max-height: none;
    overflow-y: visible;
    resize: none;
  }

  /* Preview: portrait-leaning frame (taller than wide) vs default 4/5 in discovery-subpages */
  .ml-lp #page-text-video .guest-text-video-showcase__demo-stage {
    aspect-ratio: 3 / 4;
    max-height: min(560px, 65vh);
  }

  .ml-lp #page-text-video .guest-text-video-showcase__result--solo-demo .guest-text-video-showcase__demo-stage {
    aspect-ratio: 3 / 4;
    max-height: min(560px, 65vh);
  }
}

/* Image → video landings: visualize the three steps (ref image, prompt, clip) */
.ml-lp__steps--i2v .ml-lp__step-visual {
  margin-top: 0.85rem;
}

.ml-lp__steps--i2v .ml-lp__step-visual--ref {
  margin: 0.85rem 0 0;
  padding: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 10, 16, 0.55);
}

.ml-lp__steps--i2v .ml-lp__step-visual--ref:has(img[hidden]) {
  display: none;
}

.ml-lp__steps--i2v .ml-lp__step-visual-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 5;
  max-height: 220px;
  object-fit: cover;
}

.ml-lp__steps--i2v .ml-lp__step-visual-img[hidden] {
  display: none !important;
}

.ml-lp__steps--i2v .ml-lp__step-visual-prompt {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.84rem;
  line-height: 1.45;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 12, 20, 0.72);
  font-family: var(--mono, ui-monospace, system-ui, monospace);
  color: color-mix(in srgb, var(--text) 92%, transparent);
}

.ml-lp__steps--i2v .ml-lp__step-visual--clip {
  margin-top: 0.85rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #050508;
}

.ml-lp__steps--i2v .ml-lp__step-visual-video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  max-height: 200px;
  object-fit: cover;
  vertical-align: middle;
  background: #000;
}

.ml-lp__steps--i2v .ml-lp__step-visual-video[hidden] {
  display: none !important;
}

.ml-lp__steps--i2v .ml-lp__step-visual-fallback {
  margin: 0;
  padding: 0.65rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.ml-lp__steps--i2v .ml-lp__step-visual-fallback[hidden] {
  display: none !important;
}

@media (max-width: 719px) {
  .ml-lp__steps--i2v .ml-lp__step-visual-img {
    max-height: 200px;
  }

  .ml-lp__steps--i2v .ml-lp__step-visual-video {
    max-height: 180px;
  }
}

/* Mobile: hamburger + slide-down nav (desktop keeps inline links) */
@media (max-width: 767.98px) {
  .ml-lp__nav-toggle {
    display: inline-flex;
  }

  .ml-lp__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 8;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
    margin: 0;
    font-size: 0.95rem;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
  }

  .ml-lp__nav.is-open {
    display: flex;
  }

  .ml-lp__nav a {
    padding: 0.72rem 0.35rem;
    border-radius: var(--radius-sm);
  }
}

@media (min-width: 768px) {
  .ml-lp__nav {
    display: flex !important;
    position: static;
    padding: 0;
    background: transparent;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
  }

  .ml-lp__nav-toggle {
    display: none !important;
  }
}

body.ml-lp--nav-open {
  overflow: hidden;
}

/* Guest text→video demo: hide CTA row under the prompt on small screens (SPA keeps them) */
@media (max-width: 767.98px) {
  .ml-lp #page-text-video .guest-text-video-showcase__cta--after-preview {
    display: none !important;
  }
}

