/* Ordsam's site: the app's palettes, the system font, no scripts. Light first; dark follows the system. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f7f9f9;
  --text: #0f1419;
  --strong: #0f1419;
  --secondary: #536471;
  --border: #cfd9de;
  --link: #1d6fd8;
  --green: #00875a;
  --bezel: #0f1419;
  --shadow: 0 24px 56px rgba(15, 20, 25, 0.16);
  --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #16181c;
    --text: #e7e9ea;
    --strong: #ffffff;
    --secondary: #8b98a5;
    --border: #2f3336;
    --link: #4aa6ff;
    --green: #00ba7c;
    --bezel: #16181c;
    --shadow: none;
  }
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The wordmark is a mask, so it takes the text colour of each theme. */
.wordmark {
  display: block;
  width: 116px;
  aspect-ratio: 761 / 170;
  background: var(--strong);
  -webkit-mask: url("img/wordmark.png") center / contain no-repeat;
  mask: url("img/wordmark.png") center / contain no-repeat;
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.site-header .home {
  display: block;
  padding: 8px 0;
}

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

.site-header nav a,
.site-footer a {
  color: var(--secondary);
  text-decoration: none;
}

.site-header nav a {
  font-size: 15px;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--secondary);
  font-size: 15px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

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

.site-footer p {
  margin: 0;
}

/* Home: hero */

.hero {
  padding: 72px 0 64px;
  text-align: center;
}

.hero .wordmark {
  width: min(264px, 66vw);
  margin: 0 auto 32px;
}

.hero h1 {
  margin: 0;
}

.tagline {
  margin: 0 0 18px;
  color: var(--strong);
  font-size: clamp(34px, 9vw, 64px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.intro {
  max-width: 34em;
  margin: 0 auto 32px;
  color: var(--secondary);
  font-size: clamp(18px, 2.4vw, 21px);
}

.store {
  display: inline-block;
  border-radius: 10px;
}

.store img {
  width: auto;
  height: 52px;
}

.store-note {
  margin: 12px 0 0;
  color: var(--secondary);
  font-size: 14px;
}

@media (min-width: 820px) {
  .hero {
    padding: 120px 0 104px;
  }
}

/* Home: feature sections, each with a phone */

.feature,
.band {
  border-top: 1px solid var(--border);
  padding: 64px 0;
}

.feature .wrap {
  display: grid;
  gap: 44px;
  align-items: center;
}

.feature h2,
.band h2 {
  margin: 0 0 12px;
  color: var(--strong);
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.lead {
  margin: 0 0 24px;
  color: var(--secondary);
  font-size: 19px;
}

.points {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding-left: 24px;
}

.points li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* The top of the screen in a phone that fades out below. */
.phone {
  width: min(300px, 80vw);
  margin: 0 auto;
  padding: 10px 10px 0;
  background: var(--bezel);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 46px 46px 0 0;
  box-shadow: var(--shadow);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}

.phone img {
  width: 100%;
  border-radius: 36px 36px 0 0;
}

@media (min-width: 820px) {
  .feature,
  .band {
    padding: 104px 0;
  }

  .feature .wrap {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }

  .feature.flip .copy {
    order: 2;
  }

  .phone {
    width: 320px;
  }
}

/* Home: quiz types, privacy and the closing call */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.cards li {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.cards strong {
  display: block;
  margin-bottom: 4px;
  color: var(--strong);
}

.cards span {
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.45;
}

/* The quiz types are short enough for two columns on a phone. */
@media (min-width: 360px) {
  .cards.four {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 560px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .cards.four {
    grid-template-columns: repeat(4, 1fr);
  }

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

.band .more {
  margin: 24px 0 0;
}

.closing {
  text-align: center;
}

.closing .lead {
  margin-bottom: 28px;
}

/* Support and privacy */

.page {
  padding: 48px 0 72px;
}

/* Text pages keep the header, the text and the footer in one column. */
.doc .wrap {
  max-width: 720px;
}

.page h1 {
  margin: 0 0 8px;
  color: var(--strong);
  font-size: clamp(32px, 7vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.page h2 {
  margin: 36px 0 8px;
  color: var(--strong);
  font-size: 20px;
  line-height: 1.3;
}

.page .lead,
.page .updated {
  margin-top: 0;
  color: var(--secondary);
}

.page ul {
  padding-left: 22px;
}

.page li + li {
  margin-top: 6px;
}

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