/* Knubbi website. System fonts only; nothing is loaded from other servers. */
:root {
  --leaf: #1f8a4c;
  --leaf-soft: #e3f3e7;
  --ink: #0f2217;
  --soft: #51655a;
  --bg: #f5faf5;
  --band: #ffffff;
  --card: #ffffff;
  --line: #dcebdf;
  --phone: #16191b;
  --shadow: 0 30px 60px -20px rgba(16, 60, 34, .28);
}
@media (prefers-color-scheme: dark) {
  :root {
    --leaf: #5fd08a;
    --leaf-soft: #17301f;
    --ink: #ecf5ee;
    --soft: #a3b8aa;
    --bg: #0c140f;
    --band: #111c15;
    --card: #15221a;
    --line: #24362a;
    --phone: #2a2f31;
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px max(20px, calc((100vw - 1080px) / 2));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.nav nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav nav a { color: var(--soft); }
.nav .lang { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.nav .lang:hover { text-decoration: none; background: var(--leaf-soft); }

/* Landing page */
main { overflow: hidden; }
section { padding: 0 20px; }
h1, h2 { letter-spacing: -.025em; line-height: 1.06; margin: 0; text-wrap: balance; }
.hero, .feature {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px;
}
.hero { padding-top: 72px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(48px, 8vw, 88px); font-weight: 800; }
.lead { font-size: clamp(19px, 2.2vw, 24px); color: var(--soft); margin: 22px 0 0; max-width: 26em; text-wrap: pretty; }
.pill {
  display: inline-block; margin: 28px 0 0; padding: 9px 18px;
  font-size: 15px; font-weight: 600; color: var(--leaf);
  background: var(--leaf-soft); border-radius: 999px;
}
.feature { padding-top: 88px; padding-bottom: 88px; }
.feature.flip .copy { order: 2; }
.feature h2, .worlds h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 750; }
.feature p, .worlds p { font-size: clamp(17px, 1.7vw, 20px); color: var(--soft); margin: 18px 0 0; max-width: 28em; text-wrap: pretty; }

/* A plain phone frame drawn with CSS */
.phone {
  justify-self: center;
  width: min(300px, 72vw);
  padding: 9px;
  background: var(--phone);
  border-radius: 46px;
  box-shadow: var(--shadow);
}
.screen { position: relative; border-radius: 38px; overflow: hidden; }
.screen .next { position: absolute; inset: 0; opacity: 0; }
.hero .phone { width: min(330px, 76vw); animation: float 4.5s ease-in-out infinite; }

/* Gentle motion: the hero phone floats, some screens cycle through several pictures (see build.py),
   and sections rise into view (the .js/.in classes come from the small script). */
@keyframes float {
  0%, 100% { transform: rotate(2deg) translateY(0); }
  50% { transform: rotate(1deg) translateY(-12px); }
}
.js .feature .copy, .js .feature .phone, .js .worlds, .js .promise {
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1);
}
.js .feature:not(.in) .copy { opacity: 0; transform: translateY(28px); }
.js .feature:not(.in) .phone { opacity: 0; transform: translateY(60px) rotate(-3deg) scale(.96); }
.js .feature.flip:not(.in) .phone { transform: translateY(60px) rotate(3deg) scale(.96); }
.js .feature .phone { transition-delay: .08s; }
.js .worlds:not(.in), .js .promise:not(.in) { opacity: 0; transform: translateY(28px); }

/* Garden worlds */
.worlds { padding: 96px 0; background: var(--band); text-align: center; }
.worlds h2, .worlds p { padding: 0 20px; margin-left: auto; margin-right: auto; }
.strip {
  display: flex; gap: 18px; margin-top: 44px; padding: 8px max(20px, calc((100vw - 1080px) / 2)) 28px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: 0 0 min(230px, 60vw); margin: 0; scroll-snap-align: center; }
.strip img { border-radius: 26px; box-shadow: 0 16px 34px -18px rgba(16, 60, 34, .45); }
.strip figcaption { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--soft); }

/* The promise */
.promise { padding: 110px 20px; text-align: center; }
.promise h2 { display: flex; flex-wrap: wrap; justify-content: center; gap: .1em .5em; font-size: clamp(36px, 6.4vw, 72px); font-weight: 800; }
.promise h2 span:nth-child(2) { color: var(--leaf); }
.promise p { max-width: 34em; margin: 24px auto 0; font-size: clamp(17px, 1.7vw, 20px); color: var(--soft); text-wrap: pretty; }
.more { display: inline-block; margin-top: 22px; font-size: 18px; font-weight: 600; }

/* Text pages */
.article { max-width: 720px; margin: 0 auto; padding: 56px 20px 40px; overflow: visible; }
.article h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; }
.article h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 38px 0 8px; }
.article p, .article li { color: var(--soft); }
.article strong { color: var(--ink); }
.article ul { padding-left: 22px; }
.updated { font-size: 15px; margin-top: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px 24px; margin: 26px 0; }
.card p:first-child { margin-top: 0; } .card p:last-child { margin-bottom: 0; }

/* Footer */
.foot { padding: 36px 20px 48px; text-align: center; border-top: 1px solid var(--line); font-size: 14px; color: var(--soft); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.foot p { margin: 14px 0 0; }

@media (max-width: 760px) {
  .hero, .feature { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero { padding-top: 48px; padding-bottom: 64px; }
  .feature { padding-top: 56px; padding-bottom: 56px; }
  .feature.flip .copy { order: 0; }
  .lead, .feature p { margin-left: auto; margin-right: auto; }
  .worlds, .promise { padding-top: 72px; padding-bottom: 72px; }
  .nav nav a:not(.lang) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .phone { animation: none; }
  .screen .next { animation: none !important; }
  .hero .phone { transform: rotate(2deg); }
  .js .feature .copy, .js .feature .phone, .js .worlds, .js .promise { transition: none; opacity: 1 !important; transform: none !important; }
}
