/**
 * Fonts
 */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2")
    format("woff2-variations");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

/**
 * Base
 */
:root {
  color-scheme: light;
  --ink: #1e1b4b;
  --indigo: #4f46e5;
  --indigo-deep: #4338ca;
  --text: #3f3d6b;
  --muted: #4b4a75;
  --tint: #eef0ff;
  --line: #e0e7ff;
  --line-strong: #c7d2fe;
  --violet-tint: #f3e8ff;
  --rose-tint: #fce7f3;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--indigo) 45%, transparent);
  outline-offset: 2px;
}

/**
 * Shared
 */
.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
}

.section {
  padding-block: clamp(56px, 8vw, 112px);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.eyebrow {
  align-self: flex-start;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--indigo-deep);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.title {
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.title em {
  color: var(--indigo);
  font-style: normal;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--indigo);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--indigo-deep);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--tint);
  color: var(--indigo);
}

.icon svg,
.badge svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

/**
 * Header
 */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
}

/* Proportions of the app's logo: wordmark at 60% of the icon's height. */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.26em;
  font-family: "Outfit", sans-serif;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo svg {
  width: 1.667em;
  height: 1.667em;
}

.logo__disc {
  fill: #615fff;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #3730a3;
  font-size: 14px;
  font-weight: 600;
}

/**
 * Hero and sign-up
 */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding-block: clamp(40px, 6vw, 72px);
  text-align: center;
}

.hero .eyebrow {
  align-self: center;
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(40px, 6.6vw, 84px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero h1 em {
  color: var(--indigo);
  font-style: normal;
}

/*
 * The last word of the title changes. Every word sits in the same cell, on
 * its own line, so the widest one sets the height and nothing moves around it.
 * The padding leaves room for the accents and the descenders under the clip.
 */
.swap {
  display: grid;
  justify-items: center;
  margin-block: -0.25em;
  padding-block: 0.25em;
  overflow: hidden;
  white-space: nowrap;
}

.swap span {
  grid-area: 1 / 1;
  opacity: 0;
  animation: swap 10s infinite both;
}

.swap span:nth-child(1) {
  opacity: 1;
  animation-delay: -0.6s;
}

.swap span:nth-child(2) {
  animation-delay: 1.9s;
}

.swap span:nth-child(3) {
  animation-delay: 4.4s;
}

.swap span:nth-child(4) {
  animation-delay: 6.9s;
}

.lead {
  max-width: 560px;
  color: var(--text);
  font-size: 20px;
}

.signup,
.signup__fields {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.signup {
  max-width: 520px;
}

.signup__label {
  font-size: 14px;
  font-weight: 600;
}

.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.signup__row input {
  flex: 1 1 220px;
  min-width: 0;
  height: 56px;
  padding: 0 20px;
  border: 1px solid #818cf8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.signup__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 18px;
  margin: 0;
  padding: 0;
  border: 0;
}

.signup__who legend {
  float: left;
  margin-right: 18px;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 44px;
}

.signup__who label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 15px;
}

.signup__who input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--indigo);
}

.signup__note {
  color: var(--muted);
  font-size: 13px;
}

.signup__trap {
  position: absolute;
  left: -9999px;
}

.signup__done {
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--tint);
  font-weight: 700;
}

.signup__error {
  font-weight: 600;
}

/**
 * Video
 */
.video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
  max-width: 920px;
  margin-inline: auto;
}

.video h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-align: center;
}

/*
 * The film is the block: it brings its own ground, which no colour of the page
 * matches, so nothing is laid around it. The still image shows until the film
 * plays, and stays if it never does.
 */
.film {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 36px;
  background: #eef1f7 url("film/poster-16x9.webp") center / cover no-repeat;
}

.film video {
  display: block;
  width: 100%;
  height: 100%;
}

/* Same width as the `media` of the film's first source. */
@media (max-width: 700px) {
  .film {
    max-width: 340px;
    aspect-ratio: 9 / 16;
    background-image: url("film/poster-9x16.webp");
  }
}

/**
 * Miniatures: the paper sheet and what an exercise looks like
 */
.paper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 44%;
  aspect-ratio: 210 / 297;
  margin-right: -12%;
  padding: 6% 5%;
  overflow: hidden;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgb(49 46 129 / 0.16);
  font-size: 7.5px;
  line-height: 1.3;
  transform: rotate(-6deg);
}

.paper i {
  display: block;
  flex: none;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}

.paper i.h {
  height: 6px;
  background: var(--line-strong);
}

.paper--small {
  width: 78px;
  height: 104px;
  aspect-ratio: auto;
  margin: 0;
  padding: 12px 10px;
}

.kicker {
  color: var(--indigo-deep);
  font-size: 11px;
  font-weight: 700;
}

.q {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.choices {
  display: flex;
  gap: 8px;
}

.choice {
  flex: 1;
  padding: 8px 0;
  border: 2px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.choice--picked {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 700;
}

/**
 * The problem and the answer
 */
.changes {
  margin-top: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 64px;
}

.split__head {
  display: flex;
  flex: 1 1 300px;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.split__body {
  display: flex;
  flex: 2 1 520px;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.point {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.3;
}

.point strong {
  color: var(--ink);
  font-weight: 800;
}

/**
 * The child's journey
 */
.journey {
  background: var(--tint);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 48px;
  padding: clamp(24px, 3.6vw, 44px);
  border-radius: 32px;
  background: #ffffff;
}

.step:nth-child(even) {
  flex-direction: row-reverse;
}

.step__text {
  display: flex;
  flex: 1.2 1 380px;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.step__title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.step__title span {
  color: var(--indigo);
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
}

.checks li {
  position: relative;
  padding-left: 28px;
}

.checks li::before {
  position: absolute;
  top: 0.3em;
  left: 0;
  width: 18px;
  height: 18px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / contain no-repeat;
  content: "";
}

.step__mini {
  display: flex;
  flex: 1 1 300px;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 220px;
  padding: 24px;
  border-radius: 24px;
  background: var(--tint);
}

.step__mini--center {
  align-items: center;
  gap: 18px;
}

.shot {
  display: flex;
  align-items: flex-end;
}

.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -14px;
  border-radius: 50%;
  background: var(--indigo);
  color: #ffffff;
  animation: bob 2.6s ease-in-out infinite;
}

.badge svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.typed {
  width: 100%;
  max-width: 300px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 16px;
  margin-left: 3px;
  background: var(--indigo);
  vertical-align: -3px;
  animation: blink 1s steps(1) infinite;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
}

.row b {
  color: var(--indigo);
  font-size: 13px;
  font-weight: 800;
}

.row i {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #a5b4fc;
}

.grow {
  transform-origin: left;
  animation: grow 4s ease-out infinite backwards;
}

.grow--2 {
  animation-delay: 0.3s;
}

.grow--3 {
  animation-delay: 0.6s;
}

.bubble {
  align-self: flex-start;
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 18px 18px 18px 4px;
  background: #ffffff;
  font-size: 15px;
}

.bubble--ask {
  align-self: flex-end;
  border-radius: 18px 18px 4px 18px;
  background: var(--indigo);
  color: #ffffff;
  font-weight: 600;
}

.bubble--typing {
  display: flex;
  gap: 6px;
  padding: 14px 16px;
}

.bubble--typing i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--indigo);
  animation: dot 1.4s infinite;
}

.bubble--typing i:nth-child(2) {
  animation-delay: 0.2s;
}

.bubble--typing i:nth-child(3) {
  animation-delay: 0.4s;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
}

.reveal {
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--indigo);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.4;
  animation: reveal 6s infinite;
}

.gauge {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.gauge span {
  height: 8px;
  border-radius: 4px;
  background: #ffffff;
}

.gauge i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--indigo);
}

/**
 * Subjects and exercises
 */
.shelves {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.shelf {
  display: flex;
  flex: 1 1 340px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: clamp(24px, 3vw, 32px);
  border-radius: 28px;
  background: var(--line);
}

.shelf--violet {
  background: var(--violet-tint);
}

.shelf--rose {
  background: var(--rose-tint);
}

.shelf h3 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.shelf p {
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chips li {
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

/**
 * What the AI brings
 */
.ai {
  border-top: 1px solid var(--line);
}

.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.tile {
  display: flex;
  flex: 1 1 230px;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 28px;
  border-radius: 28px;
  background: var(--line);
}

.tile:nth-child(2) {
  background: var(--violet-tint);
}

.tile:nth-child(3) {
  background: var(--rose-tint);
}

.tile .icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
}

.tile .icon svg {
  width: 24px;
  height: 24px;
}

.tile h3 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tile p {
  color: var(--text);
}

/**
 * Author and footer
 */
.author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 28px;
  background: var(--violet-tint);
}

.author__text {
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.author__text h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.author__text p {
  color: var(--text);
  font-size: 17px;
}

.site-footer {
  margin-top: clamp(28px, 4vw, 44px);
  padding-block: 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/**
 * Motions
 */
/*
 * One word of 4: in from below, held, out by the top, then parked out of
 * sight. Coming in and going out take the same time on the same curve, so the
 * word leaving and the one arriving move as a single strip, never overlapping.
 */
@keyframes swap {
  0% {
    opacity: 1;
    translate: 0 1.7em;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }

  6%,
  25% {
    opacity: 1;
    translate: 0 0;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }

  31% {
    opacity: 1;
    translate: 0 -1.7em;
  }

  31.01%,
  100% {
    opacity: 0;
    translate: 0 -1.7em;
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes dot {
  0%,
  60%,
  100% {
    opacity: 0.25;
  }

  30% {
    opacity: 1;
  }
}

@keyframes reveal {
  0%,
  30% {
    opacity: 0;
  }

  42%,
  90% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 -6px;
  }

  50% {
    translate: 0 4px;
  }
}

@keyframes grow {
  0% {
    transform: scaleX(0.12);
  }

  55%,
  100% {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .badge,
  .caret,
  .grow,
  .bubble--typing i,
  .reveal,
  .swap span {
    animation: none;
  }
}

/**
 * Last, so that `hidden` wins over the `display` a class sets on the same
 * element (the sign-up fields).
 */
[hidden] {
  display: none;
}
