/* Media AI — SaaS design system */
:root {
  --ma-bg: #07070d;
  --ma-bg-2: #0c0c14;
  --ma-surface: #12121c;
  --ma-surface-2: #181826;
  --ma-line: rgba(255, 255, 255, 0.08);
  --ma-line-strong: rgba(255, 255, 255, 0.14);
  --ma-text: #f6f3ff;
  --ma-muted: #9b97b0;
  --ma-faint: #6d6980;
  --ma-violet: #8b5cf6;
  --ma-violet-2: #c4b5fd;
  --ma-pink: #f472b6;
  --ma-amber: #fbbf24;
  --ma-ok: #34d399;
  --ma-danger: #fb7185;
  --ma-radius: 20px;
  --ma-radius-sm: 12px;
  --ma-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --ma-font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ma-display: "Sora", "Inter", system-ui, sans-serif;
  --ma-serif: "Instrument Serif", Georgia, serif;
  --ma-max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--ma-bg);
  color: var(--ma-text);
  font-family: var(--ma-font);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(139, 92, 246, 0.22), transparent 55%),
    radial-gradient(700px 420px at -10% 20%, rgba(244, 114, 182, 0.08), transparent 50%),
    var(--ma-bg);
}
img, video { max-width: 100%; }
a { color: var(--ma-violet-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font-family: inherit; }
.ma-skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ma-violet); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100;
}
.ma-skip:focus { left: 8px; }

/* ── Layout ─────────────────────────────────────────────── */
.ma-shell { max-width: var(--ma-max); margin: 0 auto; padding: 0 22px 96px; }
.ma-section { padding: 72px 0 8px; }
.ma-section h2.ma-h {
  font-family: var(--ma-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
  margin: 0 0 10px;
}
.ma-lead { color: var(--ma-muted); font-size: 1.05rem; max-width: 560px; line-height: 1.55; margin: 0 0 28px; }
.ma-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ma-violet-2); margin: 0 0 14px;
}

/* ── Nav ────────────────────────────────────────────────── */
.ma-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0;
  background: rgba(7, 7, 13, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.ma-nav.solid { border-bottom-color: var(--ma-line); }
.ma-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--ma-display); font-weight: 700; letter-spacing: -0.03em;
  color: var(--ma-text); text-decoration: none;
}
.ma-brand:hover { text-decoration: none; }
.ma-logo, .ma-logo-img {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
}
.ma-logo {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ma-violet), #db2777);
  font-size: 12px; font-weight: 800; color: #fff;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}
.ma-logo-img { object-fit: cover; box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25); }
.ma-brand small { display: block; font-weight: 500; color: var(--ma-faint); font-size: 11px; margin-top: 1px; font-family: var(--ma-font); }
.ma-nav-links { display: flex; align-items: center; gap: 22px; }
.ma-nav-links a {
  color: var(--ma-muted); font-size: 14px; font-weight: 600; text-decoration: none;
}
.ma-nav-links a:hover { color: var(--ma-text); }
.ma-nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ma-pill {
  background: var(--ma-surface); border: 1px solid var(--ma-line);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; color: var(--ma-muted);
}
.ma-pill strong { color: var(--ma-amber); }

/* ── Buttons ────────────────────────────────────────────── */
.ma-btn {
  appearance: none; border: 0; cursor: pointer;
  border-radius: 12px; padding: 11px 16px; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: transform .15s ease, opacity .15s ease, background .15s ease, box-shadow .15s ease;
}
.ma-btn:hover { text-decoration: none; }
.ma-btn:active { transform: scale(0.98); }
.ma-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ma-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: white; box-shadow: 0 10px 28px rgba(124, 58, 237, 0.35);
}
.ma-btn-primary:hover { box-shadow: 0 14px 34px rgba(124, 58, 237, 0.45); }
.ma-btn-ghost {
  background: transparent; color: var(--ma-text);
  border: 1px solid var(--ma-line-strong);
}
.ma-btn-ghost:hover { background: rgba(255,255,255,0.04); }
.ma-btn-accent { background: var(--ma-amber); color: #1a1205; }
.ma-btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 14px; }

/* ── Landing hero ───────────────────────────────────────── */
.ma-hero-saas {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px;
  align-items: center; padding: 36px 0 20px;
}
.ma-hero-saas h1 {
  font-family: var(--ma-serif);
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  line-height: 1.02; letter-spacing: -0.03em;
  margin: 0 0 16px; font-weight: 400;
}
.ma-hero-saas h1 em {
  font-style: italic; color: var(--ma-violet-2);
}
.ma-hero-saas .sub {
  color: var(--ma-muted); font-size: 1.12rem; line-height: 1.6;
  max-width: 520px; margin: 0 0 26px;
}
.ma-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.ma-hero-note { color: var(--ma-faint); font-size: 13px; }
.ma-mosaic {
  display: grid; grid-template-columns: 1.1fr 0.9fr; grid-template-rows: 1fr 1fr;
  gap: 12px; min-height: 420px;
}
.ma-mosaic figure {
  margin: 0; position: relative; overflow: hidden; border-radius: 18px;
  border: 1px solid var(--ma-line); background: var(--ma-surface);
}
.ma-mosaic figure:first-child { grid-row: 1 / span 2; }
.ma-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 180px; }
.ma-mosaic figcaption {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(7,7,13,0.72); backdrop-filter: blur(8px);
  border: 1px solid var(--ma-line); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px;
}

.ma-trust {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0 0;
}
.ma-tag {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ma-violet-2); background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.28); border-radius: 999px; padding: 6px 11px;
}

/* ── Tool grid (landing) ────────────────────────────────── */
.ma-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.ma-card {
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: var(--ma-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.ma-card:hover {
  border-color: rgba(196,181,253,.4);
  transform: translateY(-3px);
  box-shadow: var(--ma-shadow);
}
.ma-card-link { display: block; color: inherit; text-decoration: none; }
.ma-card-link:hover { text-decoration: none; }
.ma-card img.thumb, .ma-card .thumb {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--ma-surface-2); display: block;
}
.ma-card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ma-card-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ma-badge {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(251,191,36,.12); color: var(--ma-amber);
}
.ma-badge.soon { background: rgba(155,151,176,.12); color: var(--ma-muted); }
.ma-cat { font-size: 12px; color: var(--ma-muted); font-weight: 600; }
.ma-card h3 { margin: 0; font-size: 1.12rem; letter-spacing: -0.02em; font-family: var(--ma-display); }
.ma-card p { margin: 0; color: var(--ma-muted); font-size: 0.92rem; line-height: 1.45; flex: 1; }
.ma-card .ma-btn { margin-top: 8px; width: 100%; text-align: center; }

/* ── Feature rows ───────────────────────────────────────── */
.ma-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ma-feature {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  border: 1px solid var(--ma-line); border-radius: 18px; padding: 22px;
}
.ma-feature .icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(139,92,246,.14); color: var(--ma-violet-2); font-weight: 800; margin-bottom: 14px;
}
.ma-feature h3 { margin: 0 0 8px; font-size: 1.05rem; font-family: var(--ma-display); }
.ma-feature p { margin: 0; color: var(--ma-muted); font-size: 0.95rem; line-height: 1.5; }

.ma-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ma-step {
  padding: 8px 4px 0;
}
.ma-step .num {
  font-family: var(--ma-serif); font-size: 2rem; color: var(--ma-violet-2); display: block; margin-bottom: 8px;
}
.ma-step h3 { margin: 0 0 8px; font-family: var(--ma-display); }
.ma-step p { margin: 0; color: var(--ma-muted); line-height: 1.5; }

/* ── Use cases / FAQ / CTA ──────────────────────────────── */
.ma-usecases { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ma-use {
  border: 1px solid var(--ma-line); border-radius: 16px; padding: 18px 18px 16px;
  background: var(--ma-surface);
}
.ma-use h3 { margin: 0 0 6px; font-size: 1rem; }
.ma-use p { margin: 0; color: var(--ma-muted); font-size: 0.92rem; line-height: 1.5; }

.ma-faq { display: grid; gap: 10px; max-width: 760px; }
.ma-faq details {
  background: var(--ma-surface); border: 1px solid var(--ma-line);
  border-radius: 14px; padding: 4px 16px;
}
.ma-faq summary {
  cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none;
}
.ma-faq summary::-webkit-details-marker { display: none; }
.ma-faq details p { margin: 0 0 14px; color: var(--ma-muted); line-height: 1.55; }

.ma-cta-band {
  margin-top: 56px;
  background: linear-gradient(135deg, rgba(124,58,237,.28), rgba(219,39,119,.18));
  border: 1px solid rgba(196,181,253,.25);
  border-radius: 24px; padding: 40px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.ma-cta-band h2 { margin: 0 0 6px; font-family: var(--ma-serif); font-size: 2rem; font-weight: 400; }
.ma-cta-band p { margin: 0; color: var(--ma-muted); }

.ma-footer {
  margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--ma-line);
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 24px;
  color: var(--ma-muted); font-size: 13px;
}
.ma-footer strong { color: var(--ma-text); display: block; margin-bottom: 10px; font-size: 13px; }
.ma-footer a { display: block; color: var(--ma-muted); padding: 4px 0; text-decoration: none; }
.ma-footer a:hover { color: var(--ma-text); }
.ma-footer .legal { grid-column: 1 / -1; padding-top: 12px; color: var(--ma-faint); }

/* ── Studio / tool workspace ────────────────────────────── */
.ma-tool-hero { padding: 12px 0 20px; }
.ma-crumb { font-size: 13px; color: var(--ma-muted); margin: 0 0 12px; }
.ma-tool-hero h1 {
  font-family: var(--ma-serif); font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 10px; letter-spacing: -0.03em;
}
.ma-tool-hero .sub { color: var(--ma-muted); max-width: 640px; margin: 0 0 12px; line-height: 1.55; }
.ma-examples { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ma-chip {
  font-size: 12px; color: var(--ma-muted); border: 1px solid var(--ma-line);
  border-radius: 999px; padding: 5px 10px; background: transparent;
}

.ma-work { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 22px; }
.ma-panel {
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: var(--ma-radius);
  padding: 20px;
}
.ma-panel h2 { margin: 0 0 6px; font-size: 1.05rem; font-family: var(--ma-display); }
.ma-panel .hint { color: var(--ma-muted); font-size: 0.9rem; margin: 0 0 14px; }

.ma-drop {
  border: 1.5px dashed var(--ma-line-strong);
  border-radius: 14px; padding: 28px 16px; text-align: center;
  background: var(--ma-surface-2); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ma-drop:hover, .ma-drop.drag { border-color: var(--ma-violet-2); background: rgba(139,92,246,.08); }
.ma-drop input { display: none; }
.ma-preview {
  margin-top: 12px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--ma-line); max-height: 280px;
  display: none; background: #000;
}
.ma-preview img, .ma-preview video { width: 100%; display: block; max-height: 280px; object-fit: contain; }
.ma-preview-note { font-size: 12px; color: var(--ma-muted); padding: 6px 10px; background: var(--ma-bg); }

.ma-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.ma-style {
  border: 1px solid var(--ma-line); border-radius: 12px;
  padding: 12px; background: var(--ma-surface-2); cursor: pointer;
  font-weight: 700; font-size: 13px; color: var(--ma-text); text-align: left;
}
.ma-style.active {
  border-color: var(--ma-violet-2);
  background: rgba(139,92,246,.15);
  box-shadow: inset 0 0 0 1px rgba(196,181,253,.35);
}

.ma-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 14px; }
.ma-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ma-field label, .ma-opts label {
  font-size: 11px; font-weight: 700; color: var(--ma-muted); text-transform: uppercase; letter-spacing: .04em;
}
.ma-field input, .ma-field textarea, .ma-opts select {
  border-radius: 12px; border: 1px solid var(--ma-line); background: var(--ma-surface-2);
  color: var(--ma-text); padding: 11px 12px; font-size: 14px; outline: none; width: 100%;
}
.ma-field textarea { min-height: 72px; resize: vertical; }
.ma-field input:focus, .ma-field textarea:focus, .ma-opts select:focus { border-color: var(--ma-violet-2); }

.ma-result {
  min-height: 320px; border-radius: 14px; border: 1px solid var(--ma-line);
  background: #050509; display: grid; place-items: center; overflow: hidden;
  color: var(--ma-muted); font-size: 14px; position: relative;
}
.ma-result img, .ma-result video { width: 100%; max-height: 460px; object-fit: contain; display: block; }
.ma-result-placeholder { display: grid; place-items: center; gap: 10px; padding: 16px; text-align: center; width: 100%; }
.ma-result-placeholder img { max-height: 200px; width: auto; max-width: 100%; opacity: 0.88; border-radius: 8px; }
.ma-compare { position: relative; width: 100%; height: 420px; overflow: hidden; background: #000; }
.ma-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ma-compare .after { clip-path: inset(0 0 0 50%); }
.ma-compare input[type=range] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 2;
}
.ma-compare .bar {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none;
}
.ma-compare-lab {
  position: absolute; bottom: 12px; z-index: 1;
  background: rgba(7,7,13,.72); color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--ma-line);
}
.ma-compare-lab-l { left: 12px; }
.ma-compare-lab-r { right: 12px; }
.ma-result-actions { display: flex; gap: 8px; margin-top: 12px; }
.ma-result-actions .ma-btn { flex: 1; text-align: center; }

.ma-burger {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--ma-line); background: transparent; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.ma-burger span { display: block; width: 16px; height: 1.5px; background: var(--ma-text); }
.ma-mobile-nav {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 0 4px; border-bottom: 1px solid var(--ma-line); margin-bottom: 8px;
}
.ma-mobile-nav a { color: var(--ma-text); font-weight: 600; padding: 8px 0; }
.ma-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 28px 0 8px;
}
.ma-stat {
  border: 1px solid var(--ma-line); border-radius: 16px; padding: 16px 14px;
  background: rgba(255,255,255,0.02);
}
.ma-stat strong { display: block; font-family: var(--ma-display); font-size: 1.35rem; margin-bottom: 4px; }
.ma-stat span { color: var(--ma-muted); font-size: 13px; }

.ma-loading { display: grid; place-items: center; gap: 10px; padding: 24px; text-align: center; color: var(--ma-text); font-weight: 600; }
.ma-loading .hint { font-weight: 500; color: var(--ma-muted); font-size: 13px; }
.ma-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(196,181,253,.25); border-top-color: var(--ma-violet-2);
  animation: ma-spin .8s linear infinite;
}
@keyframes ma-spin { to { transform: rotate(360deg); } }
.ma-empty-credits { padding: 24px; text-align: center; }
.ma-empty-credits p { color: var(--ma-muted); margin: 8px 0 0; font-size: 14px; }

.ma-history { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.ma-history button {
  border: 1px solid var(--ma-line); background: #000; border-radius: 10px; padding: 0; overflow: hidden; cursor: pointer;
}
.ma-history img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }

.ma-seo-prose { max-width: 720px; color: var(--ma-muted); line-height: 1.65; }
.ma-seo-prose h2 { color: var(--ma-text); font-family: var(--ma-display); letter-spacing: -0.03em; }
.ma-related { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Auth modal ─────────────────────────────────────────── */
.ma-modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,4,10,.72);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.ma-modal-backdrop.open { display: flex; }
.ma-modal {
  width: min(420px, 100%);
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: 18px; padding: 22px;
  box-shadow: var(--ma-shadow);
}
.ma-modal h3 { margin: 0 0 6px; font-family: var(--ma-display); }
.ma-modal p { color: var(--ma-muted); font-size: 0.92rem; margin: 0 0 14px; }
.ma-modal-actions { display: flex; flex-direction: column; gap: 8px; }
.ma-divider {
  display: flex; align-items: center; gap: 10px; color: var(--ma-muted); font-size: 12px; margin: 8px 0;
}
.ma-divider::before, .ma-divider::after { content: ""; flex: 1; height: 1px; background: var(--ma-line); }
.ma-msg { font-size: 13px; margin-top: 8px; min-height: 1.2em; }
.ma-msg.err { color: var(--ma-danger); }
.ma-msg.ok { color: var(--ma-ok); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 980px) {
  .ma-hero-saas, .ma-work, .ma-features, .ma-steps, .ma-usecases { grid-template-columns: 1fr; }
  .ma-grid { grid-template-columns: 1fr 1fr; }
  .ma-nav-links { display: none; }
  .ma-burger { display: inline-flex; }
  .ma-footer { grid-template-columns: 1fr 1fr; }
  .ma-mosaic { min-height: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (max-width: 640px) {
  .ma-shell { padding: 0 16px 80px; }
  .ma-grid { grid-template-columns: 1fr; gap: 12px; }
  .ma-styles, .ma-opts, .ma-history { grid-template-columns: 1fr 1fr; }
  .ma-hero-saas h1 { font-size: 2.15rem; }
  .ma-cta-band { padding: 24px 18px; }
  .ma-section { padding: 48px 0 4px; }
}
