/*
 * The home page only. Builds on style.css (colours, type, header, footer)
 * and stays within its rules: no web fonts, no scripts, nothing loaded from
 * elsewhere. Colours come from the tokens in style.css, so dark mode follows
 * without a second set of rules - except the phone frame, which is dark in
 * both themes.
 */

.landing main,
.landing header,
.landing footer {
  max-width: 64rem;
}

.landing section {
  margin: 4.5rem 0;
}

.section-title {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 1.75rem;
}

.landing h3 {
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  margin-top: 3rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.12;
  margin: 0.75rem 0 1rem;
}

.badge {
  display: inline-block;
  margin: 0;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.checks li {
  position: relative;
  padding-left: 1.9rem;
  margin: 0.55rem 0;
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3rem;
  text-align: center;
}

/* --- Phone frame -------------------------------------------------------- */

.phone {
  margin: 0 auto;
  width: 100%;
  max-width: 17rem;
  padding: 0.6rem;
  border-radius: 2.2rem;
  /* A phone is dark in both themes; the text colour would turn it light. */
  background: #1f2226;
  box-shadow: 0 1.5rem 3rem -1rem rgba(0, 0, 0, 0.35);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.7rem;
}

.hero-phone {
  max-width: 19rem;
  transform: rotate(2deg);
}

/* --- Steps -------------------------------------------------------------- */

.step {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 3rem;
  align-items: center;
  margin: 3rem 0;
}

.step:nth-of-type(even) {
  grid-template-columns: 1fr 15rem;
}

.step:nth-of-type(even) .phone {
  order: 2;
}

.step .phone {
  max-width: 15rem;
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  margin: 0 0 0.75rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--paper);
  font-weight: 700;
}

.step p:not(.step-no) {
  color: var(--ink-quiet);
  font-size: 1.05rem;
}

/* --- Cards and plans ---------------------------------------------------- */

.cards,
.plans {
  display: grid;
  gap: 1.25rem;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.plans {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  max-width: 44rem;
}

.card,
.plan {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--brand) 4%, var(--paper));
}

.card p {
  margin: 0;
  color: var(--ink-quiet);
}

.plan ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
}

.plan-pro {
  border-color: var(--brand);
}

.plan-note {
  margin: 0.75rem 0 0;
  color: var(--ink-quiet);
  font-size: 0.9rem;
}

/* --- Closing ------------------------------------------------------------ */

.fair {
  padding: 2rem 2.25rem;
  border-radius: 1.25rem;
  background: color-mix(in srgb, var(--brand) 9%, var(--paper));
}

.fair .section-title {
  margin-bottom: 0.5rem;
}

.soon {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--line);
}

.soon h2 {
  margin-top: 0;
}

/* --- Narrow screens ----------------------------------------------------- */

@media (max-width: 44rem) {
  .hero,
  .step,
  .step:nth-of-type(even) {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .step:nth-of-type(even) .phone {
    order: 0;
  }

  .hero-phone {
    max-width: 15rem;
    transform: none;
  }

  .step .phone {
    max-width: 13rem;
  }

  .landing section {
    margin: 3rem 0;
  }

  .fair {
    padding: 1.5rem;
  }
}
