/* ==========================================================
   Image to Pixel Art landing page
   Palette borrowed from the classic four-shade handheld screen,
   the same look as the DMG palette the converter offers.
   ========================================================== */

:root {
  --ink: #0f380f;
  --moss: #306230;
  --leaf: #8bac0f;
  --lime: #9bbc0f;
  --paper: #eef3d3;
  --tint: #e0e9b3;

  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-pixel: "Pixelify Sans", "Courier New", monospace;

  --wrap: 1120px;
  --wrap-narrow: 760px;

  /* Stepped "pixel" corners used on buttons */
  --notch: polygon(
    0 4px, 4px 4px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%,
    4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px)
  );
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--moss);
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-pixel);
  font-weight: 700;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
}

h3 {
  font-size: 1.2rem;
  line-height: 1.3;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section--tint {
  background: var(--tint);
}

.section--dark {
  background: var(--ink);
  color: var(--paper);
}

.section-intro {
  max-width: 62ch;
  margin-top: 1rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.prose {
  max-width: 62ch;
}

.prose > * + * {
  margin-top: 1.1rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  clip-path: var(--notch);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  clip-path: none;
  outline: 3px solid var(--moss);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary:hover {
  background: var(--moss);
  color: var(--paper);
}

.btn--light {
  background: var(--lime);
  color: var(--ink);
}

.btn--light:hover {
  background: var(--leaf);
  color: var(--ink);
}

.btn--lime {
  background: var(--lime);
  color: var(--ink);
}

.btn--lime:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn--lime:focus-visible {
  outline-color: var(--lime);
}

.btn--small {
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 4px solid var(--ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo img {
  width: auto;
  height: 40px;
}

.logo__text {
  font-family: var(--font-pixel);
  font-size: 1.25rem;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__link {
  font-weight: 700;
  text-decoration: none;
}

.nav__link:hover {
  text-decoration: underline;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem);
  background-color: var(--paper);
  /* Faint pixel grid, a nod to the converter's grid overlay */
  background-image:
    linear-gradient(rgba(15, 56, 15, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 56, 15, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.lead {
  max-width: 34rem;
  margin-top: 1.25rem;
  font-size: 1.25rem;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.facts {
  display: grid;
  gap: 0.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.facts li::before {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--ink);
}

.hero__shot {
  margin: 0;
}

.hero__shot img {
  width: 100%;
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--moss);
  background: var(--tint);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps__item {
  padding-top: 1.25rem;
  border-top: 4px solid var(--ink);
  counter-increment: step;
}

.steps__item::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  font-weight: 700;
}

.steps__item p {
  margin-top: 0.5rem;
}

.steps__cta {
  margin-top: 2.5rem;
}

/* ---------- Examples ---------- */

.example {
  margin-top: 3rem;
}

.example h3 {
  margin-bottom: 1rem;
}

.compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.compare--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compare figure {
  margin: 0;
}

.compare img {
  width: 100%;
  border: 3px solid var(--ink);
  background: var(--tint);
}

.compare figcaption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 3rem;
  margin: 2.5rem 0 0;
}

.features__item {
  padding-left: 1.1rem;
  border-left: 4px solid var(--moss);
}

.features dt {
  font-size: 1.15rem;
  font-weight: 700;
}

.features dd {
  margin: 0.3rem 0 0;
  max-width: 48ch;
}

/* ---------- Use cases ---------- */

.uses {
  margin-top: 2rem;
}

.uses__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1rem 3rem;
  padding-block: 1.5rem;
  border-top: 2px solid rgba(15, 56, 15, 0.3);
}

.uses__row:last-child {
  border-bottom: 2px solid rgba(15, 56, 15, 0.3);
}

.uses__row p {
  max-width: 58ch;
}

/* ---------- Tips ---------- */

.checklist {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--ink);
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 2rem;
  border-top: 4px solid var(--ink);
}

.faq__item {
  border-bottom: 2px solid rgba(15, 56, 15, 0.3);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  flex: none;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item p {
  max-width: 60ch;
  padding-bottom: 1.25rem;
}

/* ---------- Final call to action ---------- */

.cta-band__inner {
  text-align: left;
}

.cta-band__inner p {
  max-width: 46ch;
  margin-block: 1rem 2rem;
  font-size: 1.15rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2rem;
  background: var(--ink);
  color: var(--paper);
  border-top: 4px solid var(--moss);
  font-size: 0.95rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer a:hover {
  color: var(--lime);
}

.site-footer :focus-visible {
  outline-color: var(--lime);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero__grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__shot img {
    box-shadow: 6px 6px 0 var(--moss);
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .uses__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav__link {
    display: none;
  }

  .compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .compare,
  .compare--two {
    grid-template-columns: minmax(0, 1fr);
  }

  .logo__text {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .faq__item summary::after {
    transition: none;
  }
}