/*
 * kidoversity.com. One page, no scripts. The look is the app's own world: a day sky over the sea, lanterns for
 * every heading, and a night band where the lanterns are lit. Colours are the app's brand tokens
 * (packages/ui/src/styles/tokens.css): indigo, pink and lantern yellow. Layout: one centred column, text beside
 * real pictures of the app, stacking to one column on a phone.
 */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/fredoka/fredoka-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/fonts/nunito/nunito-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --bg: #f4f9ff;
  --sky: #d9ecff;
  --surface: #ffffff;
  --tint: #e8f2ff;
  --paper: #fffaf0;
  --ink: #1c1b3a;
  --ink-2: #4a496c;
  --line: #d3e1f3;
  --brand: #4c4ce0;
  --brand-strong: #3a3ac2;
  --on-brand: #ffffff;
  --pink: #ff7ab6;
  --sun: #ffc94d;
  --sun-soft: #fff1c9;
  --sun-ink: #5c4300;
  --leaf: #1f7a4a;
  --night: #1b1a47;
  --night-2: #26255f;
  --on-night: #f3f1ff;
  --on-night-2: #c9c7ee;
  --focus: #1c1b3a;
  --shadow: 0 24px 60px -28px rgb(28 27 58 / 0.45);
  --display: 'Fredoka', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --band: clamp(56px, 9vw, 112px);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121130;
    --sky: #0c0b24;
    --surface: #1c1b45;
    --tint: #171640;
    --paper: #21204f;
    --ink: #f2f1ff;
    --ink-2: #bcbae0;
    --line: #34336c;
    --brand: #5b5bf7;
    --brand-strong: #7373ff;
    --on-brand: #ffffff;
    --sun-soft: #4a3b0c;
    --sun-ink: #ffe29a;
    --leaf: #7fdcaa;
    --night: #0c0b24;
    --night-2: #1c1b45;
    --focus: #ffc94d;
    --shadow: 0 24px 60px -28px rgb(0 0 0 / 0.8);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}
a {
  color: var(--brand);
  text-underline-offset: 3px;
}
@media (prefers-color-scheme: dark) {
  a {
    color: #a9a8ff;
  }
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
[id] {
  scroll-margin-top: 88px;
}
.defs {
  position: absolute;
}
.wrap {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}
.skip:focus {
  top: 12px;
}

/* the top bar */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top__row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
}
.top__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-inline: auto;
}
.top__nav a,
.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  font-weight: 700;
  text-decoration: none;
}
.top__nav a:hover,
.lang:hover {
  color: var(--ink);
  text-decoration: underline;
}
.top__end {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-inline-start: auto;
}
.top__nav + .top__end {
  margin-inline-start: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 26px;
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
}
.btn--small {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 1rem;
}
.btn--quiet {
  background: transparent;
  color: var(--brand);
}
.btn--quiet:hover {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
@media (prefers-color-scheme: dark) {
  .btn--quiet {
    border-color: #a9a8ff;
    color: #d5d4ff;
  }
}

/* the first screen: the two of them, then the map itself */
.hero {
  padding-block: clamp(32px, 6vw, 72px) var(--band);
  background:
    radial-gradient(60rem 30rem at 88% -8%, color-mix(in srgb, var(--sun) 38%, transparent), transparent 62%),
    linear-gradient(180deg, var(--sky) 0%, var(--bg) 78%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.hero__text {
  display: grid;
  gap: 20px;
  justify-items: start;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
  letter-spacing: -0.01em;
}
/* the headline is two phrases; when it has to break, it breaks between them */
.hero h1 span {
  display: inline-block;
}
.lead {
  max-width: 38rem;
  color: var(--ink-2);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
}
.hero .lead {
  color: var(--ink);
}
.small {
  max-width: 34rem;
  color: var(--ink-2);
  font-size: 0.98rem;
}
.chip {
  display: inline-flex;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--sun) 70%, var(--sun-ink));
  border-radius: 999px;
  background: var(--sun-soft);
  color: var(--sun-ink);
  font-size: 0.92rem;
  font-weight: 800;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.actions--center {
  justify-content: center;
  margin-top: 40px;
}
.hero__art {
  width: min(100%, 440px);
  justify-self: center;
  filter: drop-shadow(0 22px 34px rgb(28 27 58 / 0.22));
}
.window {
  margin-top: clamp(36px, 6vw, 72px);
}
.window img,
.shot img {
  width: 100%;
  border: 6px solid var(--surface);
  border-radius: 26px;
  background: var(--tint);
  box-shadow: var(--shadow);
}
.window figcaption {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 0.98rem;
  text-align: center;
}

/* a band is one section of the page */
.band {
  padding-block: var(--band);
}
.band--tint {
  background: var(--tint);
}
.head {
  display: grid;
  gap: 14px;
  max-width: 44rem;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.lantern {
  width: 24px;
  height: 24px;
  color: var(--ink);
}
h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}
h3 {
  font-size: 1.3rem;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.split + .split {
  margin-top: clamp(40px, 7vw, 88px);
}
.split--flip {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.split--flip .points {
  order: 2;
}
.points {
  display: grid;
  gap: 28px;
}
.points li {
  display: grid;
  gap: 6px;
}
.points p,
.room p,
.note-row p {
  color: var(--ink-2);
}

.counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2.2fr);
  gap: 20px 32px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.counts > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 2px;
}
.counts dd {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.counts dt {
  color: var(--ink-2);
  font-weight: 700;
}
.counts__wide dd {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
}

.rooms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}
.room {
  display: grid;
  gap: 10px;
  align-content: start;
}
.room .shot {
  margin-bottom: 12px;
}
.note-row {
  display: grid;
  gap: 8px;
  max-width: 46rem;
  margin-top: clamp(32px, 5vw, 56px);
}

/* the night band: the promises, each beside a lit lantern */
.band--night {
  background:
    radial-gradient(40rem 22rem at 12% 0%, color-mix(in srgb, var(--sun) 16%, transparent), transparent 70%),
    linear-gradient(180deg, var(--night), var(--night-2));
  color: var(--on-night);
}
.band--night .eyebrow,
.band--night .lead {
  color: var(--on-night-2);
}
.band--night .lantern {
  color: var(--on-night);
}
.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 48px;
}
.promises li {
  position: relative;
  padding-inline-start: 34px;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.45;
}
.promises li::before {
  content: '';
  position: absolute;
  inset-inline-start: 4px;
  top: 0.42em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 5px rgb(255 201 77 / 0.2), 0 0 18px 4px rgb(255 201 77 / 0.55);
}

/* the note from Dada, as a letter */
.letter {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.letter__art {
  width: 100%;
  position: sticky;
  top: 96px;
}
.letter__text {
  display: grid;
  gap: 16px;
  max-width: 40rem;
  font-size: 1.14rem;
  line-height: 1.75;
}
.letter__text h3 {
  color: var(--brand);
  font-size: 1.6rem;
}
@media (prefers-color-scheme: dark) {
  .letter__text h3 {
    color: #c3c2ff;
  }
}
.letter__first {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.5;
}
.letter__sign {
  margin-top: 8px;
}
.letter__sign strong {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
}

/* where it stands */
.stand {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}
.stand > div {
  display: grid;
  gap: 14px;
  align-content: start;
}
.ticks,
.steps {
  display: grid;
  gap: 12px;
  color: var(--ink-2);
}
.ticks li,
.steps li {
  position: relative;
  padding-inline-start: 32px;
}
.ticks li::before {
  content: '';
  position: absolute;
  inset-inline-start: 2px;
  top: 0.3em;
  width: 11px;
  height: 6px;
  border: solid var(--leaf);
  border-width: 0 0 3px 3px;
  transform: rotate(-45deg);
}
.ticks--open li::before {
  top: 0.38em;
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink-2);
  border-radius: 50%;
  transform: none;
}
.steps {
  counter-reset: step;
}
.steps li {
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0.1em;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* the foot of the page */
.foot {
  padding-block: 48px max(32px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.98rem;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  justify-content: space-between;
}
.foot__row > div {
  display: grid;
  gap: 6px;
  align-content: start;
}
.brand--foot {
  font-size: 1.15rem;
}
.foot__version {
  font-variant-numeric: tabular-nums;
}
.foot ul {
  display: grid;
  gap: 2px;
}
.foot li a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 700;
}
.foot__copy {
  margin-top: 28px;
}

/* the page nobody meant to open */
.lost {
  display: grid;
  gap: 20px;
  justify-items: center;
  min-height: 70vh;
  padding-block: var(--band);
  align-content: center;
  text-align: center;
}
.lost img {
  width: min(60vw, 240px);
}

@media (max-width: 1020px) {
  .top__nav {
    display: none;
  }
}
@media (max-width: 860px) {
  .hero__grid,
  .split,
  .rooms,
  .letter,
  .stand {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__art {
    order: -1;
    width: min(64vw, 300px);
  }
  .split--flip .points {
    order: 0;
  }
  .promises {
    grid-template-columns: minmax(0, 1fr);
  }
  .counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .counts__wide {
    grid-column: 1 / -1;
  }
  .letter__art {
    position: static;
    width: min(60vw, 240px);
    justify-self: center;
  }
}
@media (max-width: 460px) {
  .top__row {
    gap: 8px;
  }
  .brand span {
    font-size: 1.1rem;
  }
  .top__end {
    gap: 10px;
  }
  .btn {
    width: 100%;
  }
  .btn--small {
    width: auto;
    padding-inline: 14px;
  }
  .counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
