:root {
  --text: #2f2b36;
  --text-muted: #77727f;
  --bg: #f7f6fb;
  --surface: #ffffff;
  --border: #e4e2e8;
  --accent: #4f46e5;
  --tool-compressor: #b45309;
  --tool-converter: #4f46e5;
  /* The Lottie art is drawn for light backgrounds, so its tiles stay light in dark mode. */
  --art-bg: #ffffff;
  --shadow: 0 1px 2px rgb(20 16 40 / 4%), 0 8px 24px rgb(20 16 40 / 6%);

  font: 16px/1.5 system-ui, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ece9f2;
    --text-muted: #a09aab;
    --bg: #131118;
    --surface: #1c1922;
    --border: #2e2a36;
    --accent: #8b93fb;
    --tool-compressor: #f5a742;
    --tool-converter: #8b93fb;
    --art-bg: #f1eff6;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--bg);
  min-height: 100vh;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 16px 40px;
}

.lottie {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 32px;
  margin-bottom: 56px;
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__subtitle {
  margin: 0 0 24px;
  max-width: 460px;
  font-size: 17px;
  color: var(--text-muted);
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}

.hero__points li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero__points svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__art {
  aspect-ratio: 1;
  max-width: 340px;
  width: 100%;
  justify-self: center;
  padding: 24px;
  border-radius: 32px;
  background: var(--art-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ── Tools ───────────────────────────────────────────────────────────── */

.tools__title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.tools__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tool {
  --tool: var(--accent);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.tool--compressor {
  --tool: var(--tool-compressor);
}

.tool--converter {
  --tool: var(--tool-converter);
}

.tool:hover,
.tool:focus-visible {
  border-color: var(--tool);
  transform: translateY(-3px);
}

.tool:focus-visible {
  outline: 2px solid var(--tool);
  outline-offset: 2px;
}

.tool__art {
  display: block;
  height: 180px;
  padding: 16px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--tool) 14%, var(--art-bg)), var(--art-bg) 70%);
}

.tool__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.tool__name {
  font-size: 20px;
  font-weight: 700;
}

.tool__desc {
  font-size: 15px;
  color: var(--text-muted);
}

.tool__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tool__chips span {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--tool);
  background: color-mix(in srgb, var(--tool) 12%, transparent);
}

.tool__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  background: var(--tool);
}

.tool__cta span {
  transition: transform 0.2s;
}

.tool:hover .tool__cta span {
  transform: translateX(3px);
}

@media (prefers-color-scheme: dark) {
  .tool__cta {
    color: #131118;
  }
}

.footer {
  margin-top: 56px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.footer a {
  color: inherit;
}

/* ── Small screens ───────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .page {
    padding-top: 32px;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
    margin-bottom: 40px;
  }

  .hero__art {
    order: -1;
    max-width: 200px;
    padding: 16px;
    border-radius: 24px;
  }

  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__points {
    justify-content: center;
  }

  .tool__art {
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool,
  .tool__cta span {
    transition: none;
  }

  .tool:hover {
    transform: none;
  }
}
