/* The marketing pages: Home, Nutrition, Workout and Coaches. Colours and fonts come from chrome.css. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--body-font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--head-font); font-weight: 700; letter-spacing: -0.025em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.band { background: var(--band); }
section { padding: 96px 0; }
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  color: var(--green);
  font: 700 13px/1.2 var(--body-font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-title { margin: 0 0 16px; color: var(--green); font-size: 34px; line-height: 1.15; }
.lead { max-width: 60ch; margin: 0 0 48px; color: var(--muted); }
.center { text-align: center; }
.center .lead, .lead.center { margin-left: auto; margin-right: auto; }
.pill.ghost { background: transparent; border-color: #fff; color: #fff; }
.pill.ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.pill.outline { background: transparent; color: var(--green); border-color: var(--green); }
.pill.outline:hover { background: var(--band); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.soon {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 30px;
  background: #fff4d6;
  color: #7a5400;
  font: 700 12px/1.4 var(--body-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Photos still to come: a dark, textured panel that says so. */
.photo {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, rgba(0, 122, 63, 0.35), transparent 55%),
    linear-gradient(135deg, #24312b, #3a4842 60%, #2b3631);
}
.photo::after {
  content: attr(data-label);
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 4px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font: 500 12px/1.4 var(--body-font);
}

/* Hero: a full-width photo with the headline over it, as on the reference site. */
.hero { position: relative; display: flex; align-items: center; min-height: 640px; padding: 0; color: #fff; }
.hero .photo { position: absolute; inset: 0; }
.hero .photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 18, 14, 0.75), rgba(10, 18, 14, 0.15));
}
.hero .wrap { position: relative; width: 100%; padding-top: 80px; padding-bottom: 80px; }
.hero h1 { max-width: 15ch; margin: 0 0 28px; color: #fff; font-size: 52px; line-height: 1.08; }
.hero h1 em { color: #7fe0ad; font-style: normal; }
.hero .sub { max-width: 30ch; margin: 0 0 24px; font: 600 22px/1.3 var(--head-font); }
.hero p { max-width: 46ch; margin: 0 0 32px; color: rgba(255, 255, 255, 0.88); }
.hero .eyebrow { color: #7fe0ad; }
.hero.short { min-height: 480px; }

/* Three cards with a picture on top. */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cards.four { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22); }
}
.card .photo, .card .shot-crop { aspect-ratio: 4 / 3; }
.card .shot-crop { overflow: hidden; background: #eef3f0; }
.card .shot-crop img { width: 72%; margin: 28px auto 0; border-radius: 22px 22px 0 0; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
.card .device-art { aspect-ratio: 4 / 3; overflow: hidden; background: #eef3f0; }
.card .device-art img { width: 100%; height: 100%; object-fit: cover; }
.card .body { display: flex; flex: 1; flex-direction: column; padding: 24px 24px 28px; }
.card h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.25; }
.card p { flex: 1; margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.card .more { font-weight: 600; font-size: 15px; text-decoration: none; }
.card .more:hover { text-decoration: underline; }

/* Two audiences side by side. */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.side { padding: 40px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.side h3 { margin: 0 0 12px; color: var(--green); font-size: 26px; }
.side p { margin: 0 0 16px; color: var(--muted); }
.ticks { margin: 0 0 28px; padding: 0; list-style: none; }
.ticks li { position: relative; margin: 10px 0; padding-left: 30px; }
/* A list of what the Dashboard shows, in columns so its length shows at a glance. */
.ticks.metrics { columns: 2; column-gap: 28px; margin-top: 8px; }
.ticks.metrics li { margin: 0 0 10px; break-inside: avoid; font-size: 15px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--button) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* Big numbers, in the style of the reference site's "Success Backed By" row. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.steps .num { display: block; color: var(--green); font: 600 56px/1 var(--head-font); }
.steps h3 { margin: 16px 0 8px; font-size: 19px; }
.steps p { max-width: 30ch; margin: 0 auto; color: var(--muted); font-size: 15px; }

/* How it works: a solid green band, the steps as a timeline. */
.how { background: #0a6236; color: #fff; }
.how .section-title { color: #fff; }
.how .steps { grid-template-columns: 1fr; gap: 0; max-width: 620px; margin: 32px auto 0; text-align: left; }
.how .steps > div { position: relative; padding: 0 0 36px 44px; }
.how .steps > div:last-child { padding-bottom: 0; }
.how .steps > div::before { content: ""; position: absolute; top: 5px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: #7fe0ad; }
.how .steps > div:not(:last-child)::after { content: ""; position: absolute; top: 25px; bottom: -1px; left: 7px; width: 2px; background: rgba(255, 255, 255, 0.3); }
.how .steps .num { color: #7fe0ad; font: 700 13px/1.6 var(--body-font); letter-spacing: 0.14em; }
.how .steps .num::before { content: "STEP "; }
.how .steps h3 { margin: 4px 0 6px; font-size: 24px; color: #fff; }
.how .steps p { max-width: none; margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 16px; }

/* Hero: the app beside the headline. */
.hero { overflow: hidden; }
.photo:not([data-label])::after { content: none; }
.hero-art { position: absolute; top: 56px; right: 40px; }
.hero-art .phone { max-width: none; width: 250px; }
.hero-art.devices { top: 50%; width: min(48%, 580px); transform: translateY(-50%); }
.laptop { overflow: hidden; border: 10px solid #1b1f1d; border-bottom-width: 14px; border-radius: 16px 16px 0 0; background: #1b1f1d; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.laptop img { display: block; width: 100%; height: auto; }
.laptop-base { height: 14px; margin: 0 -5%; border-radius: 0 0 12px 12px; background: linear-gradient(#d7dcd9, #9aa19d); }
.hero-art.devices .phone { position: absolute; bottom: -36px; left: -40px; width: 150px; }
@media (max-width: 1280px) {
  .hero { flex-direction: column; align-items: stretch; }
  .hero-art, .hero-art.devices { position: relative; top: auto; right: auto; width: 100%; margin-top: 40px; transform: none; }
  .hero-art:not(.devices) { display: flex; justify-content: center; height: 380px; margin-bottom: -56px; }
  .hero-art:not(.devices) .phone { width: 230px; height: max-content; }
  .hero-art.devices { max-width: 560px; margin-bottom: 24px; }
  .hero-art.devices .phone { left: -8px; bottom: -28px; width: 104px; }
}

/* Phone screenshots. */
/* An iPhone: a slim bezel around a 390 x 844 screen, the corners of both in step at any size. */
.phone {
  overflow: hidden;
  width: 100%;
  max-width: 300px;
  border-radius: 16.4% / 7.85%;
  background: #121614;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18), inset 0 0 0 1.5px #2b322e;
}
picture { display: block; }
.phone img { display: block; width: 93.6%; margin: 3.2%; border-radius: 14.1% / 6.5%; }
.screens { display: flex; justify-content: center; align-items: flex-end; gap: 32px; }
.screens .phone:nth-child(2) { max-width: 330px; }
.screens figcaption { margin-top: 16px; color: var(--muted); font-size: 15px; text-align: center; }

/* Feature rows: picture one side, words the other, alternating. */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 48px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature:nth-child(even) .media { order: 2; }
.feature .media { display: flex; justify-content: center; }
.feature .phone { max-width: 250px; }
.feature .media .photo { width: 100%; aspect-ratio: 4 / 3; border-radius: 20px; }
.feature h3 { margin: 0 0 12px; color: var(--green); font-size: 28px; line-height: 1.2; }
.feature > div > p { margin: 0 0 16px; color: var(--muted); }

/* Smaller points in a grid. */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.point { padding: 28px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.point h3 { margin: 0 0 8px; font-size: 18px; }
.point p { margin: 0; color: var(--muted); font-size: 15px; }

/* Questions and answers. */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  padding: 22px 40px 22px 0;
  font: 600 19px/1.4 var(--head-font);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; color: var(--green); font-size: 26px; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 22px; color: var(--muted); }

/* Waitlist: the closing "Ready for..." band with its form. */
.waitlist .wrap { max-width: 760px; }
.waitlist form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 8px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}
.waitlist label { display: block; color: var(--ink); font-size: 15px; font-weight: 500; }
.waitlist .full { grid-column: 1 / -1; }
.waitlist input, .waitlist select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid #c9d1cc;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.4 var(--body-font);
}
.waitlist input:focus, .waitlist select:focus { outline: 2px solid var(--button); outline-offset: 1px; border-color: transparent; }
.waitlist .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.waitlist .fine { margin: 0; color: var(--muted); font-size: 14px; }
.waitlist button { justify-self: start; }
.waitlist .status { margin: 0; font-size: 15px; font-weight: 500; }
.waitlist .status.ok { color: var(--green); }
.waitlist .status.error { color: #b3261e; }

@media (max-width: 960px) {
  .cards, .cards.four, .points { grid-template-columns: 1fr 1fr; }
  .feature { gap: 40px; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  .section-title { font-size: 26px; }
  .lead { margin-bottom: 32px; }
  .hero, .hero.short { min-height: 560px; }
  .hero .wrap { padding-top: 56px; padding-bottom: 56px; }
  .hero h1 { font-size: 34px; }
  .hero .sub { font-size: 19px; }
  .cards, .cards.four, .points, .split, .steps, .feature { grid-template-columns: 1fr; }
  .split { gap: 20px; }
  .side { padding: 28px 22px; }
  .side h3 { font-size: 23px; }
  .steps { gap: 36px; }
  .steps .num { font-size: 46px; }
  .feature { gap: 28px; padding: 36px 0; }
  .feature:nth-child(even) .media { order: 0; }
  .feature h3 { font-size: 23px; }
  .phone, .feature .phone { max-width: 230px; }
  .screens { gap: 16px; }
  .screens figure:not(:nth-child(2)) { display: none; }
  .waitlist form { grid-template-columns: 1fr; padding: 22px; }
  .waitlist button { justify-self: stretch; }
}

/* Coach or fitness enthusiast: the drop-down, and content shown only to one of them. Until a
   choice is made ("none"), each page shows its hero, a prompt to choose and the waitlist. */
html[data-role="none"] [data-for]:not([data-for~="none"]),
html[data-role="coach"] [data-for]:not([data-for~="coach"]),
html[data-role="enthusiast"] [data-for]:not([data-for~="enthusiast"]) { display: none !important; }
html[data-role="none"] main > section:not(.hero):not(.always) { display: none; }
.role-prompt { margin: 0 0 32px; font-weight: 500; }
.hero .role-prompt { color: #7fe0ad; }
.role-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 40px; }
.role-switch .label { font-weight: 600; }
.role-select {
  min-width: 200px;
  padding: 6px 30px 6px 2px;
  border: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 2px center / 16px no-repeat;
  color: #fff;
  font: 600 16px/1.3 var(--body-font);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.role-select option { color: #1c2622; }
.role-select:focus { outline: none; border-bottom-color: #7fe0ad; box-shadow: 0 2px 0 #7fe0ad; }
.role-switch.on-light .role-select {
  border-bottom-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23007A3F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color: var(--ink);
}
.role-switch.on-light .role-select:focus { border-bottom-color: var(--button); box-shadow: 0 2px 0 var(--button); }
.role-bar { padding: 20px 0; border-bottom: 1px solid var(--line); }
.role-bar .role-switch { margin: 0; }
@media (max-width: 700px) {
}

/* Home headline that types itself out (typed.js). */
.hero h1.typed { position: relative; max-width: 15ch; }
.hero h1.typed .live { position: absolute; inset: 0; }
/* Home banner: the headline, line and buttons for every role share one spot, with only the
   chosen role's showing, so the banner keeps the same size whichever role is picked. */
.hero h1.typed { display: grid; }
.hero h1.typed .ghost, .hero .stack > * { grid-area: 1 / 1; }
.hero .stack { display: grid; }
html body .hero h1.typed .ghost[data-for], html body .hero .stack > p[data-for] { display: block !important; visibility: hidden; }
html body .hero .stack > .actions[data-for] { display: flex !important; visibility: hidden; }
html:not([data-role]) body .hero [data-for~="none"],
html[data-role="none"] body .hero h1.typed .ghost[data-for~="none"], html[data-role="none"] body .hero .stack > [data-for~="none"],
html[data-role="coach"] body .hero h1.typed .ghost[data-for~="coach"], html[data-role="coach"] body .hero .stack > [data-for~="coach"],
html[data-role="enthusiast"] body .hero h1.typed .ghost[data-for~="enthusiast"], html[data-role="enthusiast"] body .hero .stack > [data-for~="enthusiast"] { visibility: visible; }
.hero h1.typed.typing .ghost { visibility: hidden !important; }
html body .hero .art-stack > [data-for] { display: block !important; visibility: hidden; }
html:not([data-role]) body .hero .art-stack > [data-for~="none"],
html[data-role="none"] body .hero .art-stack > [data-for~="none"],
html[data-role="coach"] body .hero .art-stack > [data-for~="coach"],
html[data-role="enthusiast"] body .hero .art-stack > [data-for~="enthusiast"] { visibility: visible; }
/* The photo for a coach or fitness enthusiast, standing on the bottom of the banner. */
.hero-person { position: absolute; z-index: 1; isolation: isolate; right: 40px; bottom: 0; height: calc(100% - 56px); max-height: 600px; }
.hero-person img {
  position: relative;
  width: auto;
  height: 100%;
  /* Matched to the banner's light: a little less contrast and warmth. */
  filter: saturate(0.88) contrast(0.94) brightness(0.97);
  /* The bottom and the photo's cut-off right edge fade into the banner. */
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 14%), linear-gradient(to left, transparent 0, #000 9%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to top, transparent 0, #000 14%), linear-gradient(to left, transparent 0, #000 9%);
  mask-composite: intersect;
}
/* A pool of light behind, and a soft shadow underfoot. */
.hero-person::before {
  content: "";
  position: absolute;
  inset: 4% -30% -6%;
  z-index: -1;
  background: radial-gradient(ellipse 50% 55% at 50% 58%, rgba(127, 224, 173, 0.22), rgba(127, 224, 173, 0.06) 55%, transparent 72%);
  pointer-events: none;
}
.hero-person::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 2%;
  height: 7%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45), transparent 70%);
  pointer-events: none;
}
@media (max-width: 1280px) {
  /* Below the text, in the same space as the laptop and phone, so the banner doesn't change size. */
  .hero .art-stack { display: grid; }
  .hero .art-stack > * { grid-area: 1 / 1; }
  .hero-person { position: relative; right: auto; bottom: auto; height: auto; max-height: none; margin: 40px 0 24px; }
  .hero-person img { position: absolute; top: 0; left: 50%; height: 100%; transform: translateX(-50%); }
  .hero-person::before { inset: -6% 0 -4%; }
  .hero-person::after { left: 18%; right: 18%; }
}
.hero h1.typed.typing .ghost { visibility: hidden; }
.hero h1.typed.typing .live::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.06em;
  background: #7fe0ad;
  vertical-align: -0.08em;
  animation: caret 0.9s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* A plain link beside a pill button in the hero. */
.hero .actions { align-items: center; }
.hero .text-link {
  padding: 12px 6px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.hero .text-link:hover { color: #7fe0ad; }

/* Phone demos (demo.js): the real app in a phone. The app draws at iPhone width (390px) and is
   scaled down to fit the phone's screen. */
.demo { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.demo-phone {
  position: relative;
  width: 280px;
  height: 585px;
  overflow: hidden;
  border: 9px solid #121614;
  border-radius: 46px;
  background: #f6f7f4;
  box-shadow: 0 24px 50px rgba(16, 32, 24, 0.18);
}
.demo-app {
  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 844px;
  border: 0;
  transform: scale(0.6667);
  transform-origin: 0 0;
}
.demo-say { min-height: 3em; max-width: 320px; margin: 0; color: var(--ink); font-size: 15px; font-weight: 500; text-align: center; }
.demo-count { display: block; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.demo-note { max-width: 320px; margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.demo-again { padding: 0; border: 0; background: none; color: var(--green); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.demo.finished .demo-again { padding: 6px 14px; border-radius: 999px; background: var(--button); color: #fff; text-decoration: none; }
.clip { margin: 0; }
.demo-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #f6f7f4; }
/* On a device in dark mode, the app pictures switch to their dark versions, and their backdrops follow. */
@media (prefers-color-scheme: dark) {
  .card .shot-crop, .card .device-art { background: #16201b; }
  .demo-phone, .demo-video { background: #0f1512; }
}
