/* Cheer Moves landing page. Colors are sampled from the Cheer Moves logo. */

:root {
  --blue: #2654ce;
  --blue-deep: #172c8b;
  --red: #c42f2d;
  --red-bright: #e93a3b;
  --white: #ffffff;
  --tint: #eef3ff;
  --ink: #0e1b4d;
  --ink-soft: #3c4879;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;

  --gutter: 20px;
  --measure: 34rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

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

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
  letter-spacing: -0.005em;
  max-width: 18ch;
}

h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
}

.section-lede {
  max-width: var(--measure);
  margin-top: 1rem;
  color: var(--ink-soft);
}

/* Button: white letters, red fill, white edge, the same stack as the logo lettering. */

.button {
  display: inline-block;
  padding: 0.95rem 1.5rem 1rem;
  border: 3px solid var(--white);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.375rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 0 rgba(10, 20, 70, 0.45);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  background: var(--red-bright);
}

.button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(10, 20, 70, 0.45);
}

.button:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 4px;
}

.button-on-light {
  border-color: var(--red);
  box-shadow: 0 6px 0 rgba(23, 44, 139, 0.25);
}

.button-on-light:focus-visible {
  outline-color: var(--blue-deep);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue) 45%, var(--blue-deep) 100%);
  color: var(--white);
}

/* On phones the ribbon stays in the lower part of the hero, behind the video,
   so it never runs under the white headline and paragraph. */
.hero-ribbon {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 30rem;
  pointer-events: none;
}

.ribbon-white {
  fill: var(--white);
  opacity: 0.92;
}

.ribbon-red {
  fill: var(--red-bright);
}

.hero-inner {
  position: relative;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

/* The app icon, square with iPhone-style corners. The image file already has
   transparent rounded corners at 22.37% of its width; the radius here matches
   so the white edge and the shadow follow the same curve. */
.logo-tile {
  width: 132px;
  border: 4px solid var(--white);
  border-radius: 25%;
  background: var(--white);
  transform: rotate(-3deg);
  box-shadow: 0 8px 0 rgba(10, 20, 70, 0.35);
  margin-bottom: 2rem;
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.9rem, 12.5vw, 5.25rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  max-width: 11ch;
  text-wrap: balance;
}

.hero-lede {
  max-width: var(--measure);
  margin-top: 1.25rem;
  font-size: 1.1875rem;
  line-height: 1.5;
}

/* The button and the line under it share one centered axis, so the note sits
   centered beneath the button at every screen width. */
.hero-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
  margin-top: 1.75rem;
  text-align: center;
}

.hero-note {
  margin-top: 1.1rem;
  font-weight: 500;
}

.hero-media {
  justify-self: center;
  width: min(100%, 19rem);
}

.phone-video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
  border: 6px solid var(--white);
  border-radius: 30px;
  box-shadow: 0 14px 0 rgba(10, 20, 70, 0.4);
}

/* Lessons */

.lessons {
  padding: 4rem 0 3.5rem;
}

.lesson-list {
  margin-top: 2.25rem;
  display: grid;
  gap: 0;
  border-top: 2px solid var(--ink);
}

.lesson-list li {
  position: relative;
  padding: 1.15rem 0 1.2rem 2.25rem;
  border-bottom: 1px solid rgba(14, 27, 77, 0.2);
}

/* Red star marker, borrowed from the stars on the Cheer Builder studio wall. */
.lesson-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.3rem;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--red);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.lesson-list p {
  margin-top: 0.2rem;
  color: var(--ink-soft);
}

/* Parents */

.parents {
  padding: 3.5rem 0 4rem;
  background: var(--blue-deep);
  color: var(--white);
}

/* This heading is a full sentence, so it gets a wider measure than the
   short section headings. */
.parents h2 {
  max-width: 26ch;
}

.parent-points {
  margin-top: 2.25rem;
  display: grid;
  gap: 2rem;
}

.parent-points p {
  margin-top: 0.4rem;
  max-width: 30rem;
  color: rgba(255, 255, 255, 0.88);
}

/* Steps */

.steps {
  padding: 4rem 0 4.5rem;
  background: var(--tint);
}

.step-list {
  margin: 2.25rem 0 2.5rem;
  display: grid;
  gap: 1.75rem;
  counter-reset: step;
}

.step-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 0.5rem;
}

.step-list li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--display);
  font-weight: 800;
  font-size: 4rem;
  line-height: 0.85;
  color: var(--red);
}

.step-list p {
  margin-top: 0.25rem;
  max-width: 30rem;
  color: var(--ink-soft);
}

/* Footer */

.site-footer {
  padding: 2.25rem 0 2.75rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
}

.site-footer p + p {
  margin-top: 0.5rem;
  max-width: 40rem;
}

/* Not-found page */

.not-found {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1.25rem;
  padding: 3rem var(--gutter);
  background: var(--blue);
  color: var(--white);
}

.not-found h1 {
  font-size: clamp(2.5rem, 9vw, 4rem);
  max-width: 14ch;
}

/* Wider screens */

@media (min-width: 720px) {
  .lesson-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }

  .parent-points {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
  }

  .logo-tile {
    width: 156px;
  }

  /* On wide screens the ribbon sweeps behind the video only, clear of the text column. */
  .hero-ribbon {
    left: 48%;
    bottom: -22%;
    width: 52%;
    height: 100%;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    align-items: center;
    gap: 3rem;
    padding-top: 2.5rem;
    padding-bottom: 5rem;
  }

  .hero-media {
    width: min(100%, 21rem);
    transform: rotate(2.5deg);
  }

  .step-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
