/* Same font and tokens as the app (lib/theme/app_theme.dart). The font is
   self-hosted so visiting these pages sends nothing to a third party. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/PlusJakartaSans-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/PlusJakartaSans-Bold.ttf") format("truetype");
}

:root {
  --background: #f6f6f3;
  --surface: #ffffff;
  --border: #e6e6e0;
  --text: #15151a;
  --text-secondary: #6a6a74;
  --link: #4f46e5;
  --surface-muted: #efefea;
  --bezel-ring: transparent;
  /* The goal accents, in the app's order (lib/theme/tokens.dart). */
  --rose: #f43f5e;
  --orange: #ea580c;
  --amber: #d97706;
  --green: #16a34a;
  --teal: #0d9488;
  --blue: #2563eb;
  --violet: #8b5cf6;
  --pink: #db2777;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0d0d10;
    --surface: #17171c;
    --border: #2a2a31;
    --text: #f3f3f6;
    --text-secondary: #9c9ca8;
    --link: #a5b4fc;
    --surface-muted: #222228;
    --bezel-ring: #3a3a43;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 500 16px/1.6 "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

h1 {
  margin: 40px 0 4px;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

h2 {
  margin: 36px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

h3 {
  margin: 24px 0 4px;
  font-size: 16px;
}

p,
ul {
  margin: 8px 0;
}

ul {
  padding-left: 22px;
}

li {
  margin: 4px 0;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

.updated,
footer {
  color: var(--text-secondary);
  font-size: 14px;
}

.summary {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.summary ul {
  margin: 0;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

footer a {
  color: inherit;
}

/* Home page: a front section with the app, then the support FAQ at the
   same width as the other pages. */
.home {
  max-width: 992px;
}

.home > :not(.hero) {
  max-width: 648px;
  margin-inline: auto;
}

.hero {
  display: grid;
  gap: 28px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
}

.hero-text {
  padding: 28px 24px 0;
}

.app {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app img {
  width: 60px;
  height: 60px;
  /* The icon's corner radius (230 of 1024), so the dark-mode ring fits it. */
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px var(--bezel-ring);
}

.app p {
  display: grid;
  margin: 0;
  line-height: 1.3;
}

.app strong {
  font-size: 18px;
}

.app span {
  color: var(--text-secondary);
  font-size: 14px;
}

.hero h1 {
  margin: 28px 0 0;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -1.2px;
}

/* The app's segmented progress bar, one segment per goal color. */
.segments {
  display: flex;
  gap: 5px;
  max-width: 264px;
  margin: 18px 0 20px;
}

.segments span {
  flex: 1;
  height: 8px;
  border-radius: 4px;
}

.segments span:nth-child(1) { background: var(--rose); }
.segments span:nth-child(2) { background: var(--orange); }
.segments span:nth-child(3) { background: var(--amber); }
.segments span:nth-child(4) { background: var(--green); }
.segments span:nth-child(5) { background: var(--teal); }
.segments span:nth-child(6) { background: var(--blue); }
.segments span:nth-child(7) { background: var(--violet); }
.segments span:nth-child(8) { background: var(--pink); }

.hero .lede {
  max-width: 30em;
  margin: 0;
  color: var(--text-secondary);
  font-size: 17px;
  text-wrap: pretty;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  padding: 5px 14px;
  background: var(--surface-muted);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 14px;
}

.soon::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

/* Two store screenshots in a phone bezel. The card cuts them off at the
   bottom, so the section stays short. */
.shots {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 16px;
  height: 300px;
}

.shots::before {
  content: "";
  position: absolute;
  inset: -20% -25% -40%;
  /* Each glow fades out inside this box, so none of them shows an edge. */
  background:
    radial-gradient(34% 30% at 42% 42%, rgb(139 92 246 / 0.22), transparent),
    radial-gradient(30% 28% at 62% 58%, rgb(244 63 94 / 0.16), transparent),
    radial-gradient(26% 24% at 56% 30%, rgb(37 99 235 / 0.14), transparent);
}

.shots img {
  position: relative;
  align-self: flex-start;
  width: 46%;
  max-width: 236px;
  height: auto;
  background: #f6f6f3;
  border: 5px solid #15151a;
  border-radius: 13% / 6%;
  box-shadow:
    0 0 0 1px var(--bezel-ring),
    0 24px 48px -20px rgb(21 21 26 / 0.45);
}

.shots img + img {
  margin-top: 36px;
}

.home h2:first-of-type {
  margin-top: 48px;
}

@media (min-width: 760px) {
  .home {
    padding-top: 48px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 24px;
  }

  .hero-text {
    padding: 48px 0 48px 48px;
  }

  .hero h1 {
    font-size: 54px;
    letter-spacing: -1.8px;
  }

  .shots {
    height: 440px;
    padding-top: 48px;
    gap: 20px;
  }

  .shots img {
    border-width: 7px;
  }
}
