:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --hairline: rgba(0, 0, 0, 0.1);
  --link: #0066cc;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --secondary: #a1a1a6;
    --hairline: rgba(255, 255, 255, 0.14);
    --link: #2997ff;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 22px; }

/* Header */

.site-header { padding: 28px 0 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 43px; }
.brand span { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }

.logo {
  display: inline-block;
  background: currentColor;
  -webkit-mask: url(logo.svg) center / contain no-repeat;
  mask: url(logo.svg) center / contain no-repeat;
}

.site-nav { display: flex; gap: 22px; font-size: 15px; }
.site-nav a { color: var(--secondary); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); text-decoration: none; }

/* Hero */

.hero { text-align: center; padding-top: 56px; padding-bottom: 24px; }
.hero h1 {
  margin: 0 auto;
  max-width: 14em;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.hero p.lede {
  margin: 16px auto 0;
  max-width: 30em;
  font-size: clamp(19px, 2.4vw, 22px);
  color: var(--secondary);
}

.cta {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 24px;
  border-radius: 980px;
  background: var(--text);
  color: var(--bg);
  font-size: 17px;
  font-weight: 600;
}
.cta:hover { text-decoration: none; opacity: 0.85; }

/* HomeView: the photo on top, with its screen cut out; screenshots sit behind the opening.
   The opening is 640×640 at (50, 51) in the 741×880 image, padded a pixel under the bezel. */

.device {
  position: relative;
  width: min(520px, 100%);
  margin: 48px auto 0;
  aspect-ratio: 741 / 880;
}

.device .frame {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.18));
}

.device .screen {
  position: absolute;
  left: calc(49 / 741 * 100%);
  top: calc(50 / 880 * 100%);
  width: calc(642 / 741 * 100%);
  height: calc(642 / 880 * 100%);
  overflow: hidden;
  background: #1c1c1e;
}

.device .screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.device .screen img.on { opacity: 1; }

.device .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, #2c2c30, #151517);
}
.device .placeholder .logo { width: 22%; aspect-ratio: 566 / 819; color: rgba(255, 255, 255, 0.18); }

.dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.dots button {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--secondary); opacity: 0.35; cursor: pointer;
}
.dots button[aria-current="true"] { opacity: 1; }

/* Sources */

.section { padding-top: 88px; }
.section h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(30px, 4.4vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section .sub { margin: 10px auto 0; max-width: 34em; text-align: center; color: var(--secondary); font-size: 19px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  border-radius: 22px;
  background: var(--card);
}
.card .icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--text);   /* black tile, white glyph (flips in dark mode) */
  color: var(--card);
}
.card .icon svg { width: 30px; height: 30px; }
.card h3 { margin: 20px 0 6px; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--secondary); font-size: 16px; }
.card .more { margin-top: auto; padding-top: 18px; font-size: 15px; }

.also {
  margin-top: 20px;
  padding: 22px 28px;
  border-radius: 22px;
  background: var(--card);
  color: var(--secondary);
  font-size: 16px;
}
.also strong { color: var(--text); }

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.feature { padding: 26px 28px; border-radius: 22px; background: var(--card); }
.feature h3 { margin: 0 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--secondary); font-size: 16px; }

/* Plain pages (Support, Privacy) */

.page { max-width: 720px; padding-top: 48px; }
.page h1 { margin: 0; font-size: clamp(34px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
.page .updated { margin: 8px 0 0; color: var(--secondary); font-size: 15px; }
.page h2 { margin: 44px 0 10px; font-size: 24px; letter-spacing: -0.01em; }
.page p, .page li { color: var(--text); }
.page ul, .page ol { padding-left: 1.3em; }
.page li { margin: 6px 0; }
.page code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--card);
  overflow-wrap: anywhere;
}
.page .note { color: var(--secondary); }

/* Footer */

.site-footer {
  margin-top: 96px;
  padding: 22px 0 40px;
  border-top: 1px solid var(--hairline);
  color: var(--secondary);
  font-size: 13px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--secondary); }
.site-footer p { margin: 0; max-width: 46em; }

@media (max-width: 760px) {
  .cards, .features { grid-template-columns: 1fr; }
  .site-nav { gap: 16px; }
  .brand span { font-size: 28px; }
  .brand .logo { width: 25px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .device .screen img { transition: none; }
}
