/* DeskLeap website: one stylesheet for every page. No web fonts: the system font stack
   renders SF Pro on Apple devices without downloading or embedding it. */

:root {
  color-scheme: light dark;

  /* Brand (from the design draft) */
  --brand-primary: #007AFF;
  --brand-secondary: #0051FF;
  --brand-accent: #60A5FF;
  --brand-background: #F2F6FF;

  /* Light theme */
  --bg: var(--brand-background);
  --surface: #FFFFFF;
  --surface-2: #E8EFFD;
  --text: #0B1530;
  --text-muted: #4A5670;
  --border: #D5DFF2;
  --link: #0048E0;          /* 6.6:1 on white, 6.1:1 on --bg */
  --button-bg: #0051FF;     /* white text 5.8:1 */
  --button-bg-hover: #0043D6;
  --button-text: #FFFFFF;
  --focus: #007AFF;
  --code-bg: #E8EFFD;
  --note-bg: #FFF7E0;
  --note-border: #E8C75A;
  --note-text: #5A4300;

  /* The hero panel is dark navy in both themes */
  --hero-bg-1: #07102A;
  --hero-bg-2: #0A1B4D;
  --hero-glow: #0051FF;
  --hero-text: #FFFFFF;
  --hero-muted: #C4D3F2;

  --radius: 18px;
  --radius-sm: 10px;
  --max: 68rem;
  --gutter: clamp(16px, 4vw, 32px);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070D1C;
    --surface: #0F182D;
    --surface-2: #16223D;
    --text: #E7EDF9;
    --text-muted: #A3B1CC;
    --border: #22314F;
    --link: #7AB4FF;         /* 8.6:1 on --bg */
    --button-bg: #0A5CFF;    /* white text 5.1:1 */
    --button-bg-hover: #2A72FF;
    --button-text: #FFFFFF;
    --focus: #60A5FF;
    --code-bg: #16223D;
    --note-bg: #2A2310;
    --note-border: #8A6D1E;
    --note-text: #F3DE9C;

    --hero-bg-1: #040A1C;
    --hero-bg-2: #081640;
  }
}

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

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

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;
  overflow-wrap: break-word;
}

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

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

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

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; margin-top: 1.6em; }
h3 { font-size: 1.2rem; font-weight: 650; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
li + li { margin-top: 0.35em; }

code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code, kbd {
  background: var(--code-bg);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}
pre {
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  line-height: 1.45;
}
pre code { background: none; padding: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 550;
  padding: 0.35rem 0;
  display: inline-block;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--brand-primary);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 650;
  text-decoration: none;
  border: 0;
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--button-bg-hover); text-decoration: none; }
.button svg { width: 20px; height: 20px; flex: none; }
.button-secondary {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.button-secondary:hover { background: rgba(127, 160, 255, 0.14); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin: 1.6rem 0 0;
}

/* Stand-in for the official App Store badge until the app is live. */
.badge-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.5rem 1.1rem;
  border-radius: 12px;
  border: 1.5px dashed currentColor;
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.85;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--hero-text);
  background:
    radial-gradient(60rem 40rem at 95% 110%, rgba(0, 81, 255, 0.85), transparent 60%),
    radial-gradient(40rem 30rem at 75% 20%, rgba(96, 165, 255, 0.35), transparent 60%),
    linear-gradient(135deg, var(--hero-bg-1), var(--hero-bg-2));
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 2rem;
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.hero h1 { color: var(--hero-text); }
.hero .lede {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  color: var(--hero-muted);
  max-width: 34rem;
}
.hero a:not(.button) { color: #BCD8FF; }
.hero .button-secondary { color: var(--hero-text); }
.hero-art {
  justify-self: center;
  position: relative;
  width: min(100%, 300px);
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: -18%;
  background: radial-gradient(closest-side, rgba(96, 165, 255, 0.55), transparent);
  filter: blur(8px);
}
.hero-art img {
  position: relative;
  width: 100%;
  border-radius: 22.5%;
  box-shadow: 0 30px 60px -20px rgba(0, 20, 80, 0.8);
}

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { grid-row: 1; width: 140px; justify-self: start; }
  .hero-art::before { inset: -30%; }
}

/* Smaller page header for inner pages */
.page-hero {
  color: var(--hero-text);
  background:
    radial-gradient(40rem 20rem at 100% 120%, rgba(0, 81, 255, 0.8), transparent 60%),
    linear-gradient(135deg, var(--hero-bg-1), var(--hero-bg-2));
}
.page-hero .wrap {
  padding-top: clamp(2.2rem, 6vw, 3.5rem);
  padding-bottom: clamp(2.2rem, 6vw, 3.5rem);
}
.page-hero h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 0.3em; }
.page-hero p { color: var(--hero-muted); margin: 0; max-width: 40rem; font-size: 1.12rem; }

/* ---------- Sections ---------- */

main { display: block; }
.section { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.section > .wrap > h2:first-child { margin-top: 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-intro { color: var(--text-muted); max-width: 42rem; font-size: 1.1rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
  padding: 0;
  list-style: none;
}
.cards li + li { margin-top: 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
}
.section-alt .card { background: var(--bg); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-secondary));
}
.card .icon svg { width: 24px; height: 24px; }

.requirements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
}
.requirements div {
  border-left: 4px solid var(--brand-primary);
  padding: 0.2rem 0 0.2rem 1rem;
}
.requirements dt { font-weight: 700; }
.requirements dd { margin: 0; color: var(--text-muted); }

.cta {
  text-align: center;
}
.cta .actions { justify-content: center; }

/* ---------- Prose pages (download, privacy, support) ---------- */

.prose { max-width: 46rem; }
.prose h2 { padding-top: 0.2em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.35rem; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.toc h2 { font-size: 1rem; margin: 0 0 0.4rem; letter-spacing: 0; }
.toc ul { margin: 0; padding-left: 1.2rem; }
.toc li + li { margin-top: 0.15em; }

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.55rem 1.25rem;
  margin: 1.4rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.facts dt { font-weight: 650; }
.facts dd { margin: 0; color: var(--text-muted); min-width: 0; }
.facts code { word-break: break-all; }
@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; gap: 0.1rem; }
  .facts dd + dt { margin-top: 0.6rem; }
}

.note {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  color: var(--note-text);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
}
.note p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1.1rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0.05rem;
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: var(--button-bg);
}
.steps ul { margin-top: 0.4rem; }

/* Tables become stacked on narrow screens */
.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
th { font-weight: 650; background: var(--surface-2); }
thead th:first-child { border-top-left-radius: var(--radius-sm); }
thead th:last-child { border-top-right-radius: var(--radius-sm); }
@media (max-width: 600px) {
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  .stack td { display: block; border: 0; padding: 0.2rem 0; }
  .stack td:first-child { font-weight: 650; }
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.2rem 1rem;
  margin: 0.6rem 0;
}
details[open] { padding-bottom: 0.6rem; }
summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.7rem 0;
}
details p:last-child { margin-bottom: 0.2rem; }

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.92rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.8rem;
  padding-bottom: 1.8rem;
}
.site-footer p { margin: 0; }
.site-footer ul {
  display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem;
  list-style: none; margin: 0; padding: 0;
}
.site-footer li + li { margin-top: 0; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .fineprint { flex-basis: 100%; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  .hero, .page-hero { background: none; color: #000; }
  .page-hero p { color: #000; }
}

.hero-note { margin-top: 1rem; color: var(--hero-muted); font-size: 0.95rem; }
.centered { margin-inline: auto; }
.page-hero a:not(.button) { color: #BCD8FF; }
.note-tight { margin: 0.6rem 0 0; }
tbody th { background: none; }
