/* nunito-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./fonts/nunito-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* nunito-cyrillic-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./fonts/nunito-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* nunito-latin-ext-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./fonts/nunito-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* nunito-latin-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./fonts/nunito-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* Landing pages (public/welcome/), built by scripts/make-landing.mjs. Same colours as the app. */

:root {
  --brand: #00a378;
  --brand-strong: #00875f;
  --brand-dark: #007a5a;
  --brand-tint: #e3f5ef;
  --text: #1f2a26;
  --muted: #5f6d68;
  --page: #f3f6f4;
  --radius: 24px;
  --shadow: 0 10px 30px rgb(16 40 32 / 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: 'Nunito Variable', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--brand-dark);
}

:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--brand-dark);
}

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.01em;
}

section {
  padding: clamp(48px, 8vw, 96px) max(20px, 5vw);
}

section > h2 {
  max-width: 900px;
  margin: 0 auto 36px;
  font-size: clamp(28px, 4vw, 42px);
  text-align: center;
}

/* --- Top bar, over the green hero --- */

.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(20px, 5vw) 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
}

/* The parrot sits on a white disc, sized so its beak stays inside (cropping the picture itself
   into a circle cut the beak off) */
.logo-disc {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
}

.final .logo-disc {
  width: 120px;
  height: 120px;
}

.language {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.18);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.language select {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
}

/* --- Hero --- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding-top: calc(110px + env(safe-area-inset-top, 0px));
  padding-bottom: clamp(90px, 10vw, 140px);
  background:
    radial-gradient(circle at 85% 15%, rgb(255 255 255 / 0.16), transparent 40%),
    radial-gradient(circle at 10% 90%, rgb(255 255 255 / 0.1), transparent 35%),
    linear-gradient(135deg, #41c91c, var(--brand) 50%, #00806a);
  color: #fff;
  overflow: hidden;
}

.hero-text {
  max-width: 620px;
  justify-self: end;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6.5vw, 76px);
}

.hero-text > p {
  margin: 0 0 30px;
  font-size: clamp(18px, 2vw, 22px);
  opacity: 0.95;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 34px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 21px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 24px rgb(0 60 40 / 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgb(0 60 40 / 0.3);
}

.cta-note {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 700;
  opacity: 0.9;
}

.hero-phone {
  position: relative;
  justify-self: start;
  width: min(300px, 70vw);
}

.hero-phone .phone {
  transform: rotate(4deg);
}

.wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(40px, 6vw, 90px);
  fill: var(--page);
}

/* Stickers floating around the phone */
.floater {
  position: absolute;
  z-index: 2;
  width: clamp(48px, 7vw, 76px);
  height: auto;
  filter: drop-shadow(2.5px 0 0 #fff) drop-shadow(-2.5px 0 0 #fff) drop-shadow(0 2.5px 0 #fff) drop-shadow(0 -2.5px 0 #fff)
    drop-shadow(0 6px 8px rgb(0 0 0 / 0.25));
  animation: bob 5s ease-in-out infinite;
}

.f0 { top: 4%; left: -22%; animation-delay: -1s; }
.f1 { top: -6%; right: -14%; animation-delay: -2.2s; }
.f2 { top: 38%; right: -26%; animation-delay: -3.1s; }
.f3 { bottom: 16%; left: -28%; animation-delay: -0.4s; }
.f4 { bottom: -4%; right: -10%; animation-delay: -4s; }
.f5 { top: 52%; left: -12%; animation-delay: -2.7s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

/* --- A phone frame around a screenshot --- */

.phone {
  position: relative;
  padding: 10px;
  border-radius: 44px;
  background: #1f2a26;
  box-shadow: 0 30px 60px rgb(0 40 30 / 0.35), inset 0 0 0 2px #3a4743;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 34px;
}

/* --- Screenshots --- */

.shots ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.shots li {
  text-align: center;
}

.shots li:nth-child(odd) .phone {
  transform: rotate(-2deg);
}

.shots li:nth-child(even) .phone {
  transform: rotate(2deg) translateY(18px);
}

.shots p {
  margin: 30px 0 0;
  font-weight: 800;
}

/* --- Features --- */

.features {
  background: #fff;
}

.features ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.features li {
  padding: 28px;
  border: 1px solid #e3e9e6;
  border-radius: var(--radius);
  background: var(--page);
}

.features li img {
  width: 64px;
  height: 64px;
}

.features h3 {
  margin: 14px 0 6px;
  font-size: 22px;
}

.features li p {
  margin: 0;
  color: var(--muted);
}

.topics-note {
  max-width: 760px;
  margin: 48px auto 18px;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  max-width: 900px;
  margin: 0 auto;
}

.topics img {
  width: 44px;
  height: 44px;
}

/* --- Languages --- */

.languages ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.languages a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 2px 8px rgb(16 40 32 / 0.06);
  transition: transform 0.15s ease;
}

.languages a:hover {
  transform: translateY(-3px);
}

.languages img {
  width: 56px;
  height: 56px;
}

/* --- Final call to action --- */

.final {
  margin: 0 max(20px, 5vw) clamp(48px, 8vw, 96px);
  border-radius: 36px;
  background: linear-gradient(135deg, #41c91c, var(--brand) 50%, #00806a);
  color: #fff;
  text-align: center;
}

.final h2 {
  /* auto sides: section headings are capped at 900px wide, so zero margins pushed this one left */
  margin: 16px auto 10px;
  font-size: clamp(30px, 4.5vw, 48px);
}

.final p {
  margin: 0 auto 28px;
  max-width: 560px;
  font-size: 20px;
}

/* Under "Start playing": quieter, an outline on the green */
.share {
  margin-top: 4px;
  padding: 12px 26px;
  border: 2px solid rgb(255 255 255 / 0.8);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.share:hover {
  background: rgb(255 255 255 / 0.15);
}

/* --- Footer --- */

footer {
  padding: 0 max(20px, 5vw) calc(40px + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

footer p {
  max-width: 900px;
  margin: 0 auto 10px;
}

/* --- Smaller screens --- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text,
  .hero-phone {
    justify-self: center;
  }
  .hero-phone {
    width: min(250px, 62vw);
    margin-top: 10px;
  }
  .shots ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 48px;
  }
  .features ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .languages ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  body {
    font-size: 17px;
  }
  .features ul {
    grid-template-columns: 1fr;
  }
  .phone {
    padding: 7px;
    border-radius: 30px;
  }
  .phone img {
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
