/* Magpie's landing page. Colours and fonts are the app's own
   (magpie-product, docs/02-design-tokens.md). The privacy and support
   pages use it too (the "doc" rules near the end). */

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

:root {
  --background: #F1F3EE;
  --surface: #FFFFFF;
  --ink: #14201B;
  --ink-secondary: #3C4A43;
  --ink-tertiary: #4A5750;
  --brand: #0B7A5C;
  --brand-text: #0B7A5C;
  --accent: #FFD84D;
  --border: #C9D0C8;
  --border-soft: #D3D9D1;
  --chip-fill: #E3E8E2;
  --hero-card: #14201B;
  --on-dark: #FFFFFF;
  --on-dark-secondary: #C9D3CD;
  --shadow: 0 18px 26px rgba(20, 32, 27, 0.22);

  --heading: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0E1512;
    --surface: #18221D;
    --ink: #EDF2EE;
    --ink-secondary: #C7D1CA;
    --ink-tertiary: #A9B5AD;
    --brand-text: #4FD1A5;
    --border: #3E4E46;
    --border-soft: #3A4A42;
    --chip-fill: #2A372F;
    --hero-card: #1F3A2E;
    --shadow: 0 18px 26px rgba(0, 0, 0, 0.5);
  }
}

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

body {
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--brand-text);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  color: var(--ink);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Top bar */
.top {
  padding: 20px 0;
}

.top .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.9375rem;
}

.top a {
  color: var(--ink-tertiary);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
}

.top a:hover {
  color: var(--brand-text);
}

.top nav {
  display: flex;
  gap: 24px;
}

/* Hero */
.hero {
  padding: 32px 0 72px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 56px;
}

.mark {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.mark img {
  width: 64px;
  height: 64px;
  border-radius: 22.5%;
  border: 1px solid var(--border-soft);
}

.mark span {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(2.375rem, 5.6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.04;
}

.hero h1 em {
  font-style: normal;
  color: var(--brand-text);
}

.lede {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-top: 22px;
  max-width: 34rem;
}

.cta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.soon {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: var(--accent);
  color: #14201B;
  border-radius: 999px;
  padding: 12px 22px;
}

.store-badge img {
  height: 56px;
  width: auto;
}

.cta small {
  font-size: 0.9375rem;
  color: var(--ink-tertiary);
}

/* A real screenshot in Apple's iPhone bezel (made with AppShots' frame
   command). The picture has a transparent background. */
.phone {
  --w: 320px;
  width: var(--w);
  height: auto;
  flex: none;
  filter: drop-shadow(var(--shadow));
}

/* Intro and the gaps */
.intro {
  padding: 24px 0 72px;
}

.intro h2,
.features h2,
.more h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.375rem);
  font-weight: 700;
  line-height: 1.1;
}

.examples {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.examples li {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 18px 18px 20px;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--ink);
}

.intro p {
  margin-top: 28px;
  max-width: 44rem;
  font-size: 1.1875rem;
}

.recall {
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: 32px;
}

.recall h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

.recall p {
  margin-top: 10px;
  font-size: 1.0625rem;
}

.gaps {
  list-style: none;
  display: flex;
  align-items: flex-start;
  margin-top: 30px;
  padding-left: 14px;
  position: relative;
}

/* The dot for the day a fact is saved */
.gaps::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
}

.gaps li {
  flex: var(--g) 1 0;
  min-width: 0;
  position: relative;
  padding-top: 26px;
  text-align: center;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
}

.gaps li::before {
  content: '';
  position: absolute;
  left: 0;
  right: 14px;
  top: 6px;
  height: 2px;
  background: var(--border);
}

.gaps li::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
}

.gaps-note {
  font-size: 0.9375rem !important;
  color: var(--ink-tertiary);
  margin-top: 14px !important;
}

/* Feature cards */
.features {
  padding: 0 0 72px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.card {
  border-radius: 24px;
  padding: 36px 36px 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.12;
}

.card p {
  margin-top: 12px;
  min-height: 6.4em;
  text-wrap: pretty;
}

.card .phone {
  --w: 300px;
  margin: 28px auto 0;
  /* Only the top of the phone shows; the card cuts off the rest. */
  margin-bottom: calc(var(--w) * -0.86);
}

.card.green {
  background: var(--brand);
  border-color: var(--brand);
  color: #E4F2EC;
}

.card.green h3 {
  color: #FFFFFF;
}

.card.green h3 em,
.card.dark h3 em {
  font-style: normal;
  color: var(--accent);
}

.card.dark {
  background: var(--hero-card);
  border-color: var(--hero-card);
  color: var(--on-dark-secondary);
}

.card.dark h3 {
  color: var(--on-dark);
}

/* Smaller points */
.more {
  padding: 0 0 72px;
}

.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.points h3 {
  font-size: 1.3125rem;
  font-weight: 700;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.points p {
  margin-top: 10px;
}

/* Free to try */
.plus {
  padding: 0 0 80px;
}

.plus-card {
  background: var(--hero-card);
  color: var(--on-dark-secondary);
  border-radius: 24px;
  padding: 44px;
}

.plus-card .pill {
  display: inline-block;
  background: var(--accent);
  color: #14201B;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 999px;
  padding: 5px 14px;
}

.plus-card h2 {
  color: var(--on-dark);
  font-size: clamp(1.75rem, 3.6vw, 2.375rem);
  font-weight: 700;
  line-height: 1.1;
  margin-top: 18px;
}

.plus-card p {
  margin-top: 14px;
  max-width: 42rem;
  font-size: 1.125rem;
}

.plus-card .cta {
  margin-top: 26px;
}

.plus-card .cta small {
  color: var(--on-dark-secondary);
}

/* Privacy and support pages */
.top a[aria-current="page"] {
  color: var(--ink);
}

.doc {
  padding: 24px 0 80px;
}

/* One narrow column: the top bar and footer line up with the text. */
.narrow .wrap {
  max-width: 760px;
}

.doc header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 8px;
}

.doc .mark {
  text-decoration: none;
  width: fit-content;
}

.doc .mark img {
  width: 48px;
  height: 48px;
}

.doc .mark span {
  font-size: 1.375rem;
}

.doc h1 {
  font-size: clamp(2.125rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.06;
}

.doc-sub {
  margin-top: 10px;
  color: var(--ink-tertiary);
}

.doc h2 {
  font-size: 1.4375rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 40px;
}

.doc p,
.doc ul {
  margin-top: 14px;
}

.doc header p,
.doc header h1 {
  margin-top: 0;
}

.doc header .doc-sub {
  margin-top: 10px;
}

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

.doc li + li {
  margin-top: 8px;
}

.doc a:not(.mark) {
  font-weight: 500;
  text-underline-offset: 3px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0 48px;
  font-size: 0.9375rem;
  color: var(--ink-tertiary);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

footer a {
  color: var(--ink-secondary);
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
}

footer a:hover {
  color: var(--brand-text);
}

footer p {
  margin-top: 14px;
}

footer .legal {
  font-size: 0.8125rem;
}

/* Narrower screens */
@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .hero .phone {
    margin: 0 auto;
  }

  .examples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .card p {
    min-height: 0;
  }

  .points {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 520px) {
  .hero {
    padding: 16px 0 56px;
  }

  .lede {
    font-size: 1.125rem;
  }

  .phone {
    --w: min(300px, 78vw);
  }

  .examples {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .examples li {
    padding: 14px 18px 16px;
  }

  .card {
    padding: 28px 24px 0;
  }

  .card .phone {
    --w: min(280px, 76vw);
  }

  .recall {
    padding: 24px 20px;
  }

  .gaps li {
    font-size: 1rem;
  }

  .plus-card {
    padding: 32px 24px;
  }
}
