@font-face {
  font-family: "Poppins";
  src: url("./assets/fonts/poppins-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("./assets/fonts/poppins-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Poppins", Arial, sans-serif;
  color: #171923;
  background: #edf3ff;
  font-synthesis: none;
  --blue: #0b5cc5;
  --blue-dark: #073b84;
  --yellow: #ffdc00;
  --green: #14763f;
  --border: #cdd7e8;
  --muted: #5f6675;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--blue) 0 260px, #edf3ff 260px 100%);
}

button, input { font: inherit; }

.site-header {
  color: #fff;
  padding: max(24px, env(safe-area-inset-top)) 20px 28px;
}

.header-inner,
main,
footer {
  width: min(100% - 32px, 760px);
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.08;
  font-weight: 400;
}

main { padding-bottom: 22px; }

.processor-card {
  padding: clamp(22px, 5vw, 38px);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(18, 45, 91, 0.16);
}

h2, h3, p { margin-top: 0; }

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.2;
}

.intro-copy p {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.55;
}

.file-picker {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 210px;
  padding: 28px;
  border: 3px dashed var(--blue);
  border-radius: 22px;
  background: #f2f6ff;
  text-align: center;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.file-picker:hover { background: #e7efff; }
.file-picker:active { transform: scale(0.99); }
.file-picker.is-processing { display: none; }
.file-picker input { position: absolute; opacity: 0; pointer-events: none; }

.upload-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--blue-dark);
  background: var(--yellow);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.picker-title { color: var(--blue-dark); font-size: 1.2rem; font-weight: 600; }
.picker-help { color: var(--muted); font-size: 0.88rem; }

.work-panel { margin-top: 22px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8faff;
}

.file-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
}

.file-row strong,
.file-row span { display: block; overflow-wrap: anywhere; }
.file-row div > span { margin-top: 2px; color: var(--muted); font-size: 0.82rem; }

.progress-block {
  margin-top: 22px;
  padding: 20px;
  border-radius: 18px;
  background: #f2f6ff;
}

.progress-copy { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.progress-copy span { color: var(--blue-dark); font-weight: 600; }

progress {
  display: block;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #d7dfef;
  accent-color: var(--blue);
}

progress::-webkit-progress-bar { background: #d7dfef; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 999px; }

.progress-block p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.result-block {
  margin-top: 22px;
  padding: 20px;
  border: 2px solid #68bd8d;
  border-radius: 18px;
  background: #effbf4;
}

.success-mark {
  float: left;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-right: 12px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 1.4rem;
  font-weight: 600;
}

.result-block h3 { margin-bottom: 2px; }
.result-block > div > p { margin-bottom: 0; color: #355343; overflow-wrap: anywhere; }

video {
  display: block;
  clear: both;
  width: 100%;
  max-height: 440px;
  margin-top: 18px;
  border: 3px solid var(--yellow);
  border-radius: 15px;
  background: #000;
}

.review-note {
  margin: 14px 0;
  color: #4d574f;
  font-size: 0.88rem;
  line-height: 1.45;
}

.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

button {
  min-height: 52px;
  padding: 11px 16px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
}

.primary-button { border: 2px solid var(--blue); color: #fff; background: var(--blue); }
.secondary-button { border: 2px solid var(--blue); color: var(--blue); background: #fff; }
button:focus-visible, .file-picker:focus-within { outline: 4px solid rgba(255, 220, 0, 0.8); outline-offset: 3px; }

.error-block {
  margin-top: 20px;
  padding: 18px;
  border-left: 5px solid #b3261e;
  border-radius: 14px;
  color: #6e241f;
  background: #fff1f0;
}

.error-block p { margin: 7px 0 14px; line-height: 1.5; }

footer {
  padding: 0 8px max(24px, env(safe-area-inset-bottom));
  color: #566074;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.5;
}

[hidden] { display: none !important; }

@media (max-width: 560px) {
  body { background-position-y: -40px; }
  .site-header { padding-inline: 4px; }
  .header-inner, main, footer { width: min(100% - 24px, 760px); }
  .processor-card { padding: 22px 18px; border-radius: 24px; }
  .file-picker { min-height: 190px; }
  .result-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
