/*
 * The marketing site's one style sheet (getkikigo.com).
 *
 * Files in /assets/ are cached by browsers for a year (see firebase.json), so a visitor never
 * downloads them twice. That is why the name carries a version: after a change, save the file as
 * site.v2.css and point the pages at the new name. Editing it in place would not reach returning
 * visitors.
 *
 * No web fonts on purpose: the page makes no request to anyone but us, and it shows text at once.
 * "ui-rounded" is the rounded system font on Apple devices; the others are the nearest fit elsewhere.
 */
:root {
  --night: #13123A;
  --panel: #1D1B50;
  --text: #F4EEFF;
  --muted: #C9BCE6;
  --lime: #C8FF3D;
  --pink: #FF4FCB;
  --cyan: #5CE6FF;
  --yellow: #FFE45D;
  --line: rgba(244, 238, 255, .28);
  --round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--night); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh; /* for browsers that do not know dvh */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 400 1.0625rem/1.5 var(--round);
  overflow-x: hidden; /* the two glows in the hero hang over the edge on purpose */
}

a { color: var(--lime); text-underline-offset: .2em; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 max(1.25rem, env(safe-area-inset-right)) 0 max(1.25rem, env(safe-area-inset-left)); }

/* Shown only when someone moves through the page with the keyboard. */
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 2; padding: .75rem 1rem; border-radius: .75rem; background: var(--lime); color: var(--night); font-weight: 700; }
.skip:focus { top: 1rem; color: var(--night); }

/* ── Top bar ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: max(1.25rem, env(safe-area-inset-top)); padding-bottom: .5rem; }
.brand { display: block; line-height: 0; }
.brand img { width: 10.5rem; height: auto; }
/* 48px high, so it is easy to hit with a thumb. */
.lang { display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-weight: 600; text-decoration: none; }
.lang:hover { border-color: var(--lime); color: var(--lime); }

/* ── Hero ── */
main { flex: 1; }
.hero { position: relative; display: grid; gap: 2.5rem; align-items: center; padding-top: 2.5rem; padding-bottom: 3.5rem; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .32; pointer-events: none; }
.hero::before { width: 20rem; height: 20rem; right: -9rem; top: -5rem; background: var(--pink); }
.hero::after { width: 15rem; height: 15rem; left: -8rem; bottom: -3rem; background: var(--cyan); opacity: .2; }

h1 { margin: 0; font-size: clamp(2.1rem, 8.4vw, 4rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
h1 em { font-style: normal; color: var(--lime); }
.lead { margin: 1.1rem 0 0; max-width: 30rem; color: var(--muted); font-size: clamp(1.15rem, 3.6vw, 1.4rem); line-height: 1.4; text-wrap: pretty; }

.soon { margin: 2.25rem 0 .85rem; font-weight: 700; }
.soon::before { content: ""; display: inline-block; width: .6rem; height: .6rem; margin-right: .6rem; border-radius: 50%; background: var(--pink); }
.stores { display: flex; flex-wrap: wrap; gap: .75rem; }
/* Not the official store badges: plain buttons that cannot be pressed until the app is out. */
.store { display: grid; gap: .1rem; min-width: 10.5rem; min-height: 3.75rem; padding: .6rem 1.25rem; border: 2px dashed var(--line); border-radius: 1rem; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: not-allowed; }
.store small { color: var(--muted); font-size: .8125rem; line-height: 1.2; }
.store strong { font-size: 1.1875rem; font-weight: 700; line-height: 1.2; }

/* The picture: a rainbow with three of the app's animals in front of it. */
.art { position: relative; justify-self: center; width: min(100%, 23rem); aspect-ratio: 23 / 15; }
.rainbow { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; }
.animals { position: absolute; left: 0; right: 0; bottom: 3%; display: flex; align-items: flex-end; justify-content: center; gap: 1.5%; }
.animal { width: 24%; aspect-ratio: 1; padding: 2.4%; border: 3px solid; border-radius: 50%; background: var(--night); animation: bob 2.6s ease-in-out infinite; }
.animal svg { display: block; width: 100%; height: 100%; }
.fox { color: #FF9F43; }
.unicorn { color: #B98BFF; width: 30%; margin-bottom: 5%; animation-delay: -.9s; }
.owl { color: #5CB8FF; animation-delay: -1.7s; }
@keyframes bob { 0%, 100% { transform: translateY(4px) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }

/* ── The three points ── */
.points { padding-bottom: 4rem; }
.points h2 { margin: 0 0 1.25rem; font-size: clamp(1.4rem, 4.6vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.points ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.points li { position: relative; padding: 1.5rem 1.4rem 1.6rem; border: 1px solid var(--line); border-radius: 1.6rem; background: var(--panel); }
/* The coloured tab leans 7 degrees, like the mark in the logo. */
.points li::before { content: ""; display: block; width: 2.6rem; height: .7rem; margin-bottom: 1.1rem; border-radius: 999px; background: var(--pink); transform: rotate(-7deg); transform-origin: left center; }
.points li:nth-child(2)::before { background: var(--cyan); }
.points li:nth-child(3)::before { background: var(--lime); }
.points h3 { margin: 0 0 .4rem; font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.points p { margin: 0; color: var(--muted); }

/* ── Foot ── */
/* Text on the left, links on the right; on a narrow phone the links wrap below the text. */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; border-top: 1px solid var(--line); padding-top: 1.5rem; padding-bottom: max(1.75rem, env(safe-area-inset-bottom)); color: var(--muted); font-size: .9375rem; }
.foot p { margin: 0; }
.foot p + p { margin-top: .35rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
/* 44px high: easy to hit, without padding that would push the first link off the text's left edge. */
.foot-links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--text); font-weight: 600; text-decoration: none; }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--lime); }

/* ── The "page not found" page ── */
.lost { display: grid; place-items: center; text-align: center; padding-top: 4rem; padding-bottom: 4rem; }
.lost p { margin: 1rem auto 0; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.5rem; margin-top: 1.75rem; padding: 0 1.5rem; border-radius: 1rem; background: var(--lime); color: var(--night); font-weight: 700; text-decoration: none; }
.button:hover { background: var(--text); color: var(--night); }

/* ── Privacy policy and terms ──
 * One column on a phone: title, the short version, the contents, the text.
 * On a wide screen the contents move to a column on the left and stay in view while you scroll.
 */
.legal { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); padding-top: 2.5rem; padding-bottom: 4rem; }
.legal::before { content: ""; position: absolute; z-index: -1; width: 18rem; height: 18rem; right: -9rem; top: -6rem; border-radius: 50%; background: var(--pink); filter: blur(70px); opacity: .22; pointer-events: none; }
.legal-head, .tldr, .prose { max-width: 42rem; }
.legal h1 { font-size: clamp(2.1rem, 7.4vw, 3.25rem); }
.updated { margin: 1.25rem 0 0; color: var(--muted); font-size: .9375rem; }
.updated::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .55rem; border-radius: 50%; background: var(--cyan); vertical-align: .1em; }

.tldr { margin-top: 2rem; padding: 1.5rem 1.4rem 1.4rem; border: 1px solid var(--line); border-radius: 1.6rem; background: var(--panel); }
/* The same leaning tab as on the front page. */
.tldr::before { content: ""; display: block; width: 2.6rem; height: .7rem; margin-bottom: 1.1rem; border-radius: 999px; background: var(--lime); transform: rotate(-7deg); transform-origin: left center; }
.tldr h2 { margin: 0 0 .75rem; font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.tldr ul { margin: 0; }

.toc { margin-top: 2.25rem; }
.toc h2 { margin: 0 0 .35rem; color: var(--pink); font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; }
/* Padding, not only a minimum height: an entry that wraps onto two lines keeps its air too. */
.toc a { display: flex; align-items: baseline; gap: .65rem; min-height: 2.75rem; padding: .7rem 0; color: var(--muted); text-decoration: none; line-height: 1.3; }
.toc a:hover { color: var(--lime); }
.toc span { flex: none; width: 1.4rem; color: var(--pink); font-size: .875rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.prose { overflow-wrap: anywhere; }
.prose section { padding-top: 2.75rem; }
.prose h2 { margin: 0 0 .85rem; font-size: clamp(1.4rem, 4.6vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; scroll-margin-top: 1.5rem; }
.prose h3 { margin: 1.75rem 0 .4rem; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.prose p { margin: 0 0 1rem; color: var(--muted); text-wrap: pretty; }
.prose strong, .tldr strong { color: var(--text); font-weight: 700; }
.legal ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.legal li { position: relative; margin-bottom: .55rem; padding-left: 1.3rem; color: var(--muted); }
.legal li:last-child { margin-bottom: 0; }
.legal ul li::before { content: ""; position: absolute; left: .1rem; top: .6em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--lime); }
.toc li { margin: 0; padding: 0; }

/* Who gets what: a card per item, which reads better on a phone than a table. */
.facts { display: grid; gap: .75rem; margin: 0 0 1rem; }
.facts div { padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); }
.facts dt { font-weight: 700; }
.facts dd { margin: .25rem 0 0; color: var(--muted); }

@media (min-width: 46rem) {
  .points ol { grid-template-columns: repeat(3, 1fr); }
  .brand img { width: 12.5rem; }
}
@media (min-width: 56rem) {
  .hero { grid-template-columns: 1.15fr .85fr; padding-top: 4.5rem; padding-bottom: 5.5rem; }
  .art { justify-self: end; width: 100%; max-width: 26rem; }
}
@media (min-width: 62rem) {
  .legal { grid-template-columns: 15rem minmax(0, 42rem); grid-template-areas: "head head" "toc tldr" "toc text"; column-gap: 4rem; padding-top: 4rem; }
  .legal-head { grid-area: head; }
  .tldr { grid-area: tldr; }
  .prose { grid-area: text; }
  .toc { grid-area: toc; align-self: start; position: sticky; top: 1.5rem; margin-top: 2rem; max-height: calc(100vh - 3rem); overflow-y: auto; }
  /* Tighter here, made for a mouse, so all sixteen entries fit on a laptop screen. */
  .toc a { min-height: 0; padding: .4rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  .animal { animation: none; }
}
/* Printed policies: black on white, without the parts that only work on a screen. */
@media print {
  html, body { background: #fff; color: #000; }
  .lang, .skip, .toc, .foot-links, .legal::before { display: none; }
  .prose p, .legal li, .facts dd, .updated, .foot { color: #000; }
  .tldr, .facts div { background: none; }
  a { color: #000; }
}
