/* Site layout: tokens only, local `lp-*` classes for layout, logical properties (style.md, quality.md).
   Type, cards, buttons and numbers come from the system classes (`at-web-*`, `at-card`, `at-bigstat`). */

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

body {
  overflow-wrap: anywhere;
  margin: 0;
  line-height: 1.5;
}

img,
video {
  display: block;
  max-inline-size: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}

main > *,
.lp-footer {
  padding-inline: var(--space-4);
}

main > * > *,
.lp-footer > * {
  max-inline-size: var(--size-content);
  margin-inline: auto;
}

.lp-manifesto > *,
.lp-science > *,
.lp-try > *,
.lp-how > *,
.lp-who > * {
  margin-block-end: var(--space-4);
}

/* The hero and the 404 page keep `data-theme="dark"` on the section: the logo has white letters. */
.lp-hero,
.lp-notfound {
  display: grid;
  position: relative;
  overflow: hidden;
  padding-block: var(--space-12) var(--space-8);
}

.lp-hero {
  gap: var(--space-12);
  justify-items: start;
}

.lp-notfound {
  min-block-size: 100svh;
}

.lp-notfound {
  align-content: center;
  align-items: center;
  justify-items: start;
  gap: var(--space-6);
}

.lp-notfound > * {
  margin-inline: 0;
}

/* The system phone frame (`at-phone`) holds the 9:16 video; under the text on a narrow screen, no card around the text. */
.lp-hero-phone {
  inline-size: min(100%, 20rem);
  margin-inline: auto;
}

.lp-hero-video {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  object-fit: cover;
}

.lp-hero-text {
  display: grid;
  gap: var(--space-6);
  justify-items: start;
}

.lp-logo {
  inline-size: auto;
  block-size: var(--space-8);
}

.lp-line {
  display: block;
}

.lp-manifesto,
.lp-science,
.lp-try,
.lp-how,
.lp-who,
.lp-coach,
.lp-faq,
.lp-footer {
  padding-block: var(--space-16);
}

.lp-bell-parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-8);
}

.lp-bell-part {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.lp-bell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.lp-bell > * {
  max-inline-size: 100%;
}

/* The ladder sizes itself in `cqi`; the card is its container, and the whole row (about 38em for the
   eight to thirty-two kg ladder) must fit inside it. */
[data-bell-calc] {
  container-type: inline-size;
}

/* The token is a fixed 160px (10rem); two digits are about 1.7em wide and must stay on one line in a
   narrow card. rem keeps the cap tied to the reader's text-size setting. */
.lp-bell .num-hero {
  font-size: min(10rem, 52cqi);
}

/* The row is 38em wide for the 7-weight ladder (8 to 32 kg), so the card width divided by 38 is the
   largest size that fits; the numbers inside are 1.8em of it. */
.lp-bell .at-ladder {
  font-size: min(1.25rem, calc(100cqi / 38));
}

.lp-bell > .at-seg,
.lp-bell > .at-btn--block,
.lp-bell__choices,
.lp-bell__form {
  inline-size: 100%;
}

.lp-bell__top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  inline-size: 100%;
}

.lp-bell__top .at-steps {
  flex: 1;
}

.lp-bell__choices,
.lp-bell__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.lp-bell__label {
  color: var(--accent-ink);
}

.lp-science .at-cite a,
.lp-bell-part .at-cite a,
.lp-faq .at-faq__a a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--size-control);
}

.lp-steps {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-coach {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

.lp-coach-photo {
  inline-size: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.lp-footer {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
  border-block-start: 1px solid var(--line);
}

.lp-footer > * {
  margin-inline: 0;
}

.lp-profiles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.lp-profiles a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--size-control);
}

@media (min-width: 960px) {
  main > *,
  .lp-footer {
    padding-inline: var(--space-8);
  }

  /* Text on the left, the phone with the video on the right; the first screen fits in 100svh. */
  .lp-hero {
    min-block-size: 100svh;
    grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
    align-items: center;
  }

  .lp-hero-phone {
    margin-inline: 0;
  }

  .lp-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .lp-coach {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }
}
