:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-soft: #f4f8fa;
  --text: #101317;
  --muted: #667085;
  --line: #dbe4ea;
  --line-strong: #b9cbd6;
  --accent: #0785a0;
  --accent-dark: #056b84;
  --accent-soft: #e8f8fb;
  --success: #16a36b;
  --danger: #ca2b3b;
  --danger-soft: #fff1f2;
  --shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 25% 0%, rgba(7, 133, 160, 0.06), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(219, 228, 234, 0.78);
  backdrop-filter: blur(16px);
}

.brand,
.site-nav,
.trust-row,
.format-note,
.privacy-note,
.site-footer nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 40px;
  color: var(--accent);
}

.brand-icon svg {
  width: 36px;
  height: 36px;
  stroke-width: 2;
}

.site-nav {
  gap: 34px;
  font-size: 15px;
  font-weight: 700;
}

.site-nav a {
  position: relative;
  padding: 28px 0 24px;
  text-decoration: none;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--accent);
}

.site-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--accent);
  border-radius: 99px;
}

main {
  width: min(100%, 1360px);
  margin: 0 auto;
  padding: 56px 36px 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 580px);
  gap: 54px;
  align-items: center;
}

.hero-copy h1 {
  max-width: 620px;
  margin: 0 0 22px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin: 0;
  color: #4a5565;
  font-size: 19px;
}

.trust-row {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  color: #536173;
  font-weight: 650;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-row span + span::before {
  margin-right: 12px;
  color: #9aa9b6;
  content: "•";
}

svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.trust-row svg,
.format-note svg,
.privacy-note svg,
.benefit-list svg {
  color: var(--accent);
}

.hero-preview {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(10, 28, 38, 0.16), rgba(10, 28, 38, 0.04)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1100&q=80") center/cover;
  box-shadow: var(--shadow);
}

.preview-image.before {
  position: absolute;
  inset: 0 50% 0 0;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: saturate(0.8);
}

.preview-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: rgba(255, 255, 255, 0.85);
}

.preview-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: var(--text);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.16);
  transform: translate(-50%, -50%);
}

.preview-arrow svg {
  width: 30px;
  height: 30px;
}

.preview-badge {
  position: absolute;
  bottom: 32px;
  display: grid;
  gap: 2px;
  min-width: 116px;
  padding: 16px 18px;
  color: #fff;
  background: rgba(0, 103, 128, 0.82);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.preview-badge strong {
  font-size: 28px;
  line-height: 1;
}

.preview-badge span {
  font-size: 14px;
}

.preview-badge.original {
  left: 50px;
}

.preview-badge.compressed {
  right: 50px;
}

.tool-panel {
  margin-top: 36px;
  padding: 38px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.04);
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 28px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  border: 2px dashed var(--line-strong);
  border-radius: 14px;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.upload-zone.dragover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.upload-button {
  display: grid;
  place-items: center;
  gap: 6px;
  width: min(100%, 420px);
  color: var(--text);
  cursor: pointer;
  background: transparent;
  border: 0;
}

.upload-button svg {
  width: 70px;
  height: 70px;
  color: var(--accent);
}

.upload-button span {
  font-size: 24px;
  font-weight: 800;
}

.upload-button small,
.upload-zone p,
.format-note,
.privacy-note,
.file-meta span,
.metric span,
.metric small,
.faq-section p,
.steps-grid p,
.why-section p {
  color: var(--muted);
}

.upload-zone p {
  margin: 16px 0 0;
}

.file-row,
.alert,
.result-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.file-row {
  display: grid;
  grid-template-columns: 112px minmax(140px, 1fr) minmax(330px, 500px) 42px;
  gap: 22px;
  align-items: center;
  padding: 18px 20px;
}

.file-row img,
.result-panel > img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.file-meta {
  display: grid;
  gap: 4px;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.progress-steps li {
  position: relative;
  display: grid;
  gap: 7px;
  justify-items: center;
  color: #5b6573;
  font-size: 14px;
}

.progress-steps li::before {
  position: absolute;
  top: 11px;
  right: 50%;
  left: -50%;
  height: 3px;
  content: "";
  background: #d1d9e0;
}

.progress-steps li:first-child::before {
  display: none;
}

.progress-steps span {
  z-index: 1;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 3px solid #c7d1da;
  border-radius: 50%;
}

.progress-steps li.done::before,
.progress-steps li.active::before {
  background: var(--accent);
}

.progress-steps li.done span,
.progress-steps li.active span {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 5px #fff;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #344054;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.icon-button:hover {
  background: #f2f5f7;
}

.alert {
  display: grid;
  grid-template-columns: 28px 1fr 42px;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  color: #8a1f2d;
  background: var(--danger-soft);
  border-color: #ffb8c0;
}

.alert svg {
  color: var(--danger);
}

.format-note,
.privacy-note {
  gap: 8px;
  margin: 18px 0 0;
  font-size: 14px;
}

.format-note a {
  color: var(--accent-dark);
  font-weight: 700;
}

.result-panel {
  display: grid;
  grid-template-columns: 180px repeat(4, 1fr);
  gap: 0;
  align-items: center;
  padding: 22px;
}

.result-panel > img {
  width: 160px;
  height: 160px;
}

.metric {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 130px;
  padding: 10px 22px;
  text-align: center;
  border-left: 1px solid var(--line);
}

.metric svg {
  color: var(--accent);
}

.metric strong {
  font-size: 30px;
  line-height: 1.1;
}

#compressedMetric {
  color: var(--accent);
}

.result-actions {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 22px;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 8px;
}

.primary-action {
  color: #fff;
  background: linear-gradient(90deg, var(--accent) 0%, #0097b2 100%);
  box-shadow: 0 16px 28px rgba(7, 133, 160, 0.22);
}

.secondary-action {
  color: var(--text);
  cursor: pointer;
  background: #fff;
  border: 1px solid #cfd9e1;
}

.why-section,
.steps-section,
.faq-section {
  margin-top: 58px;
  padding: 0 28px;
}

.why-section {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.8fr) 320px;
  gap: 44px;
  align-items: center;
}

.why-section h2,
.steps-section h2,
.faq-section h2 {
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.why-section h2 {
  display: flex;
  gap: 14px;
  align-items: center;
}

.why-section h2 svg {
  color: var(--accent);
}

.benefit-list {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.benefit-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #3f4c5f;
  font-weight: 650;
}

.score-card {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 220px;
  color: #1f473c;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(232, 248, 251, 0.88)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=600&q=80") center/cover;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.score-card span {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  font-size: 36px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.88);
  border: 8px solid #37b971;
  border-radius: 50%;
}

.score-card small {
  margin-top: -34px;
  font-weight: 800;
}

.steps-section,
.faq-section {
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.steps-grid article {
  position: relative;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 0 22px;
  align-items: center;
}

.steps-grid b {
  position: absolute;
  top: 4px;
  left: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

.steps-grid article > svg {
  grid-row: 1 / 3;
  width: 82px;
  height: 82px;
  padding: 24px;
  color: var(--accent);
  background: var(--surface-soft);
  border-radius: 50%;
}

.steps-grid h3 {
  margin: 0;
  font-size: 22px;
}

.steps-grid p {
  margin: 6px 0 0;
}

.faq-section {
  padding-bottom: 24px;
}

details {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
}

details:first-of-type {
  border-radius: 10px 10px 0 0;
}

details:last-of-type {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

summary::after {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--accent);
  content: "+";
  border: 1px solid #c5d1dc;
  border-radius: 50%;
}

details[open] summary::after {
  color: #fff;
  content: "-";
  background: var(--accent);
  border-color: var(--accent);
}

details p {
  max-width: 850px;
  padding: 0 18px 20px;
  margin: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1288px);
  margin: 0 auto;
  padding: 34px 36px 42px;
  color: #667085;
  border-top: 1px solid var(--line);
}

.site-footer nav {
  gap: 26px;
}

.site-footer a {
  text-decoration: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .site-header {
    padding: 0 22px;
  }

  .brand {
    font-size: 20px;
  }

  .site-nav {
    gap: 18px;
  }

  main {
    padding: 36px 20px 56px;
  }

  .hero,
  .why-section {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    min-height: 300px;
  }

  .file-row {
    grid-template-columns: 84px 1fr 42px;
  }

  .progress-steps {
    grid-column: 1 / -1;
  }

  .result-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-panel > img {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .metric {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .result-actions {
    grid-column: 1 / -1;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 18px 0;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .trust-row span + span::before {
    display: none;
  }

  .hero-preview {
    min-height: 260px;
  }

  .preview-badge {
    min-width: 92px;
    padding: 12px;
  }

  .preview-badge strong {
    font-size: 22px;
  }

  .preview-badge.original {
    left: 18px;
  }

  .preview-badge.compressed {
    right: 18px;
  }

  .tool-panel {
    padding: 22px 16px;
  }

  .upload-zone {
    min-height: 240px;
    padding: 18px;
  }

  .upload-button span {
    font-size: 20px;
  }

  .file-row {
    grid-template-columns: 72px 1fr 38px;
    gap: 14px;
    padding: 14px;
  }

  .file-row img {
    width: 72px;
    height: 58px;
  }

  .progress-steps li {
    font-size: 12px;
  }

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

  .result-panel > img {
    width: 150px;
    height: 150px;
  }

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

  .primary-action,
  .secondary-action {
    min-height: 56px;
    font-size: 17px;
  }

  .why-section,
  .steps-section,
  .faq-section {
    padding-right: 4px;
    padding-left: 4px;
  }

  .why-section h2,
  .steps-section h2,
  .faq-section h2 {
    font-size: 28px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 20px;
  }
}

