/* Home: intro on graph paper, reading list, four abilities, principles, newsletter band. */

.intro {
  position: relative;
  overflow: hidden;
  background-color: var(--ivory);
  background-image: linear-gradient(rgb(36 26 38 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgb(36 26 38 / 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 2px solid var(--ink);
}

.intro__grid {
  display: grid;
  gap: var(--s-4);
  padding-block: var(--s-4) var(--section);
}

.intro__copy > * {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.intro__copy > :nth-child(2) {
  animation-delay: 0.08s;
}

.intro__copy > :nth-child(3) {
  animation-delay: 0.16s;
}

.intro__copy > :nth-child(4) {
  animation-delay: 0.24s;
}

.intro__copy > :nth-child(5) {
  animation-delay: 0.32s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
}

.intro__title {
  margin-bottom: var(--s-3);
  max-width: 15ch;
  font-size: var(--fs-hero);
  line-height: 1;
  letter-spacing: -0.04em;
}

.intro__lead {
  margin-bottom: var(--s-2);
  max-width: 36rem;
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: 1.5;
}

.intro__text {
  max-width: 36rem;
  color: var(--ink-soft);
}

.intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

.intro__figure {
  position: relative;
  justify-self: center;
  margin-right: 10px;
  width: 100%;
  max-width: 34rem;
  animation: rise 0.9s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.intro__figure picture {
  overflow: hidden;
  background-color: var(--sand);
  border: 2px solid var(--ink);
  border-radius: var(--radius-l);
  box-shadow: 10px 10px 0 var(--brick);
}

.intro__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Measuring scale under the hero photo: four labelled ticks, filled in one after another. */
.scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: var(--s-3);
  list-style: none;
  border-top: 2px solid var(--ink);
}

.scale__step {
  position: relative;
  padding-top: 0.85rem;
  font-family: var(--ff-head);
  font-size: clamp(0.6875rem, 0.6rem + 0.35vw, 0.8125rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.scale__step::before {
  position: absolute;
  top: -2px;
  left: 0;
  width: 2px;
  height: 0.6rem;
  content: "";
  background-color: var(--ink);
}

.scale__step::after {
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  content: "";
  background-color: var(--brick);
  transform: scaleX(0);
  transform-origin: left center;
  animation: fill 0.6s ease-out forwards;
}

.scale__step:nth-child(1)::after {
  animation-delay: 0.6s;
}

.scale__step:nth-child(2)::after {
  animation-delay: 1s;
}

.scale__step:nth-child(3)::after {
  animation-delay: 1.4s;
}

.scale__step:nth-child(4)::after {
  animation-delay: 1.8s;
}

@keyframes fill {
  to {
    transform: scaleX(1);
  }
}

@media (min-width: 64em) {
  .intro__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--s-5);
    padding-block: var(--section);
  }
}

/* Reading list */

.reading__grid {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-3);
}

@media (min-width: 40em) {
  .reading__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .reading__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Abilities */

.abilities {
  padding-top: 0;
}

.abilities__list {
  display: grid;
  gap: var(--s-3);
  list-style: none;
}

@media (min-width: 40em) {
  .abilities__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .abilities__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Principles */

.principles {
  color: var(--on-plum);
  background-color: var(--plum);
}

.principles__grid {
  display: grid;
  gap: var(--s-4);
}

.principles__title {
  font-size: var(--fs-h2);
  color: var(--white);
}

.principles__list {
  display: grid;
  gap: var(--s-3);
  list-style: none;
  counter-reset: principle;
}

.principle {
  position: relative;
  padding: var(--s-3) 0 0 4.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.18);
  counter-increment: principle;
}

.principle::before {
  position: absolute;
  top: var(--s-3);
  left: 0;
  font-family: var(--ff-head);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--saffron);
  content: counter(principle, decimal-leading-zero);
}

.principle__title {
  margin-bottom: 0.4rem;
  font-size: var(--fs-h3);
  color: var(--white);
}

.principle__text {
  color: var(--on-plum-soft);
}

@media (min-width: 64em) {
  .principles__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--s-5);
  }

  .principles__head {
    position: sticky;
    top: calc(var(--topbar-h) + var(--s-4));
    align-self: start;
  }
}

/* Newsletter band */

.optin-band {
  padding-block: var(--section);
  background-color: var(--saffron);
  background-image: radial-gradient(rgb(36 26 38 / 0.12) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  border-top: 2px solid var(--ink);
}
