/* generate_animation — ocean palette and type borrowed from the aaq landing page,
   so the two products read as coming from the same place. */

:root,
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f1f9fd;
  --card: #ffffff;
  --ink: #07314c;
  --ink-soft: #527386;
  --brand: #0a93c9;
  --brand-2: #00b4d8;
  --brand-deep: #045b86;
  --tint: #e3f5fc;
  --line: #d8e9f2;
  --shadow: 0 18px 50px -28px rgba(7, 49, 76, 0.45);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --star: #f4a52b;
  --ok: #1f9d57;
  --bad: #d64545;
}

:root[data-theme="dark"] {
  --bg: #04101a;
  --bg-soft: #08202f;
  --card: #0a2032;
  --ink: #e9f5fc;
  --ink-soft: #9dc1d6;
  --brand: #2bb6e8;
  --brand-2: #54d6f6;
  --brand-deep: #0a93c9;
  --tint: #0e2a3d;
  --line: #16384f;
  --shadow: 0 22px 60px -30px rgba(0, 0, 0, 0.8);
  --nav-bg: rgba(6, 20, 31, 0.66);
  --star: #f4b942;
  --ok: #3ec27e;
  --bad: #ef6b6b;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(90% 60% at 50% -10%, var(--tint) 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

h1, h2, h3, .brand {
  font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

a { color: var(--brand-deep); }

.wrap { width: min(760px, calc(100% - 2.5rem)); margin: 0 auto; }

/* ── header ─────────────────────────────────────────────────────────────── */
header.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand { display: flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; color: var(--ink); text-decoration: none; }

.badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.who { color: var(--ink-soft); font-size: 0.85rem; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 3.2rem 0 1.6rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
.hero p { color: var(--ink-soft); margin: 0.9rem auto 0; max-width: 52ch; }

/* ── cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
}

.card h2 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.card .hint { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 1.1rem; }

/* ── form ───────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1.05rem; }
.field > label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.4rem; }
.field .sub { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.84rem; margin-top: 0.15rem; }

input[type="url"], input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

textarea { min-height: 190px; resize: vertical; line-height: 1.6; }

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.row { display: flex; gap: 1rem; }
.row > * { flex: 1; min-width: 0; }

input[type="range"] { width: 100%; accent-color: var(--brand); }
.length-value { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand-deep); }

details.advanced { border-top: 1px dashed var(--line); padding-top: 0.9rem; margin: 0.4rem 0 1.4rem; }
details.advanced > summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; color: var(--brand-deep); }
details.advanced[open] > summary { margin-bottom: 0.9rem; }

/* ── source picker ──────────────────────────────────────────────────────── */
/* Three ways in, one at a time. Website reads first because it is what most people
   arrive with; the other two are there for when it is the wrong question. */
.sources { display: flex; gap: 0.35rem; margin-bottom: 0.9rem; }

.source {
  flex: 1;
  padding: 0.5rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.source:hover { border-color: var(--brand); color: var(--ink); }

.source.on {
  background: var(--tint);
  border-color: var(--brand);
  color: var(--brand-deep);
}

.filerow { display: flex; align-items: center; gap: 0.7rem; margin: 0.6rem 0 0; }
.btn-file { padding: 0.4rem 0.8rem; font-size: 0.88rem; }
#document { min-height: 150px; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-wide { width: 100%; padding: 0.85rem 1.25rem; font-size: 1rem; }
.btn-icon { padding: 0.4rem 0.6rem; background: transparent; border-color: var(--line); color: var(--ink); }

/* ── progress ───────────────────────────────────────────────────────────── */
.bar { height: 9px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 0.5s ease; }
.stage { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.9rem; }
.stage .pct { font-variant-numeric: tabular-nums; }
.eta { color: var(--ink-soft); font-size: 0.85rem; margin-top: 0.75rem; }

/* ── notices ────────────────────────────────────────────────────────────── */
.notice { border-radius: 11px; padding: 0.75rem 0.9rem; font-size: 0.92rem; margin-bottom: 1rem; }
.notice.error { background: color-mix(in oklab, var(--bad) 12%, transparent); border: 1px solid color-mix(in oklab, var(--bad) 35%, transparent); color: var(--bad); }
.notice.info { background: var(--tint); border: 1px solid var(--line); color: var(--ink); }
.notice.ok { background: color-mix(in oklab, var(--ok) 12%, transparent); border: 1px solid color-mix(in oklab, var(--ok) 35%, transparent); color: var(--ok); }

/* ── result ─────────────────────────────────────────────────────────────── */
video { width: 100%; border-radius: 13px; background: #000; display: block; }
.result-actions { display: flex; gap: 0.7rem; margin-top: 1.1rem; flex-wrap: wrap; }

.quota { text-align: center; color: var(--ink-soft); font-size: 0.85rem; padding-bottom: 3rem; }

[hidden] { display: none !important; }

footer { text-align: center; color: var(--ink-soft); font-size: 0.85rem; padding: 2rem 0 3rem; }

@media (max-width: 560px) {
  .row { flex-direction: column; gap: 0; }
  .nav-actions .who { display: none; }
}
