/* The member site: page frame, type styles, buttons and the small shared pieces.
   Values are the designer's (README "Typography", "Buttons", "Spacing, radius, shadow"). */

/* ------------------------------------------------------------------ frame */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 16px);
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: normal; /* as in the prototype: every line height that matters is set where it is used */
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}
main:focus {
  outline: none; /* the target of the skip link */
}
img,
video {
  max-width: 100%;
}
a {
  color: var(--ink);
}
a:hover {
  color: var(--eyebrow);
}
input,
button,
select {
  font-family: inherit;
}
input::placeholder {
  color: var(--text-muted);
}
h1,
h2,
h3,
p,
figure,
blockquote {
  margin: 0;
}
[hidden] {
  display: none !important;
}

/* the designer's width is the width of the content: the side padding comes on top of it */
.container {
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container--join {
  max-width: calc(var(--container-join) + 2 * var(--gutter));
}

/* ------------------------------------------------------------------ accessibility */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 14px;
  color: #fff;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.on-dark :focus-visible,
.on-dark:focus-visible {
  outline-color: var(--lime);
}

/* ------------------------------------------------------------------ type */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.eyebrow--lime {
  color: var(--lime);
}
.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.label--lime {
  color: var(--lime);
}
.h1,
.h2,
.h2-sub {
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: pretty;
}
.h1 {
  font-size: var(--h1-page);
  line-height: 1;
  letter-spacing: -0.015em;
}
.h1--hero {
  font-size: var(--h1-hero);
  line-height: 0.96;
}
.h1--about {
  font-size: var(--h1-about);
  line-height: 0.98;
}
.h1--join {
  font-size: var(--h1-join);
  line-height: 1.02;
}
.h1--workout {
  font-size: var(--h1-workout);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.h2 {
  font-size: var(--h2-section);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.h2-sub {
  font-size: 26px;
  line-height: 1.15;
}
.lead {
  font-size: var(--lead);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.text {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}
.text--card {
  font-size: 16px;
}
.serif {
  font-family: var(--serif);
  font-weight: 400;
}

/* a heading block: eyebrow over a headline */
.heading {
  display: grid;
  gap: 14px;
}
/* a section header: heading left, text or a link right */
.section-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
}
.section-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.section-row--baseline {
  align-items: baseline;
  gap: 16px;
  margin-bottom: 0;
}
.arrow-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.arrow-link:hover {
  color: var(--eyebrow);
}
.arrow-link--lime {
  color: var(--lime);
}
.arrow-link--lime:hover {
  color: #fff;
}
.arrow-link--small {
  color: var(--eyebrow);
  font-size: 14px;
}

@media (pointer: coarse) {
  .arrow-link {
    min-height: 44px;
  }
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}
.btn--dark {
  background: var(--green);
  color: #fff;
}
.btn--dark:hover {
  background: var(--green-hover);
  color: #fff;
}
.btn--lime {
  background: var(--lime);
  color: var(--ink);
}
.btn--lime:hover {
  background: var(--lime-hover);
  color: var(--ink);
}
.btn--white {
  background: #fff;
  color: var(--ink);
}
.btn--white:hover {
  background: var(--lime);
  color: var(--ink);
}
.btn--ghost {
  padding: 0 24px;
  background: transparent;
  border: 1.5px solid var(--ghost-border);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(31, 42, 26, 0.04);
  color: var(--ink);
}
.btn--52 {
  height: 52px;
  padding: 0 26px;
}
.btn--50 {
  height: 50px;
  padding: 0 24px;
}
.btn--48 {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}
.btn--44 {
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
}
.btn--block {
  width: 100%;
}
.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* round icon button: the slider's arrows */
.round-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--control-border);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  padding: 0 0 2px;
}
.round-btn:hover {
  border-color: var(--ink);
}

/* small pills and badges */
.pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill--lime {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}
.pill--on-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(31, 42, 26, 0.07);
  color: var(--ink);
}
.badge--lime {
  background: var(--lime);
}
.time-pill {
  position: absolute;
  background: var(--pill-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--r-pill);
}

/* the play triangle, a CSS shape (README "Assets": no icon library) */
.play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(31, 42, 26, 0.18);
}
.play::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 13px solid var(--ink);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}
.play--lime {
  width: 44px;
  height: 44px;
  background: var(--lime);
  box-shadow: none;
  flex: none;
}
.play--lime::before {
  border-left-width: 12px;
  border-top-width: 7px;
  border-bottom-width: 7px;
}
.play--small {
  position: relative;
  width: 26px;
  height: 26px;
  box-shadow: none;
}
.play--small::before {
  border-left-width: 8px;
  border-top-width: 5px;
  border-bottom-width: 5px;
  margin-left: 2px;
}

/* a picture that fills its frame */
.cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  display: block;
}
.fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* the striped stand-in behind a picture (README "Colour": program placeholder stripes) */
.stripes {
  --t1: #dfe9c9;
  --t2: #d3e0b8;
  background: repeating-linear-gradient(135deg, var(--t1) 0 12px, var(--t2) 12px 24px);
}
.stripes--2 {
  --t1: #e7e2cf;
  --t2: #dcd5bd;
}
.stripes--3 {
  --t1: #d8e6d2;
  --t2: #c9dac1;
}
.stripes--4 {
  --t1: #def4a9;
  --t2: #cfe98f;
}
.stripes--5 {
  --t1: #e9ead8;
  --t2: #dcdcc4;
}
.stripes--6 {
  --t1: #d3e0b8;
  --t2: #c3d3a2;
}
.stripes--7 {
  --t1: #ece6d3;
  --t2: #e0d8bf;
}
.stripes--8 {
  --t1: #e1ead3;
  --t2: #d2dfbf;
}

/* a card that lifts on hover */
.lift {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ------------------------------------------------------------------ motion */
@keyframes sm-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sm-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.sm-in {
  animation: sm-in 0.25s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .lift:hover,
  .week-card:hover,
  .today-chip:hover {
    transform: none;
  }
}
