/* One stylesheet for every page of the site, mobile first. No web fonts: system fonts load at once. */

:root {
  color-scheme: light dark;
  --bg: #fbf9ff;
  --surface: #ffffff;
  --tint: #f1edff;
  --ink: #221d45;
  --muted: #5d5884;
  --line: #e2dcf6;
  --link: #5b43c9;
  --night: #1c1850;
  --night-ink: #f3efff;
  --night-muted: #c9c0f2;
  --moon: #ffd36b;
  --moon-hover: #ffe08f;
  --moon-ink: #241c52;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(34 29 69 / 6%), 0 8px 24px rgb(34 29 69 / 8%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-story: Georgia, "PT Serif", "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131030;
    --surface: #1d1946;
    --tint: #18143f;
    --ink: #eeeaff;
    --muted: #b9b1e3;
    --line: #342d6d;
    --link: #c3b4ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 7.5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 5.5vw, 2.25rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--moon);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--moon);
  color: var(--moon-ink);
  font-weight: 700;
}

.skip:focus {
  top: 8px;
}

.small {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--moon);
  color: var(--moon-ink);
  font: 700 1.0625rem/1.2 var(--font-display);
  text-decoration: none;
  box-shadow: 0 6px 20px rgb(255 211 107 / 28%);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  background: var(--moon-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: none;
}

.btn .icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.btn--small {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.95rem;
  box-shadow: none;
}

.btn--small .icon {
  width: 18px;
  height: 18px;
}

/* On the narrowest phones the top button keeps its icon and hides its words from the eye only. */
@media (max-width: 359px) {
  .btn--small span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Top bar */

.topbar {
  background: var(--night);
  color: var(--night-ink);
}

.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font: 700 1.125rem/1.2 var(--font-display);
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Hero: a night sky drawn in CSS, no image requests */

.hero {
  padding: 16px 0 56px;
  background:
    radial-gradient(1.6px 1.6px at 8% 22%, rgb(255 255 255 / 85%) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 22% 64%, rgb(255 255 255 / 60%) 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 35% 12%, rgb(255 255 255 / 70%) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 48% 86%, rgb(255 255 255 / 50%) 50%, transparent 52%),
    radial-gradient(1.8px 1.8px at 63% 8%, rgb(255 236 179 / 90%) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 74% 58%, rgb(255 255 255 / 55%) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 88% 18%, rgb(255 255 255 / 75%) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 94% 78%, rgb(255 255 255 / 55%) 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 14% 92%, rgb(255 255 255 / 55%) 50%, transparent 52%),
    radial-gradient(60% 55% at 72% 42%, rgb(154 123 255 / 38%), transparent 72%),
    linear-gradient(160deg, #17134a 0%, #2a2178 60%, #43308f 100%);
  color: var(--night-ink);
}

.hero__in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero__img {
  order: -1;
  width: min(60vw, 250px);
  filter: drop-shadow(0 18px 30px rgb(10 6 40 / 45%));
  animation: float 6s ease-in-out infinite;
}

.hero__text {
  max-width: 36rem;
  text-align: center;
}

.eyebrow {
  margin-bottom: 0.6em;
  color: var(--moon);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lead {
  color: var(--night-muted);
  font-size: 1.125rem;
}

.hero__cta {
  margin: 1.5em 0 0.75em;
}

.hero__note {
  margin: 0;
  color: var(--night-muted);
  font-size: 0.95rem;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* Sections */

.section {
  padding: 56px 0;
}

.section--tint {
  background: var(--tint);
}

.section--night {
  background: linear-gradient(170deg, #1c1850 0%, #2d2476 100%);
  color: var(--night-ink);
  color-scheme: dark;
}

.section--night a {
  color: var(--moon);
}

.section--night .small {
  color: var(--night-muted);
}

.section__lead {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.125rem;
}

/* Ages */

.ages {
  display: grid;
  gap: 10px;
  margin: 0 0 1.25em;
  padding: 0;
  list-style: none;
}

.ages li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.ages b {
  flex: none;
  min-width: 3.2em;
  color: var(--link);
  font: 800 1.25rem/1 var(--font-display);
}

/* Steps */

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  column-gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step img {
  grid-row: span 2;
  width: 88px;
}

.step h3 {
  margin-bottom: 0.25em;
}

.step h3::before {
  content: counter(step) ". ";
  counter-increment: step;
  color: var(--link);
}

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

.steps__more {
  margin: 24px 0 0;
  font-weight: 600;
}

/* Sample stories */

.stories {
  display: grid;
  gap: 20px;
}

.story {
  padding: 22px 20px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.story h3 {
  margin-bottom: 0.3em;
  font-size: 1.35rem;
}

.story__meta {
  margin-bottom: 0.5em;
  color: var(--muted);
  font-size: 0.95rem;
}

.story__note {
  display: inline-block;
  margin-bottom: 0.9em;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--tint);
  font-size: 0.92rem;
}

.story__text {
  font-family: var(--font-story);
  font-size: 1.07rem;
  line-height: 1.65;
}

.story__text p {
  margin: 0 0 0.85em;
}

.story__more summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--link);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.story__more summary::-webkit-details-marker {
  display: none;
}

.story__more summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

/* Once opened, the story simply goes on. */
.story__more[open] summary {
  display: none;
}

/* Voice and the evening reminder */

.duo {
  display: grid;
  gap: 32px;
}

.duo__img {
  width: 120px;
  margin-bottom: 12px;
}

.listen {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 16px;
  background: rgb(255 255 255 / 7%);
}

.listen figcaption {
  margin-bottom: 10px;
  font-weight: 600;
}

.listen audio {
  display: block;
  width: 100%;
}

.chat {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin: 0 0 20px;
}

.chat__sticker {
  width: 120px;
}

.chat__bubble {
  max-width: 22rem;
  padding: 12px 14px;
  border-radius: 18px 18px 18px 6px;
  background: #ffffff;
  color: #1d1b2c;
  box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
}

.chat__bubble p {
  margin: 0 0 0.5em;
}

.chat__bubble p:last-child {
  margin: 0;
}

.chat__button {
  width: 100%;
  max-width: 22rem;
  margin: 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgb(255 255 255 / 16%);
  font-weight: 600;
  text-align: center;
}

.chat figcaption {
  color: var(--night-muted);
  font-size: 0.85rem;
}

/* An image beside text */

.media {
  display: grid;
  gap: 20px;
}

.media__img {
  justify-self: center;
  width: 150px;
}

/* Worlds */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.25em;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.98rem;
  white-space: nowrap;
}

.chips .chips__own {
  border-style: dashed;
  border-color: var(--link);
}

/* Safety */

.checks {
  margin: 0 0 1.25em;
  padding-left: 1.4em;
}

.checks li {
  margin-bottom: 0.8em;
}

.checks li::marker {
  color: var(--link);
  font-weight: 800;
}

.note {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--tint);
}

.note h3 {
  margin-bottom: 0.3em;
}

.note p:last-child {
  margin: 0;
}

/* Prices */

.free {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.free img {
  flex: none;
  width: 84px;
}

.free p {
  margin: 0;
  font-size: 1.1rem;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.tier {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tier h3 {
  margin-bottom: 0.25em;
}

.tier__price {
  margin: 0;
  font: 800 1.6rem/1.25 var(--font-display);
}

.tier__later {
  display: block;
  color: var(--muted);
  font: 500 0.95rem/1.4 var(--font);
}

.tier__uah {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.tier__contents {
  margin: 0;
}

.packs {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  background: var(--surface);
}

.packs caption {
  padding: 0 0 8px;
  font-weight: 700;
  text-align: left;
}

.packs th,
.packs td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.packs thead th {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.packs tbody tr:last-child > * {
  border-bottom: 0;
}

/* Questions */

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 16px 40px 16px 0;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 12px;
  right: 6px;
  color: var(--link);
  font: 400 1.6rem/1 var(--font);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details[open] {
  padding-bottom: 8px;
}

.faq ul {
  padding-left: 1.3em;
}

/* Closing call */

.cta {
  background:
    radial-gradient(50% 60% at 50% 30%, rgb(154 123 255 / 35%), transparent 70%),
    linear-gradient(170deg, #241d63 0%, #17134a 100%);
  color: var(--night-ink);
  text-align: center;
}

.cta__in img {
  width: 140px;
  margin: 0 auto 8px;
}

.cta p {
  color: var(--night-muted);
}

/* Footer */

.footer {
  padding: 32px 0 40px;
  background: #120f33;
  color: #cfc8f3;
  font-size: 0.95rem;
}

.footer a {
  color: var(--moon);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 1em;
}

.footer .small {
  margin: 0;
  color: #a39bd2;
}

/* Privacy policy and terms */

.doc {
  padding: 32px 0 56px;
}

.doc__text {
  max-width: 44rem;
}

.doc__text h1 {
  font-size: clamp(1.7rem, 6vw, 2.4rem);
}

.doc__text h2 {
  margin-top: 1.6em;
  font-size: 1.35rem;
}

.doc__text ul {
  padding-left: 1.3em;
}

.doc__text li {
  margin-bottom: 0.45em;
}

.doc__back {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  max-width: 44rem;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* 404 */

.notfound {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px 0;
  text-align: center;
}

.notfound img {
  width: 150px;
  margin: 0 auto 16px;
}

.notfound__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
}

/* Wider screens */

@media (min-width: 640px) {
  .wrap {
    padding: 0 24px;
  }

  .tier {
    padding: 18px;
  }
}

@media (min-width: 860px) {
  .section {
    padding: 80px 0;
  }

  .hero {
    padding: 56px 0 88px;
  }

  .hero__in {
    flex-direction: row;
    justify-content: space-between;
    gap: 48px;
  }

  .hero__text {
    text-align: left;
  }

  .hero__img {
    order: 0;
    width: 400px;
  }

  .ages {
    grid-template-columns: repeat(5, 1fr);
  }

  .ages li {
    flex-direction: column;
    gap: 6px;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .step {
    grid-template-columns: 1fr;
    align-content: start;
    padding: 24px;
    text-align: center;
  }

  .step img {
    grid-row: auto;
    width: 150px;
    margin: 0 auto 12px;
  }

  .duo {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 56px;
  }

  .media {
    grid-template-columns: 220px 1fr;
    align-items: start;
    gap: 56px;
  }

  .media__img {
    position: sticky;
    top: 24px;
    width: 220px;
  }

  .media--end {
    grid-template-columns: 1fr 220px;
  }

  .media--end .media__img {
    order: 2;
  }
}

@media (min-width: 960px) {
  .stories {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }

  .tiers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__img {
    animation: none;
  }

  .btn {
    transition: none;
  }
}
