/* Kidux's website. The colours and the type are the brand's
   (branding/README.md): cream paper, ink text, Sun as the one accent,
   Andika throughout. */

@font-face {
  font-family: "Andika";
  src: url("fonts/Andika-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Andika";
  src: url("fonts/Andika-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --cream: #fff6e9;
  --band: #fbecd8;
  --paper: #ffffff;
  --ink: #3b2f2a;
  --soft: #5c4d45;
  --night: #24313f;
  --snow: #fdf6f0;
  --sun: #f0a202;
  --sky: #cfe3f3;
  --peach: #f6d7c4;
  --blue: #3584e4;
  --line: #f2e2cc;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 19px/1.55 "Andika", "Noto Sans", sans-serif;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* The bar along the top, which stays in view: the way to give is always
   one click away. */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 246, 233, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.top .logo img { height: 40px; width: auto; }
.top nav { display: none; gap: 22px; margin-left: auto; font-weight: 700; font-size: 17px; }
.top nav a { text-decoration: none; padding: 6px 0; }
.top nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
}
.top .tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.language a {
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
}
.language a:hover { background: var(--line); }
@media (min-width: 1000px) {
  .top nav { display: flex; }
  .top .tools { margin-left: 6px; }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.button svg { width: 20px; height: 20px; flex: none; }
.button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.button.primary { background: var(--night); color: var(--snow); }
.button.give { background: var(--sun); color: var(--ink); }
.button.quiet { background: #ebe0d2; color: var(--ink); }
.button.small { min-height: 42px; padding: 0 16px; font-size: 17px; border-radius: 13px; }
a:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

section { padding: 76px 0; }
section.band { background: var(--band); }

h1 { font-size: clamp(36px, 4.8vw, 56px); line-height: 1.08; letter-spacing: -0.5px; }
h2 { font-size: clamp(30px, 3.8vw, 44px); line-height: 1.14; }
h3 { font-size: 22px; line-height: 1.25; }
.lead { margin-top: 18px; font-size: clamp(19px, 2.1vw, 23px); color: var(--soft); }
.intro { max-width: 800px; margin-bottom: 38px; }
.intro p { margin-top: 12px; font-size: 21px; color: var(--soft); }

.hero { padding: 60px 0 68px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 940px) { .hero .wrap { grid-template-columns: 1fr 1.2fr; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.note { margin-top: 20px; font-size: 16px; color: var(--soft); }

/* A picture of a screen, in the frame of one. */
.screen {
  margin: 0;
  border: 10px solid var(--night);
  border-radius: 20px;
  background: var(--night);
  box-shadow: 0 28px 60px -28px rgba(36, 49, 63, 0.6);
  overflow: hidden;
}
.screen img { width: 100%; border-radius: 9px; }

.cards { display: grid; gap: 20px; }
@media (min-width: 620px) { .cards.four { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .cards.four { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 860px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--paper);
  border-radius: 22px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 18px; color: var(--soft); }
.card .button { margin-top: 18px; }
.card a:not(.button) { font-weight: 700; text-decoration-color: var(--sun); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--sky);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--night);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tag {
  margin-top: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--peach);
  color: #7a3310;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 940px) {
  .split { grid-template-columns: 1fr 1.15fr; }
  .split.flip > :first-child { order: 2; }
  .split.flip { grid-template-columns: 1.15fr 1fr; }
}

.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 13px; }
.ticks li { position: relative; padding-left: 38px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b2f2a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.500l4 4 8-9'/%3E%3C/svg%3E") center / 15px no-repeat;
}

.steps { margin: 24px 0 0; padding-left: 24px; display: grid; gap: 10px; }
.steps li::marker { font-weight: 700; }
.needs { align-self: stretch; justify-content: center; }
.needs .ticks { margin-top: 14px; }

.pair { display: grid; gap: 28px; }
@media (min-width: 820px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair figure { margin: 0; }
.pair figcaption { margin-top: 18px; }
.pair figcaption p { margin-top: 6px; font-size: 18px; color: var(--soft); }

.modules { display: grid; gap: 20px; }
@media (min-width: 620px) { .modules { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .modules { grid-template-columns: repeat(3, 1fr); } }
.module { background: var(--paper); border-radius: 22px; overflow: hidden; }
.module img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.module div { padding: 18px 22px 24px; }
.module h3 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.module p { margin-top: 6px; font-size: 18px; color: var(--soft); }
.age { font-size: 15px; color: var(--soft); white-space: nowrap; }

/* Where to give: the one dark place on the page. */
.support { background: var(--night); color: var(--snow); text-align: center; }
.support .wrap { display: grid; gap: 22px; justify-items: center; }
.support img { width: 120px; height: 120px; }
.support h2 { color: var(--snow); }
.support p { max-width: 640px; margin: 14px auto 26px; font-size: 21px; color: #e6dccf; }
.support .thanks { margin: 16px auto 0; font-size: 16px; color: #b9c3cf; }
/* GitHub's own Sponsor button, under ours. */
.support iframe { display: block; margin: 18px auto 0; border: 0; border-radius: 6px; }
.support a:focus-visible { outline-color: var(--snow); }

footer { padding: 40px 0 48px; border-top: 1px solid var(--line); font-size: 15px; color: var(--soft); }
footer img { height: 32px; width: auto; margin-bottom: 14px; }
footer p + p { margin-top: 8px; }

@media (max-width: 480px) {
  body { font-size: 18px; }
  section { padding: 56px 0; }
  .hero { padding: 36px 0 52px; }
  .top .logo img { height: 34px; }
  .button { width: 100%; }
  .button.small { width: auto; }
  .screen { border-width: 6px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
