/* ==========================================================================
   Miloop AI: editor.css
   Product page for Miloop Editor (/editor/).
   Consumes the tokens defined in style.css and adds no new ones.

   Same hero anatomy as the portfolio series (back-link, eyebrow, h1 with a
   gradient <em>, lede, three-item spec strip), so the page reads as part of
   the site. What is new is what a video service needs: a film frame, a
   before/after comparison, and a vertical short beside its copy.

   The page shows results only. How an episode is made stays off it.
   ========================================================================== */

/* ==========================================================================
   Hero
   ========================================================================== */
.editor-hero {
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

.editor-h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: calc(clamp(2.1rem, 4.4vw, 3.4rem) * var(--display-scale));
  line-height: 1.12;
  margin-top: var(--space-2);
  max-width: 22ch;
}
.editor-h1 em {
  display: block;
  font-style: normal;
  background: linear-gradient(120deg, var(--loop-indigo), var(--loop-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* The shared rule in style.css lists each page's h1 by name; this page keeps
   its own copy here rather than editing that list. */
html[lang^="zh"] .editor-h1 { line-height: 1.28; }

.editor-lede {
  margin-top: var(--space-3);
  color: var(--ink-dim);
  font-size: 1.08rem;
  max-width: 56ch;
}

/* "AI-powered" next to the product name: the one word a visitor scans for.
   What the AI does stays off the page; the questions say a person reviews
   every film. */
.editor-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.editor-ai {
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(166, 108, 240, 0.55);
  background: linear-gradient(120deg, rgba(91, 110, 245, 0.18), rgba(166, 108, 240, 0.18));
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

/* The product's state, said once at the top: in private beta, taking
   founding clients. Mint because it is a live, positive signal, the same
   pulsing dot the homepage uses on its Live badge. */
.editor-status {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-2);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.editor-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal-mint);
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .editor-status-dot { animation: node-pulse 2.4s ease-in-out infinite; }
}

.editor-note {
  margin-top: var(--space-2);
  color: var(--ink-dim);
  font-size: 0.9rem;
}

.editor-actions {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.editor-spec {
  margin: var(--space-5) 0 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.editor-spec-item { min-width: 0; }
@media (max-width: 1000px) {
  .editor-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.editor-spec-label {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.editor-spec-value {
  margin: 0.4rem 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .editor-spec { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* ==========================================================================
   Film frames
   ==========================================================================
   preload="none" with a poster, as on the DeskLoop page: the reel is 8.5MB
   and nobody should download it for scrolling past.
   ========================================================================== */
.editor-frame {
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.editor-video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

.editor-reel {
  margin: var(--space-4) 0 0;
  max-width: 1000px;
}
.editor-reel-caption {
  margin-top: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
}
.editor-reel-note {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

.editor-link {
  font-size: 0.95rem;
  color: var(--ink);
  border-bottom: 1px solid var(--border-strong);
  transition: border-color 0.15s ease;
}
.editor-link::after { content: " \2197"; color: var(--loop-violet); }
a.editor-link:hover { border-color: var(--loop-indigo); }

.editor-figures {
  margin: var(--space-4) 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: 1000px;
}
.editor-figure {
  min-width: 0;
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-soft);
}
.editor-figure-label {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.editor-figure-value {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--signal-mint);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .editor-figures { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* ==========================================================================
   Before and after
   ==========================================================================
   The delivered frame sits on the left because the packaging it shows (name
   strip, recap list) lives in the left half of the picture. A range input
   covers the frame so dragging, tapping and the keyboard all work without
   pointer code of our own.
   ========================================================================== */
.editor-tabs {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.editor-tab {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.editor-tab:hover { color: var(--ink); }
.editor-tab[aria-selected="true"] {
  color: var(--ink);
  border-color: var(--loop-indigo);
  background: var(--bg-panel-raised);
}

.editor-compare {
  --pos: 50%;
  position: relative;
  margin-top: var(--space-3);
  max-width: 1000px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  touch-action: pan-y;
}
.editor-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.editor-compare-after { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.editor-compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  pointer-events: none;
}
.editor-compare-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.4rem;
  height: 2.4rem;
  margin: -1.2rem 0 0 -1.2rem;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--loop-indigo), var(--loop-violet));
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.editor-compare-knob::before,
.editor-compare-knob::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -5px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.editor-compare-knob::before { left: 9px; border-right: 6px solid #07070C; }
.editor-compare-knob::after { right: 9px; border-left: 6px solid #07070C; }

.editor-compare-tag {
  position: absolute;
  top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(10, 11, 20, 0.78);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
}
.editor-compare-tag--left { left: var(--space-2); }
.editor-compare-tag--right { right: var(--space-2); }

.editor-compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.editor-compare:focus-within {
  outline: 2px solid var(--loop-indigo);
  outline-offset: 3px;
}

.editor-caption {
  margin-top: var(--space-3);
  color: var(--ink-dim);
  font-size: 0.98rem;
  line-height: 1.75;
  max-width: 66ch;
}

/* ==========================================================================
   What you get
   ==========================================================================
   Outcomes only, the things a client can see in the finished films. How
   they are made stays off the page.
   ========================================================================== */
.editor-gets {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  max-width: 1080px;
}
.editor-get {
  min-width: 0;
  padding: var(--space-3);
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}
.editor-get-name {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
}
.editor-get-body {
  margin-top: 0.4rem;
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}

@media (max-width: 1000px) {
  .editor-gets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .editor-gets { grid-template-columns: 1fr; }
}

/* The rights note for B-roll: who answers for material the client brings or
   asks for, and that clips lifted from other people's videos are not used. */
.editor-footnote {
  margin-top: var(--space-3);
  color: var(--ink-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 72ch;
}

/* ==========================================================================
   Shorts
   ========================================================================== */
.editor-shorts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: var(--space-5);
  align-items: center;
}
.editor-shorts-copy { min-width: 0; }
.editor-short { margin: 0; }
.editor-short-caption { margin-top: var(--space-2); text-align: center; }

@media (max-width: 820px) {
  .editor-shorts { grid-template-columns: 1fr; gap: var(--space-4); }
  .editor-short { max-width: 300px; }
}

/* ==========================================================================
   How it works
   ========================================================================== */
.editor-steps {
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: 1000px;
}
.editor-step {
  min-width: 0;
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-strong);
}
.editor-step-index {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--loop-violet);
}
.editor-step-name {
  margin-top: var(--space-1);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
}
.editor-step-body {
  margin-top: 0.35rem;
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}

@media (max-width: 820px) {
  .editor-steps { grid-template-columns: 1fr; }
}

.editor-callout {
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--loop-indigo);
  border-radius: var(--radius-md);
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 72ch;
}

/* ==========================================================================
   Questions
   ========================================================================== */
.editor-faq {
  margin: var(--space-4) 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-5);
  max-width: 1000px;
}
.editor-faq-item {
  min-width: 0;
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-soft);
}
.editor-faq-q {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
}
.editor-faq-a {
  margin: 0.4rem 0 0;
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

@media (max-width: 820px) {
  .editor-faq { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Reserve
   ========================================================================== */
.editor-credit {
  margin-top: var(--space-5);
  color: var(--ink-dim);
  font-size: 0.9rem;
  max-width: 66ch;
}
