:root {
  --accent: #1F8F61;
  --accent-soft: rgba(31, 143, 97, 0.12);
  --bg: #FFFFFF;
  --bg-secondary: #EDEDF2;
  --card: #FFFFFF;
  --text: #1D1D1F;
  --text-secondary: #6E6E73;
  --separator: rgba(0, 0, 0, 0.1);
  --device: #1D1D1F;
  --radius: 22px;
  --gutter: 20px;
  --max: 1080px;
  color-scheme: light dark;
}

/* Dark colors follow the system unless the visitor picked a theme with the toggle (theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #40C280;
    --accent-soft: rgba(64, 194, 128, 0.16);
    --bg: #000000;
    --bg-secondary: #111113;
    --card: #1C1C1E;
    --text: #F5F5F7;
    --text-secondary: #A1A1A6;
    --separator: rgba(255, 255, 255, 0.14);
    --device: #3A3A3C;
  }
}

:root[data-theme="dark"] {
  --accent: #40C280;
  --accent-soft: rgba(64, 194, 128, 0.16);
  --bg: #000000;
  --bg-secondary: #111113;
  --card: #1C1C1E;
  --text: #F5F5F7;
  --text-secondary: #A1A1A6;
  --separator: rgba(255, 255, 255, 0.14);
  --device: #3A3A3C;
  color-scheme: dark;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

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

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

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

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
  padding-top: env(safe-area-inset-top);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -4px -6px -4px -8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); background: var(--bg-secondary); }
.theme-toggle svg { width: 20px; height: 20px; }
/* Show the moon in light mode (tap for dark) and the sun in dark mode (tap for light). */
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.nav-links a { color: var(--text-secondary); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Hero */
/* The top of the page fades from a hint of the accent color into the page background. */
.hero-area {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, var(--bg)) 0%, var(--bg) 85%);
}

.hero {
  text-align: center;
  padding: 56px 0 24px;
}
.hero .icon {
  width: 112px;
  height: 112px;
  margin: 0 auto 24px;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
h1 {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.tagline {
  font-size: 21px;
  color: var(--text-secondary);
  max-width: 34ch;
  margin: 0 auto 14px;
}
/* Apple's official badge artwork, unmodified, with clear space of at least 1/4 its height */
.app-store-badge {
  display: inline-block;
  padding: 14px;
}
.app-store-badge img { height: 54px; width: auto; }
.platforms {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Device frames */
.devices {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 32px;
  padding: 40px 0 64px;
}
.device {
  margin: 0;
  background: var(--device);
  padding: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
.device img { width: 100%; }
/* iPhone 17 Pro: 402 × 874 points */
.iphone {
  width: min(300px, 78vw);
  border-radius: 52px;
}
.iphone img { aspect-ratio: 402 / 874; border-radius: 42px; }
/* iPad Air 11-inch: 820 × 1180 points */
.ipad {
  display: none;
  width: 460px;
  border-radius: 30px;
  padding: 14px;
}
.ipad img { aspect-ratio: 820 / 1180; border-radius: 18px; }

/* Sections */
section { padding: 64px 0; border-top: 1px solid var(--separator); }
/* Sections alternate backgrounds by position, starting shaded, so new sections fit in automatically. */
main > section:nth-of-type(odd) { background: var(--bg-secondary); }
h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  text-align: center;
}
.lead {
  text-align: center;
  color: var(--text-secondary);
  max-width: 40ch;
  margin: 0 auto 40px;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.feature {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
}
.feature .symbol {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.feature .symbol svg { width: 24px; height: 24px; }
.feature h3 { font-size: 19px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--text-secondary); font-size: 16px; }

/* Spotlight rows */
.spotlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}
.spotlight + .spotlight { margin-top: 72px; }
.spotlight .copy { max-width: 440px; }
.spotlight .copy h2 { margin-bottom: 12px; }
.spotlight .copy p { color: var(--text-secondary); margin: 0; }

/* Scoring table */
.scoring {
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}
.scoring div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--separator);
}
.scoring div:last-child { border-bottom: none; }
.scoring span:last-child { color: var(--text-secondary); text-align: right; }

/* Privacy */
.privacy {
  max-width: 720px;
  margin: 0 auto;
}
.privacy h2 { text-align: left; }
.privacy .badge {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0 32px;
  font-weight: 600;
}
.privacy .badge svg { flex: none; width: 28px; height: 28px; color: var(--accent); }
.privacy h3 { font-size: 19px; margin: 28px 0 8px; }
.privacy p, .privacy li { color: var(--text-secondary); }
.privacy ul { padding-left: 20px; }
.privacy .updated { font-size: 14px; color: var(--text-secondary); margin: 0; }

footer {
  border-top: 1px solid var(--separator);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--text-secondary);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* iPad Air portrait (820 points) and wider */
@media (min-width: 744px) {
  :root { --gutter: 40px; }
  .hero { padding-top: 80px; }
  h1 { font-size: 56px; }
  .tagline { font-size: 24px; }
  h2 { font-size: 40px; }
  .ipad { display: block; width: min(460px, 52vw); }
  .iphone { width: min(240px, 28vw); border-radius: 44px; padding: 8px; }
  .iphone img { border-radius: 36px; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .spotlight {
    flex-direction: row;
    justify-content: center;
    text-align: left;
    gap: 56px;
  }
  .spotlight.reverse { flex-direction: row-reverse; }
  .spotlight .copy h2 { text-align: left; }
  .spotlight .device.iphone { width: 260px; flex: none; }
}

/* iPad Air landscape (1180 points) and wider */
@media (min-width: 1100px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .ipad { width: 520px; }
  .iphone { width: 270px; }
}

/* iPhone layout: the app icon and name on top, with the section links on their own row below */
@media (max-width: 480px) {
  .nav .wrap {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* Share */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--separator);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.share-button[hidden] { display: none; }
.share-button:hover { text-decoration: none; background: var(--bg-secondary); }
.share-button svg { width: 22px; height: 22px; flex: none; }
/* Brand colors from each network's guidelines; Threads and X use black (white in Dark Mode). */
.share-facebook svg { color: #0866FF; }
.share-bluesky svg { color: #1185FE; }
.share-whatsapp svg { color: #25D366; }
.share-email svg,
.share-more svg { color: var(--accent); }
