/* The website around the app: start page, account, imprint and privacy notice.
   (The app itself has app.css.)

   The look in a few lines: a picture book for the classroom wall. Warm paper, dark pencil,
   one colour for what leads on (the petrol of the app's buttons). The pictures of the
   scenes carry the colour; everything around them keeps quiet. Sizes sit on a grid of 4px. */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/figtree.woff2') format('woff2');
}

/* Only for headlines: the cut of the typeface that is drawn for large sizes. */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/newsreader-display.woff2') format('woff2');
}

:root {
  --page: #f7f4ee;
  --card: #fdfbf7;
  --raised: #efe9df;
  --text: #1f1b16;
  --text-2: #5e554a;
  --text-3: #7b7266;
  --line: rgba(31, 27, 22, 0.1);
  --line-strong: rgba(31, 27, 22, 0.2);
  /* What leads on. As a fill it carries white text; as text on paper it is the darker one. */
  --accent: #0d827b;
  --accent-deep: #09665f;
  --danger: #b3361f;
  --danger-soft: #f6e4dc;
  --sans: 'Figtree', 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --width: 1200px;
  --edge: 24px;
  --shadow-small: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: min(var(--width), 100% - 2 * var(--edge));
  margin-inline: auto;
}

/* ---- Buttons and links --------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  background: var(--accent);
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}

.button:hover {
  background: var(--accent-deep);
}

.button:active {
  transform: scale(0.98);
}

.button:disabled {
  cursor: default;
  opacity: 0.6;
}

.button--small {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 15px;
}

.button--wide {
  width: 100%;
}

/* For what is not the main thing to do. */
.button--quiet {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: var(--card);
}

.button--quiet:hover {
  background: var(--raised);
}

.button--danger {
  background: var(--danger);
}

.button--danger:hover {
  background: #8f2a17;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  color: var(--accent-deep);
  background: none;
  transition: text-decoration-color 150ms var(--ease);
}

.link:hover {
  text-decoration-color: currentColor;
}

.link:disabled {
  cursor: default;
  opacity: 0.6;
}

/* ---- Top of every page --------------------------------------------------------------- */

.top {
  position: sticky;
  z-index: 5;
  top: 0;
  border-bottom: 1px solid transparent;
  background: var(--page);
  transition: border-color 200ms var(--ease);
}

/* Once the page has moved under it, a line sets it apart. See site.js. */
.top.is-over {
  border-bottom-color: var(--line);
}

.top__row {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}

.nav a,
.top__login {
  text-decoration: none;
  color: var(--text-2);
  transition: color 150ms var(--ease);
}

.nav a:hover,
.top__login:hover {
  color: var(--text);
}

.top__login {
  font-size: 15px;
}

/* On phones the links fold into one button. */
.menu {
  display: none;
  position: relative;
}

.menu summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  list-style: none;
  cursor: pointer;
}

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

.menu[open] summary {
  background: var(--raised);
}

.menu__list {
  position: absolute;
  top: 44px;
  right: 0;
  display: grid;
  width: 208px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.menu__list a {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 15px;
  text-decoration: none;
}

.menu__list a:hover {
  background: var(--raised);
}

/* ---- First screen -------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: center;
  /* Fills the window under the top row, so that the first screen reads as one picture. */
  min-height: min(calc(100svh - 64px), 820px);
  padding-block: 48px 64px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 34rem;
  margin-top: 24px;
  font-size: 20px;
  line-height: 30px;
  color: var(--text-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}

.hero__note {
  margin-top: 20px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-3);
}

/* The Wichtellabor as it fills up during a quiet lesson: real pictures of the app, and
   under them the level meter of the app as the handle that moves through the lesson. */
.stage {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.stage__pictures {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #2b2019;
}

.stage__pictures img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 400ms var(--ease);
}

.stage__pictures img.is-shown {
  opacity: 1;
}

.stage__control {
  display: grid;
  gap: 12px;
  padding: 16px 12px 8px;
}

/* Without scripts there is one picture and nothing to move. */
html:not(.js) .stage__control {
  display: none;
}

.stage__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  font-size: 14px;
  line-height: 20px;
}

.stage__head label {
  font-weight: 500;
}

.stage__head output {
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}

.meter {
  position: relative;
  height: 32px;
}

.meter__bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
}

.meter__bars i {
  flex: 1;
  border-radius: 2px;
  background: var(--raised);
  transition: background-color 200ms var(--ease);
}

.meter__bars i.is-lit {
  background: var(--accent);
}

/* The real control lies over the bars: it can be dragged, tapped and moved by keyboard. */
.meter input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  background: none;
  appearance: none;
  -webkit-appearance: none;
}

.meter input::-webkit-slider-runnable-track {
  height: 32px;
  background: none;
}

.meter input::-moz-range-track {
  height: 32px;
  background: none;
}

.meter input::-webkit-slider-thumb {
  width: 20px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: var(--text);
  box-shadow: 0 0 0 3px var(--card);
  -webkit-appearance: none;
}

.meter input::-moz-range-thumb {
  width: 20px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: var(--text);
  box-shadow: 0 0 0 3px var(--card);
}

.meter input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ---- Sections ------------------------------------------------------------------------ */

.section {
  padding-block: 96px;
  border-top: 1px solid var(--line);
}

.section h2,
.closing h2,
.page h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section__lead {
  max-width: 36rem;
  margin-top: 16px;
  font-size: 18px;
  line-height: 28px;
  color: var(--text-2);
}

.section p + p {
  margin-top: 16px;
}

/* A heading on the left, what belongs to it on the right. */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px 64px;
  align-items: start;
}

.pair__text p {
  max-width: 34rem;
  color: var(--text-2);
}

.pair__text h2 + p {
  margin-top: 20px;
}

/* Rows with a hairline between them: steps, features, prices, questions. */
.rows > * {
  padding-block: 20px;
  border-top: 1px solid var(--line);
}

.rows > :first-child {
  padding-top: 4px;
  border-top: 0;
}

.rows > :last-child {
  padding-bottom: 0;
}

.rows h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.rows p,
.rows dd {
  margin-top: 4px;
  color: var(--text-2);
}

.steps > li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
}

.steps__number {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 24px;
  color: var(--text-3);
}

.facts > div {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 4px 24px;
}

.facts dt {
  font-weight: 600;
}

.facts dd {
  margin-top: 0;
}

/* ---- The scenes ---------------------------------------------------------------------- */

.scenes {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 48px;
}

.scenes__list {
  display: grid;
  gap: 2px;
}

.scenes__list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 16px;
  text-align: left;
  color: var(--text-2);
  background: none;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}

.scenes__list button:hover {
  color: var(--text);
  background: var(--raised);
}

.scenes__list button[aria-selected='true'] {
  border-color: var(--line);
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  box-shadow: var(--shadow-small);
}

.scenes__list small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
}

.scene img {
  width: 100%;
  border-radius: 12px;
  background: var(--raised);
}

.scene h3 {
  margin-top: 20px;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.scene p {
  max-width: 44rem;
  margin-top: 4px;
  color: var(--text-2);
}

/* With scripts one scene shows at a time; without, they stand one below the other. */
.js .scenes .scene:not(.is-shown) {
  display: none;
}

html:not(.js) .scenes {
  display: block;
}

html:not(.js) .scenes__list {
  display: none;
}

html:not(.js) .scene + .scene {
  margin-top: 48px;
}

.timers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
}

/* ---- Prices -------------------------------------------------------------------------- */

.prices > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: baseline;
}

.prices p {
  grid-column: 1;
  margin-top: 0;
}

.prices strong {
  grid-row: 1;
  grid-column: 2;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.prices strong small {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
}

.notes {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-3);
}

.notes p + p {
  margin-top: 0;
}

/* What the first year of the subscription costs, added up like a receipt. */
.bill {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-small);
  font-variant-numeric: tabular-nums;
}

.bill h3 {
  font-size: 17px;
  font-weight: 600;
}

.bill__pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  color: var(--text-2);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--raised);
}

.stepper button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  transition: background-color 150ms var(--ease);
}

.stepper button:hover {
  background: var(--page);
}

.stepper button:disabled {
  cursor: default;
  opacity: 0.4;
}

.stepper output {
  min-width: 32px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
}

.bill__lines {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.bill__lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-2);
}

.bill__lines .bill__sum {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  color: var(--text);
}

.bill__after {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  text-align: right;
  color: var(--text-3);
}

/* ---- Questions ----------------------------------------------------------------------- */

.faq details {
  padding-block: 0;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  font-size: 17px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq details:first-child summary {
  padding-top: 4px;
}

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

.faq summary .icon {
  color: var(--text-3);
  transition: transform 200ms var(--ease);
}

.faq details[open] summary .icon {
  transform: rotate(180deg);
}

.faq details p {
  max-width: 40rem;
  margin-top: 0;
  padding-bottom: 24px;
}

/* ---- The last word, and the foot of every page ---------------------------------------- */

.closing {
  padding-block: 96px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.closing p {
  margin-top: 16px;
  font-size: 18px;
  line-height: 28px;
  color: var(--text-2);
}

.closing .button {
  margin-top: 32px;
}

.foot {
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2);
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.foot a {
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.foot a:hover {
  color: var(--text);
}

/* ---- Pages of text: imprint, privacy notice -------------------------------------------- */

.page {
  padding-block: 64px 96px;
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin-top: 48px;
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.prose h3 {
  margin-top: 32px;
  font-size: 17px;
  font-weight: 600;
}

.prose p,
.prose ul,
.prose address {
  margin-top: 12px;
  font-style: normal;
  color: var(--text-2);
}

.prose h1 + p {
  margin-top: 16px;
  color: var(--text-3);
}

.prose ul {
  padding-left: 20px;
  list-style: disc;
}

.prose li + li {
  margin-top: 4px;
}

.prose a {
  color: var(--accent-deep);
  text-underline-offset: 3px;
}

/* ---- The account ----------------------------------------------------------------------- */

.account {
  width: min(480px, 100%);
  margin-inline: auto;
}

.account > p {
  margin-top: 12px;
  color: var(--text-2);
}

.panel {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-small);
}

.panel + .panel {
  margin-top: 16px;
}

.panel h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.panel > p {
  margin-top: 4px;
  color: var(--text-2);
}

.panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel__row > :first-child {
  min-width: 0;
}

.panel__row strong {
  display: block;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

.panel__row span {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-3);
}

.owned {
  margin-top: 16px;
  font-variant-numeric: tabular-nums;
}

.owned li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}

.owned li span:last-child {
  color: var(--text-2);
}

.owned small {
  display: block;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-3);
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 20px;
}

.panel details summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-2);
}

.panel details[open] summary {
  color: var(--text);
}

.panel details > :not(summary) {
  margin-top: 16px;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.status {
  margin-top: 16px;
  font-size: 15px;
  color: var(--text-2);
}

/* Signing in: see ../js/authform.js. */
.auth {
  display: grid;
  gap: 16px;
}

.auth__field,
.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.auth__field input,
.field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 400;
  background: #fff;
  transition: border-color 150ms var(--ease);
}

.auth__field input:hover,
.field input:hover {
  border-color: var(--text-3);
}

.auth__field input:focus-visible,
.field input:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-radius: 10px;
}

.auth__tip,
.field small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
}

.auth__error,
.form__error {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--danger);
  background: var(--danger-soft);
}

.auth .link {
  justify-self: center;
  font-size: 15px;
}

.auth__turn {
  font-size: 15px;
  text-align: center;
  color: var(--text-2);
}

.auth__turn .link {
  display: inline;
}

.auth--sent {
  gap: 8px;
  justify-items: start;
}

.auth--sent strong {
  font-size: 17px;
  font-weight: 600;
}

.auth--sent p {
  color: var(--text-2);
}

.auth--sent .link {
  justify-self: start;
  margin-top: 8px;
}

/* ---- Coming in, once ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .hero__text,
  .hero .stage {
    animation: arrive 500ms var(--ease) both;
  }

  .hero .stage {
    animation-delay: 60ms;
  }

  html {
    scroll-behavior: smooth;
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ---- Smaller windows ------------------------------------------------------------------ */

@media (max-width: 1040px) {
  .nav {
    display: none;
  }

  .menu {
    display: block;
  }

  .top__row {
    gap: 16px;
  }
}

@media (max-width: 900px) {
  :root {
    --edge: 20px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    min-height: 0;
    padding-block: 40px 64px;
  }

  .hero__lead {
    margin-top: 16px;
    font-size: 18px;
    line-height: 28px;
  }

  .hero__actions {
    margin-top: 24px;
  }

  .section,
  .closing {
    padding-block: 64px;
  }

  .pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .scenes {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 32px;
  }

  /* The names of the scenes in one row that can be pushed sideways. */
  .scenes__list {
    display: flex;
    gap: 4px;
    margin-inline: calc(-1 * var(--edge));
    padding: 2px var(--edge);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .scenes__list::-webkit-scrollbar {
    display: none;
  }

  .scenes__list button {
    flex: none;
    gap: 8px;
    width: auto;
  }

  .timers {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 32px;
  }

  .facts > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .page {
    padding-block: 40px 64px;
  }
}

@media (max-width: 480px) {
  .top__login {
    display: none;
  }

  .stage__control {
    padding-inline: 8px;
  }

  .meter__bars {
    gap: 2px;
  }

  .panel {
    padding: 20px;
  }
}
