/* Surj website. Colors and fonts come from the app design system (design/bbfit-tokens.css). */

@font-face {
  font-family: 'Boldonse';
  src: url('/fonts/Boldonse-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --ground: #0a0c0b;
  --surface: #131714;
  --surface-raised: #1c211d;
  --line: #2a312b;
  --ink: #f2f5ee;
  --ink-muted: #a6aea1;
  --volt: #c8f135;
  --on-volt: #0a0c0b;
  --gold: #ffc83d;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
  --font-sans: -apple-system, 'SF Pro Display', 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Boldonse', 'SF Pro Display', system-ui, sans-serif;
  /* Elastic motion, as in the app. */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--volt); color: var(--on-volt); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }

/* Header and footer */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--ground) 80%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.top nav { display: flex; gap: 24px; margin-left: auto; }
.top nav a { text-decoration: none; color: var(--ink-muted); font-weight: 500; }
.top nav a:hover { color: var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 22px/1 var(--font-brand); }
.brand .logo { width: 30px; height: auto; }
.brand .logo path { fill: var(--volt); }
@media (max-width: 760px) { .top nav { display: none; } .top .button { margin-left: auto; } }

.foot {
  display: grid; gap: 24px; grid-template-columns: 1fr 2fr;
  max-width: var(--max); margin: 96px auto 0; padding: 48px var(--gutter);
  border-top: 1px solid var(--line);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 12px 24px; align-content: start; }
.foot nav a { color: var(--ink-muted); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot > p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--volt); color: var(--on-volt);
  font-weight: 700; text-decoration: none;
  transition: transform 0.45s var(--spring), box-shadow 0.3s;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--volt) 25%, transparent);
}
.button:hover { transform: translateY(-3px) scale(1.04); }
.button:active { transform: scale(0.96); }
.button.small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.button.ghost { background: var(--surface-raised); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.store { display: flex; flex-wrap: wrap; gap: 12px; }
.store .button { min-width: 210px; }
.store .button span { display: grid; text-align: left; line-height: 1.15; }
.store .button small { font-weight: 500; font-size: 12px; opacity: 0.75; }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 96px var(--gutter) 0; }
.section > h2, .lead-title { font: clamp(30px, 5vw, 52px)/1.1 var(--font-brand); }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-muted); max-width: 640px; }
.volt { color: var(--volt); }

/* Hero: image when it exists, a volt glow otherwise. */
.hero {
  position: relative; isolation: isolate;
  min-height: min(88vh, 860px);
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px;
  max-width: var(--max); margin: 0 auto; padding: 72px var(--gutter) 48px;
}
.hero::before {
  content: ''; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1;
  background:
    linear-gradient(90deg, var(--ground) 30%, color-mix(in srgb, var(--ground) 40%, transparent) 70%, var(--ground)),
    linear-gradient(0deg, var(--ground), transparent 35%),
    url('/img/hero.webp') right center / cover no-repeat,
    radial-gradient(60% 70% at 78% 45%, color-mix(in srgb, var(--volt) 22%, transparent), transparent 70%);
}
.hero h1 { font: clamp(40px, 7.4vw, 84px)/1.02 var(--font-brand); margin-bottom: 24px; }
.hero .lead { margin-bottom: 32px; }
.hero .note { margin-top: 16px; font-size: 14px; color: var(--ink-muted); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; } }

/* Phone frame around an app screenshot. */
.phone {
  justify-self: center;
  width: min(300px, 72vw); aspect-ratio: 9 / 19.5;
  border-radius: 46px; padding: 12px;
  background: linear-gradient(145deg, #2b312c, #0e110f);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotate(-4deg);
  transition: transform 0.8s var(--spring);
}
.phone:hover { transform: rotate(0deg) translateY(-6px); }
.phone .screen {
  width: 100%; height: 100%; border-radius: 36px; overflow: hidden;
  background: radial-gradient(80% 50% at 50% 30%, color-mix(in srgb, var(--volt) 18%, var(--surface)), var(--ground));
  display: grid; place-items: center;
}
/* A real screenshot of the app when it exists (website/img), the glow otherwise. */
.phone .screen-home { background: url('/img/screen-home.webp') center top / cover, radial-gradient(80% 50% at 50% 30%, color-mix(in srgb, var(--volt) 18%, var(--surface)), var(--ground)); }
.phone .screen .logo { width: 40%; }
.phone .screen .logo path { fill: var(--volt); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px;
  border-radius: 50%; background: var(--volt); color: var(--on-volt); font: 18px/1 var(--font-brand);
}
.step h3 { font-size: 21px; }
.step p { color: var(--ink-muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Features: equal heights whatever the text length. */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 40px; }
.feature {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: transform 0.5s var(--spring), border-color 0.3s;
}
.feature:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--volt) 45%, var(--line)); }
.feature .art {
  aspect-ratio: 16 / 10;
  background: var(--art, none) center / cover, radial-gradient(70% 90% at 30% 20%, color-mix(in srgb, var(--volt) 16%, var(--surface-raised)), var(--surface-raised));
}
.feature .body { padding: 22px 24px 26px; flex: 1; }
/* Feature images (website/img), see docs/WEBSITE.md. */
.art-recovery { --art: url('/img/recovery.webp'); }
.art-loads { --art: url('/img/loads.webp'); }
.art-midset { --art: url('/img/midset.webp'); }
.art-gym { --art: url('/img/gym.webp'); }
.art-knees { --art: url('/img/knees.webp'); }
.art-records { --art: url('/img/records.webp'); }
.feature h3 { font-size: 20px; }
.feature p { color: var(--ink-muted); margin: 0; }

/* Wide image band with a quote. */
.band {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 96px auto 0; max-width: var(--max); border-radius: var(--radius-xl);
  min-height: 420px; display: grid; align-items: end; padding: 48px;
}
.band::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, rgba(10, 12, 11, 0.92), rgba(10, 12, 11, 0.1) 70%),
    url('/img/band.webp') center / cover,
    radial-gradient(60% 80% at 70% 30%, color-mix(in srgb, var(--gold) 20%, transparent), var(--surface));
}
.band p { font: clamp(24px, 4vw, 40px)/1.2 var(--font-brand); max-width: 760px; margin: 0; }
@media (max-width: 860px) { .band { margin: 64px 16px 0; padding: 28px; min-height: 340px; } }

/* Values and call to action */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.value { border-top: 2px solid var(--volt); padding-top: 16px; }
.value h3 { font-size: 19px; }
.value p { color: var(--ink-muted); margin: 0; }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; } }

.cta {
  text-align: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 64px var(--gutter);
}
.cta .lead { margin: 0 auto; }
.cta .store { justify-content: center; margin-top: 28px; }

/* Legal and help pages */
.prose { max-width: 760px; margin: 0 auto; padding: 64px var(--gutter) 0; }
.prose h1 { font: clamp(30px, 5vw, 44px)/1.1 var(--font-brand); margin-bottom: 8px; }
.prose h2 { font-size: 24px; margin-top: 48px; }
.prose h3 { font-size: 19px; margin-top: 28px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink-muted); font-weight: 600; }
.prose .updated { color: var(--ink-muted); font-size: 15px; }
.prose .callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--volt); border-radius: var(--radius-md); padding: 16px 20px; margin: 24px 0; }
.prose details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 4px 20px; margin: 12px 0; }
.prose summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.prose details p { color: var(--ink-muted); }

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