:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #111111;
  --muted: #5f5f5f;
  --accent: #111111;
  --accent-dark: #000000;
  --line: #dedede;
  --panel: #ffffff;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --accent: #f5f5f5;
  --accent-dark: #ffffff;
  --line: #333333;
  --panel: #111111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

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

.page {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 80px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-link,
.nav-links a {
  color: var(--text);
  text-decoration: none;
}

.brand-link {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.site-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 64px;
}

.intro {
  max-width: 640px;
}

.app-hero {
  max-width: 760px;
  padding: 0 0 48px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.theme-toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 160ms ease;
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(20px);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-weight: 650;
  line-height: 1.05;
}

h2 {
  margin: 44px 0 10px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1.25;
}

p,
li {
  color: var(--muted);
  font-size: 1rem;
}

.intro p:not(.eyebrow) {
  max-width: 620px;
  margin: 22px 0 28px;
  font-size: 1.05rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
}

.app-store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--text);
  border-radius: 8px;
  background: var(--text);
  color: var(--panel);
  text-decoration: none;
}

.app-store-button:hover,
.app-store-button:focus {
  background: var(--panel);
  color: var(--text);
}

.app-store-icon {
  display: flex;
  width: 26px;
  height: 26px;
}

.app-store-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.app-store-small,
.app-store-large {
  display: block;
  line-height: 1.1;
}

.app-store-small {
  font-size: 0.72rem;
}

.app-store-large {
  font-size: 1.22rem;
  font-weight: 700;
}

.text-link {
  font-weight: 650;
}

.screenshot-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

.screenshot-gallery figure {
  margin: 0;
}

.screenshot-gallery img {
  max-height: 640px;
  object-fit: cover;
  object-position: top center;
}

.screenshot-gallery figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.feature-list h2 {
  margin-top: 0;
}

.feature-list p {
  margin-bottom: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--text);
  border-radius: 4px;
  background: var(--text);
  color: var(--panel);
  font-weight: 650;
  text-decoration: none;
}

.button:hover,
.button:focus {
  background: var(--panel);
  color: var(--text);
}

.policy {
  max-width: 760px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--panel);
}

.policy ul {
  padding-left: 1.25rem;
}

.policy-meta {
  margin: 18px 0 40px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 24px, 920px);
    padding: 24px 0 40px;
  }

  .site-footer {
    margin-top: 40px;
  }

  .top-nav {
    margin-bottom: 36px;
  }

  .app-hero,
  .screenshot-gallery,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .app-hero {
    padding: 0 0 48px;
  }

  .actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .screenshot-gallery {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }

  .screenshot-gallery figure {
    flex: 0 0 min(78vw, 320px);
    scroll-snap-align: start;
  }

  .screenshot-gallery img {
    max-height: none;
  }

  .feature-list {
    gap: 18px;
    padding-top: 32px;
  }

  .policy {
    padding: 0;
  }
}
