@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --ink: #080b10;
  --paper: #f5f1e8;
  --paper-strong: #fffaf0;
  --muted: #6c6f78;
  --line: #d8d0bf;
  --blue: #1e42ff;
  --red: #fb372f;
  --green: #18b26b;
  --charcoal: #171b23;
  --shadow: 0 24px 70px rgba(8, 11, 16, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(30, 66, 255, 0.11), transparent 34%),
    linear-gradient(240deg, rgba(251, 55, 47, 0.12), transparent 30%),
    var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 28px;
}

.brand-lockup,
.system-pill,
.eyebrow,
h1,
h2,
h3 {
  font-family: "Archivo", "Segoe UI", sans-serif;
}

.brand-lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.brand-logo-kmc {
  width: clamp(150px, 18vw, 230px);
}

.brand-logo-scaling {
  width: clamp(170px, 19vw, 250px);
  border-radius: 5px;
  background: var(--charcoal);
  padding: 9px 11px;
}

.brand-cross {
  display: inline-flex;
  position: relative;
  width: 34px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(8, 11, 16, 0.18);
  border-radius: 999px;
  background: var(--charcoal);
  box-shadow: 0 10px 24px rgba(8, 11, 16, 0.16);
  color: var(--paper-strong);
  font-family: "Archivo", "Segoe UI", sans-serif;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.system-pill {
  border: 1px solid rgba(8, 11, 16, 0.18);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 250, 240, 0.76);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy,
.signal-panel,
.upload-card,
.status-card {
  border: 1px solid rgba(8, 11, 16, 0.12);
  background: rgba(255, 250, 240, 0.88);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: clamp(32px, 5vw, 64px);
  border-radius: 8px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -7%;
  bottom: -18px;
  width: min(52vw, 520px);
  height: 172px;
  border-top: 10px solid var(--blue);
  clip-path: polygon(0 83%, 17% 48%, 27% 61%, 42% 21%, 55% 52%, 68% 12%, 82% 56%, 100% 28%, 100% 100%, 0 100%);
  background:
    linear-gradient(145deg, rgba(30, 66, 255, 0.18), rgba(251, 55, 47, 0.12)),
    rgba(8, 11, 16, 0.04);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.9;
  font-weight: 800;
}

.intro {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: 24px 0 0;
  color: #30343d;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
}

.signal-panel {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 18px;
  padding: 32px;
  border-radius: 8px;
  background: var(--charcoal);
  color: var(--paper-strong);
}

.signal-line {
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(var(--blue), var(--red), var(--green));
}

.signal-panel ol {
  display: grid;
  gap: 24px;
  align-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.signal-panel li {
  display: grid;
  gap: 6px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
}

.signal-panel span {
  color: #9ca9ff;
  font-family: "Archivo", "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: 0.1em;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: start;
  margin-top: 10px;
}

.upload-card,
.status-card {
  border-radius: 8px;
  padding: clamp(24px, 4vw, 38px);
}

.section-heading {
  margin-bottom: 24px;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.field {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
}

.field > span {
  font-weight: 700;
}

.field small {
  color: var(--muted);
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--ink);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  padding: 12px;
  cursor: pointer;
}

.file-control span:first-child {
  border-radius: 6px;
  background: var(--charcoal);
  color: var(--paper-strong);
  padding: 9px 12px;
  font-weight: 800;
}

.file-control span:last-child {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

textarea {
  resize: vertical;
  min-height: 132px;
  padding: 15px 16px;
}

.file-input:focus + .file-control,
textarea:focus {
  outline: 3px solid rgba(30, 66, 255, 0.16);
  border-color: var(--blue);
}

.submit-button,
.download-link {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.submit-button:hover,
.download-link:not(.is-disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(251, 55, 47, 0.28);
}

.submit-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.status-box {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 24px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.status-box strong {
  display: block;
  margin-bottom: 4px;
}

.status-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.status-box.is-working .status-dot {
  background: var(--blue);
  animation: pulse 1.2s infinite;
}

.status-box.is-ready .status-dot {
  background: var(--green);
}

.status-box.is-error .status-dot {
  background: var(--red);
}

.job-meta {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
}

.job-meta div {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.job-meta dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.job-meta dd {
  margin: 5px 0 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.download-link {
  background: var(--blue);
}

.download-link.is-disabled {
  background: #b9bdc8;
  color: #f9f9fb;
  pointer-events: none;
}

.history {
  margin-top: 28px;
}

h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.history ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.45);
    opacity: 0.55;
  }
}

@media (max-width: 940px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .signal-panel {
    grid-template-columns: 1fr;
  }

  .signal-line {
    width: 100%;
    height: 4px;
  }

  .signal-panel ol {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-lockup {
    align-items: center;
    flex-direction: column;
    gap: 9px;
    width: min(280px, 100%);
  }

  .brand-logo-kmc {
    width: min(250px, 78vw);
  }

  .brand-logo-scaling {
    width: min(260px, 82vw);
  }

  .system-pill {
    white-space: normal;
  }

  .hero-copy {
    min-height: 390px;
    padding: 28px;
  }

  .signal-panel ol {
    grid-template-columns: 1fr;
  }

  .upload-card,
  .status-card {
    padding: 22px;
  }
}
