:root {
  color-scheme: light dark;

  --bg: #FFFFFF;
  --surface: #F5F7FC;
  --surface-warm: #FDF7E7;
  --text: #171B26;
  --text-muted: #4D5568;
  --border: #DCE2F0;

  --accent: #3857C7;
  --accent-hover: #2E4DB8;
  --button-bg: #3857C7;
  --button-hover: #2E4DB8;
  --button-text: #FFFFFF;

  --amber: #F5BA42;
  --amber-text: #7A5200;
  --focus: #3857C7;

  --grad-start: #4D73ED;
  --grad-end: #2E4DB8;

  --window-shadow: 0 12px 32px rgba(23, 27, 38, 0.14), 0 2px 6px rgba(23, 27, 38, 0.08);

  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --measure: 44rem;
  --measure-wide: 64rem;
  --radius: 0.75rem;
  --radius-sm: 0.45rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10131B;
    --surface: #181D29;
    --surface-warm: #241E12;
    --text: #EEF1F8;
    --text-muted: #A4AFC6;
    --border: #2A3245;

    --accent: #89A8FF;
    --accent-hover: #ADC2FF;
    --button-bg: #3857C7;
    --button-hover: #2E4DB8;
    --button-text: #FFFFFF;

    --amber: #F5BA42;
    --amber-text: #F5BA42;
    --focus: #F5BA42;

    --grad-start: #4D73ED;
    --grad-end: #2E4DB8;

    --window-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  background-color: var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  font-weight: 600;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.skip-link:focus {
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Header */

.site-header {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
}

.site-brand {
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

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

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Main */

main {
  flex: 1 0 auto;
  padding-block: 3rem 4rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-top: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.0625rem;
  margin-top: 1.6rem;
  margin-bottom: 0.35rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.1rem;
}

ul,
ol {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.5rem;
}

li:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.12em 0.35em;
  border-radius: 0.3rem;
  background-color: var(--surface);
  color: var(--text);
  overflow-wrap: anywhere;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.meta {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.small-note {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Home app cards */

.app-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1.25rem;
}

.app-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background-color: var(--surface);
  border: 1px solid var(--border);
}

.app-card-icon {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
}

.app-card-body {
  flex: 1 1 16rem;
  min-width: 0;
}

.app-card-title {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-size: 1.35rem;
}

.app-card-title a {
  color: var(--text);
  text-decoration: none;
}

.app-card-title a:hover {
  color: var(--accent);
}

.app-card-tagline {
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.app-card-meta {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.app-card-action {
  margin-bottom: 0;
}

.app-card-link {
  font-weight: 600;
}

/* Discern hero */

.app-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
  margin-bottom: 2.25rem;
}

.app-hero-icon {
  flex: 0 0 auto;
  width: 128px;
  height: 128px;
}

.app-hero-text {
  flex: 1 1 15rem;
  min-width: 0;
}

.app-hero-text h1 {
  margin-bottom: 0.25rem;
}

.app-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.availability {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background-color: var(--surface-warm);
  border: 1px solid var(--amber);
  color: var(--amber-text);
  font-size: 0.9375rem;
  font-weight: 500;
}

.hero-action {
  margin-bottom: 0.5rem;
}

.hero-meta {
  margin-bottom: 0;
}

/* Before-and-after comparison */

.compare {
  width: 100%;
  max-width: var(--measure-wide);
  margin: 2rem auto;
  padding-inline: 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.compare-item {
  margin: 0;
  min-width: 0;
}

.compare-item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.compare-item figcaption {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
}

@media (min-width: 44rem) {
  .compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* App window screenshots */

.screen {
  width: 100%;
  max-width: var(--measure-wide);
  margin: 2rem auto 2.25rem;
  padding-inline: 1.25rem;
}

.screen img {
  width: 100%;
  height: auto;
  border-radius: clamp(0.25rem, 1.1vw, 0.75rem);
  box-shadow: var(--window-shadow);
}

.screen figcaption {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (min-width: 48rem) {
  .screen figcaption {
    max-width: var(--measure);
    margin-inline: auto;
    text-align: center;
  }
}

/* Demo stills */

.still {
  margin: 2rem 0;
}

.still img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.still figcaption {
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Sample and download boxes */

.sample-box,
.download-box {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background-color: var(--surface);
  border: 1px solid var(--border);
}

.sample-box h2,
.download-box h2 {
  margin-top: 0;
}

.sample-box > :last-child,
.download-box > :last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  background-color: var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

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

.closing-note {
  margin-top: 2.25rem;
  color: var(--text-muted);
}

.page-links {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

/* Footer */

.site-footer {
  padding-block: 1.75rem 2.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.copyright {
  margin: 0;
}

@media (max-width: 30rem) {
  main {
    padding-block: 2.25rem 3rem;
  }

  .app-card,
  .sample-box,
  .download-box {
    padding: 1.15rem;
  }

  .app-hero-icon {
    width: 88px;
    height: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition: none;
    animation: none;
  }
}
