:root {
  color-scheme: light dark;
  --background: #fff;
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --link: #0066cc;
  --brand: #007aff; /* the system blue the app uses */
  --step: #d0453b;
  --card: #fff;
  --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  --separator: #d2d2d7;
  --footer: #f5f5f7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000;
    --text: #f5f5f7;
    --secondary: #a1a1a6;
    --link: #2997ff;
    --brand: #0a84ff;
    --step: #ff6961;
    --card: #1c1c1e;
    --card-shadow: none;
    --separator: #424245;
    --footer: #1c1c1e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}

main { flex: 1; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, p { margin: 0; }

/* Home, laid out like iCloud's Invites page, as halfsheet.app is. */

.intro {
  text-align: center;
  padding: 96px 16px 64px;
}

.intro img { display: block; margin: 0 auto; }

.intro .app-icon { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.14)); }

.intro h1 {
  font-size: 80px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 36px 0 20px;
}

.intro p {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.38;
  max-width: 28em;
  margin: 0 auto;
  text-wrap: balance;
}

.intro .pill {
  display: inline-block;
  margin-top: 56px;
  padding: 12px 36px;
  border-radius: 999px;
  border: 1px solid var(--separator);
  color: var(--secondary);
  font-size: 17px;
  font-weight: 600;
  max-width: none;
}

.intro .more { margin-top: 28px; font-size: 17px; font-weight: 400; }

/* Three cards: what the app does, in the order it does it. */

.features {
  max-width: 1032px;
  margin: 0 auto;
  padding: 32px 16px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 44px 36px 48px;
  overflow: hidden;
}

.card .glyph { display: block; width: 52px; height: 40px; color: var(--brand); }

.card .glyph .step { color: var(--step); }

.card h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.004em;
  line-height: 1.14;
  margin: 36px 0 12px;
}

.card p { font-size: 17px; line-height: 1.47; }

/* Questions, folded like the iCloud pages. */

.faq {
  max-width: 1032px;
  margin: 0 auto;
  padding: 88px 16px 96px;
}

.faq h2 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 40px;
}

.faq details { border-bottom: 1px solid var(--separator); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.17;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-right: 2px solid var(--secondary);
  border-bottom: 2px solid var(--secondary);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s;
}

.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }

.faq summary:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 4px; }

.faq details p { max-width: 44em; padding: 0 0 24px; font-size: 17px; }

/* The header on every page: home on the left, Support on the right, as wide as the page's
   own column. */

.page-header {
  max-width: 712px;
  margin: 0 auto;
  width: 100%;
  padding: 24px 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header.wide { max-width: 1032px; }

.page-header .home-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}

.page-header .home-link img { border-radius: 7px; }

.page-header nav a { color: var(--secondary); }

/* Support, privacy and terms. */

.document {
  max-width: 712px;
  margin: 0 auto;
  padding: 48px 16px 64px;
}

.document h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.document .lead { font-size: 21px; color: var(--secondary); margin-bottom: 32px; }
.document .updated { font-size: 14px; color: var(--secondary); margin-bottom: 24px; }
.document h2 { font-size: 21px; font-weight: 600; margin: 40px 0 8px; }
.document h3 { font-size: 17px; font-weight: 600; margin: 24px 0 4px; }
.document p { margin-bottom: 12px; }
.document ul { margin: 0 0 12px; padding-left: 1.2em; }
.document li { margin-bottom: 6px; }

/* Footer on every page, a grey band as on iCloud. */

.footer {
  background: var(--footer);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 20px max(16px, calc((100% - 1000px) / 2));
  font-size: 12px;
  color: var(--secondary);
}

.footer nav { display: flex; flex-wrap: wrap; }

.footer nav a { color: var(--secondary); padding: 0 10px; border-left: 1px solid var(--separator); }

.footer nav a:first-child { padding-left: 0; border-left: 0; }

@media (max-width: 834px) {
  .features { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .intro { padding-top: 64px; }
  .intro img { width: 104px; height: 104px; }
  .intro h1 { font-size: 52px; margin-top: 28px; }
  .intro p { font-size: 19px; }
  .intro .pill { margin-top: 44px; }
  .card { padding: 32px 24px 36px; }
  .card h2 { font-size: 24px; margin-top: 28px; }
  .faq h2 { font-size: 32px; }
  .faq summary { font-size: 19px; }
  .footer { justify-content: center; text-align: center; }
  .document { padding-top: 32px; }
  .document h1 { font-size: 34px; }
  .document .lead { font-size: 19px; }
}
