/* Routside's website: one stylesheet for every page. No JavaScript, no web fonts, no
   third-party anything, so the site collects nothing, as the app doesn't.
   Colours are tokens on :root, redefined for dark mode, which follows the system. */

:root {
  --bg: #fbfbfd;
  --bg-raised: #ffffff;
  --bg-sunken: #f2f2f6;
  --text: #1d1d1f;
  --text-secondary: #5e5e66;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #1f6fe5;          /* the marker blue from the app icon */
  --accent-text: #ffffff;
  --button: #1f6fe5;          /* white text on it: 4.7:1 */
  --switch-on: #ffffff;       /* the device switch's chosen segment */
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 22px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-raised: #161618;
    --bg-sunken: #1c1c1f;
    --text: #f5f5f7;
    --text-secondary: #a1a1aa;
    --line: rgba(255, 255, 255, 0.14);
    --accent: #4c8dff;
    --accent-text: #ffffff;
    --button: #2a6fdb;        /* darker than the link blue, so white text keeps 4.8:1 */
    --switch-on: #3a3a3c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.6);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* The system font: San Francisco on Apple devices, the platform's own elsewhere. */
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -100px;
  background: var(--accent); color: var(--accent-text);
  padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* Header and footer */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 20px; padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 19px;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.site-nav a { color: var(--text-secondary); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

.site-footer {
  margin-top: 96px; border-top: 1px solid var(--line);
  color: var(--text-secondary); font-size: 14px;
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding-top: 28px; padding-bottom: 40px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: var(--text-secondary); }
.site-footer .fine { flex-basis: 100%; font-size: 12px; margin: 0; }

/* Buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--button); color: var(--accent-text);
  font-weight: 600; text-decoration: none;
}
.button:hover { filter: brightness(1.08); }
.button-note { margin: 10px 0 0; font-size: 14px; color: var(--text-secondary); }

/* Landing page */

.hero { padding: 56px 0 24px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) {
  .hero { padding: 88px 0 40px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; }
}
.hero-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 24px; }
.hero h1 {
  font-size: clamp(36px, 7vw, 60px); line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 18px; font-weight: 700;
}
.hero .lede { font-size: clamp(19px, 2.4vw, 22px); color: var(--text-secondary); margin: 0 0 28px; max-width: 34em; }
.hero-device { justify-self: center; width: min(320px, 78vw); filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.18)); }

.section { padding: 64px 0 0; }
.section h2 {
  font-size: clamp(28px, 4.5vw, 40px); line-height: 1.1; letter-spacing: -0.015em;
  margin: 0 0 12px; font-weight: 700;
}
.section .intro { color: var(--text-secondary); font-size: 19px; margin: 0 0 32px; max-width: 40em; }

/* The device switch: three radio buttons drawn as a segmented control, like iOS's. The
   inputs stay in the page (only made invisible), so the keyboard and VoiceOver use them as a
   normal radio group: Tab to it, arrow keys to change. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.device-switch {
  display: inline-flex; gap: 2px; margin: 0 0 28px; padding: 3px; border: 0;
  border-radius: 999px; background: var(--bg-sunken);
}
.device-switch input { position: absolute; opacity: 0; pointer-events: none; }
.device-switch label {
  padding: 8px 18px; border-radius: 999px; font-size: 15px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer;
}
.device-switch input:checked + label {
  background: var(--switch-on); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.device-switch input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }

/* One gallery per device; only the chosen one shows. */
.showcase .gallery { display: none; }
.showcase:has(#show-iphone:checked) .gallery-iphone,
.showcase:has(#show-duo:checked) .gallery-duo,
.showcase:has(#show-ipad:checked) .gallery-ipad { display: grid; }

/* The screenshots scroll sideways inside their own strip on narrow screens; the page itself
   never scrolls sideways. Each device's strip is sized to its shape. */
.gallery {
  grid-auto-flow: column; grid-auto-columns: min(220px, 62vw);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 16px 24px; margin: 0 -16px;
}
.gallery-duo { grid-auto-columns: min(270px, 70vw); }
.gallery-ipad { grid-auto-columns: min(400px, 80vw); }
@media (min-width: 1040px) {
  .gallery-iphone, .gallery-duo {
    grid-auto-flow: row; grid-template-columns: repeat(5, 1fr);
    overflow: visible; margin: 0; padding: 8px 0 0;
  }
}
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery img { width: 100%; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.16)); }
.gallery figcaption { text-align: center; color: var(--text-secondary); font-size: 15px; margin-top: 14px; }

.features { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.feature h3 { margin: 0 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--text-secondary); font-size: 16px; }

.callout {
  margin-top: 64px; padding: 40px 24px; border-radius: 28px; text-align: center;
  background: var(--bg-raised); border: 1px solid var(--line);
}
.callout h2 { margin-top: 0; }
.callout p { color: var(--text-secondary); max-width: 36em; margin: 0 auto 24px; }

/* Text pages: privacy, accessibility, support */

.doc { max-width: 720px; padding-top: 56px; }
.doc h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 8px; }
.doc .updated { color: var(--text-secondary); margin: 0 0 32px; font-size: 15px; }
.doc .summary {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 0 0 40px; font-size: 18px;
}
.doc h2 { font-size: 24px; margin: 44px 0 10px; letter-spacing: -0.01em; }
.doc h3 { font-size: 19px; margin: 28px 0 6px; }
.doc ul { padding-left: 1.25em; }
.doc li { margin: 6px 0; }
.doc dt { font-weight: 600; margin-top: 18px; }
.doc dd { margin: 4px 0 0; color: var(--text-secondary); }
.doc details {
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg-raised);
  padding: 14px 20px; margin: 12px 0;
}
.doc summary { font-weight: 600; cursor: pointer; }
.doc details p { margin: 10px 0 2px; color: var(--text-secondary); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
