/* Workouts by Diet Track: the public site (D-092).
   Mobile first. Every colour is one of the eleven tokens below; where a
   mockup pairing failed WCAG AA, the role moved to another token rather
   than a new value being introduced (see the comments on --band,
   --eyebrow and --quiet). */

@font-face {
  font-family: "Inter Tight";
  src: url("/assets/inter-tight-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #7674F1;
  --purple-deep: #5B59D9;
  --yellow: #F1C40F;
  --plum: #44265E;
  --ink: #0E0E10;
  --bg: #F4F4F5;
  --card: #FFFFFF;
  --hairline: #E5E5E7;
  --text: #18181B;
  --body: #4A4A50;
  --muted: #9A9AA1;

  /* White on #7674F1 is 3.79:1 and yellow on it 2.28:1, so the band uses
     deep purple: white 5.42:1, the yellow headline 3.26:1 at display size. */
  --band: var(--purple-deep);
  --band-line: var(--purple);
  /* #7674F1 as 11-12 px text is 3.45:1 on the page; deep purple is 4.93:1. */
  --eyebrow: var(--purple-deep);
  /* #9A9AA1 is 2.54:1 on the page and 2.80:1 on white; small secondary
     text uses the body colour, which passes, and stays smaller instead. */
  --quiet: var(--body);
  --focus: var(--purple);

  --gutter: 20px;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: 120ms ease-out;

  color-scheme: light;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; }
h1, h2, h3, p { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; transition: color var(--ease), text-decoration-color var(--ease); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.on-band :focus-visible, .privacy-strip :focus-visible { outline-color: var(--card); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: calc(1120px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eyebrow);
}

/* In-text links are underlined: deep purple against body text is only
   1.62:1, so colour alone would not mark them. */
.text-link { color: var(--purple-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Header ---------- */

.site-header { position: relative; border-bottom: 1px solid var(--hairline); }
.site-header.on-band { background: var(--band); color: var(--card); border-bottom-color: var(--band-line); }

.site-header__bar {
  height: 56px;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.wordmark__name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.wordmark__by { font-size: 11px; font-weight: 500; color: var(--quiet); }
.on-band .wordmark__by { color: var(--card); }

.site-nav { display: none; }
.site-nav ul { list-style: none; display: flex; gap: 32px; }
.site-nav a { font-size: 14px; font-weight: 500; color: var(--body); }
.site-nav a:hover { color: var(--purple-deep); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.on-band .site-nav a { color: var(--card); }
.on-band .site-nav a:hover { color: var(--card); text-decoration: underline; text-underline-offset: 4px; }

.store { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.store img { height: 48px; width: auto; }
.store__note { font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--quiet); }
.on-band .store__note { color: var(--card); }
.store--header { display: none; gap: 3px; }
.store--header img { height: 40px; }
.store--header .store__note { font-size: 11px; line-height: 1; }

.mobile-nav { display: flex; align-items: center; gap: 18px; }
.mobile-nav > a { font-size: 13px; font-weight: 500; color: var(--body); padding: 8px 0; }
.on-band .mobile-nav > a { color: var(--card); }

.menu > summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: -6px;
  cursor: pointer;
  border-radius: 4px;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu__icon { display: flex; flex-direction: column; gap: 5px; width: 20px; }
.menu__icon span { height: 1.5px; background: currentColor; }

.menu__sheet {
  position: absolute;
  z-index: 50;
  top: 100%;
  left: 0;
  right: 0;
  padding: 8px var(--gutter);
  background: var(--card);
  color: var(--text);
  border-bottom: 1px solid var(--hairline);
}
.menu__sheet ul { list-style: none; }
.menu__sheet li + li { border-top: 1px solid var(--hairline); }
.menu__sheet a { display: block; padding: 14px 0; font-size: 16px; font-weight: 500; color: var(--text); }
.menu__sheet a:hover { color: var(--purple-deep); }
.menu__sheet a[aria-current="page"] { font-weight: 600; }
.on-band .menu__sheet :focus-visible { outline-color: var(--focus); }

@media (min-width: 768px) {
  .site-header__bar { height: 72px; }
  .wordmark { gap: 8px; }
  .wordmark__name { font-size: 20px; }
  .wordmark__by { font-size: 12px; }
  .site-nav { display: block; }
  .store--header { display: inline-flex; }
  .mobile-nav { display: none; }
}

/* ---------- Hero ---------- */

.hero { background: var(--band); color: var(--card); overflow: hidden; }

.hero__grid { display: flex; flex-direction: column; padding-top: 48px; }
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }

.hero__title { font-size: 44px; font-weight: 700; line-height: 1.02; letter-spacing: -0.025em; }
.hero__title span { display: block; }
.hero__title .hero__punch { color: var(--yellow); }

.hero__lead { font-size: 17px; line-height: 1.5; max-width: 44ch; }

.hero__phone { display: flex; justify-content: center; height: 420px; margin-top: 44px; overflow: hidden; }

@media (min-width: 768px) {
  .hero__title { font-size: 60px; }
  .hero__lead { font-size: 19px; }
  .hero__text { gap: 24px; }
  .hero .store { margin-top: 8px; }
}

@media (min-width: 900px) {
  .hero__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: end;
    padding-top: 88px;
  }
  .hero__text { padding-bottom: 96px; }
  .hero__phone { height: 560px; margin-top: 0; }
}

/* An iPhone 15 Pro (393 x 852 pt) at 0.7 on phones and 0.8 on desktop,
   cropped by the bottom of the band. No shadow; a hairline only. */
.phone {
  --scale: 0.7;
  position: relative;
  flex: none;
  width: calc(393px * var(--scale));
  height: calc(852px * var(--scale));
  border-radius: calc(48px * var(--scale));
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--hairline);
}
.phone__island {
  position: absolute;
  z-index: 2;
  top: calc(11px * var(--scale));
  left: 50%;
  width: calc(126px * var(--scale));
  height: calc(37px * var(--scale));
  border-radius: calc(24px * var(--scale));
  background: var(--ink);
  transform: translateX(-50%);
}
.phone > img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .phone { --scale: 0.8; }
}

/* A screenshot that has not been supplied yet: the slot's name on a plain
   card. */
.slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}
.phone .slot { padding-bottom: 30%; }

/* ---------- Features ---------- */

.feature { padding-block: 56px; display: flex; flex-direction: column; gap: 30px; }
.feature + .feature { border-top: 1px solid var(--hairline); }

.feature__text { display: flex; flex-direction: column; gap: 14px; }
.feature__title { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.feature__body { font-size: 16px; line-height: 1.55; color: var(--body); }

.feature__media { display: flex; justify-content: center; }

.shot {
  width: 260px;
  height: 564px;
  flex: none;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--bg);
}
.shot > img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 768px) {
  .feature__text { gap: 16px; }
  .feature__title { font-size: 36px; }
  .feature__body { font-size: 17px; }
}

@media (min-width: 900px) {
  .feature {
    padding-block: 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
  }
  .feature__text { max-width: 460px; }
  .feature:nth-child(odd) .feature__media { grid-column: 1; grid-row: 1; }
  .feature:nth-child(odd) .feature__text { grid-column: 2; grid-row: 1; }
  .feature:nth-child(even) .feature__text { justify-self: end; }
  .shot { width: 300px; height: 650px; border-radius: 40px; }
}

/* ---------- The program ---------- */

.program { background: var(--card); border-top: 1px solid var(--hairline); }
.program__grid { padding-block: 56px; display: flex; flex-direction: column; gap: 22px; }
.program__text { display: flex; flex-direction: column; gap: 14px; }
.program__body { font-size: 16px; line-height: 1.55; color: var(--body); max-width: 46ch; }

.tiles { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 4px;
}
.tile__num { font-size: 10px; font-weight: 600; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--eyebrow); }
.tile__name { font-size: 16px; font-weight: 700; line-height: 1.3; }

@media (min-width: 768px) {
  .program__text { gap: 16px; }
  .program__body { font-size: 17px; }
  .tiles { gap: 12px; }
  .tile { padding: 20px; gap: 6px; }
  .tile__name { font-size: 18px; }
}

@media (min-width: 900px) {
  .program__grid {
    padding-block: 96px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
  }
}

/* ---------- Privacy strip ---------- */

.privacy-strip { background: var(--plum); color: var(--card); }
.privacy-strip__grid { padding-block: 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.privacy-strip__text { display: flex; flex-direction: column; gap: 14px; }
.privacy-strip .eyebrow { color: var(--yellow); }

.checks { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; align-items: baseline; gap: 10px; font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.checks li::before { content: "\2713"; flex: none; color: var(--yellow); font-weight: 700; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}
.button:hover { text-decoration-color: currentColor; }
.button:active { transform: translateY(1px); }

@media (min-width: 768px) {
  .privacy-strip__grid { padding-block: 56px; }
}

@media (min-width: 900px) {
  .privacy-strip__grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 64px;
    align-items: center;
  }
  .checks { flex-direction: row; flex-wrap: wrap; column-gap: 40px; row-gap: 10px; }
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--hairline); }
.site-footer__inner { padding-block: 32px; display: flex; flex-direction: column; gap: 16px; }
.site-footer__row { display: flex; flex-direction: column; gap: 16px; }
.site-footer .wordmark__name { font-size: 16px; }
.site-footer .wordmark__by { font-size: 12px; }
.site-footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer__links a { font-size: 14px; font-weight: 500; color: var(--body); }
.site-footer__links a:hover { color: var(--purple-deep); }
.site-footer__copy { font-size: 13px; color: var(--quiet); }
.site-footer__legal { font-size: 12px; line-height: 1.5; color: var(--quiet); }

@media (min-width: 768px) {
  .site-footer__inner { padding-block: 40px; gap: 20px; }
  .site-footer__row { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
  .site-footer .wordmark { gap: 8px; }
  .site-footer__links { gap: 28px; }
}

/* ---------- Policy and support pages ---------- */

.doc { padding: 48px var(--gutter) 72px; }
.doc__inner { max-width: 640px; margin-inline: auto; display: flex; flex-direction: column; gap: 32px; }
.doc__head { display: flex; flex-direction: column; gap: 12px; }
.doc__title { font-size: 34px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.doc__meta { font-size: 13px; line-height: 1.5; color: var(--quiet); }
.doc__lead { font-size: 17px; line-height: 1.55; color: var(--body); }

.doc__section { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.doc__section h2 { font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--eyebrow); }
.doc__section p, .doc__section li { font-size: 16px; line-height: 1.6; color: var(--body); }
.doc__section strong { color: var(--text); font-weight: 600; }
.doc__section ul { padding-left: 1.25em; display: flex; flex-direction: column; gap: 10px; }
.doc__section li::marker { color: var(--body); }

.faq { background: var(--card); border: 1px solid var(--hairline); border-radius: 4px; }
.faq details + details { border-top: 1px solid var(--hairline); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline-offset: -2px; }
.faq__sign { position: relative; flex: none; width: 12px; height: 12px; }
.faq__sign::before, .faq__sign::after {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 2px;
  background: var(--yellow);
}
.faq__sign::after { transform: rotate(90deg); }
.faq details[open] .faq__sign::after { display: none; }
.faq__answer { padding: 0 16px 16px; margin-top: -6px; }
.faq__answer p { font-size: 15px; line-height: 1.6; color: var(--body); }

@media (min-width: 768px) {
  .doc { padding: 88px var(--gutter) 112px; }
  .doc__inner { gap: 40px; }
  .doc__head { gap: 16px; }
  .doc__title { font-size: 44px; }
  .doc__meta { font-size: 14px; }
  .doc__lead { font-size: 18px; }
  .doc__section { gap: 12px; padding-top: 32px; }
  .doc__section h2 { font-size: 12px; }
  .doc__section p, .doc__section li { font-size: 17px; }
  .faq summary { padding: 20px; font-size: 17px; }
  .faq__answer { padding: 0 20px 20px; }
  .faq__answer p { font-size: 16px; }
}

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