/* Lijn — lijnreader.com
   One centred column, Apple's own faces, the icon's indigo as the single
   accent. Light and dark follow the system unless the visitor chooses. */

:root {
  --bg: #fbfbfd;
  --surface: #f2f2f7;
  --ink: #1d1d1f;
  --ink-light: #515154;
  --ink-faint: #86868b;
  --rule: rgba(0, 0, 0, 0.12);
  --accent: #4a3d99;
  --accent-ink: #ffffff;
  --device: #1b1d20;
  --shadow: rgba(0, 0, 0, 0.16);

  /* Tokens the help pages share */
  --cream: var(--bg);
  --paper: var(--bg);
  --tag: var(--surface);
  --tag-border: rgba(0, 0, 0, 0.14);

  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --measure: 65ch;

  color-scheme: light;
}

html.dark {
  --bg: #000000;
  --surface: #1c1c1e;
  --ink: #f5f5f7;
  --ink-light: #c7c7cc;
  --ink-faint: #8e8e93;
  --rule: rgba(255, 255, 255, 0.16);
  --accent: #b1a6f0;
  --accent-ink: #0b0730;
  --device: #2a2c30;
  --shadow: rgba(0, 0, 0, 0.6);
  --tag-border: rgba(255, 255, 255, 0.18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.page { padding-bottom: 64px; }

/* --- handbook --- */
.swatches { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; align-items: center; margin: var(--space-sm) 0; }
.swatches dt { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.swatches dd { margin: 0; color: var(--ink-light); }
.swatch { display: inline-block; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--rule); }

/* --- nav --- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0 16px; border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.nav-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.nav-brand img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--ink-light); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links .nav-lang { margin-left: 8px; padding-left: 22px; border-left: 1px solid var(--rule); }

/* --- app icon, light and dark --- */
.app-icon { overflow: hidden; margin: 0 auto; box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 14px 34px var(--shadow); }
.app-icon img { width: 100%; height: 100%; display: block; }
.app-icon .dark, html.dark .app-icon .light { display: none; }
html.dark .app-icon .dark { display: block; }

/* --- hero --- */
.hero { text-align: center; padding: 88px 0 0; overflow: hidden; }
.hero .app-icon { width: 128px; height: 128px; border-radius: 29px; margin-bottom: 26px; }
.hero h1 { font-size: clamp(2.8rem, 6vw, 4rem); line-height: 1; letter-spacing: -0.015em; margin: 0 0 22px; }
.lede { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.45; color: var(--ink-light); max-width: 30em; margin: 0 auto 26px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; }
.button {
  display: inline-block; padding: 11px 22px; border-radius: 980px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 1.0625rem;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button.secondary { background: var(--surface); color: var(--ink); }
.actions .quiet { font-size: 1.0625rem; }
.availability { font-size: 0.9375rem; color: var(--ink-faint); margin: 14px 0 0; }

/* The tilted iPad. The stage clips it; the device keeps its own shadow. */
.stage {
  position: relative; height: clamp(320px, 46vw, 600px); margin-top: 64px; perspective: 2400px; overflow: hidden;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ink) 4%, transparent));
  border-bottom: 1px solid var(--rule);
}
.device {
  position: absolute; left: 50%; top: 15%; width: min(760px, 70vw); aspect-ratio: 3 / 4;
  margin-left: calc(min(760px, 70vw) * -0.30); padding: 14px; border-radius: 36px; background: var(--device);
  transform-origin: 50% 0; transform: rotateX(48deg) rotateZ(-22deg);
  box-shadow: -30px 50px 60px var(--shadow), -90px 140px 140px var(--shadow);
}
.device img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 23px; background: #fff; }

/* --- feature sections --- */
.feature { padding: 96px 0 0; text-align: center; }
.feature h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); line-height: 1.1; margin: 0 0 16px; }
.feature p { font-size: 1.125rem; line-height: 1.6; color: var(--ink-light); max-width: 32em; margin: 0 auto; }
.feature p + p { margin-top: 12px; }
.shot { margin: 44px auto 0; max-width: 620px; }
.shot img {
  width: 100%; height: auto; display: block; border-radius: 18px; border: 1px solid var(--rule); background: #fff; cursor: zoom-in;
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 24px 60px var(--shadow);
}
.shot figcaption { margin-top: 14px; font-size: 0.875rem; color: var(--ink-faint); }

.formats { margin: 26px auto 0; display: grid; grid-template-columns: max-content minmax(0, max-content); justify-content: center; gap: 6px 24px; font-size: 1rem; text-align: left; }
.formats dt { color: var(--ink); font-weight: 600; }
.formats dd { color: var(--ink-light); margin: 0; }

/* --- price --- */
.price { padding: 112px 0 0; text-align: center; }
.price h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin: 0 0 16px; }
.price .amount { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1; margin: 18px 0 10px; }
.price p { color: var(--ink-light); max-width: 32em; margin: 0 auto; font-size: 1.125rem; line-height: 1.6; }

/* --- made by --- */
.studio { padding: 112px 0 40px; text-align: center; }
.studio .app-icon { width: 80px; height: 80px; border-radius: 18px; margin-bottom: 22px; }
.studio h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin: 0 0 10px; }
.studio p { color: var(--ink-light); margin: 0 auto 10px; max-width: 32em; line-height: 1.6; }

/* --- inner pages (privacy, press) --- */
.article { padding: 56px 0 0; max-width: var(--measure); }
.article h1 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 10px; }
.article .dateline { font-size: 0.875rem; color: var(--ink-faint); margin: 0 0 var(--space-md); }
.article h2 { font-size: 1.25rem; margin: var(--space-md) 0 var(--space-xs); }
.article p, .article li { color: var(--ink-light); line-height: 1.65; }
.article p { margin: 0 0 var(--space-sm); }
.article ul { margin: 0 0 var(--space-sm) 1.2em; padding: 0; }
.article li { margin-bottom: 6px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 0 0 var(--space-sm); }
.facts dt { color: var(--ink); font-weight: 600; }
.facts dd { color: var(--ink-light); margin: 0; }
blockquote.boiler { margin: 0 0 var(--space-sm); padding-left: 16px; border-left: 2px solid var(--rule); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: var(--space-sm) 0; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--rule); background: #fff; }
.shots figcaption, .icon-row figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--ink-faint); }
.icon-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; margin: var(--space-sm) 0; }
.icon-row figure { margin: 0; }
.icon-row img { width: 96px; height: 96px; border-radius: 22px; display: block; box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 8px 24px var(--shadow); }
.icon-row.small img { width: 64px; height: 64px; border-radius: 14px; }

/* --- help pages: what docs.css expects from the host sheet --- */
.docs-page { max-width: 900px; margin: 0 auto; }
.main { display: block; }
.manpage { display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-faint); margin: 0 0 var(--space-md); }
.manpage--foot { margin: var(--space-md) 0 0; }

/* --- footer --- */
.footer { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--rule); text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 0; margin: 0 0 var(--space-sm); font-size: 0.9rem; }
.footer-links a { color: var(--ink-light); }
.footer-links a:hover { color: var(--ink); text-decoration: none; }
.footer-separator { display: inline-block; color: var(--ink-faint); margin: 0 var(--space-sm); }
.copyright { font-size: 0.8rem; color: var(--ink-faint); margin: 0 0 var(--space-sm); }
.appearance { display: inline-flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--ink-faint); }
.appearance-options { display: inline-flex; border: 1px solid var(--rule); border-radius: 980px; overflow: hidden; }
.appearance-options button {
  appearance: none; border: 0; background: transparent; color: var(--ink-light); font: inherit; font-size: 0.8rem;
  padding: 5px 12px; cursor: pointer;
}
.appearance-options button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.appearance-options button:hover { color: var(--ink); }

/* --- enlarged screenshot --- */
.shot-dialog { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; }
.shot-dialog::backdrop { background: rgba(0, 0, 0, .82); }
.shot-dialog img { display: block; max-width: 92vw; max-height: 88vh; border-radius: 12px; cursor: zoom-out; }

@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 56px; }
  .stage { margin-top: 44px; }
  .device { padding: 8px; border-radius: 22px; }
  .device img { border-radius: 15px; }
  .feature { padding-top: 64px; }
  .price, .studio { padding-top: 80px; }
  .nav { flex-wrap: wrap; gap: 10px 16px; font-size: 0.875rem; }
  .formats { grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; }
  .nav-links { gap: 12px; margin-left: auto; }
  .nav-links .nav-lang { margin-left: 0; padding-left: 12px; }
  .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .device { transform: none; left: 15%; margin-left: 0; width: 70%; }
}

/* nav icon follows the appearance, like the app icon */
.nav-brand .dark, html.dark .nav-brand .light { display: none; }
html.dark .nav-brand .dark { display: block; }
.docs-page .nav { margin-bottom: 40px; }

/* --- launch-notice sign-up --- */
.notify { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 auto; max-width: 30em; }
.notify input[type="email"] {
  flex: 1 1 14em; min-width: 0; font: inherit; font-size: 1.0625rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 980px; padding: 10px 18px;
}
.notify input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.notify .button { border: 0; font: inherit; font-weight: 600; font-size: 1.0625rem; cursor: pointer; }
.notify-note { font-size: 0.9375rem; color: var(--ink-faint); margin: 12px auto 0; max-width: 30em; }
.notify-note.error { color: #b3261e; }
html.dark .notify-note.error { color: #ff8a80; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
