/* Trip & Clip — imagegen. Same design tokens as the main app (dark studio). */
@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk Variable";
  src: url("/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --card: #121212;
  --line: rgba(255, 255, 255, 0.1);
  --text: #fafafa;
  --muted: rgba(255, 255, 255, 0.55);
  --mint: #00d9a3;
  --red: #ff5252;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter Variable", -apple-system, "PingFang SC", sans-serif;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100vh;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }

.brand {
  font-family: "Space Grotesk Variable", "Inter Variable", sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.brand-sm {
  font-family: "Space Grotesk Variable", sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  text-align: center;
}
.dot { color: var(--mint); }
.tag { color: var(--muted); margin: 6px 0 0; }
.head { margin-bottom: 4px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 22px;
  margin-top: 12vh;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.lbl { font-size: 14px; color: var(--muted); }

.field {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  padding: 14px 16px;
  outline: none;
  resize: none;
}
.field:focus { border-color: rgba(0, 217, 163, 0.6); }
.field::placeholder { color: rgba(255, 255, 255, 0.25); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--mint);
  color: #06281f;
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn.big { font-size: 19px; padding: 16px 20px; }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.err { color: var(--red); font-size: 14px; margin: 0; }

/* photo drop zone */
.drop {
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
  overflow: hidden;
}
.drop:hover, .drop.drag { border-color: var(--mint); }
.drop-icon { font-size: 40px; }
.drop p { margin: 6px 0; }
#preview {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

/* prompt chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.chip:active { transform: scale(0.96); }
.chip:hover { border-color: rgba(0, 217, 163, 0.5); }

/* waiting: plane over clouds */
.sky {
  position: relative;
  height: 120px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0,217,163,0.08), rgba(0,217,163,0.02));
  margin-bottom: 18px;
}
.plane {
  position: absolute;
  top: 38%;
  font-size: 34px;
  animation: fly 3.2s ease-in-out infinite;
}
@keyframes fly {
  0%   { left: -12%; transform: translateY(6px) rotate(-4deg); }
  50%  { transform: translateY(-6px) rotate(3deg); }
  100% { left: 104%; transform: translateY(4px) rotate(-2deg); }
}
.cloud { position: absolute; font-size: 26px; opacity: 0.5; animation: drift linear infinite; }
.c1 { top: 12%; animation-duration: 7s; }
.c2 { top: 55%; animation-duration: 10s; animation-delay: -3s; }
.c3 { top: 32%; animation-duration: 13s; animation-delay: -7s; }
@keyframes drift {
  from { right: -15%; }
  to   { right: 110%; }
}
.wait-msg {
  font-family: "Space Grotesk Variable", sans-serif;
  font-size: 22px;
  margin: 0 0 6px;
  text-align: center;
}
.card .muted { text-align: center; }
.bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 18px;
}
.bar-fill {
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: var(--mint);
  animation: slide 1.6s ease-in-out infinite;
}
@keyframes slide {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

/* result */
.video {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #000;
}
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }

.foot {
  margin-top: auto;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}
