@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/platform/assets/fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/platform/assets/fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/platform/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --bg: #f7f6f1;
  --bg-tint: #eef0fb;
  --surface: #ffffff;
  --surface-2: #f2f0e9;
  --ink: #14121f;
  --ink-soft: #363345;
  --muted: #6b6880;
  --line: #e5e1d7;
  --line-strong: #d3cec1;
  --accent: #4f46e5;
  --accent-hover: #4038c9;
  --accent-soft: #e8e6fd;
  --green: #0f7a4d;
  --green-soft: #e2f5ec;
  --amber: #a16207;
  --amber-soft: #fdf3d8;
  --red: #b91c1c;
  --red-soft: #fdeaea;
  --shadow-sm: 0 1px 2px rgba(20, 18, 31, .05);
  --shadow-md: 0 1px 2px rgba(20, 18, 31, .04), 0 18px 44px -26px rgba(20, 18, 31, .3);
  --radius: 16px;
  --radius-lg: 22px;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .9rem; }
.fineprint { font-size: .8rem; color: var(--muted); margin-top: 18px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; }

.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--accent); margin: 0 0 .8em; }
.lead { font-size: clamp(1rem, 1.5vw, 1.14rem); color: var(--ink-soft); max-width: 60ch; }

.app-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.02em; font-size: 1.08rem; }
.brand:hover { color: var(--ink); }
.brand-name { display: grid; line-height: 1.05; }
.brand-name small { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent); color: #fff; }
.brand-mark .mark { width: 24px; height: 24px; }
.main-nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.main-nav a { color: var(--ink-soft); font-weight: 500; font-size: .9rem; padding: 8px 11px; border-radius: 999px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; border-radius: 999px; border: 1px solid transparent; padding: 11px 20px; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 7px 13px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }

.hero { padding: clamp(36px, 5vw, 64px) 0 clamp(30px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.hero h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }
.hero-points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.hero-points li { position: relative; padding-left: 26px; font-size: .92rem; color: var(--ink-soft); }
.hero-points li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.section { padding: clamp(40px, 5vw, 68px) 0; }
.section-tight { padding: clamp(26px, 3vw, 40px) 0; }
.section-alt { background: var(--bg-tint); }
.section-head { max-width: 660px; margin-bottom: 28px; }
.section-head p { color: var(--ink-soft); margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 26px); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 1.15rem; }
.panel-note { font-size: .74rem; color: var(--muted); }
.form-panel { box-shadow: var(--shadow-md); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 5px; }
.tab { position: relative; cursor: pointer; }
.tab input { position: absolute; opacity: 0; width: 0; height: 0; }
.tab span { display: block; text-align: center; padding: 8px 10px; border-radius: 8px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.tab input:checked + span { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.tab input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab-panel { display: grid; }

.form { display: grid; gap: 15px; }
.field { display: grid; gap: 6px; }
.field > label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select {
  width: 100%; font: inherit; font-size: .94rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 11px; padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input[type="file"] { padding: 8px; background: var(--surface); }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hint { font-size: .76rem; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.notice { display: grid; gap: 2px; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; }
.notice.compact { padding: 10px 12px; }
.notice strong { color: var(--accent-hover); font-size: .84rem; }
.notice span { font-size: .8rem; color: var(--ink-soft); }

.flash { border-radius: 12px; padding: 11px 14px; font-size: .88rem; font-weight: 500; margin: 0 0 16px; }
.flash-error { background: var(--red-soft); color: var(--red); }
.flash-ok { background: var(--green-soft); color: var(--green); }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-no { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .8rem; margin-bottom: 12px; }
.step-card p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.check-list { padding: 0; list-style: none; display: grid; gap: 9px; }
.check-list li { position: relative; padding-left: 26px; font-size: .92rem; color: var(--ink-soft); }
.check-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }

.job-title { max-width: 30ch; }
.job-panel { margin: 14px 0 26px; }
.job-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.job-status .muted { flex: 1; min-width: 160px; }
.job-progress-num { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #7c6cf6); border-radius: inherit; transition: width .4s ease; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: .8rem; color: var(--muted); }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); }
.badge-done { background: var(--green-soft); color: var(--green); }
.badge-error { background: var(--red-soft); color: var(--red); }
.badge-queued, .badge-downloading, .badge-analyzing, .badge-rendering { background: var(--amber-soft); color: var(--amber); }

[data-clips] { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.clip-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.clip-card video { width: 100%; max-height: 540px; background: #0b0a10; display: block; object-fit: contain; }
.clip-body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.clip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.clip-head h3 { margin: 0; font-size: .98rem; }
.clip-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 34px 22px; text-align: center; }
.empty strong { display: block; margin-bottom: 4px; }
.empty p { color: var(--muted); font-size: .9rem; margin: 0; }

.app-footer { background: #14121f; color: #cfcbe0; margin-top: 40px; padding: 20px 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-bottom p { margin: 0; font-size: .8rem; color: #a8a3c0; }
.footer-bottom a { color: #cfcbe0; }
.footer-bottom a:hover { color: #fff; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .header-inner { justify-content: space-between; }
  .grid-2 { grid-template-columns: 1fr; }
  [data-clips] { grid-template-columns: 1fr; }
}

.notice.danger {
  background: var(--red-soft);
}
.notice.danger strong {
  color: var(--red);
}
.help {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
}
.help summary {
  cursor: pointer;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.help ol {
  margin: 10px 0 6px;
  padding-left: 1.2em;
  font-size: .82rem;
  color: var(--ink-soft);
}
.help li {
  margin-bottom: 4px;
}
