/*
 * Sonik Pocket website. Colours and type follow the app (CLAUDE.md design tokens and the
 * guardian V4 retail palette in src/screens/auth/v4/AuthV4.tsx).
 *
 * One rule to keep: the bright brand teal (#01a4c0) is for shapes and large decoration
 * only. White on it is 3:1, too low for text, so links and filled buttons use the app's
 * deeper link teal (#007792, 5.2:1 on white).
 */

/* ---------- Fonts ---------- */

@font-face {
  font-family: 'Fredoka';
  src: url('../fonts/Fredoka-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --brown: #806157;
  --brown-deep: #5c443c;
  --teal: #01a4c0;
  --teal-ink: #007792;
  --teal-ink-hover: #005f75;
  --ink: #1d2939;
  --body: #6b5e59;
  --line: #e0d6d2;
  --line-soft: #efe9e6;
  --white: #ffffff;
  --warm: #f6f4f3;

  --tint-sky: #e3f2fa;
  --tint-mint: #e3f4ee;
  --tint-lavender: #eeeafb;
  --tint-butter: #fff3d1;
  --tint-peach: #fde6d2;

  --earn: #8a5a00;
  --save: #1f6e55;
  --spend: #5b47b5;

  --radius: 24px;
  --radius-small: 16px;
  --shadow: 0 24px 48px -24px rgba(92, 68, 60, 0.35);
  --shadow-phone: 0 30px 60px -28px rgba(29, 41, 57, 0.55);

  --font-title: 'Fredoka', 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --header-height: 72px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2 {
  color: var(--brown);
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.25rem);
}

h2 {
  font-size: clamp(1.9rem, 1.35rem + 2.4vw, 2.9rem);
}

h3 {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: var(--teal-ink);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--teal-ink-hover);
}

:focus-visible {
  outline: 3px solid var(--teal-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  color: var(--white);
  transform: none;
}

.container {
  width: min(1160px, 100% - 2.5rem);
  margin-inline: auto;
}

.container--narrow {
  width: min(780px, 100% - 2.5rem);
}

.lead {
  color: var(--body);
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  background: var(--tint-sky);
  color: var(--teal-ink);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.arrow-link::after {
  content: '→';
  display: inline-block;
  margin-inline-start: 0.4em;
  transition: transform 0.2s ease;
}

.arrow-link:hover::after {
  transform: translateX(4px);
}

[dir='rtl'] .arrow-link::after {
  content: '←';
}

[dir='rtl'] .arrow-link:hover::after {
  transform: translateX(-4px);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--small {
  min-height: 44px;
  padding: 0 1.25rem;
  font-size: 0.95rem;
}

.btn--primary {
  background: var(--teal-ink);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--teal-ink-hover);
  color: var(--white);
}

.btn--outline {
  border-color: var(--teal-ink);
  background: var(--white);
  color: var(--teal-ink);
}

.btn--outline:hover {
  border-color: var(--teal-ink-hover);
  background: var(--tint-sky);
  color: var(--teal-ink-hover);
}

/* A button that reads as a link, for the footer's "Cookie settings". */
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--body);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.link-button:hover {
  color: var(--teal-ink);
  text-decoration: underline;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}

/* The official store badges. Never recolour, redraw, stretch or animate them (Apple's
   and Google's rules); the gap above is the clear space both ask for, a quarter of the
   badge's height. */
.store-link {
  display: inline-flex;
  border-radius: 9px;
}

.store-link img {
  display: block;
  width: auto;
  height: 56px;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 168px;
  min-height: 60px;
  padding: 0.5rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
  background: var(--ink);
  color: var(--white);
  line-height: 1.2;
  text-decoration: none;
}

.store-badge__small {
  font-size: 0.75rem;
}

.store-badge__name {
  font-size: 1.1rem;
  font-weight: 600;
}

.store-badge--soon {
  border: 2px dashed var(--line);
  background: var(--white);
  color: var(--body);
}

.store-badge--soon .store-badge__name {
  color: var(--brown);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--line-soft);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-height: var(--header-height);
  padding-block: 0.5rem;
}

.site-logo {
  display: inline-flex;
  flex: none;
}

.site-logo img {
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav__list a:hover {
  color: var(--teal-ink);
}

.site-nav__list a[aria-current='page'] {
  color: var(--brown);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--teal);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.lang-switch:hover {
  border-color: var(--teal-ink);
  color: var(--teal-ink);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--warm);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--brown);
  transition: transform 0.2s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -7px;
}

.nav-toggle__bars::after {
  top: 7px;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bars::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Small screens: the menu folds behind the button, once the script is there to open it. */
@media (max-width: 899px) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
  }

  .js .site-nav.is-open {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1rem;
    max-height: calc(100dvh - var(--header-height) - var(--consent-height, 0px));
    overflow-y: auto;
    padding: 0.75rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line-soft);
    background: var(--white);
    box-shadow: 0 24px 32px -24px rgba(92, 68, 60, 0.3);
  }

  .js .site-nav.is-open .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .js .site-nav.is-open .site-nav__list a {
    width: 100%;
    min-height: 52px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 1.05rem;
  }

  .js .site-nav.is-open .site-nav__list a[aria-current='page'] {
    box-shadow: none;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem);
}

.section--tight {
  padding-block: clamp(2rem, 1rem + 4vw, 4rem);
}

.section--warm {
  background: var(--warm);
}

.section--teal {
  background: var(--teal-ink);
}

.section__head {
  max-width: 44rem;
  margin: 0 auto clamp(2rem, 1rem + 3vw, 3.5rem);
  text-align: center;
}

.section__head p {
  margin-top: 0.9rem;
  font-size: 1.125rem;
}

.section__head--left {
  margin-inline: 0;
  text-align: start;
}

.section--teal .section__head h2,
.section--teal .section__head p {
  color: var(--white);
}

.section__more {
  margin-top: 2rem;
  text-align: center;
}

.section__more--close {
  margin-top: 0.25rem;
}

/* ---------- Phone ---------- */

.phone {
  overflow: hidden;
  border: 8px solid var(--ink);
  border-radius: 38px;
  background: var(--ink);
  box-shadow: var(--shadow-phone);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
}

/* Shows the top of a screen and leaves its tab bar out. */
.phone--crop {
  aspect-ratio: 390 / 800;
}

.phone--crop img {
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ---------- Hero ---------- */

.hero {
  overflow: hidden;
  padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(3rem, 2rem + 4vw, 5.5rem);
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 4rem);
  align-items: center;
}

.hero__copy {
  max-width: 36rem;
}

.hero__copy h1 {
  margin-top: 1.1rem;
}

.hero__copy .lead {
  margin-top: 1.4rem;
}

.hero__copy .store-badges {
  margin-top: 2rem;
}

.hero__more {
  margin-top: 1.4rem;
}

.hero__art {
  position: relative;
  width: min(100%, 540px);
  margin-inline: auto;
  aspect-ratio: 1 / 1.06;
}

.blob {
  position: absolute;
  border-radius: 50%;
}

.blob--sky {
  top: 6%;
  left: 4%;
  width: 92%;
  aspect-ratio: 1;
  background: var(--tint-sky);
}

.hero__art .phone {
  position: absolute;
}

.phone--front {
  top: 0;
  left: 9%;
  z-index: 2;
  width: 46%;
  transform: rotate(-5deg);
}

.phone--back {
  top: 9%;
  right: 7%;
  z-index: 1;
  width: 42%;
  transform: rotate(6deg);
}

.hero__sonik {
  position: absolute;
  bottom: 1%;
  left: -5%;
  z-index: 3;
  width: 24%;
  animation: bob 4.5s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 480px) {
  .phone {
    border-width: 6px;
    border-radius: 28px;
  }
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

/* ---------- The hook under the hero (the line from the 2022 site) ---------- */

.hook {
  padding-block: clamp(0.5rem, 2vw, 1.5rem) clamp(1rem, 0.5rem + 2vw, 2.5rem);
  text-align: center;
}

.hook__question {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 500;
}

.hook h2 {
  margin-top: 0.35rem;
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem);
}

/* A hand-drawn line under a few words. */
.squiggle {
  display: inline-block;
  padding-bottom: 0.16em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M4 10C52 3 148 3 196 9' fill='none' stroke='%23ff857d' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") bottom center / 100% 0.3em no-repeat;
}

/* ---------- Pillars: Earn, Learn, Save, Spend ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1rem;
}

.pillar {
  text-align: center;
}

/* The face sits in the middle half of its file, so the picture is drawn large and pulled in. */
.pillar img {
  display: block;
  width: 176px;
  height: 176px;
  margin: -32px auto -40px;
}

.pillar h3 {
  color: var(--brown);
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
}

.pillar p {
  max-width: 17rem;
  margin: 0.4rem auto 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (min-width: 820px) {
  .pillars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  gap: 1.25rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.75rem 1.75rem 2rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--white);
}

.step__number {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1.5rem;
  color: var(--line);
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}

.step__icon {
  display: block;
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
}

.step p {
  margin-top: 0.5rem;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Feature rows ---------- */

.feature {
  display: grid;
  gap: clamp(2rem, 1rem + 5vw, 5rem);
  align-items: center;
}

.feature__media {
  display: grid;
  width: min(100%, 520px);
  margin-inline: auto;
}

.feature__media > * {
  grid-area: 1 / 1;
  align-self: center;
}

.feature__scene {
  width: 80%;
  justify-self: start;
}

.feature__media .phone {
  z-index: 1;
  width: 44%;
  justify-self: end;
  transform: rotate(4deg);
}

.feature--flip .feature__scene {
  justify-self: end;
}

.feature--flip .feature__media .phone {
  justify-self: start;
  transform: rotate(-4deg);
}

.feature__copy {
  max-width: 34rem;
}

.feature__copy .lead {
  margin-top: 1.1rem;
}

.kicker {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.kicker--earn {
  background: var(--tint-butter);
  color: var(--earn);
}

.kicker--save {
  background: var(--tint-mint);
  color: var(--save);
}

.kicker--spend {
  background: var(--tint-lavender);
  color: var(--spend);
}

.ticks {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.ticks--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
}

.ticks li {
  position: relative;
  padding-inline-start: 2.25rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
}

.ticks li::before {
  content: '';
  position: absolute;
  top: 0.1em;
  inset-inline-start: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--tint-mint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6e55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9'/%3E%3C/svg%3E")
    center / 1.1rem no-repeat;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature--flip .feature__media {
    order: 2;
  }
}

/* ---------- In the loop (guardians) ---------- */

.loop {
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 4rem);
  align-items: center;
}

.cards {
  display: grid;
  gap: 1rem;
}

.card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
}

.card img {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.card p {
  margin-top: 0.4rem;
  font-size: 0.975rem;
  line-height: 1.55;
}

.loop__media .phone {
  width: min(280px, 72vw);
  margin-inline: auto;
  border-color: #0b2530;
  background: #0b2530;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .loop {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

/* ---------- Family ---------- */

.family {
  display: grid;
  gap: clamp(1.5rem, 1rem + 4vw, 4rem);
  align-items: center;
}

.family__media img {
  display: block;
  width: min(100%, 480px);
  margin-inline: auto;
}

.family__copy {
  max-width: 34rem;
}

.family__copy p {
  margin-top: 1.1rem;
}

@media (min-width: 900px) {
  .family {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Next: the Journey ---------- */

.next {
  display: grid;
  gap: 1.25rem 2.5rem;
  align-items: center;
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
  border-radius: clamp(24px, 4vw, 36px);
  background: var(--tint-lavender);
}

.next img {
  display: block;
  width: clamp(96px, 18vw, 170px);
}

.next h2 {
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem);
}

.next p {
  max-width: 40rem;
  margin-top: 0.75rem;
  color: var(--ink);
}

.next .kicker {
  margin-top: 0;
  background: var(--white);
  color: var(--spend);
}

.next .arrow-link {
  color: var(--spend);
}

@media (min-width: 700px) {
  .next {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

/* A label above a heading on the night sky. */
.cta--space .eyebrow {
  margin-bottom: 0.9rem;
}

/* ---------- Questions ---------- */

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:first-child {
  border-top: 1px solid var(--line);
}

.faq summary {
  position: relative;
  display: block;
  padding-block: 1.15rem;
  padding-inline: 0 3rem;
  color: var(--ink);
  font-size: 1.075rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-end: 0.25rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--tint-sky)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007792' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E")
    center / 1rem no-repeat;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq summary:hover {
  color: var(--teal-ink);
}

.faq details > :not(summary) {
  max-width: 62ch;
  padding-bottom: 1.25rem;
}

.faq details > :not(summary) + :not(summary) {
  margin-top: -0.5rem;
}

.faq-group + .faq-group {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.faq-group h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
}

/* ---------- Get the app ---------- */

.cta__inner {
  padding: clamp(2.5rem, 1.5rem + 5vw, 4.5rem) 1.5rem;
  border-radius: clamp(28px, 4vw, 44px);
  background: var(--tint-sky);
  text-align: center;
}

.cta__sonik {
  display: block;
  width: 168px;
  margin: 0 auto 0.5rem;
}

.cta .lead {
  max-width: 34rem;
  margin: 1rem auto 0;
}

.cta .store-badges {
  justify-content: center;
  margin-top: 1.75rem;
}

.cta .store-badge {
  text-align: start;
}

.cta__note {
  margin-top: 1.5rem;
  font-size: 0.975rem;
}

.cta__note a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Lift-off: the night sky and planets of the 2022 site, on Home's last panel ---------- */

.cta--space .cta__inner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-bottom: 6.5rem;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='360' viewBox='0 0 480 360'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='24' cy='40' r='1.4'/%3E%3Ccircle cx='96' cy='212' r='1'/%3E%3Ccircle cx='150' cy='96' r='1.2'/%3E%3Ccircle cx='214' cy='300' r='1.5'/%3E%3Ccircle cx='262' cy='44' r='1'/%3E%3Ccircle cx='300' cy='180' r='1.3'/%3E%3Ccircle cx='356' cy='262' r='1'/%3E%3Ccircle cx='410' cy='130' r='1.5'/%3E%3Ccircle cx='452' cy='322' r='1.1'/%3E%3Ccircle cx='58' cy='330' r='1.2'/%3E%3Ccircle cx='190' cy='170' r='0.9'/%3E%3Ccircle cx='440' cy='24' r='1'/%3E%3C/g%3E%3Cg fill='%239fd8e6' opacity='.4'%3E%3Cpath d='M380 60c3 14 6 17 20 20-14 3-17 6-20 20-3-14-6-17-20-20 14-3 17-6 20-20z'/%3E%3Cpath d='M120 268c2 9 4 11 13 13-9 2-11 4-13 13-2-9-4-11-13-13 9-2 11-4 13-13z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #00727f 0%, #0a5479 48%, #143c72 100%);
}

/* The soft hill of lighter sky. */
.cta--space .cta__inner::before {
  content: '';
  position: absolute;
  inset: 46% -15% -60%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.space__planet {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.space__planet--green {
  top: -34px;
  left: -32px;
  width: 132px;
}

.space__planet--castle {
  right: -30px;
  bottom: -34px;
  width: 132px;
}

.space__planet--purple {
  display: none;
}

.cta--space .cta__sonik {
  width: 124px;
  margin-bottom: 1rem;
  animation: bob 4.5s ease-in-out infinite;
}

.cta--space h2,
.cta--space .lead,
.cta--space .cta__note,
.cta--space .cta__note a {
  color: var(--white);
}

.cta--space :focus-visible {
  outline-color: var(--white);
}

.cta--space .store-badge--soon {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.cta--space .store-badge--soon .store-badge__name {
  color: var(--white);
}

@media (min-width: 820px) {
  .cta--space .cta__inner {
    padding-bottom: clamp(2.5rem, 1.5rem + 5vw, 4.5rem);
  }

  .space__planet--green {
    top: -64px;
    left: 5%;
    width: 220px;
  }

  .space__planet--castle {
    top: 22%;
    right: -56px;
    bottom: auto;
    width: 230px;
  }

  .space__planet--purple {
    bottom: -40px;
    left: -52px;
    display: block;
    width: 170px;
  }
}

/* ---------- Inner pages ---------- */

.page-hero {
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5rem) clamp(2rem, 1rem + 3vw, 3.5rem);
  background: var(--warm);
}

.page-hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(2.25rem, 1.5rem + 3.4vw, 3.5rem);
}

.page-hero .lead {
  max-width: 40rem;
  margin-top: 1.1rem;
}

.page-hero__art {
  display: block;
  width: min(100%, 300px);
  margin-inline: auto;
}

@media (min-width: 820px) {
  .page-hero__grid--split {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  }
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin-bottom: 1rem;
}

.prose p + p {
  margin-top: 1.1rem;
}

/* A plain document page: several short headed sections down one column. */
.prose--doc h2 {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
}

.prose--doc h2:not(:first-child) {
  margin-top: 2.75rem;
}

.prose--doc ul {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding-inline-start: 1.25rem;
  list-style: disc;
}

.prose--doc ul + p {
  margin-top: 1.1rem;
}

.prose--doc li::marker {
  color: var(--teal);
}

/* Shown on a page whose front matter says `draft: yes`. */
.draft-banner {
  margin: 0;
  padding: 0.75rem 1.25rem;
  background: var(--tint-butter);
  color: var(--earn);
  font-weight: 600;
  text-align: center;
}

.trio {
  display: grid;
  gap: 1.25rem;
}

.trio__item {
  padding: 1.75rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--white);
}

.trio__item h3 {
  color: var(--brown);
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
}

.trio__item p {
  margin-top: 0.6rem;
}

@media (min-width: 860px) {
  .trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Cards that end in a button: the buttons line up along the bottom. */
.trio--actions .trio__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.trio--actions .trio__item .btn {
  margin-top: auto;
}

.trio--actions .trio__item p {
  margin-bottom: 1.5rem;
}

.stat {
  display: grid;
  gap: 1rem 2.5rem;
  align-items: center;
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
  border-radius: clamp(24px, 4vw, 36px);
  background: var(--tint-butter);
}

.stat__number {
  color: var(--brown);
  font-family: var(--font-title);
  font-size: clamp(4rem, 2.5rem + 7vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
}

.stat__text {
  color: var(--ink);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 500;
  line-height: 1.45;
}

.stat__source {
  display: block;
  margin-top: 0.6rem;
  color: var(--body);
  font-size: 0.95rem;
  font-weight: 400;
}

@media (min-width: 700px) {
  .stat {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.contact-cards {
  display: grid;
  gap: 1.25rem;
}

.contact-card {
  padding: 1.75rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--white);
}

.contact-card img {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.contact-card h2 {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.contact-card li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.contact-card p,
.contact-card ul {
  margin-top: 0.5rem;
}

.contact-card .btn {
  margin-top: 1.25rem;
}

.contact-card__email {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (min-width: 860px) {
  .contact-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.legal {
  min-height: 60vh;
}

.legal__fallback {
  margin-top: 1.5rem;
  font-size: 0.975rem;
}

.legal__choice {
  margin-bottom: 1.5rem;
}

.lost {
  padding-block: clamp(3rem, 2rem + 6vw, 6rem);
  text-align: center;
}

.lost img {
  display: block;
  width: min(60%, 260px);
  margin: 0 auto 1rem;
}

.lost .lead {
  max-width: 30rem;
  margin: 1rem auto 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4rem) 1.5rem;
  border-top: 1px solid var(--line-soft);
  background: var(--warm);
  font-size: 0.95rem;
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
}

.site-footer__brand p {
  max-width: 22rem;
  margin-top: 1rem;
}

.site-footer__title {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.site-footer a {
  color: var(--body);
  text-decoration: none;
}

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}

.site-footer a:hover {
  color: var(--teal-ink);
  text-decoration: underline;
}

.site-footer__base p + p {
  margin-top: 0.4rem;
}

.site-footer__base {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .site-footer__grid {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Arabic ---------- */

/* The brand fonts have no Arabic letters, so Arabic falls through to the reader's own
   Arabic font; Latin words such as "Sonik Pocket" keep the brand fonts. Arabic needs more
   room between lines, and its letters must never be spaced apart. */
[lang='ar'] {
  --font-title: 'Fredoka', 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
  --font-body: 'Poppins', 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
  letter-spacing: 0;
}

/* Arabic letters draw smaller than Latin ones at the same size. */
html[lang='ar'] body {
  font-size: 1.125rem;
  line-height: 1.85;
}

html[lang='ar'] h1,
html[lang='ar'] h2 {
  line-height: 1.35;
}

html[lang='ar'] h3,
html[lang='ar'] .lead {
  line-height: 1.7;
}

html[lang='ar'] .eyebrow {
  letter-spacing: 0;
}

/* In a feature row the phone and the scene swap sides, so the phone's lean swaps too. */
[dir='rtl'] .feature__media .phone {
  transform: rotate(-4deg);
}

[dir='rtl'] .feature--flip .feature__media .phone {
  transform: rotate(4deg);
}

/* A line that tells an Arabic reader the app itself is in English. */
.locale-note {
  margin-top: 1.25rem;
  font-size: 0.975rem;
}

/* Latin text, such as an address, inside an Arabic page. */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

[dir='rtl'] .ltr {
  text-align: right;
}

/* ---------- The cookie question ---------- */

/* Sits along the bottom of the window and does not block the page. The two answers
   look the same on purpose: saying no must be as easy as saying yes. */
.consent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 -16px 32px -24px rgba(92, 68, 60, 0.45);
}

.consent[hidden] {
  display: none;
}

/* site.js sets --consent-height while the question is open. */
html {
  scroll-padding-bottom: var(--consent-height, 0px);
}

body {
  padding-bottom: var(--consent-height, 0px);
}

.consent__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.consent__text {
  flex: 1 1 22rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.consent__title {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Motion ---------- */

/* site.js adds .reveal to what starts below the screen, then .is-visible as it scrolls in. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.pillars > :nth-child(2),
.steps > :nth-child(2),
.cards > :nth-child(2) {
  transition-delay: 0.08s;
}

.pillars > :nth-child(3),
.steps > :nth-child(3),
.cards > :nth-child(3) {
  transition-delay: 0.16s;
}

.pillars > :nth-child(4),
.cards > :nth-child(4) {
  transition-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
