/* PDF Organizer — showcase site.
   One dark world taken from the app itself: graphite surfaces, the icon's cobalt as the
   only accent, and the three sync colours used only for sync state. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #111214;
  --surface: #17191c;
  --raised: #1e2024;
  --line: #2a2d32;
  --line-strong: #3a3d43;
  --text: #e8eaee;
  --muted: #a3a7b0;
  --faint: #7d818a;

  --accent: #2f6fed;
  --accent-hover: #2560d6;
  --accent-ink: #7fa9ff;
  --accent-wash: rgba(47, 111, 237, 0.14);

  --sync-shared: #3fb950;
  --sync-local: #e3a33a;
  --sync-moving: #58a6ff;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-lg: 14px;
  --wrap: 1120px;
  --wrap-wide: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(80px, 11vw, 144px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-strong) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent-ink);
  overflow-x: hidden;
}

::selection { background: rgba(47, 111, 237, 0.45); color: #fff; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 3px solid var(--bg); border-radius: 12px; }
::-webkit-scrollbar-thumb:hover { background: #4a4d54; }

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

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: #a9c4ff; }

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

h1, h2, h3 {
  margin: 0;
  font-weight: 640;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.625rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
em { font-style: italic; font-weight: inherit; }

code, kbd, pre { font-family: var(--mono); font-size: 0.875em; }
:not(pre) > code {
  padding: 0.12em 0.4em;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
}

.icon { width: 1.1em; height: 1.1em; flex: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: calc(var(--wrap-wide) + var(--gutter) * 2); }
.wrap--narrow { max-width: calc(720px + var(--gutter) * 2); }

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

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--raised);
  color: var(--text);
  font: 560 0.9375rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:hover { background: #26292e; border-color: #4a4d54; color: var(--text); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 4px 10px -4px rgba(0, 0, 0, 0.6);
}
.btn--primary:hover { background: var(--accent-hover); border-color: transparent; color: #fff; }

.btn--ghost { background: transparent; }

.btn--small { min-height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: 8px; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 18, 20, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out);
}
.topbar.is-scrolled { border-bottom-color: var(--line); }

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 620;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand img { border-radius: 7px; }

.topbar__links {
  display: flex;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.topbar__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 150ms, background-color 150ms;
}
.topbar__links a:hover { color: var(--text); background: var(--raised); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-top: clamp(40px, 6vw, 72px);
  isolation: isolate;
}
/* A single cobalt glow behind the headline, the icon's colour thrown on the wall. */
.hero::before {
  content: "";
  position: absolute;
  inset: -60px 0 auto;
  height: 720px;
  background: radial-gradient(50% 55% at 50% 30%, rgba(47, 111, 237, 0.22), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero__copy { text-align: center; }

.hero h1 {
  font-size: clamp(2.5rem, 1.2rem + 5.4vw, 4.75rem);
  font-weight: 660;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.hero__lede {
  max-width: 34em;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.hero__actions .btn { min-height: 50px; padding: 0 24px; font-size: 1rem; }

/* Links in the meta line stay quiet so the Download button leads. */
.hero__meta a { color: var(--muted); }
.hero__meta a:hover { color: var(--text); }
.hero__meta {
  margin-top: 14px;
  color: var(--faint);
  font-size: 0.875rem;
}

/* ── Screenshot + tour ───────────────────────────────────────────────────── */

.shot {
  margin: clamp(32px, 4vw, 48px) 0 0;
  animation: rise 1100ms var(--ease-out) 120ms both;
}

@keyframes rise {
  from { transform: translateY(28px) scale(0.985); }
  to { transform: none; }
}

.shot__frame {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #0c0d0f;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 40px -18px rgba(0, 0, 0, 0.75);
}

.shot__chrome {
  display: flex;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #1a1c20;
}
.shot__chrome span { width: 11px; height: 11px; border-radius: 50%; background: #34373d; }

.shot__stage { position: relative; overflow: hidden; }

.shot__spot {
  position: absolute;
  left: var(--x, 0%);
  top: var(--y, 0%);
  width: var(--w, 100%);
  height: var(--h, 100%);
  border-radius: 8px;
  outline: 2px solid transparent;
  box-shadow: 0 0 0 200vmax rgba(8, 9, 11, 0);
  pointer-events: none;
  transition:
    left 520ms var(--ease-out), top 520ms var(--ease-out),
    width 520ms var(--ease-out), height 520ms var(--ease-out),
    box-shadow 360ms var(--ease-out), outline-color 360ms var(--ease-out);
}
.shot.is-touring .shot__spot {
  outline-color: var(--accent-ink);
  box-shadow: 0 0 0 200vmax rgba(8, 9, 11, 0.62);
}

.tour {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.tour__stop {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 0.875rem/1.2 var(--font);
  cursor: pointer;
  transition: color 150ms, border-color 150ms, background-color 150ms;
}
.tour__stop:hover,
.tour__stop[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-wash);
}

/* ── Problem ─────────────────────────────────────────────────────────────── */

.problem {
  padding-block: var(--section) calc(var(--section) * 0.6);
  text-align: center;
}
.problem h2 { margin-bottom: 24px; }
.problem p { color: var(--muted); font-size: 1.125rem; max-width: 38em; margin-inline: auto; }
.problem__turn {
  margin-top: 20px !important;
  color: var(--text) !important;
  font-weight: 560;
}

/* ── Features ────────────────────────────────────────────────────────────── */

.features { padding-bottom: clamp(24px, 4vw, 48px); }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(48px, 7vw, 88px);
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature--flip .feature__text { order: 2; }

.feature__text h2 { margin-bottom: 20px; }
.feature__text > p { color: var(--muted); max-width: 32em; }
.feature__aside { margin-top: 16px; font-size: 0.9375rem; color: var(--faint) !important; }

.feature__visual { min-width: 0; }

/* Folder → group mapping */
.tree {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.875rem;
}
.tree__head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.9375rem;
}
.tree__head code { font-size: 0.875rem; }
.tree__rows { margin: 0; padding: 8px 0; list-style: none; }
.tree__rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
}
.tree__rows li + li { border-top: 1px dashed var(--line); }
.tree__file { color: var(--text); overflow-wrap: anywhere; }
.tree__file i { font-style: normal; color: var(--faint); }
.tree__group {
  flex: none;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-wash);
  border: 1px solid rgba(47, 111, 237, 0.4);
  color: var(--accent-ink);
  font-size: 0.8125rem;
}
.tree__foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.9375rem;
}

/* Details panel crop */
.crop {
  margin: 0 auto;
  max-width: 400px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--raised);
  box-shadow: 0 14px 24px -14px rgba(0, 0, 0, 0.75);
}
.crop img { width: 100%; }
.crop--grid { max-width: none; margin-bottom: 20px; }

.rules { margin: 28px 0 0; display: grid; gap: 18px; }
.rules div { padding-left: 18px; border-left: 1px solid var(--line-strong); }
.rules dt { font-weight: 600; }
.rules dd { margin: 4px 0 0; color: var(--muted); font-size: 0.9375rem; }

/* Sync states */
.states {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.state {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  padding: 20px 24px;
}
.state + .state { border-top: 1px solid var(--line); }
.state strong { font-weight: 600; }
.state > span:last-child { grid-column: 2; color: var(--muted); font-size: 0.9375rem; }
.state__dot {
  grid-row: span 2;
  align-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 18%, transparent);
}
.state--shared { --dot: var(--sync-shared); }
.state--local { --dot: var(--sync-local); }
.state--moving { --dot: var(--sync-moving); }
.state--moving .state__dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--dot) 8%, transparent); }
}
.states__foot { margin-top: 16px; color: var(--muted); font-size: 0.9375rem; }

/* Join with a code — drawn in the app's own Qt controls (flat greys, as in the details
   crop above it), not in the site's cobalt. */
.join {
  max-width: 420px;
  margin-inline: auto;
  padding: 18px 20px 20px;
  border: 1px solid #3a3d42;
  border-radius: 8px;
  background: #1e2024;
  box-shadow: 0 14px 24px -14px rgba(0, 0, 0, 0.75);
  font-size: 0.875rem;
}
.join__title { margin-bottom: 14px; font-weight: 600; color: #e0e3e8; }
.join__label { display: block; margin-bottom: 6px; color: #8a8d95; font-size: 0.8125rem; }
.join__input {
  display: block;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #3a3d42;
  border-radius: 4px;
  background: #2d3035;
  color: #e0e3e8;
  font: 500 0.8125rem var(--mono);
}
.join__row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.join__btn {
  display: inline-grid;
  place-items: center;
  min-width: 76px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #3a3d42;
  border-radius: 4px;
  background: #2d3035;
  color: #e0e3e8;
  font-size: 0.8125rem;
}
.join__ok {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #30333a;
  color: #8a8d95;
  font-size: 0.8125rem;
}

/* ── Promises ────────────────────────────────────────────────────────────── */

.promises {
  padding-block: var(--section);
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.promises h2 { max-width: 14em; }
.promises__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
  margin-top: clamp(40px, 6vw, 64px);
}
.promise { padding-top: 20px; border-top: 1px solid var(--line-strong); }
.promise h3 { margin-bottom: 10px; }
.promise p { color: var(--muted); font-size: 0.9375rem; }

/* ── Keyboard ────────────────────────────────────────────────────────────── */

.keys { padding-block: var(--section) 0; }
.keys__inner { text-align: center; }
.keys p { margin: 18px auto 0; max-width: 34em; color: var(--muted); }
.keys__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 36px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
}
.keys__list li { display: flex; align-items: center; gap: 12px; }
.keys__list span { display: inline-flex; gap: 4px; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--raised);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ── Self-host ───────────────────────────────────────────────────────────── */

.selfhost { padding-block: var(--section); }
.selfhost__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.selfhost__text h2 { margin-bottom: 20px; }
.selfhost__text p { color: var(--muted); max-width: 32em; }
.selfhost__text p + p { margin-top: 14px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-weight: 560;
  text-decoration: none;
}
.link-arrow .icon { transition: transform 200ms var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(3px); }

.code {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #0c0d0f;
  overflow: hidden;
}
.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #1a1c20;
  color: var(--muted);
  font-size: 0.8125rem;
}
.code__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: 500 0.8125rem var(--font);
  cursor: pointer;
}
.code__copy:hover { background: var(--raised); color: var(--text); }
.code__copy.is-done { color: var(--accent-ink); }
.code pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  line-height: 1.75;
  color: #d6dae1;
  tab-size: 2;
}
.code .c { color: var(--faint); }

/* ── Download ────────────────────────────────────────────────────────────── */

.download {
  position: relative;
  padding-block: var(--section);
  text-align: center;
  border-top: 1px solid var(--line);
  isolation: isolate;
}
.download::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(45% 40% at 50% 0%, rgba(47, 111, 237, 0.16), transparent 70%);
  z-index: -1;
}
.download__icon { margin: 0 auto 28px; border-radius: 20px; box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.7); }
.download__lede { margin-top: 16px; color: var(--muted); font-size: 1.125rem; }

.platforms {
  display: grid;
  max-width: 720px;
  margin: 44px auto 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: left;
}
.platform {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  transition: background-color 160ms;
}
.platform + .platform { border-top: 1px solid var(--line); }
.platform.is-yours { background: var(--accent-wash); }
.platform.is-yours .btn { background: var(--accent); border-color: transparent; color: #fff; }
.platform.is-yours .btn:hover { background: var(--accent-hover); color: #fff; }
.platform__mark { width: 26px; height: 26px; color: var(--text); }
.platform__name { display: grid; }
.platform__name strong { font-weight: 600; }
.platform__name span { color: var(--muted); font-size: 0.875rem; }

.download__note {
  max-width: 40em;
  margin: 24px auto 0;
  color: var(--faint);
  font-size: 0.875rem;
}
.download__note strong { color: var(--muted); font-weight: 560; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer { padding-block: 32px 40px; border-top: 1px solid var(--line); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  color: var(--faint);
  font-size: 0.875rem;
}
.footer__links { display: flex; gap: 20px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.footer__links a { color: var(--muted); text-decoration: none; }
.footer__links a:hover { color: var(--text); }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .promises__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .feature,
  .selfhost__inner { grid-template-columns: minmax(0, 1fr); }
  .feature--flip .feature__text { order: 0; }
  .topbar__links li:not(:last-child) { display: none; }
}

@media (max-width: 560px) {
  .topbar__inner { gap: 12px; }
  .topbar__gh { font-size: 0; gap: 0; padding: 8px !important; }
  .topbar__gh .icon { width: 20px; height: 20px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .shot__chrome { padding: 8px 10px; }
  .shot__chrome span { width: 8px; height: 8px; }
  /* At phone width the regions are too small to point at; the screenshot stands alone. */
  .tour { display: none; }
  .promises__grid { grid-template-columns: minmax(0, 1fr); }
  .tree__rows li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .platform { grid-template-columns: auto 1fr; }
  .platform .btn { grid-column: 1 / -1; }
  .footer__links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
}
