/* getpumpd.app. Colours, type and radii come from design/systems/pumpd (DESIGN.md, tokens.json). */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo.woff2") format("woff2");
  font-weight: 600 900;
  font-stretch: 125%;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/Figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F3F3F1;
  --surface: #FFFFFF;
  --surface-alt: #E9E9E6;
  --line: #DADAD6;
  --text: #141414;
  --muted: #5C5C60;
  --primary: #6D28D9;
  --on-primary: #FFFFFF;
  --container: #EDE4FD;
  --on-container: #3B1782;
  --focus: #6D28D9;
  --device: #0B0B0C;
  --shadow: 0 18px 40px -18px rgb(20 20 20 / .28), 0 2px 6px rgb(20 20 20 / .06);
  --gradient: linear-gradient(100deg, #FF2D8D 0%, #D946EF 35%, #8B5CF6 68%, #22D3EE 100%);

  --display: "Archivo", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --page: min(1200px, 100% - 2 * var(--gutter));
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --bar-h: 76px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --surface: #1D1D1E;
    --surface-alt: #2A2A2C;
    --line: #333336;
    --text: #F4F4F4;
    --muted: #A8A8AD;
    --primary: #A78BFA;
    --on-primary: #1A0B38;
    --container: #2E1F4D;
    --on-container: #E4D9FF;
    --focus: #C4B5FD;
    --device: #000000;
    --shadow: 0 24px 48px -20px rgb(0 0 0 / .7), 0 0 0 1px #2A2A2C;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bar-h) + 32px + env(safe-area-inset-bottom));
}
img, svg { display: block; max-width: 100%; height: auto; }
::selection { background: var(--primary); color: var(--on-primary); }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 120ms !important; }
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: var(--page); margin-inline: auto; }

/* Wordmark: wide capitals with the short brand bar under it (the only gradient on the page). */
.wordmark {
  display: inline-flex; flex-direction: column; gap: 5px;
  font: 800 1.5rem/1 var(--display); font-stretch: 125%; letter-spacing: .01em;
  text-decoration: none; color: var(--text); text-transform: uppercase;
}
.wordmark::after {
  content: ""; width: 1.9em; height: 4px; border-radius: 2px; background: var(--gradient);
}

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 24px; }
.lang {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 14px;
  border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.lang:hover { background: var(--surface-alt); color: var(--text); }

/* Type */
h1, h2, h3 { margin: 0; text-wrap: balance; }
.display {
  font-family: var(--display); font-stretch: 125%; font-weight: 800;
  text-transform: uppercase; letter-spacing: -.005em; line-height: .98;
}
.display { hyphens: manual; overflow-wrap: normal; }
h1.display { font-size: clamp(2.3rem, 1.2rem + 4vw, 4.6rem); }
h2.display { font-size: clamp(2.2rem, 1.2rem + 6vw, 6rem); line-height: .9; }
.lead { font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.5; color: var(--text); max-width: 34ch; }
.muted { color: var(--muted); }
p { margin: 0; }

/* Buttons: violet pill and tonal pill, 52 px tall. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 1rem/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: transform 220ms var(--ease), background-color 220ms var(--ease);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-tonal { background: var(--container); color: var(--on-container); }
.btn svg { width: 20px; height: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Phones: real screens from the app in a plain device frame. */
.phone {
  position: relative; width: 100%; max-width: 300px;
  padding: 2.6%; border-radius: 13% / 6%; background: var(--device); box-shadow: var(--shadow);
}
.phone picture { display: block; }
.phone img { width: 100%; height: auto; aspect-ratio: 9 / 20; border-radius: 11% / 5%; }
.phone img { background: var(--surface); }

/* Hero */
.hero {
  display: grid; gap: 40px; align-items: center;
  padding-block: clamp(16px, 4vw, 56px) clamp(56px, 8vw, 120px);
}
.hero-copy { display: grid; gap: 24px; }
.hero-copy .lead { max-width: 38ch; color: var(--muted); }
.hero-copy .lead strong { color: var(--text); font-weight: 600; }
.hero-note { font-size: .9375rem; color: var(--muted); }
.hero-phones { position: relative; display: grid; justify-items: center; }
.hero-phones .phone { width: min(70vw, 300px); animation: rise 900ms var(--ease) both; }
.hero-phones .phone.back { display: none; }
@keyframes rise { from { transform: translateY(28px); } }
@media (min-width: 900px) {
  .hero { grid-template-columns: 7fr 5fr; gap: 24px; }
  .hero-phones { min-height: 620px; align-self: start; margin-top: 8px; }
  .hero-phones .phone { position: absolute; width: 262px; }
  .hero-phones .phone.front { left: 4%; top: 0; z-index: 1; }
  .hero-phones .phone.back { display: block; right: 0; top: 56px; transform: rotate(4deg); animation-name: rise-tilt; animation-delay: 120ms; }
  @keyframes rise-tilt { from { transform: translateY(40px) rotate(4deg); } to { transform: rotate(4deg); } }
}

/* Feature sections: the app's tab title at poster size, then the story and the screens. */
.tab {
  padding-block: clamp(72px, 10vw, 140px);
  border-top: 1px solid var(--line);
}
.tab-grid { display: grid; gap: 48px; align-items: center; }
.tab-copy { display: grid; gap: 28px; align-content: start; }
.tab-copy h2 { color: var(--text); }
.points { list-style: none; margin: 0; padding: 0; max-width: 46ch; }
.points li { padding-block: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.points li strong { display: block; color: var(--text); font-weight: 600; font-size: 1.0625rem; margin-bottom: 2px; }
.shots { display: flex; gap: clamp(12px, 3vw, 32px); justify-content: center; align-items: flex-start; }
.shots .phone { flex: 0 1 280px; }
.shots .phone + .phone { margin-top: 72px; }
@media (max-width: 599px) {
  .shots .phone { flex-basis: min(80vw, 300px); }
  .shots .phone + .phone { display: none; }
}
@media (min-width: 900px) {
  .tab-grid { grid-template-columns: 5fr 7fr; gap: 64px; }
  .tab-grid.flip .tab-copy { order: 2; }
}

/* Weight: the one big statement, scale dots versus the trend line, drawn from the same data idea. */
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .9375rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 10px; }
.legend i { display: inline-block; flex: none; }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; background: #7E6DC4; }
.legend .line { width: 26px; height: 3px; border-radius: 2px; background: var(--primary); }
@media (prefers-color-scheme: dark) { .legend .dot { background: #7C6AB4; } }

/* Coach: numbered steps, because the order matters. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; max-width: 50ch; }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 16px;
  padding-block: 18px; border-top: 1px solid var(--line); color: var(--muted);
}
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--container); color: var(--on-container); font: 700 1rem/1 var(--body);
}
.steps strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.coach-art { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 360 / 220; }
.coach-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.coach-side { display: grid; gap: 24px; justify-items: center; }
.coach-side .phone { max-width: 300px; }
@media (min-width: 900px) {
  .coach-side { grid-template-columns: 1fr; justify-items: stretch; }
  .coach-side .phone { justify-self: center; }
}

/* Why it's different: a 2 x 2 sheet with hairlines, not boxes. */
.why { padding-block: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); }
.why h2 { max-width: 14ch; }
.why-grid { display: grid; margin-top: 48px; border-top: 1px solid var(--line); }
.why-grid > div { padding: 28px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.why-grid h3 { font-size: 1.375rem; font-weight: 700; line-height: 1.25; }
.why-grid p { color: var(--muted); max-width: 42ch; }
@media (min-width: 760px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
  .why-grid > div { padding: 36px 40px 36px 0; }
  .why-grid > div:nth-child(even) { padding-left: 40px; border-left: 1px solid var(--line); }
}
.small-print { margin-top: 28px; font-size: .9375rem; color: var(--muted); }

/* Get the app: two doors, each with its Summit scene, like the app's flow intros. */
.get { padding-block: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); }
.get-head { display: grid; gap: 20px; margin-bottom: 48px; }
.doors { display: grid; gap: 20px; }
.door { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
@media (prefers-color-scheme: light) { .door { box-shadow: 0 0 0 1px var(--line); } }
.door-art { aspect-ratio: 360 / 200; overflow: hidden; }
.door-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.door-body { display: grid; gap: 14px; padding: 28px; align-content: start; }
.door-body h3 { font: 800 1.5rem/1.1 var(--display); font-stretch: 125%; text-transform: uppercase; }
.door-body p { color: var(--muted); }
.door-body .actions { margin-top: 8px; }
.mail { font-weight: 600; color: var(--text); }
@media (min-width: 760px) { .doors { grid-template-columns: 1fr 1fr; } }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 40px 24px; font-size: .9375rem; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: flex-start; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--text); }
.foot .credits { margin-top: 20px; max-width: 70ch; }

/* The tab bar: the app's own navigation, floating, driving the scroll. */
.tabbar {
  position: fixed; z-index: 10; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px)); height: var(--bar-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding: 0 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px -12px rgb(0 0 0 / .35);
}
.tabbar a {
  position: relative; z-index: 1; display: grid; justify-items: center; gap: 4px;
  min-height: 60px; align-content: center;
  font-size: .75rem; font-weight: 600; letter-spacing: .01em; color: var(--muted); text-decoration: none;
}
.tabbar a .ico { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; transition: background-color 220ms var(--ease); }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="true"] { color: var(--text); }
.tabbar a[aria-current="true"] .ico { color: var(--on-container); }
.tabbar .pill {
  position: absolute; z-index: 0; top: 14px; left: 0; width: 56px; height: 30px; border-radius: 999px;
  background: var(--container); opacity: 0;
  transition: transform 360ms var(--ease), opacity 220ms var(--ease);
}
.tabbar.has-active .pill { opacity: 1; }
.tabbar .add .ico {
  width: 48px; height: 34px; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  transition: transform 220ms var(--ease);
}
.tabbar .add { color: var(--text); }
.tabbar .add:hover .ico { transform: scale(1.06); }
.tabbar svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Legal pages */
.legal { padding-block: 24px 64px; }
.legal article { max-width: 68ch; display: grid; gap: 18px; }
.legal h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); margin-bottom: 12px; }
.legal h2 { font-size: 1.25rem; font-weight: 700; margin-top: 20px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.placeholder { background: var(--container); color: var(--on-container); padding: 0 .3em; border-radius: 4px; font-weight: 600; }
.legal-page { padding-bottom: 40px; }

/* Weight: one wide chart, the page's single data graphic (made-up data, said so in the caption). */
.trend-band { margin-top: clamp(48px, 7vw, 96px); display: grid; gap: 14px; }
.trend-chart { width: 100%; height: clamp(160px, 22vw, 260px); overflow: visible; }
.trend-chart path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.trend-chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 6; }
.trend-chart .dots { stroke: #7E6DC4; stroke-width: 11; }
.trend-chart .trend { stroke: var(--primary); stroke-width: 5; }
.trend-band figcaption { font-size: .9375rem; color: var(--muted); }
@media (prefers-color-scheme: dark) { .trend-chart .dots { stroke: #7C6AB4; } }
