/* Identity: the Paper app icon. A white tile ("paper") holding glass tiles
   that run blue → violet → pink; in dark mode the tile turns graphite. */
:root {
  --bg: #f6f6fa;
  --surface: #ffffff;
  --text: #17152b;
  --muted: #615e78;
  --line: rgba(40, 30, 110, 0.1);
  --accent: #6a3cf0;
  --accent-text: #ffffff;
  --code-bg: #eeedf5;
  --brand-1: #3f6dff;
  --brand-2: #8f52fa;
  --brand-3: #ff6b8c;
  --brand: linear-gradient(120deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
  --glow: 0.35;
  --shadow: 0 1px 2px rgba(40, 30, 110, 0.06), 0 8px 24px rgba(40, 30, 110, 0.06);
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e15;
    --surface: #1a1922;
    --text: #f2f1f8;
    --muted: #a19fb5;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #a68bff;
    --accent-text: #ffffff;
    --code-bg: #23222d;
    --glow: 0.22;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f0e15;
  --surface: #1a1922;
  --text: #f2f1f8;
  --muted: #a19fb5;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #a68bff;
  --accent-text: #ffffff;
  --code-bg: #23222d;
  --glow: 0.22;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 6px; }
pre {
  background: var(--code-bg);
  padding: 16px 18px;
  border-radius: 12px;
  overflow-x: auto;
  line-height: 1.6;
}
pre code { background: none; padding: 0; }
kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0 0.4em;
  margin: 0 1px;
  background: var(--surface);
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(16px, calc((100% - 1080px) / 2));
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  font-family: var(--display);
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}
.brand:hover { text-decoration: none; }
.brand picture, .brand img { display: block; }
.nav nav { display: flex; gap: 20px; font-size: 14px; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); text-decoration: none; }

main, footer { padding: 0 16px; }

section { max-width: 1080px; margin: 0 auto; }

/* Hero */
.hero { position: relative; text-align: center; padding: 72px 0 40px; isolation: isolate; }
/* Light from the icon's tiles spilling onto the page. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 20px;
  left: 50%;
  width: min(560px, 100%);
  height: 320px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 30% 55%, var(--brand-1), transparent),
    radial-gradient(closest-side at 50% 40%, var(--brand-2), transparent),
    radial-gradient(closest-side at 70% 55%, var(--brand-3), transparent);
  opacity: var(--glow);
  filter: blur(40px);
  pointer-events: none;
}
.hero-icon { display: inline-block; }
.hero-icon img { display: block; filter: drop-shadow(0 18px 30px rgba(60, 40, 160, 0.22)); }
.brand-text {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h1 {
  font-family: var(--display);
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 24px 0 16px;
}
.lede { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 32px 0 12px; }
.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 980px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 500;
}
.button:hover { text-decoration: none; background: var(--surface); }
.button.primary {
  background: var(--brand);
  color: var(--accent-text);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.12),
              0 6px 18px -6px var(--brand-2);
}
.button.primary:hover { filter: brightness(1.08); background: var(--brand); }
.button:focus-visible, .copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fine { color: var(--muted); font-size: 13px; }

/* Screenshots: page one in front, with the left edge of page two waiting
   behind it on the right, the way the next page sits off-screen. */
.shots-wrap { padding: 24px 0 64px; }
.shots { margin: 0; }
.shots-stage { position: relative; padding-right: 12%; }
.shot {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(30, 20, 90, 0.45);
}
.shots .shot-next {
  position: absolute;
  z-index: 0;
  top: 7%;
  left: 78%;
  width: 22%;
  height: 86%;
  object-fit: cover;
  object-position: left center;
  border-radius: 14px;
  opacity: 0.6;
  box-shadow: none;
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent);
  mask-image: linear-gradient(to right, #000 55%, transparent);
}
.shots figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }

/* Content sections */
h2 { font-family: var(--display); font-size: clamp(28px, 4.5vw, 44px); letter-spacing: -0.015em; text-align: center; margin: 0 0 32px; }
.features, .install, .help, .faq { padding: 48px 0; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
/* A glass tile like the icon's, coloured by position along the brand ramp. */
.glyph {
  --c: var(--brand-2);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.05) 55%, transparent),
    var(--c);
  box-shadow: inset 1px 1.5px 0 rgba(255, 255, 255, 0.7), inset -1px -1px 0 rgba(255, 255, 255, 0.25),
              0 4px 10px -4px var(--c);
}
.glyph svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature-grid article:nth-child(1) .glyph { --c: #4a72ff; }
.feature-grid article:nth-child(2) .glyph { --c: #6b62fc; }
.feature-grid article:nth-child(3) .glyph { --c: #8f52fa; }
.feature-grid article:nth-child(4) .glyph { --c: #b452e0; }
.feature-grid article:nth-child(5) .glyph { --c: #db5cb4; }
.feature-grid article:nth-child(6) .glyph { --c: #ff6b8c; }
.feature-grid h3 { margin: 0 0 8px; font-size: 19px; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 15px; }

.install-lede { text-align: center; color: var(--muted); margin: -16px 0 32px; }
/* One option per row, so each command has room to be read in full. */
.install-grid {
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.install-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.install-card h3 { margin: 0; font-size: 19px; }
.install-card p { margin: 0; color: var(--muted); font-size: 15px; }
.install-card .button { align-self: flex-start; }
.install-card .note { font-size: 13px; }
.install-card .note code { overflow-wrap: anywhere; }
.command {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--code-bg);
  border-radius: 12px;
  padding: 12px;
}
.command code {
  flex: 1;
  min-width: 0;
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.copy {
  flex: none;
  font: 500 12px var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
}
.copy:hover { border-color: var(--muted); }
.center { text-align: center; margin-top: 24px; }

.help-title {
  text-align: center;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.01em;
  margin: 40px 0 20px;
  scroll-margin-top: 80px;
}
.help h2 + .help-title { margin-top: 0; }
.help .install-lede { max-width: 640px; margin: 0 auto 24px; }
.steps { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: 15px; }
.steps li { margin-bottom: 6px; }
.steps strong { color: var(--text); font-weight: 600; }

.faq { max-width: 720px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

footer {
  text-align: center;
  padding: 48px 16px 64px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
  font-size: 14px;
}
footer p { margin: 4px 0; }

@media (max-width: 640px) {
  .nav nav { gap: 14px; }
  .nav nav a:not(:last-child):nth-child(n+3) { display: none; }
  .shot { border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
