/* The web page's look, taken from the app: warm paper, white sheets, rounded type, six pastel tints, very light shadows.
   The only strong color on the page is what a visitor colors in. */

@font-face {
  font-family: "Zen Maru Gothic";
  src: url("fonts/zen-maru-gothic-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Zen Maru Gothic";
  src: url("fonts/zen-maru-gothic-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #fbf8f3;
  --sheet: #ffffff;
  --ink: #3d3d4a;
  --ink-soft: #6b6b77;
  --accent: #8fa8f0;
  --peach: #ffe3d4;
  --butter: #fff2c9;
  --mint: #d9f2e3;
  --sky: #d9edfa;
  --lilac: #e8e0f7;
  --rose: #fadee6;
  --shadow: 0 1px 2px rgba(61, 61, 74, 0.04), 0 10px 30px rgba(61, 61, 74, 0.07);
  --wide: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 1.0625rem/1.6 "Zen Maru Gothic", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
}

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

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1 {
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 3.75rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; }

.lead { font-size: 1.1875rem; color: var(--ink-soft); max-width: 34em; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

/* The top and the bottom */

.top, main > section, footer {
  width: min(var(--wide), 100% - 48px);
  margin-inline: auto;
}

.top { padding: 28px 0 0; }

.name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}
.name img { border-radius: 22.5%; box-shadow: var(--shadow); }

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  padding: 40px 0 56px;
  border-top: 2px solid rgba(61, 61, 74, 0.08);
  color: var(--ink-soft);
}
footer .name { color: var(--ink); }
footer nav { display: flex; gap: 28px; margin-left: auto; }
footer nav a { text-underline-offset: 4px; }

/* The first screen: the words and the cards on the left, the page to color on the right */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 56px 72px;
  align-items: center;
  padding: 56px 0 104px;
}

.pitch .lead { margin-top: 24px; }

.soon {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--butter);
  font-weight: 700;
}

.made-from { margin-top: 64px; }
.made-from > p { color: var(--ink-soft); }

.cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  max-width: 560px;
}
.cards li {
  padding: 8px 6px 10px;
  border-radius: 18px;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.25;
}
.cards li:nth-child(1) { background: var(--mint); }
.cards li:nth-child(2) { background: var(--peach); }
.cards li:nth-child(3) { background: var(--lilac); }
.cards li:nth-child(4) { background: var(--butter); }
.cards li:nth-child(5) { background: var(--sky); }
.cards li:nth-child(6) { background: var(--rose); }
.cards img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 13px;
  background: var(--sheet);
  margin-bottom: 8px;
}

button { font: inherit; color: inherit; cursor: pointer; }

.soft {
  margin-top: 24px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--sheet);
  box-shadow: var(--shadow);
  font-weight: 700;
}
.soft:active, .round:active { transform: scale(0.97); }

.sheet {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--sheet);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  touch-action: manipulation;
  cursor: pointer;
}
.sheet canvas, .sheet img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sheet img { mix-blend-mode: multiply; pointer-events: none; user-select: none; -webkit-user-select: none; }

.tray {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.crayons {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  padding: 12px;
  border-radius: 28px;
  background: var(--sheet);
  box-shadow: var(--shadow);
}
.crayons button {
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(61, 61, 74, 0.08);
}
.crayons button[aria-checked="true"] {
  box-shadow: 0 0 0 3px var(--sheet), 0 0 0 5.5px rgba(61, 61, 74, 0.55);
}
.round {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--sheet);
  box-shadow: var(--shadow);
}
.round:disabled { opacity: 0.4; cursor: default; }

.hint { margin-top: 14px; text-align: center; color: var(--ink-soft); }

/* How it works */

.steps { padding-bottom: 112px; }
.steps ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  margin-top: 48px;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps img {
  width: min(100%, 280px);
  border-radius: 36px;
  box-shadow: var(--shadow);
}
.steps h3 { margin-top: 28px; }
.steps h3::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.75em;
  height: 1.75em;
  margin-right: 0.55em;
  border-radius: 50%;
  background: var(--lilac);
  font-size: 0.85em;
}
.steps li:nth-child(2) h3::before { background: var(--mint); }
.steps li:nth-child(3) h3::before { background: var(--peach); }
.steps p { margin-top: 10px; color: var(--ink-soft); max-width: 30em; }

/* More pages */

.more { padding-bottom: 112px; }
.more .lead { margin-top: 16px; }
.more ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 28px;
  margin-top: 48px;
}
.more img { border-radius: 14px; background: var(--sheet); box-shadow: var(--shadow); }
.more span { display: block; margin-top: 12px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-soft); }

/* The facts */

.facts { padding-bottom: 112px; }
.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  margin-top: 40px;
}
.columns ul { margin-top: 14px; }
.columns li { padding: 12px 0; border-top: 2px solid rgba(61, 61, 74, 0.08); color: var(--ink-soft); }

/* The price */

.price { padding-bottom: 120px; }
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 40px;
  max-width: 820px;
}
.plan { padding: 32px; border-radius: 28px; background: var(--sky); }
.plan + .plan { background: var(--rose); }
.plan .pages { margin-top: 8px; font-size: 1.5rem; line-height: 1.25; font-weight: 700; }
.plan p:last-child { margin-top: 12px; }

/* Smaller screens */

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 32px 0 80px; gap: 40px; }
  .made-from { margin-top: 44px; }
  .desk { max-width: 440px; width: 100%; margin-inline: auto; }
  .steps ol { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .more ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .columns { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .steps, .more, .facts { padding-bottom: 80px; }
  .price { padding-bottom: 88px; }
}

@media (max-width: 520px) {
  .top, main > section, footer { width: calc(100% - 40px); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards li { font-size: 0.875rem; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .crayons { gap: 6px; padding: 10px; }
  footer nav { margin-left: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .soft, .round { transition: transform 0.12s ease; }
  .sheet img, .cards { transition: opacity 0.2s ease; }
  .swapping .sheet img, .swapping .sheet canvas, .swapping .cards { opacity: 0; }
}
