/* The colours and shapes of the Smarter Jump application itself. Light by default, dark when the system asks for it,
   and either one when forced with the theme button (the data-theme attribute on the html element).
   Mobile first: the base rules are for phones, the media queries add room for wider screens. */
:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #16202f;
  --muted: #667085;
  --border: #e1e6ef;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --ok: #0f9d58;
  --bad: #d92d20;
  --blue: #002fa7;
  --yellow: #ffc400;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e131b;
    --surface: #171e29;
    --text: #e8edf5;
    --muted: #98a2b3;
    --border: #2a3342;
    --accent: #5b8def;
    --ok: #1fae7a;
    --bad: #f0645a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e131b;
  --surface: #171e29;
  --text: #e8edf5;
  --muted: #98a2b3;
  --border: #2a3342;
  --accent: #5b8def;
  --ok: #1fae7a;
  --bad: #f0645a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
a { color: var(--accent); }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 17px; line-height: 1.3; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 17px; color: var(--muted); max-width: 46rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Top bar and tabs, as in the application */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; }
.logo { flex: none; }
.actions { display: flex; gap: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.icon { padding: 8px 10px; }
.theme-label { display: none; }
.flag { width: 22px; height: 15px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(128, 128, 128, .4); }

.tabs {
  position: sticky; top: 61px; z-index: 9;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 0 8px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; padding: 12px 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px;
  border-bottom: 3px solid transparent;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .demo-link { color: var(--accent); }
.tabs .demo-link::after { content: " ↗"; }

main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 40px; }
main:focus { outline: none; }
.view { animation: appear .2s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

/* Overview */
.intro { margin-bottom: 20px; }
.cta { margin: 18px 0 12px; }

.cards { display: grid; gap: 12px; margin: 22px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 16px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 20px; margin: 0 0 12px; }
.card.link { color: inherit; text-decoration: none; border-top: 3px solid var(--blue); }
.card.link:hover { border-color: var(--accent); }
.card.link h2 { color: var(--accent); }

/* Screenshots */
.shot { margin: 0; }
.shot .zoom {
  display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow); cursor: zoom-in;
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.intro-shot { margin-bottom: 8px; }
.gallery { display: grid; gap: 20px; }
.gallery .phone { max-width: 300px; justify-self: center; width: 100%; }

/* Features */
.feature { display: grid; gap: 14px; margin: 26px 0; }
.feature .text p { color: var(--text); }

/* What Jump lacks */
.gaps { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; counter-reset: gap; }
.gap {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  padding: 16px; counter-increment: gap;
}
.gap h2::before { content: counter(gap) ". "; color: var(--muted); font-weight: 600; }
.gap p { margin: 0; padding: 8px 0 8px 30px; position: relative; }
.gap p::before {
  position: absolute; left: 0; top: 9px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff;
}
.gap .theirs::before { content: "✕"; background: var(--bad); }
.gap .ours { border-top: 1px dashed var(--border); }
.gap .ours::before { content: "✓"; background: var(--ok); }


.note-box {
  margin-top: 16px; padding: 16px; border-radius: 10px;
  border: 1px solid var(--border); border-left: 4px solid var(--yellow); background: var(--surface);
  font-size: 14px; color: var(--muted);
}
.note-box h2 { color: var(--text); font-size: 15px; }
.note-box p { margin: 0; }
.distribution { margin-top: 36px; border-left-color: var(--accent); }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  max-width: 1180px; margin: 0 auto; padding: 16px 16px 32px; border-top: 1px solid var(--border); font-size: 14px;
}

.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(5, 10, 20, .82); }
.lightbox img { display: block; max-width: 96vw; max-height: 94vh; width: auto; height: auto; border-radius: 8px; }
.lightbox form { position: absolute; top: 8px; right: 8px; }
.lightbox .close { min-height: 36px; padding: 6px 12px; }

/* Wider screens */
@media (min-width: 640px) {
  h1 { font-size: 32px; }
  .cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery .phone { grid-column: 1 / -1; }
  .theme-label { display: inline; }
}
@media (min-width: 900px) {
  .top { padding: 12px 24px; }
  .tabs { top: 65px; padding: 0 16px; justify-content: center; }
  .tabs a { padding: 14px 14px; }
  main { padding: 36px 24px 56px; }
  .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards.two { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature { grid-template-columns: 2fr 3fr; align-items: center; gap: 32px; }
  .feature:nth-of-type(even) .text { order: 2; }
  .gaps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery .phone { grid-column: auto; grid-row: span 2; max-width: none; }
  .foot { padding: 20px 24px 40px; }
}
