:root {
  --bg: #f7f1e6;
  --ink: #14213d;
  --ink-soft: rgba(20, 33, 61, 0.7);
  --panel: rgba(255, 252, 246, 0.82);
  --line: rgba(20, 33, 61, 0.12);
  --accent: #ef6c2f;
  --accent-deep: #d74f16;
  --highlight: #159a9c;
  --success: #1f7a4d;
  --error: #9d2d2d;
  --shadow: 0 24px 60px rgba(20, 33, 61, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(239, 108, 47, 0.18), transparent 30%),
    radial-gradient(circle at 84% 20%, rgba(21, 154, 156, 0.18), transparent 32%),
    linear-gradient(180deg, #fcf6eb 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.backdrop {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.8;
  pointer-events: none;
}

.backdrop-a {
  width: 20rem;
  height: 20rem;
  right: -5rem;
  top: 8rem;
  background: rgba(239, 108, 47, 0.16);
}

.backdrop-b {
  width: 18rem;
  height: 18rem;
  left: -5rem;
  bottom: 6rem;
  background: rgba(21, 154, 156, 0.14);
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.hero {
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

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

.hero-copy {
  order: 2;
  padding: 1.5rem;
}

.tool-panel,
.result-panel {
  padding: 1.5rem;
}

.tool-panel {
  order: 1;
}

.eyebrow,
.mini-label,
.proof-label,
.setting-label {
  display: inline-block;
  font-size: 0.77rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1,
h2,
h3,
strong {
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
}

h1 {
  margin: 0.65rem 0 0.9rem;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.94;
  max-width: 12ch;
}

.lede {
  max-width: 36rem;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.compression-story {
  margin-top: 1.4rem;
  padding: 1rem;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(245, 238, 226, 0.7));
}

.story-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.story-head strong {
  font-size: 1.15rem;
}

.story-rail {
  height: 0.7rem;
  margin: 0.9rem 0 1rem;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.1);
  overflow: hidden;
}

.story-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--highlight));
}

.story-grid {
  display: grid;
  gap: 0.85rem;
}

.story-card {
  padding: 0.85rem 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.story-card-accent {
  background: rgba(21, 154, 156, 0.08);
}

.story-label,
.story-meta {
  display: block;
}

.story-label,
.story-meta {
  color: var(--ink-soft);
}

.story-card strong {
  display: block;
  margin: 0.3rem 0;
  font-size: 1.1rem;
}

.story-note {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.proof-grid,
.stat-grid,
.settings-row {
  display: grid;
  gap: 0.9rem;
}

.proof-grid {
  margin-top: 1.5rem;
}

.proof-card,
.stat-card,
.setting {
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  padding: 1rem;
}

.proof-card strong,
.setting strong,
.stat-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1rem;
  line-height: 1.35;
}

.panel-topline,
.result-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.panel-topline h2,
.result-header h3 {
  margin: 0.3rem 0 0;
  font-size: 1.7rem;
}

.upload-form {
  margin-top: 1rem;
}

.dropzone {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 1.3rem;
  border-radius: 24px;
  border: 1.5px dashed rgba(20, 33, 61, 0.24);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(246, 240, 229, 0.7));
  cursor: pointer;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
}

.dropzone-filename {
  display: inline-flex;
  justify-self: start;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.dropzone-title {
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 1.1rem;
}

.dropzone-subtitle,
.helper {
  color: var(--ink-soft);
  line-height: 1.55;
}

.settings-row {
  margin: 1rem 0 1.1rem;
}

.primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3.25rem;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  text-decoration: none;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 14px 28px rgba(215, 79, 22, 0.24);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(20, 33, 61, 0.08);
}

.status-pill.success {
  background: rgba(31, 122, 77, 0.14);
  color: var(--success);
}

.status-pill.error {
  background: rgba(157, 45, 45, 0.14);
  color: var(--error);
}

.status-pill.neutral {
  background: rgba(20, 33, 61, 0.08);
  color: var(--ink);
}

.result-panel {
  margin-top: 1.5rem;
}

.stat-grid {
  margin: 1.25rem 0;
}

.result-preview-shell {
  margin-top: 1.25rem;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  padding: 1rem;
}

.result-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.preview-note {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.result-preview {
  display: block;
  width: 100%;
  border-radius: 18px;
  background: #0e1629;
  aspect-ratio: 16 / 9;
}

.stat-card span {
  color: var(--ink-soft);
}

.stat-card strong {
  font-size: 1.25rem;
}

.result-actions {
  display: grid;
  gap: 0.8rem;
}

.hidden {
  display: none;
}

@media (max-width: 540px) {
  .panel-topline,
  .result-header {
    display: grid;
  }

  .panel-topline .status-pill,
  .result-header .status-pill {
    justify-self: start;
  }
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .hero-copy {
    order: 1;
  }

  .tool-panel {
    order: 2;
  }

  .proof-grid,
  .stat-grid,
  .settings-row,
  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
