/* chalkday.com's home page. Builds on style.css (tokens, fonts, the tally mark and tile). */

.landing {
  --wide: 1120px;
  --gutter: 20px;
  --soft: color-mix(in srgb, var(--surface) 70%, var(--bg));
  --hue-rose: #b23a6a;
  --hue-moss: #4b7d36;
  font-size: 1.0625rem;
}

@media (prefers-color-scheme: dark) {
  .landing {
    --hue-rose: #e57aa3;
    --hue-moss: #86c06a;
  }
}

.landing h1,
.landing h2,
.landing h3 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.landing p {
  margin: 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--on-ink);
}

.skip:focus {
  left: 8px;
}

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 10px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top-links {
  display: none;
  gap: 22px;
  margin-left: auto;
}

.top-links a,
.foot nav a {
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text2);
}

.top-links a:hover,
.foot nav a:hover {
  color: var(--text);
}

.get {
  margin-left: auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.get:hover {
  color: var(--on-ink);
  opacity: 0.88;
}

@media (min-width: 820px) {
  .top-links {
    display: flex;
  }

  .get {
    margin-left: 6px;
  }
}

/* Sections */

main > section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 56px var(--gutter);
}

.eyebrow {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.landing h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.section-lede {
  margin-top: 12px;
  color: var(--text2);
  font-size: 1.15rem;
  max-width: 36rem;
}

/* The phone images: the app's own screens in their frame. The corners outside the frame are
   clipped so they never show on the dark page. */
.phone {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 13% / 6.2%;
  filter: drop-shadow(0 30px 40px rgba(52, 38, 22, 0.18));
}

/* Hero */

.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-top: 32px;
}

.hero h1 {
  font-size: clamp(2.9rem, 9vw, 5rem);
  letter-spacing: -0.035em;
}

.lede {
  margin-top: 18px;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.5;
  color: var(--text2);
  max-width: 34rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
}

.cta .store img,
.end .store img {
  display: block;
  width: 156px;
  height: 52px;
}

.cta-note {
  color: var(--text2);
  font-weight: 700;
  font-size: 0.95rem;
}

.hero-phone {
  display: flex;
  justify-content: center;
}

.hero-phone .phone {
  max-width: 340px;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    padding-top: 56px;
  }
}

/* How it works */

.steps-grid {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.steps-grid li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 900;
  margin-bottom: 14px;
}

.steps-grid h3,
.cards h3,
.plan h3 {
  font-size: 1.3rem;
}

.steps-grid p,
.cards p {
  margin-top: 8px;
  color: var(--text2);
}

@media (min-width: 760px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Features */

.feature {
  display: grid;
  gap: 36px;
  align-items: center;
  justify-items: center;
}

.feature-text {
  max-width: 34rem;
  justify-self: start;
}

.feature-text > p:not(.eyebrow) {
  margin-top: 16px;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text2);
}

.ticks {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  font-weight: 700;
}

/* A small chalk check before each line. */
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--hue-moss) 16%, transparent);
}

.ticks li::after {
  content: '';
  position: absolute;
  left: 5px;
  top: calc(0.32em + 4px);
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--hue-moss);
  border-bottom: 2px solid var(--hue-moss);
  transform: rotate(-45deg);
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .feature .phone {
    justify-self: center;
  }

  .feature.flip .feature-text {
    order: 2;
  }
}

/* Small things that help */

.cards {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.cards li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.ico {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 14px;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Plus */

.plans {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.plan-plus {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}

.plan-plus h3 {
  color: var(--on-ink);
}

.plan-note {
  margin-top: 18px;
  font-size: 0.95rem;
  opacity: 0.75;
}

@media (min-width: 760px) {
  .plans {
    grid-template-columns: 1fr 1fr;
  }
}

/* Questions */

.faq h2 {
  margin-bottom: 20px;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 4px 0;
  max-width: 46rem;
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  font-weight: 800;
  font-size: 1.15rem;
}

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

.faq summary::after {
  content: '+';
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text2);
  transition: transform 0.2s;
}

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

.faq details p {
  padding: 0 0 18px;
  color: var(--text2);
  max-width: 40rem;
}

/* Last call */

.end {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding-bottom: 72px;
}

.end-tile {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  margin-bottom: 8px;
}

.end p {
  color: var(--text2);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

/* Footer */

.foot {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.foot-brand .tile {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
