/* FitMaxx website. Colour, type and radii come from /tokens.css (generated
   from design/design-tokens.json); this file only lays the pages out. */

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text-1); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }

.num, .figure { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
}

.lede { color: var(--text-2); font-size: 18px; line-height: 1.55; max-width: 34em; }

/* ---------------------------------------------------------------- shell */

.top, main, .foot { width: min(1080px, 100% - 40px); margin-inline: auto; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand .mark { width: 26px; height: 26px; color: var(--accent); }
.brand-small { font-size: 15px; }
.brand-small .mark { width: 20px; height: 20px; }

.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--text-2); }
.nav a[aria-current="page"] { color: var(--text-1); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 120ms ease, opacity 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { color: var(--on-accent); }
.btn-primary.is-soon { background: var(--accent-tint-bg); color: var(--accent); border: 1px solid var(--accent-tint-border); cursor: default; }
.btn-primary.is-soon:hover { transform: none; }
.btn-ghost { border: 1px solid var(--hairline); color: var(--text-1); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 13px; }

.foot { padding: 40px 0 56px; border-top: 1px solid var(--divider); margin-top: 96px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--text-2); }
.foot-note { margin-top: 20px; font-size: 12px; line-height: 1.6; color: var(--text-3); max-width: 60em; }

/* ----------------------------------------------------------------- hero */

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding: 56px 0 24px;
}
.hero-copy { display: grid; gap: 22px; }
.hero-copy h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
.hero-copy h1 span { display: block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-fine { font-size: 13px; color: var(--text-3); }

/* A drawn phone, not a screenshot: it keeps the page honest about what is
   sample data and stays in step with the design system. */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 320px;
  border-radius: 44px;
  padding: 10px;
  background: #0b111b;
  border: 1px solid var(--hairline);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), var(--card-top-highlight);
}
.screen {
  border-radius: 36px;
  overflow: hidden;
  background: var(--page);
  font-size: 12px;
  line-height: 1.35;
}
.screen .hero { padding: 44px 16px 14px; background: var(--hero-gradient); display: grid; gap: 10px; }
.screen-title { display: flex; justify-content: space-between; align-items: center; }
.screen-title h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.plus { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--accent-tint-border); background: var(--accent-tint-bg); color: var(--accent); display: grid; place-items: center; font-size: 18px; line-height: 1; }
.date-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; white-space: nowrap; color: var(--text-2); font-size: 11px; }
.pill { display: inline-flex; white-space: nowrap; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--accent-tint-bg); border: 1px solid var(--accent-tint-border); color: var(--accent); font-size: 10px; font-weight: 600; }
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.energy { display: flex; align-items: baseline; gap: 8px; }
.energy .figure { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; }
.energy span { color: var(--text-2); font-size: 12px; }
.bar { height: 5px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; width: 44%; background: var(--accent); border-radius: 3px; }
.macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.macro { display: grid; gap: 3px; padding-top: 6px; border-top: 2px solid var(--track); font-size: 9px; color: var(--text-2); }
.macro b { font-size: 12px; color: var(--text-1); font-weight: 600; }
.macro b small { color: var(--text-3); font-weight: 400; font-size: 9px; }
.macro.protein { border-color: var(--macro-protein); }
.macro.carbs { border-color: var(--macro-carbs); }
.macro.fat { border-color: var(--macro-fat); }
.macro.sugar { border-color: var(--macro-sugar); }
.screen-body { padding: 12px 12px 18px; display: grid; gap: 10px; }
.mini-card { background: var(--card); border: 1px solid var(--hairline); border-radius: 16px; box-shadow: var(--card-top-highlight); padding: 12px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-2); }
.plan-head b { color: var(--text-1); font-weight: 600; }
.plan-line { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.plan-line i { display: block; height: 4px; border-radius: 2px; background: var(--track); }
.plan-line i.done { background: var(--accent); }
.plan-next { margin-top: 8px; font-size: 10px; color: var(--text-3); }
.plan-next b { color: var(--text-2); font-weight: 500; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { border-radius: 16px; padding: 12px; min-height: 92px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; background: var(--card); border: 1px solid var(--hairline); }
.tile b { font-size: 13px; font-weight: 600; }
.tile span { font-size: 10px; color: var(--text-2); }
.tile.accent { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.tile.accent span { color: var(--on-accent); opacity: 0.75; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; padding: 10px; display: grid; gap: 2px; }
.stat .eyebrow { font-size: 8px; letter-spacing: 0.12em; }
.stat .figure { font-size: 15px; font-weight: 600; }
.stat .figure small { font-size: 9px; color: var(--text-3); font-family: var(--font-ui); }
.stat span { font-size: 9px; color: var(--text-3); }
.stat svg { width: 100%; height: 22px; margin-top: 4px; }
.stat svg path { fill: none; stroke: var(--sparkline); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stat svg circle { fill: var(--accent); }

/* --------------------------------------------------------------- sections */

.section { padding: 72px 0 0; display: grid; gap: 28px; }
.section-head { display: grid; gap: 12px; max-width: 40em; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { color: var(--text-2); font-size: 17px; }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--card-radius-lg); box-shadow: var(--card-top-highlight); padding: 24px; display: grid; gap: 10px; align-content: start; }
.card h3 { font-size: 19px; }
.card p { color: var(--text-2); font-size: 15px; }
.card .glyph { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-tint-bg); border: 1px solid var(--accent-tint-border); color: var(--accent); display: grid; place-items: center; margin-bottom: 6px; }
.card .glyph svg { width: 22px; height: 22px; }
.card .numeric-note { font-size: 13px; color: var(--text-3); }

.trend { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.trend-card { padding: 28px; display: grid; gap: 14px; }
.card .trend-sentence { color: var(--text-1); font-size: 22px; line-height: 1.35; letter-spacing: -0.01em; }
.trend-sentence b { font-weight: 600; }
.trend-meta { display: flex; gap: 24px; font-size: 13px; color: var(--text-3); }
.trend-meta b { display: block; font-size: 17px; color: var(--text-1); font-weight: 500; }
.trend svg.spark { width: 100%; height: 72px; }
.trend svg.spark path { fill: none; stroke: var(--sparkline); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trend svg.spark circle { fill: var(--accent); }
.trend-copy { display: grid; gap: 14px; color: var(--text-2); font-size: 17px; }
.trend-copy h2 { color: var(--text-1); font-size: clamp(26px, 3.4vw, 36px); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid .card h3 { font-size: 17px; }
.grid.features .card h3 { font-size: 19px; }

.insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card.insight { gap: 8px; padding: 20px 22px; }
.insight-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.insight-head p { color: var(--text-1); font-size: 16px; font-weight: 500; line-height: 1.35; margin: 0; }
.insight-head .figure { flex: none; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600; line-height: 1.1; text-align: right; }
.insight-head .figure small { display: block; font-family: var(--font-ui); font-size: 10px; font-weight: 400; color: var(--text-3); margin-top: 2px; }
.card .insight-detail { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.card .period { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-top: 2px; }
.insight-note { color: var(--text-2); font-size: 16px; max-width: 46em; margin: 0; }

.streak { display: flex; align-items: baseline; gap: 10px; }
.streak b { font-family: var(--font-numeric); font-size: 44px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.streak span { color: var(--text-2); font-size: 15px; }
.week { display: flex; gap: 10px; }
.week i { flex: 1; height: 8px; border-radius: 4px; background: var(--track); }
.week i.on { background: var(--accent); }
.week i.today { opacity: 0.55; }
.milestones { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.milestones li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--divider); font-size: 15px; }
.milestones li b { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text-3); font-size: 13px; }

.privacy-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.privacy-band ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--text-2); font-size: 16px; }
.privacy-band li { position: relative; padding-left: 20px; }
.privacy-band li::before { content: ''; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
a.inline { color: var(--text-1); text-decoration: underline; text-underline-offset: 3px; }

.cta { margin-top: 80px; padding: 48px; border-radius: 28px; background: var(--hero-gradient); border: 1px solid var(--hairline); display: grid; gap: 18px; justify-items: start; }
.cta h2 { font-size: clamp(26px, 3.4vw, 36px); }
.cta p { color: var(--text-2); font-size: 17px; max-width: 36em; }

/* --------------------------------------------------------------- policies */

.policy { max-width: 42em; padding: 32px 0 0; display: grid; gap: 36px; }
.policy-head { display: grid; gap: 10px; }
.policy-head h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 700; letter-spacing: -0.03em; }
.policy-updated { font-family: var(--font-numeric); font-size: 13px; color: var(--text-3); }
.policy section { display: grid; gap: 12px; }
.policy h2 { font-size: 21px; }
.policy p { color: var(--text-2); font-size: 16px; line-height: 1.65; }
.policy dl { display: grid; gap: 22px; margin: 0; }
.policy dt { font-weight: 600; font-size: 17px; }
.policy dd { margin: 6px 0 0; color: var(--text-2); line-height: 1.65; }
.policy a { color: var(--text-1); text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .hero-band { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; }
  .three, .grid, .insights { grid-template-columns: 1fr 1fr; }
  .trend, .privacy-band { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav a:not(.btn) { display: none; }
  .three, .grid, .insights { grid-template-columns: 1fr; }
  .cta { padding: 32px 24px; }
  .top, main, .foot { width: min(1080px, 100% - 32px); }
}

/* Invite page: the code is the whole point, so it is the biggest thing on it. */
.invite-code { font-size: clamp(36px, 8vw, 56px); font-weight: 600; letter-spacing: 0.18em; color: var(--accent); margin-top: 4px; user-select: all; -webkit-user-select: all; }
.steps { color: var(--text-2); font-size: 16px; line-height: 1.6; padding-left: 1.3em; display: grid; gap: 6px; }
.steps b { color: var(--text-1); font-weight: 600; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.invite .numeric-note { font-size: 13px; color: var(--text-3); margin-top: 14px; }
