:root {
  --sky: #66b5fa;
  --sky-deep: #2f8fe6;
  --bg: #f3f8fd;
  --bg-card: #ffffff;
  --text: #15202b;
  --muted: #5b6b7b;
  --accent: #0a66c2;
  --line: #dbe6f1;
  --green: #2fb34a;
  --shadow: 0 1px 2px rgb(20 50 90 / .06), 0 12px 32px -12px rgb(20 50 90 / .2);
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky: #1d5d96;
    --sky-deep: #174c7c;
    --bg: #0d151e;
    --bg-card: #15202c;
    --text: #e9f1f9;
    --muted: #9fb0c1;
    --accent: #7cc2ff;
    --line: #243241;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 3px; }

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

/* ---------- Top bar ---------- */

.topbar {
  background: var(--sky);
  color: #fff;
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: .9rem 1rem;
}

.topbar .brand img { width: 9rem; }

.topbar nav { margin-left: auto; }

.store-top { flex: none; }
.store-top img { width: 7.5rem; }

/* Narrow screens: logo + App Store badge on the first row, menu below */
@media (max-width: 48rem) {
  .store-top { margin-left: auto; }
  .store-top img { width: 6.5rem; }
  .topbar nav { order: 3; flex-basis: 100%; margin-left: 0; }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: .3rem .75rem;
  border-radius: 999px;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}
.nav a:hover { background: rgb(255 255 255 / .18); }
.nav a[aria-current="page"] { background: #fff; color: var(--sky-deep); }
.nav a:focus-visible { outline-color: #fff; }

@media (prefers-color-scheme: dark) {
  .nav a[aria-current="page"] { background: rgb(255 255 255 / .92); color: #174c7c; }
}

/* ---------- Home hero ---------- */

.hero {
  background: var(--sky);
  color: #fff;
  text-align: center;
  padding: clamp(1.25rem, 3vw, 2.25rem) 1rem clamp(1.75rem, 4vw, 2.75rem);
}

.hero h1 { margin: 0; }

.hero .logo { width: min(20rem, 72vw); margin: 0 auto; }

.tagline {
  margin: .75rem auto 0;
  max-width: 32rem;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
  text-shadow: 0 1px 2px rgb(0 0 0 / .18);
}

.store { display: inline-block; border-radius: .6rem; transition: transform .2s; }
.store:hover { transform: scale(1.04); }
.store img { width: 9.5rem; }


/* ---------- Generic layout ---------- */

main { display: block; }

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.section { padding: clamp(2.5rem, 7vw, 4.5rem) 0 0; }

.section > h2,
.page h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  line-height: 1.2;
  text-wrap: balance;
}

.lead {
  max-width: 40rem;
  font-size: 1.15rem;
  text-wrap: pretty;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0 0;
  border-radius: 1rem;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Feature cards (home) ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.feature picture { width: 9.5rem; margin-bottom: 1rem; }
.feature img { filter: drop-shadow(0 10px 14px rgb(0 0 0 / .18)); }
.feature h3 { margin: 0; font-size: 1.2rem; }
.feature p { margin: .5rem 0 0; font-size: .95rem; color: var(--muted); text-wrap: pretty; }

.more-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: 2rem;
}

.button {
  display: inline-block;
  padding: .6rem 1.25rem;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { filter: brightness(1.07); }
.button.secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--line); }

/* ---------- Post list ---------- */

.posts { margin: 0; padding: 0; list-style: none; display: grid; gap: 1rem; }

.posts li {
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.posts a { font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.posts a:hover { text-decoration: underline; }
.posts p { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }

.date { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ---------- Text pages ---------- */

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) 1rem 4rem;
}

.page.wide { max-width: 64rem; }

.page h2 { margin: 2.5rem 0 .75rem; font-size: 1.45rem; line-height: 1.25; scroll-margin-top: 1rem; }
.page h3 { margin: 2rem 0 .5rem; font-size: 1.15rem; }
.page p, .page li { text-wrap: pretty; }
.page li + li { margin-top: .5rem; }
.page ul ul { margin-top: .5rem; }

.page figure.photo { margin: 1.5rem 0; }
.page figure.photo img { border-radius: 1rem; box-shadow: var(--shadow); }

.toc {
  padding: 1.1rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.toc ol { margin: 0; padding-left: 1.25rem; columns: 2 14rem; column-gap: 2rem; }
.toc li + li { margin-top: .2rem; }

/* Text + phone screenshot side by side */

.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  gap: 1rem 2.5rem;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.step:first-of-type { border-top: 0; }
.step h2 { margin-top: 0; }
.step picture img { filter: drop-shadow(0 10px 14px rgb(0 0 0 / .18)); }

/* Phone tilted to the right sits left of the text, so it always faces the text */
@media (min-width: 40.01rem) {
  .step.phone-left { grid-template-columns: 13rem minmax(0, 1fr); }
  .step.phone-left > picture { order: -1; }
}

@media (max-width: 40rem) {
  .step { grid-template-columns: minmax(0, 1fr); }
  .step picture { width: 11rem; margin: 0 auto; }
}

/* FAQ */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  gap: 2.5rem;
  align-items: start;
}
.faq-layout > picture { position: sticky; top: 1.5rem; }
.faq-layout > picture img { filter: drop-shadow(0 10px 14px rgb(0 0 0 / .18)); }
@media (max-width: 48rem) {
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-layout > picture { display: none; }
}

.faq-group + .faq-group { margin-top: 2.25rem; }
.faq-group h2 { margin-top: 0; }

details {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: .9rem;
}
details + details { margin-top: .6rem; }

summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1.1;
}
details[open] summary::after { content: "−"; }
details > div { padding: 0 1.1rem 1rem; }
details > div p { margin: 0; }
details > div p + p { margin-top: .75rem; }

/* ---------- Footer ---------- */

.footer {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding: 2.5rem 1rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}
.footer p { margin: .75rem 0 0; }
.footer a { color: inherit; text-decoration-color: var(--line); }
.footer a:hover { color: var(--accent); text-decoration-color: currentColor; }

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
}
.social a { color: var(--text); text-decoration: none; }
