/* Tandem's website: the app's green and mint, rounded cards, light or dark following the device. */
:root {
  --green: #2f5d50;
  --mint: #9fd8c4;
  --bg: #f6f9f7;
  --surface: #ffffff;
  --surface-2: #e9f1ed;
  --text: #19201d;
  --muted: #54605a;
  --line: #d9e3de;
  --accent: #2f5d50;
  --on-accent: #ffffff;
  --link: #2f5d50;
  --shadow: 0 1px 2px rgb(25 32 29 / 5%), 0 10px 28px rgb(47 93 80 / 9%);
  --radius: 22px;
  --radius-small: 14px;
  --width: 1040px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1311;
    --surface: #161d1a;
    --surface-2: #1d2622;
    --text: #e2e9e5;
    --muted: #a2aea8;
    --line: #2a3430;
    --accent: #9fd8c4;
    --on-accent: #0d2a21;
    --link: #9fd8c4;
    --shadow: none;
  }
}

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

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

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

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

code {
  font: 0.9em/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: var(--surface-2);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}

.wrap {
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-small);
  z-index: 10;
}

/* Header and footer, the same on every page. */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

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

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

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

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

main {
  padding: 40px 0 64px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 20px;
  padding-bottom: 28px;
}

.site-footer a {
  color: var(--muted);
}

/* Buttons and the download box. */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.button:hover {
  filter: brightness(1.08);
}

.button svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.soon {
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 8px 0 0;
}

/* What the download box shows while latest.json loads, once it has, and if it couldn't. */
[data-pc] .when-ready,
[data-pc] .when-failed {
  display: none;
}

[data-pc].ready .when-ready,
[data-pc].failed .when-failed {
  display: block;
}

[data-pc].ready .when-loading,
[data-pc].failed .when-loading {
  display: none;
}

.sha {
  overflow-wrap: anywhere;
}

/* Home. */
.hero {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 16px;
}

.hero .lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 28px;
}

.section {
  margin-top: 72px;
}

.cards {
  display: grid;
  gap: 16px;
}

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

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--accent);
  margin-bottom: 14px;
}

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

.wide-shot {
  margin: 0 0 24px;
}

.wide-shot img {
  display: block;
  width: 100%;
  max-width: 680px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.wide-shot figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
  max-width: 680px;
}

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.shots img {
  width: 100%;
}

.shots figure {
  flex: none;
  /* Three across when they fit; on phones the row scrolls sideways. */
  width: clamp(180px, calc((100% - 32px) / 3), 240px);
  margin: 0;
  scroll-snap-align: start;
}

.shots img {
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.shots figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.band {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 32px 24px;
}

/* Download, support and text pages. */
.page-intro {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 40em;
}

.platform h2 {
  margin-bottom: 4px;
}

.checklist {
  margin: 16px 0;
  padding-left: 1.2em;
}

.prose {
  max-width: 44em;
}

.prose h2 {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.prose li {
  margin: 4px 0;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  padding: 4px 20px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 12px 0;
}

.faq details[open] summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.release {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.prose .release h2,
.prose .faq h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.release h2 {
  font-size: 1.3rem;
}

.release ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}

.release > :last-child {
  margin-bottom: 0;
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
  }

  .cards.three {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards.two {
    grid-template-columns: repeat(2, 1fr);
  }

  .band {
    padding: 40px;
  }
}
