:root {
  --bg: #f3efe6;
  --bg-alt: #e7ddcb;
  --ink: #1a1712;
  --muted: #5f584b;
  --panel: rgba(255, 250, 241, 0.88);
  --panel-strong: rgba(255, 248, 235, 0.96);
  --border: rgba(58, 47, 30, 0.12);
  --accent: #bf4f22;
  --accent-deep: #7d2f10;
  --accent-soft: #f4dcc3;
  --shadow: 0 24px 60px rgba(69, 45, 17, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(191, 79, 34, 0.18), transparent 28%),
    radial-gradient(circle at right 20%, rgba(123, 92, 45, 0.14), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 90%);
}

body::after {
  top: -10rem;
  right: -8rem;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 79, 34, 0.18), rgba(125, 47, 16, 0.08) 52%, transparent 72%);
  filter: blur(20px);
  animation: prepFloat 22s ease-in-out infinite alternate;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero,
.panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "Sora", sans-serif;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 6vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 1.25rem;
}

.lede {
  max-width: 62ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(191, 79, 34, 0.12), rgba(125, 47, 16, 0.06));
  border: 1px solid rgba(191, 79, 34, 0.16);
  line-height: 1.55;
}

.hero-stats,
.workspace,
.insights-grid,
.action-row,
.panel-head,
.stats-list {
  display: grid;
}

.hero-stats {
  gap: 14px;
  align-content: end;
}

.stat-card {
  padding: 18px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.14rem;
}

@keyframes prepFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2rem, 1rem, 0) scale(1.05); }
  100% { transform: translate3d(1rem, 2rem, 0) scale(0.96); }
}

.workspace {
  grid-template-columns: 380px 1fr;
  gap: 18px;
  margin-top: 18px;
}

.insights-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 22px;
}

.panel-head {
  gap: 6px;
}

.panel-head p {
  color: var(--muted);
  line-height: 1.5;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 230px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
  border: 1.5px dashed rgba(191, 79, 34, 0.35);
  background:
    linear-gradient(135deg, rgba(244, 220, 195, 0.58), rgba(255, 255, 255, 0.42)),
    var(--panel-strong);
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dropzone:hover,
.dropzone.drag-active {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 18px 36px rgba(191, 79, 34, 0.16);
}

.dropzone input {
  display: none;
}

.dropzone-title {
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.dropzone-copy {
  max-width: 26ch;
  color: var(--muted);
  line-height: 1.5;
}

.action-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-weight: 700;
  color: #fff8f2;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  box-shadow: 0 12px 24px rgba(125, 47, 16, 0.22);
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.status-box {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 252, 246, 0.76);
  color: var(--muted);
  line-height: 1.6;
}

#viewer {
  height: 560px;
  margin-top: 18px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.42), transparent 22%),
    linear-gradient(180deg, #f4e9d8 0%, #dfc7a8 100%);
  border: 1px solid var(--border);
}

.stats-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stats-list div {
  padding: 14px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
}

dt {
  color: var(--muted);
  font-size: 0.84rem;
}

dd {
  margin: 6px 0 0;
  font-weight: 700;
  line-height: 1.45;
}

.checklist {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--ink);
}

.checklist li {
  margin-bottom: 12px;
  line-height: 1.6;
}

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

  #viewer {
    height: 460px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 16px, 1220px);
    padding-top: 14px;
  }

  .hero,
  .panel {
    border-radius: 24px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .action-row,
  .stats-list {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 3.3rem);
  }

  #viewer {
    height: 380px;
  }
}
