/* SPDX-FileCopyrightText: Copyright 2026 Kiwi360 Project */
/* SPDX-License-Identifier: LicenseRef-PolyForm-Shield-1.0.0 */

/* kiwi360.org: the Metro look of Kiwi360's own library. Light by default (the app's look), with a dark variant. */

@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --green: #86c232;
  --green-deep: #4e8a1c;
  --green-pale: #cfe8a8;
  --ink: #23271f;
  --ink-soft: #6f766a;
  --slate: #3b4136;
  --bg-top: #f5f6f2;
  --bg-bottom: #d8ddd1;
  --tile-text: #ffffff;
  --blue: #2f7ed0;
  --yellow: #e6b52c;
  --red: #d8463e;
  --teal: #1f8a87;
  --bramble-bg: #17121f;
  --bramble-text: #f5eefa;
  --bramble-muted: #b3a6c6;
  --bramble-accent: #d946ef;
  --gap: 12px;
  --page: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2e8;
    --ink-soft: #a5ad9e;
    --bg-top: #1a1d17;
    --bg-bottom: #0f110d;
    --slate: #343a2f;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed;
  line-height: 1.5;
}

a { color: inherit; }
img { max-width: 100%; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--green); color: #fff; padding: 8px 12px; z-index: 10; }

/* Top bar and pivot, as in the app's library. */
.top { display: flex; align-items: center; gap: 12px; padding-top: 22px; }
.top img { width: 40px; height: 40px; }
.top .name { font-size: 24px; font-weight: 300; text-decoration: none; }
.top .lang { margin-left: auto; font-size: 15px; color: var(--ink-soft); text-decoration: none; border: 1px solid currentColor; padding: 2px 10px; }
.top .lang:hover { color: var(--ink); }

.pivot { display: flex; flex-wrap: wrap; gap: 0 34px; margin: 6px 0 26px; padding: 0; list-style: none; }
.pivot a {
  display: block; text-decoration: none; font-weight: 300; line-height: 1.15;
  font-size: clamp(34px, 6vw, 64px); color: var(--ink-soft); opacity: .55; transition: opacity .15s;
}
.pivot a:hover, .pivot a:focus-visible { opacity: .9; }
.pivot a[aria-current="page"] { color: var(--ink); opacity: 1; }
.pivot .ext::after { content: " \2197"; font-size: .45em; vertical-align: super; }

/* Tiles. */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.tile {
  position: relative; min-height: 170px; padding: 18px; color: var(--tile-text); text-decoration: none;
  background: var(--slate); display: flex; flex-direction: column; justify-content: flex-end;
  outline: 3px solid transparent; outline-offset: 3px; transition: transform .12s, outline-color .12s;
}
a.tile:hover, a.tile:focus-visible { outline-color: var(--ink); transform: scale(1.015); }
.tile h3 { margin: 0; font-size: 21px; font-weight: 500; line-height: 1.2; }
.tile p { margin: 6px 0 0; font-size: 15px; opacity: .9; }
.tile .icon { position: absolute; top: 16px; left: 18px; width: 34px; height: 34px; opacity: .95; }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
.tile.green { background: var(--green-deep); }
.tile.lime { background: var(--green); }
.tile.blue { background: var(--blue); }
.tile.yellow { background: #9e7a1a; }
.tile.red { background: #b23a33; }
.tile.teal { background: var(--teal); }

/* Home hero. */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-bottom: 44px; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 300; line-height: 1.08; margin: 0 0 16px; letter-spacing: -.5px; }
.hero h1 b { font-weight: 500; color: var(--green-deep); }
@media (prefers-color-scheme: dark) { .hero h1 b { color: var(--green); } }
.hero .lead { font-size: 19px; color: var(--ink-soft); margin: 0 0 22px; max-width: 34em; }
.hero .meta { font-size: 14px; color: var(--ink-soft); margin-top: 14px; }

/* A drawing of the app's start screen, made of tiles (no game art). */
.mock { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 82px; gap: 8px; }
.mock div { background: var(--slate); color: #fff; font-size: 13px; padding: 8px 10px; display: flex; align-items: flex-end; }
.mock .play { grid-column: span 2; grid-row: span 2; background: var(--green); font-size: 22px; font-weight: 300; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.mock .play small { font-size: 13px; opacity: .85; }
.mock .b { background: var(--blue); } .mock .g { background: var(--green-deep); } .mock .y { background: #9e7a1a; }
.mock .t { background: var(--teal); } .mock .r { background: #b23a33; }
.mock .wide { grid-column: span 2; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; padding: 14px 22px; font-size: 17px; font-weight: 500;
  text-decoration: none; color: #fff; background: var(--slate); outline: 3px solid transparent; outline-offset: 3px;
}
.btn:hover, .btn:focus-visible { outline-color: var(--ink); }
.btn.primary { background: var(--green-deep); }
.btn.btn-bramble { background: var(--bramble-accent); color: #1b0d22; }
.btn small { font-weight: 400; opacity: .85; font-size: 14px; white-space: nowrap; }

/* Bramble recommendation: Bramble's own colours, so it reads as "the other app". */
.bramble {
  display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center;
  background: var(--bramble-bg); color: var(--bramble-text); padding: 28px 30px; margin: 0 0 44px;
  border-left: 6px solid var(--bramble-accent);
}
.bramble img { width: 84px; height: 84px; }
.bramble h2 { margin: 0 0 6px; font-size: 26px; font-weight: 500; }
.bramble p { margin: 0; color: var(--bramble-muted); }
.bramble ul { margin: 10px 0 0; padding-left: 20px; color: var(--bramble-muted); }
.bramble li b { color: var(--bramble-text); font-weight: 500; }
.bramble .emus { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bramble .emus span { font-size: 13px; padding: 3px 10px; border: 1px solid rgba(255,255,255,.18); }
.bramble .tag { display: inline-block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--bramble-accent); margin-bottom: 6px; }

section { margin: 0 0 48px; }
section > h2 { font-size: 34px; font-weight: 300; margin: 0 0 6px; }
section > .sub { color: var(--ink-soft); margin: 0 0 18px; max-width: 46em; }

/* Download page: two ways side by side. */
.ways { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--gap); }
.way { padding: 26px; }
.way h2 { margin: 0 0 4px; font-size: 28px; font-weight: 400; }
.way .tag { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.way ul { padding-left: 20px; }
.way.bramble-way { background: var(--bramble-bg); color: var(--bramble-text); border-left: 6px solid var(--bramble-accent); }
.way.bramble-way .tag { color: var(--bramble-accent); }
.way.bramble-way li, .way.bramble-way p { color: var(--bramble-muted); }
.way.bramble-way b { color: var(--bramble-text); font-weight: 500; }
.way.solo { background: var(--slate); color: #fff; }
.way.solo .tag { color: var(--green-pale); }
.way.solo p, .way.solo li { opacity: .9; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.steps li { counter-increment: step; background: rgba(255,255,255,.55); padding: 18px; min-height: 140px; }
@media (prefers-color-scheme: dark) { .steps li { background: rgba(255,255,255,.06); } }
.steps li::before { content: counter(step); display: block; font-size: 40px; font-weight: 300; color: var(--green-deep); line-height: 1; margin-bottom: 8px; }
.steps b { display: block; font-weight: 500; }

.need { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.need div { border-top: 4px solid var(--green); padding-top: 10px; }
.need b { display: block; font-weight: 500; }
.need span { color: var(--ink-soft); font-size: 15px; }

/* Help page. */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.faq details { border-top: 1px solid rgba(127,127,127,.35); padding: 14px 0; }
.faq summary { cursor: pointer; font-size: 18px; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--green-deep); font-weight: 300; }
.faq details[open] summary::before { content: "\2212"; }
.faq details p { margin: 8px 0 0 1.2em; color: var(--ink-soft); }

/* Long text (privacy). */
.prose { max-width: 50em; }
.prose h2 { font-size: 24px; font-weight: 500; margin: 32px 0 6px; }
.prose table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid rgba(127,127,127,.35); }
.prose th { font-weight: 500; }
.prose .date { color: var(--ink-soft); }
.prose .page-title { font-size: 34px; font-weight: 300; margin-top: 0; }

footer { margin-top: 60px; padding: 30px 0 40px; border-top: 1px solid rgba(127,127,127,.3); font-size: 14px; color: var(--ink-soft); }
footer .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 22px; }
footer h4 { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--ink); text-transform: lowercase; letter-spacing: .02em; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin: 4px 0; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .legal { max-width: 70em; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .ways, .faq { grid-template-columns: 1fr; }
  .steps, .need, footer .cols { grid-template-columns: repeat(2, 1fr); }
  .bramble { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .tiles { grid-template-columns: 1fr; }
  .tile.wide { grid-column: span 1; }
  .tile.tall { grid-row: span 1; }
  .steps, .need, footer .cols { grid-template-columns: 1fr; }
  .mock { grid-auto-rows: 64px; }
  .pivot { gap: 0 20px; }
}

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