/* Content machine (hero demo, 2026-11-04). One link in, a week of shorts out.
   States on .mx, set by script.js in order: is-typing → is-press → is-file + is-running →
   is-boom → is-posting → is-done. Reads the theme tokens, so it follows light and dark. */

.mx { width: min(1120px, 100%); margin: clamp(56px, 7vw, 88px) auto 0; text-align: left; }
.mx__window {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 24px; border: 1px solid transparent;
  background: linear-gradient(var(--glass), var(--glass)) padding-box, var(--edge) border-box;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 var(--bevel-top), 0 40px 90px -40px rgba(0, 0, 0, 0.55), 0 0 60px -20px rgba(var(--pool), 0.45);
}

/* the bar: a link field that types itself and a button that gets pressed */
.mx__bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.mx .dots { display: inline-flex; gap: 6px; flex: none; }
.mx .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.mx__field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2);
  font: 400 13px/1 var(--font-mono); color: var(--ink-2); white-space: nowrap; overflow: hidden;
}
.mx__field svg { width: 15px; height: 15px; flex: none; color: var(--ink-3); }
.mx__typed { overflow: hidden; text-overflow: ellipsis; }
.mx__caret { width: 1.5px; height: 16px; background: var(--accent); flex: none; opacity: 0; }
.mx.is-typing .mx__caret { opacity: 1; animation: mx-blink 0.9s steps(1) infinite; }
@keyframes mx-blink { 50% { opacity: 0; } }
.mx__go {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font: 600 13px/1 var(--font);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 0 24px -6px var(--accent-glow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.mx__go svg { width: 13px; height: 13px; }
.mx.is-press .mx__go { transform: scale(0.94); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent), 0 0 40px -4px var(--accent-glow); }

.mx__body { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 22px; padding: 22px; }

/* left: the file, the edit's steps, the waveform, the post counter */
.mx__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mx__file {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2);
  opacity: 0.35; transform: translateY(-6px) scale(0.98); transition: opacity 0.4s, transform 0.5s var(--ease-out), box-shadow 0.5s;
}
.mx.is-file .mx__file, .mx.is-boom .mx__file, .mx.is-posting .mx__file {
  opacity: 1; transform: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 14px 30px -18px var(--accent-glow);
}
/* a generic three-colour drive mark */
.mx__drive { position: relative; width: 34px; height: 30px; flex: none; }
.mx__drive i { position: absolute; width: 14px; height: 24px; border-radius: 3px; transform-origin: 50% 100%; }
.mx__drive i:nth-child(1) { left: 4px; bottom: 2px; background: #1fa463; transform: rotate(30deg); }
.mx__drive i:nth-child(2) { right: 4px; bottom: 2px; background: #ffd04b; transform: rotate(-30deg); }
.mx__drive i:nth-child(3) { left: 4px; right: 4px; width: auto; height: 9px; bottom: 0; background: #4688f4; }
.mx__name { display: grid; gap: 3px; min-width: 0; }
.mx__name b { font: 600 14px/1.2 var(--font); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx__name small { font: 400 11.5px/1 var(--font-mono); color: var(--ink-3); letter-spacing: 0.02em; }

.mx__steps { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.mx__steps li {
  position: relative; padding-left: 26px; font-size: 13.5px; line-height: 1.35; color: var(--ink-3);
  opacity: 0.45; transition: opacity 0.3s, color 0.3s;
}
.mx__steps li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--line-2); box-sizing: border-box; transition: background 0.3s, border-color 0.3s;
}
.mx__steps li.is-live { opacity: 1; color: var(--ink); }
.mx__steps li.is-live::before { border-color: var(--accent); border-top-color: transparent; animation: mx-spin 0.7s linear infinite; }
.mx__steps li.is-done { opacity: 1; color: var(--ink-2); }
.mx__steps li.is-done::before {
  border-color: var(--accent); background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}
@keyframes mx-spin { to { transform: rotate(360deg); } }

.mx__wave { position: relative; height: 46px; border-radius: 12px; background: var(--surface-2); overflow: hidden; padding: 0 8px; display: flex; align-items: center; }
.mx__wave .wave { width: 100%; height: 30px; color: color-mix(in srgb, var(--ink) 30%, transparent); }
.mx__sweep {
  position: absolute; top: 0; bottom: 0; left: 0; width: 70px; opacity: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent), transparent);
}
.mx.is-running .mx__sweep { opacity: 1; animation: mx-sweep 0.9s linear infinite; }
@keyframes mx-sweep { from { transform: translateX(-70px); } to { transform: translateX(300px); } }

.mx__count { margin: auto 0 0; font-size: 13.5px; color: var(--ink-3); }
.mx__count b { display: inline-block; min-width: 1.4em; font: 600 28px/1 var(--font-title, var(--font)); letter-spacing: -0.04em; color: var(--ink); }
.mx.is-posting .mx__count b { color: var(--accent); text-shadow: 0 0 22px var(--accent-glow); }

/* right: four phones burst in, then each gets its post stamp; under them the week fills up */
.mx__out { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mx__phones { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.mx__phones::before {
  content: ""; position: absolute; inset: 10% 5%; z-index: -1; border-radius: 50%; filter: blur(40px); opacity: 0;
  background: radial-gradient(closest-side, var(--accent), rgba(var(--pool), 0.8), transparent);
  transition: opacity 0.6s;
}
.mx.is-boom .mx__phones::before { opacity: 0.55; animation: mx-flash 1.2s var(--ease-out); }
.mx.is-posting .mx__phones::before { opacity: 0.25; }
@keyframes mx-flash { 0% { opacity: 0; transform: scale(0.6); } 25% { opacity: 0.9; transform: scale(1.1); } 100% { opacity: 0.55; transform: none; } }

.mx__phone {
  position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent); border: 1.5px dashed var(--line-2);
  transform: rotate(calc((var(--i) - 1.5) * 1.2deg));
}
/* empty slots wait for the edit, then each short pops in with its video playing */
.mx__phone::after {
  content: "9:16"; position: absolute; inset: 0; display: grid; place-items: center;
  font: 400 11px/1 var(--font-mono); letter-spacing: 0.08em; color: var(--ink-3); transition: opacity 0.2s;
}
.mx.is-running .mx__phone::after { content: "editing…"; color: var(--accent); }
.mx__phone video, .mx__phone .mx__style { opacity: 0; transition: opacity 0.25s; }
.mx__phone.is-in { background: #0b0b0e; border: 4px solid #111; box-shadow: 0 0 0 1px var(--line-2), 0 30px 50px -30px rgba(0, 0, 0, 0.8); animation: mx-pop 0.6s cubic-bezier(0.2, 1.5, 0.4, 1); }
.mx__phone.is-in::after { opacity: 0; }
.mx__phone.is-in video, .mx__phone.is-in .mx__style { opacity: 1; }
@keyframes mx-pop { 0% { transform: translateY(24px) scale(0.84) rotate(calc((var(--i) - 1.5) * 4deg)); } 100% { transform: rotate(calc((var(--i) - 1.5) * 1.2deg)); } }
.mx__phone video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mx__style {
  position: absolute; left: 8px; top: 8px; padding: 4px 7px; border-radius: 999px;
  background: rgba(5, 5, 7, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.02em; color: #fff;
}
.mx__posted {
  position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  font: 600 11px/1 var(--font); white-space: nowrap; box-shadow: 0 8px 20px -8px var(--accent-glow);
  opacity: 0; transform: translateY(10px) scale(0.9); transition: opacity 0.25s, transform 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.mx__posted svg { width: 12px; height: 12px; flex: none; }
.mx__phone.is-posted .mx__posted { opacity: 1; transform: none; }

.mx__week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto 28px 28px; gap: 6px;
  padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2);
}
.mx__week > span { font: 400 11px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); text-align: center; padding-bottom: 2px; }
.mx__slot {
  grid-column: var(--c); grid-row: calc(var(--r) + 1); display: grid; place-items: center; border-radius: 8px;
  background: var(--surface-2); border: 1px dashed var(--line-2); font-style: normal;
}
.mx__slot b { font: 600 11px/1 var(--font); color: var(--ink); opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
.mx__slot.is-in { border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.mx__slot.is-in b { opacity: 1; transform: none; }

.mx__foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-3); }
.mx__foot b { color: var(--ink); font-weight: 600; }
.mx__replay {
  margin-left: auto; flex: none; height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink); font: 500 12.5px/1 var(--font);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.mx.is-done .mx__replay { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .mx__body { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 16px; }
  .mx__phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mx__go { padding: 0 10px; font-size: 12px; }
  .mx__count { margin: 0; }
  .mx__wave { display: none; }
  .mx__side { gap: 12px; }
}
@media (max-width: 480px) {
  .mx__bar .dots { display: none; }
  .mx__week { gap: 4px; padding: 8px; grid-template-rows: auto 24px 24px; }
  .mx__slot b { font-size: 9.5px; }
  .mx__foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .mx *, .mx *::before { animation: none !important; transition: none !important; }
}

/* the site's waveform bars are navy; here they follow the ink, and light up once the edit is done */
.mx__wave .wave i { background: color-mix(in srgb, var(--ink) 32%, transparent); transition: background 0.4s; }
.mx.is-boom .mx__wave .wave i:nth-child(7n + 3), .mx.is-posting .mx__wave .wave i:nth-child(7n + 3) { background: var(--accent); }

/* "We've made content for": creator chips under the hero (replaces the recording-types marquee) */
.madefor { width: min(920px, 100%); margin-top: 18px; overflow: hidden; }
.madefor__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.madefor.is-ready { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.madefor.is-ready .madefor__list { flex-wrap: nowrap; justify-content: flex-start; width: max-content; animation: marquee 40s linear infinite; }
.madefor__list li {
  display: inline-flex; align-items: center; gap: 11px; padding: 7px 16px 7px 7px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  white-space: nowrap;
}
.madefor.is-ready .madefor__list li { margin-right: 12px; }
.madefor__av {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 55%, #fff), var(--c));
  color: #fff; font: 700 15px/1 var(--font); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px color-mix(in srgb, var(--c) 70%, transparent);
}
.madefor__who { display: grid; gap: 3px; text-align: left; }
.madefor__who b { font: 600 15px/1.1 var(--font); color: var(--ink); }
.madefor__who small { font: 400 12px/1 var(--font-mono); color: var(--ink-3); }
