:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --text: #0f1222;
  --text-2: #4a5068;
  --text-3: #7a8098;
  --line: #e5e6ef;
  --accent: #5b3ee6;
  --grad: linear-gradient(120deg, #2563eb, #7c3aed 50%, #0891b2);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d14;
    --surface: #131624;
    --text: #eef0f8;
    --text-2: #b4b9cf;
    --text-3: #868ca6;
    --line: #23273a;
    --accent: #9b87ff;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand.small {
  gap: 8px;
  font-size: 14px;
}
.nav nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
}
.nav nav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding-top: 72px;
  padding-bottom: 64px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -40px 10% auto auto;
  width: 420px;
  height: 420px;
  background: var(--grad);
  filter: blur(120px);
  opacity: 0.22;
  z-index: -1;
  border-radius: 50%;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  max-width: 600px;
  margin: 22px 0 0;
  color: var(--text-2);
  font-size: 18px;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 24px -10px #7c3aed;
}
.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
}
@media (hover: hover) {
  .btn-primary:hover {
    box-shadow: 0 12px 30px -10px #7c3aed;
  }
  .btn-ghost:hover {
    border-color: var(--text-3);
  }
}

/* Sections */
.section {
  padding-top: 56px;
  padding-bottom: 8px;
}
h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.section-sub {
  margin: 6px 0 24px;
  color: var(--text-3);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--accent) 60%, transparent);
  }
}
.card-icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
}
.card-icon.is-contain {
  object-fit: contain;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
}
.card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.card p {
  margin: 6px 0 12px;
  color: var(--text-2);
  font-size: 15px;
}
.link {
  margin-top: auto;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

/* About */
.about {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
}
.about > div {
  max-width: 640px;
}
.about p {
  color: var(--text-2);
  font-size: 17px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  display: flex;
  flex-direction: column;
}
.facts strong {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.facts span {
  color: var(--text-3);
  font-size: 14px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 14px;
}

@media (max-width: 560px) {
  .nav nav {
    gap: 16px;
    font-size: 14px;
  }
  .hero {
    padding-top: 40px;
  }
  .lead {
    font-size: 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .card,
  .btn {
    transition: none;
  }
}

.about-cta {
  margin-top: 0;
}
.footer-link {
  color: var(--text-2);
  font-weight: 700;
}
.footer-link:hover {
  color: var(--accent);
}

/* Ko-fi: their brand orange, the real cup logo, and a little tilt on hover */
.btn-kofi {
  gap: 10px;
  padding: 0 20px 0 6px;
  background: #ff6433;
  color: #fff;
  box-shadow: 0 8px 22px -10px #ff6433;
}
.kofi-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #ff6433;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kofi-mark svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}
@media (hover: hover) {
  .btn-kofi:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -10px #ff6433;
  }
  .btn-kofi:hover .kofi-mark {
    transform: rotate(-12deg) scale(1.08);
  }
}
.btn-kofi:focus-visible {
  outline: 3px solid color-mix(in srgb, #ff6433 45%, transparent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .kofi-mark {
    transition: none;
  }
}
/* A logo with its own shape (no tile): shown as-is, on the card's own background */
.card-icon.is-bare {
  object-fit: contain;
  border-radius: 0;
}

/* Card call to action: a short label whose arrow slides when the card is hovered */
.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.link .arrow {
  display: inline-block;
  transition: transform 200ms ease;
}
@media (hover: hover) {
  .card:hover .link .arrow {
    transform: translateX(4px);
  }
}
.card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .link .arrow {
    transition: none;
  }
}
