/* The home page. Tokens and base type come from site.css. */

.home {
  --measure: 68rem;
  --gutter: 16px;
}
.home > * {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
@media (min-width: 720px) {
  .home { --gutter: 32px; }
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
}
.top img { height: 40px; display: block; }
.top-link { font-weight: 600; text-decoration: none; }
.top-link:hover { text-decoration: underline; }

a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Hero */
.hero {
  display: grid;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 72px;
  align-items: center;
}
@media (min-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; padding-top: 72px; }
}
.hero h1 {
  font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  max-width: 18ch;
}

/* The correction, written on a ruled line the way a teacher would mark it. */
.slip {
  font-family: Literata, Georgia, serif;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem);
  line-height: 1.5;
  margin: 0 0 32px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  max-width: 34rem;
}
.slip .wrong {
  color: var(--red);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}
.slip .right {
  text-decoration: none;
  color: var(--blue);
  font-style: italic;
  font-weight: 600;
}
.lede { font-size: 1.125rem; max-width: 36rem; }
.availability { color: var(--pencil); margin-top: 20px; }

/* Played once: the slip is written, struck through, then fixed. */
@media (prefers-reduced-motion: no-preference) {
  .slip .wrong {
    animation: strike 0.5s ease-out 0.9s both;
  }
  .slip .right {
    display: inline-block;
    animation: fix 0.5s ease-out 1.5s both;
  }
  @keyframes strike {
    from { text-decoration-color: transparent; color: var(--ink); }
    to { text-decoration-color: var(--red); color: var(--red); }
  }
  @keyframes fix {
    from { opacity: 0; transform: translateY(0.3em); }
    to { opacity: 1; transform: none; }
  }
}

/* Screens: the app's own screenshots, framed lightly rather than in a device mock-up. */
.phone { margin: 0; }
.phone img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 28px;
  border: 1px solid var(--rule);
  background: #F4F7F9;
}
.hero-phone { justify-self: center; }
.hero-phone img { box-shadow: 0 24px 48px -24px rgb(23 34 45 / 0.35); }

/* Sections */
.home h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin: 0 0 8px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.home h3 {
  font-family: Literata, Georgia, serif;
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 0 0 10px;
}

/* The promo film: framed like the screenshots, loaded only when played. */
.film { padding-bottom: 72px; }
.film video {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 24px;
  border-radius: 16px;
  border: 1px solid var(--rule);
  background: #F4F7F9;
}
.film-summary { color: var(--pencil); font-size: 0.95rem; margin-top: 12px; }

.steps, .more { padding-bottom: 56px; }
.step, .pair {
  display: grid;
  gap: 24px;
  padding: 40px 0;
  align-items: center;
}
.step + .step, .pair + .pair { border-top: 1px solid var(--rule); }
.step .phone, .pair .phone { justify-self: center; }
.step .phone img, .pair .phone img { max-width: 260px; }
.step-text, .pair > div { max-width: 34rem; }
.step-no {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 14px;
}
@media (min-width: 760px) {
  .step, .pair { grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; }
  .step:nth-of-type(even) { grid-template-columns: 260px minmax(0, 1fr); }
  .step:nth-of-type(even) .step-text { order: 2; }
  .pair { grid-template-columns: 260px minmax(0, 1fr); }
}

.price { padding-bottom: 64px; }
.price-line {
  font-family: Literata, Georgia, serif;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.4;
  margin: 16px 0 16px;
}
.price-line strong { font-weight: 600; }
.price p:last-child { max-width: 38rem; }

.bottom {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  padding-bottom: 48px;
  color: var(--pencil);
  font-size: 0.95rem;
}
.bottom nav { display: flex; gap: 20px; margin-bottom: 8px; }
.bottom p { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
