:root {
  --text: #1b1f24;
  --muted: #57606a;
  --surface: #ffffff;
  --rule: #d8dee4;
  --link: #0b5fc4;
  --placeholder-bg: #ffe2e2;
  --placeholder-text: #8a1c1c;
  /* The app icon's two halves */
  --blue: #0a62c9;
  --red: #e0303b;
  /* The app's cards and labels, for the home page */
  --page: #eef3fa;
  --card: #ffffff;
  --card-border: #dbe4f2;
  --card-shadow: 0 1px 2px rgb(10 42 92 / 0.06), 0 8px 24px rgb(10 42 92 / 0.07);
  --label: #0a62c9;
  --tag: #e3edfb;
  --band: #0a62c9;
  --blueprint: #073f86;
  --on-label: #ffffff;
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a62c9' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
  color-scheme: light dark;
}

/* The header's switch sets data-theme; without a choice the page follows the system */
:root[data-theme='light'] {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --text: #e6e8eb;
    --muted: #9aa4af;
    --surface: #121417;
    --rule: #2e343b;
    --link: #6cb0ff;
    --placeholder-bg: #4a1f1f;
    --placeholder-text: #ffb4b4;
    --page: #0f1217;
    --card: #181d26;
    --card-border: #252c38;
    --card-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
    --label: #6fa8ff;
    --tag: #1b2a40;
    --band: #0b3f7d;
    --on-label: #0f1217;
    --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236fa8ff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
  }
}

:root[data-theme='dark'] {
  /* The same values as the system dark block above: change both together */
  color-scheme: dark;
  --text: #e6e8eb;
  --muted: #9aa4af;
  --surface: #121417;
  --rule: #2e343b;
  --link: #6cb0ff;
  --placeholder-bg: #4a1f1f;
  --placeholder-text: #ffb4b4;
  --page: #0f1217;
  --card: #181d26;
  --card-border: #252c38;
  --card-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
  --label: #6fa8ff;
  --tag: #1b2a40;
  --band: #0b3f7d;
  --on-label: #0f1217;
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236fa8ff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

main,
footer,
.bar {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* Blue and red split like the app icon, on every page */
.site {
  background: linear-gradient(90deg, var(--blue) 50%, var(--red) 50%);
  color: #fff;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.site .name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.site .name img {
  border-radius: 7px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site nav a {
  color: #fff;
}

a {
  color: var(--link);
}

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 32px 0 4px;
}

h2 {
  font-size: 1.3rem;
  margin: 36px 0 8px;
}

.updated {
  color: var(--muted);
  margin: 0 0 24px;
}

/* Anything still to be filled in before the page goes live */
.todo {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--rule);
}

/* Tables scroll sideways on a phone rather than widening the page */
.table-scroll {
  overflow-x: auto;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Home page */
.home main,
.home footer,
.home .bar {
  max-width: 64rem;
}

.hero {
  max-width: 64rem;
  margin: 0 auto;
  padding: 24px 16px 56px;
  text-align: center;
}

/* The icon sits on the seam, its own blue and red halves lining up with the band's */
.brand {
  margin: 8px 0 24px;
}

.brand img {
  display: block;
  width: clamp(80px, 18vw, 112px);
  height: auto;
  margin: 0 auto 10px;
  border-radius: 24%;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
}

.brand p {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.soon {
  display: inline-block;
  margin: 0;
  padding: 2px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.1;
  margin: 16px 0 12px;
}

.lede {
  max-width: 36rem;
  margin: 0 auto 24px;
  font-size: 1.1rem;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store {
  padding: 8px 16px;
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: 8px;
  font-size: 0.95rem;
}

/* The three screenshots, with room below them before the band ends */
.phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  justify-content: center;
  gap: clamp(8px, 3vw, 32px);
  margin: 40px 0 0;
}

.phones img {
  width: 100%;
  height: auto;
  border: clamp(5px, 1.2vw, 9px) solid #1b1f24;
  border-radius: clamp(16px, 4.5vw, 36px);
  background: #1b1f24;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.25);
}

/* On a phone the screenshots are too small three across, so they swipe sideways instead,
   with the next one peeking in from the edge */
@media (max-width: 600px) {
  .phones {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72vw;
    justify-content: start;
    gap: 12px;
    margin: 32px -16px -24px;
    padding: 0 16px 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
  }

  .phones img {
    scroll-snap-align: start;
    border-width: 8px;
    border-radius: 32px;
  }
}

/* Below the hero: the app's look, white cards with small blue capitals over each heading */
.home {
  background: var(--page);
}

.home main {
  max-width: none;
  padding: 0;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px;
}

.home section {
  padding-top: 64px;
}

.home h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 6px 0 12px;
}

.home h3 {
  font-size: 1.15rem;
  margin: 12px 0 6px;
}

.label {
  margin: 0;
  color: var(--label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card {
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--card-shadow);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 16px;
}

.home .features {
  padding-top: 56px;
}

.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tag);
  color: var(--label);
}

.icon svg {
  width: 24px;
  height: 24px;
}

.why {
  border-left: 4px solid var(--label);
}

.why h2 {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.band {
  margin-top: 64px;
  background: var(--band);
  color: #fff;
}

.band .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 32px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 48px;
}

.band .label {
  color: #cfe0ff;
}

.band p {
  margin: 0;
}

.points {
  display: grid;
  gap: 12px;
}

.point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.1);
}

.point svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

.point b {
  display: block;
}

.point span {
  font-size: 0.95rem;
  opacity: 0.85;
}

.plan h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

.plan .tagline {
  margin-bottom: 8px;
}

.plan ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan li {
  display: flex;
  gap: 10px;
}

/* A tick in a pale blue circle */
.plan li::before {
  content: '';
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--tag) var(--tick) center / 12px no-repeat;
}

.plan.subscribed {
  border: 2px solid var(--label);
}

.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.fine {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Drawn like the app's layout diagrams */
.blueprint {
  padding: 32px;
  border-radius: 16px;
  color: #fff;
  background-color: var(--blueprint);
  background-image:
    linear-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

.blueprint .label {
  color: #9fc4ff;
}

.blueprint h2 {
  margin-bottom: 20px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 12px 24px;
}

.facts b {
  display: block;
}

.facts span {
  color: #c9dcff;
  font-size: 0.95rem;
}

.blueprint .links {
  margin: 20px 0 0;
}

.blueprint a {
  color: #fff;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.cta h2 {
  margin: 0;
  font-size: 1.5rem;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--label);
  color: var(--on-label);
  font-weight: 600;
  text-decoration: none;
}


.home footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  margin-top: 64px;
  border-color: var(--card-border);
}

.home footer nav {
  gap: 4px 16px;
}

.theme {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.6);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  cursor: pointer;
}

.theme:hover {
  background: rgb(255 255 255 / 0.22);
}

.theme svg {
  width: 20px;
  height: 20px;
}

/* Show the sun while dark, offering light, and the moon while light */
.theme .sun,
:root[data-theme='dark'] .theme .moon {
  display: none;
}

:root[data-theme='dark'] .theme .sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme .moon {
    display: none;
  }

  :root:not([data-theme='light']) .theme .sun {
    display: block;
  }
}

.bar nav {
  justify-content: flex-end;
  margin-left: auto;
}

.theme,
.site .name {
  flex: none;
  white-space: nowrap;
}

@media (min-width: 601px) {
  .bar {
    flex-wrap: nowrap;
  }
}

/* On a phone the links drop to their own line, leaving the name and the switch on top */
@media (max-width: 600px) {
  .theme {
    order: 1;
    margin-left: auto;
  }

  .bar nav {
    order: 2;
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }

  /* The home page has the large logo instead, so its links share the top line with the switch */
  .home .bar nav {
    order: 0;
    width: auto;
  }
}
