:root {
  --ink: #111;
  --paper: #fff;
  --soft: #f3f1ec;
  --yellow: #ffe58a;
  --green: #b9efc0;
  --line: 3px solid var(--ink);
  --round: 22px;
  --display: "Bungee", Impact, sans-serif;
  --body: "Space Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; background: var(--paper); color: var(--ink); font: 17px/1.45 var(--body); }
#app { min-height: 100%; display: flex; }

.screen { width: 100%; max-width: 980px; margin: 0 auto; padding: 56px 24px 40px; }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }

h1 { font: 400 clamp(38px, 7vw, 76px)/1 var(--display); letter-spacing: .01em; text-transform: uppercase; }
h2 { font: 400 clamp(32px, 5.5vw, 60px)/1.05 var(--display); }
.sub { font-size: clamp(18px, 2.4vw, 24px); margin-top: -4px; }
.pitch { margin-top: 26px; font-size: 16px; }

/* carousel */
.carousel { position: relative; width: min(640px, 100%); }
.carousel .frame { aspect-ratio: 16 / 9; border: var(--line); border-radius: var(--round); overflow: hidden; background: #000; }
.carousel video { width: 100%; height: 100%; object-fit: contain; display: block; }
.carousel .arrow {
  position: absolute; top: 50%; translate: 0 -50%; background: none; border: 0; cursor: pointer;
  font: 400 54px/1 var(--display); color: var(--ink); padding: 8px;
}
.carousel .prev { left: -70px; }
.carousel .next { right: -70px; }
@media (max-width: 820px) { .carousel .prev { left: 4px; color: #fff; } .carousel .next { right: 4px; color: #fff; } }

.btn {
  font: 700 22px var(--body); padding: 12px 54px; border: var(--line); border-radius: 14px;
  background: var(--paper); color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--ink);
  transition: translate .08s, box-shadow .08s;
}
.btn:active { translate: 0 3px; box-shadow: 0 1px 0 var(--ink); }
.btn.go { background: var(--yellow); }
.btn:disabled { opacity: .5; cursor: default; }

/* request form */
.card { border: var(--line); border-radius: var(--round); padding: 24px; width: min(520px, 100%); }
.form { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 18px; }
.form input, .form textarea { font: 17px var(--body); border: 2px solid var(--ink); border-radius: 12px; padding: 12px 14px; resize: vertical; }
.form .btn { align-self: center; margin-top: 6px; }
.err { color: #b3261e; min-height: 1.4em; font-weight: 500; }

/* the input bar */
.ask { text-align: left; display: flex; align-items: center; gap: 10px; width: min(660px, 100%); border: var(--line); border-radius: 16px; padding: 8px 8px 8px 18px; background: var(--paper); margin-top: 18px; }
.ask-box { flex: 1; position: relative; display: flex; align-items: center; gap: .35em; min-width: 0; cursor: text; }
.ask-box .lead { white-space: nowrap; }
.ask-box input { flex: 1; min-width: 0; border: 0; outline: 0; font: 17px var(--body); background: transparent; padding: 8px 0; }
.ask-box .field { flex: 1; min-width: 0; position: relative; display: flex; }
.ask-box .ghost { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; pointer-events: none; color: #8a8a8a; white-space: nowrap; overflow: hidden; }
.ask-box .ghost::after { content: "▍"; animation: blink 1s steps(1) infinite; margin-left: 1px; color: var(--ink); }
@keyframes blink { 50% { opacity: 0; } }
.send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: var(--line); background: var(--paper); font: 700 22px var(--body); cursor: pointer; }
.send:disabled { opacity: .4; cursor: default; }

/* chat */
.chat { display: flex; flex-direction: column; height: 100vh; padding-top: 28px; }
.log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 4px 4px 24px; }
.msg { max-width: min(560px, 82%); border: var(--line); border-radius: 16px; padding: 12px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; }
.msg.bot { align-self: flex-start; }
.msg.media { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.msg .clips { display: flex; gap: 10px; flex-wrap: wrap; }
.msg .clips video, .msg .clips img { width: 240px; max-width: 100%; border: 2px solid var(--ink); border-radius: 12px; background: #000; }
.msg.plan { font-size: 19px; display: flex; flex-direction: column; gap: 14px; }
.msg.plan .btn { align-self: center; }
.live { display: flex; flex-direction: column; gap: 10px; align-self: stretch; }
.drafts { display: flex; flex-direction: column; gap: 16px; }
.drafts:empty { display: none; }
.msg.draft { align-self: flex-start; }
.working { align-self: flex-start; display: flex; align-items: center; gap: 10px; padding: 2px 4px; font-size: 15px; color: #555; }
.working .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { scale: .6; opacity: .45; } 50% { scale: 1; opacity: 1; } }
.swap { animation: swap .28s ease; }
@keyframes swap { from { opacity: 0; translate: 0 5px; } to { opacity: 1; translate: 0 0; } }
.chat .ask { align-self: center; margin: 8px 0 20px; }

/* cooking */
.eta { font: 500 clamp(22px, 3.4vw, 34px) var(--body); }
.story-label { align-self: center; width: min(640px, 100%); text-align: left; margin-top: 28px; font-size: 15px; }
.story { width: min(640px, 100%); aspect-ratio: 16 / 9; object-fit: cover; border: var(--line); border-radius: var(--round); background: var(--soft); }
.bar { width: min(820px, 100%); height: 44px; border: var(--line); border-radius: 16px; overflow: hidden; margin-top: 34px; }
.bar .fill { height: 100%; width: 2%; background: var(--green); border-right: var(--line); border-radius: 0 14px 14px 0; transition: width 1.2s ease; }

/* done */
.final { width: min(900px, 100%); max-height: 86vh; border: var(--line); border-radius: var(--round); background: #000; }

/* idea -> chat */
.transition { position: fixed; inset: 0; background: #000; z-index: 10; display: grid; place-items: center; }
.transition video { width: 100%; height: 100%; object-fit: cover; }
