/* Rekindly website — same visual language as the app (docs/design.md):
   content in serif, controls in sans, rules instead of cards, one signal colour. */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('fonts/newsreader-latin-opsz-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url('fonts/newsreader-latin-opsz-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('fonts/source-sans-3-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  color-scheme: light dark;
  --background: #faf9f6;
  --foreground: #141414;
  --foreground-2: #3b3a36;
  --muted: #f1eee6;
  --muted-foreground: #5c5a54;
  --card: #ffffff;
  --border: #d6d2c8;
  --border-strong: #141414;
  --input: #8a867c;
  --signal: #b23a1c;
  --signal-tint: #f6e1d8;
  --area-private: #53632a;
  --area-business: #2a4869;
  --space-plum: #6e3a62;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --page: 1160px;
  --gutter: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #121314;
    --foreground: #eae6de;
    --foreground-2: #c6c1b7;
    --muted: #1c1d1f;
    --muted-foreground: #a09b90;
    --card: #1b1c1e;
    --border: #34332f;
    --border-strong: #8c877d;
    --input: #6e6a62;
    --signal: #f08a6c;
    --signal-tint: #3a231c;
    --area-private: #b9c67e;
    --area-business: #93b3d8;
    --space-plum: #d6a8cb;
  }
}

@media (min-width: 720px) {
  :root {
    --gutter: 44px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  hyphens: auto;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--border);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

.wrap {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 8px;
  background: var(--card);
  padding: 6px 10px;
  z-index: 10;
}

/* Masthead ------------------------------------------------------------------ */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--border);
}
.masthead .logo img {
  height: 36px;
  width: auto;
}
.masthead nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}
.masthead nav a {
  text-decoration: none;
  color: var(--foreground-2);
}
.masthead nav a:hover {
  color: var(--foreground);
}
.masthead nav .lang {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--input);
  border-radius: 3px;
  padding: 3px 8px;
}
.masthead nav .optional {
  display: none;
}
@media (min-width: 860px) {
  .masthead nav .optional {
    display: inline;
  }
}

/* Type ---------------------------------------------------------------------- */

.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--foreground);
}
.kicker .dot {
  color: var(--signal);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  hyphens: manual;
}
h1 {
  font-size: clamp(46px, 8.2vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-top: 14px;
}
h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 22px;
  line-height: 1.25;
}

.deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.38;
  color: var(--foreground-2);
  max-width: 34em;
  margin: 22px 0 0;
}

.prose p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  margin: 0 0 1em;
  max-width: 36em;
}
.prose p:last-child {
  margin-bottom: 0;
}

.meta {
  font-size: 14px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums lining-nums;
}

kbd {
  font-family: var(--sans);
  font-size: 0.78em;
  font-weight: 600;
  border: 1px solid var(--input);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0 5px;
  white-space: nowrap;
}
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--muted);
  padding: 1px 5px;
  border-radius: 3px;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--input);
  border-radius: 3px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: var(--foreground);
}
.button:hover {
  border-color: var(--foreground);
  background: var(--muted);
}
.button.primary {
  background: var(--foreground);
  border-color: var(--foreground);
  color: var(--background);
}
.button.primary:hover {
  background: var(--foreground-2);
}
.button svg {
  width: 18px;
  height: 18px;
}

/* Lead ---------------------------------------------------------------------- */

.lead {
  padding-top: 56px;
}
.lead .meta {
  margin-top: 20px;
}
.rule-double {
  border: 0;
  border-top: 3px double var(--border-strong);
  margin: 44px 0 0;
}

/* Figures ------------------------------------------------------------------- */

figure {
  margin: 0;
}
.shot {
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  overflow: hidden;
  background: var(--card);
}
figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted-foreground);
  max-width: 46em;
}
figcaption strong {
  color: var(--foreground);
  font-weight: 700;
}
.hero-figure {
  margin-top: 36px;
}

.phone {
  max-width: 300px;
  margin: 0 auto;
  border: 1.5px solid var(--border-strong);
  border-radius: 34px;
  padding: 9px;
  background: var(--background);
}
.phone img {
  border-radius: 26px;
}
.phones {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.phones .phone {
  flex: 1 1 0;
  max-width: 260px;
  margin: 0;
}

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

.section {
  padding-top: 80px;
}
.section > .kicker,
.section-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 28px;
}
.section h2 {
  margin-bottom: 22px;
  max-width: 18em;
}

.split {
  display: grid;
  gap: 32px;
}
@media (min-width: 960px) {
  .split {
    grid-template-columns: 5fr 7fr;
    gap: 56px;
    align-items: start;
  }
  .split.narrow-figure {
    grid-template-columns: 7fr 5fr;
  }
  .split.reverse {
    grid-template-columns: 7fr 5fr;
  }
  .split.reverse.narrow-figure {
    grid-template-columns: 5fr 7fr;
  }
  .split.reverse > :first-child {
    order: 2;
  }
}

/* Text in two columns (heading | prose), the screenshot full width below. */
.stacked .wide-figure {
  margin-top: 36px;
}

.intro {
  display: grid;
  gap: 28px;
}
@media (min-width: 960px) {
  .intro {
    grid-template-columns: 4fr 8fr;
    gap: 56px;
  }
}
.intro h2 {
  margin-bottom: 0;
}
#idea .prose p:first-child::first-letter {
  float: left;
  font-size: 3.6em;
  line-height: 0.85;
  padding: 0.06em 0.08em 0 0;
  font-weight: 500;
}

.spaces-demo {
  display: grid;
  gap: 0;
  margin-top: 4px;
  border-top: 1px solid var(--border-strong);
}
.spaces-demo div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.spaces-demo .swatch {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateY(-1px);
}
.spaces-demo strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  min-width: 6.5em;
}
.spaces-demo span.note {
  color: var(--muted-foreground);
  font-size: 15px;
}

/* Feature index ------------------------------------------------------------- */

.index {
  display: grid;
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .index {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1040px) {
  .index {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.index li {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--border);
}
.index h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.index p {
  margin: 0;
  font-size: 16px;
  color: var(--foreground-2);
}

/* Principles ---------------------------------------------------------------- */

.principles {
  display: grid;
  gap: 0 48px;
}
@media (min-width: 860px) {
  .principles {
    grid-template-columns: 1fr 1fr;
  }
}
.principles article {
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--border);
}
.principles h3 {
  font-size: 28px;
  font-style: italic;
  margin-bottom: 8px;
}
.principles p {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--foreground-2);
}

/* Install ------------------------------------------------------------------- */

.terminal {
  position: relative;
  margin: 26px 0 0;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--card);
}
.terminal pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
}
.terminal .copy {
  position: absolute;
  top: 8px;
  right: 8px;
  font: 600 13px var(--sans);
  color: var(--foreground-2);
  background: var(--background);
  border: 1px solid var(--input);
  border-radius: 3px;
  padding: 4px 10px;
  cursor: pointer;
}
.terminal .copy:hover {
  border-color: var(--foreground);
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
}
.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  color: var(--signal);
}

.doclinks {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-strong);
}
.doclinks li {
  border-bottom: 1px solid var(--border);
}
.doclinks a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  text-decoration: none;
  font-size: 16px;
}
.doclinks a::after {
  content: '→';
  color: var(--muted-foreground);
}
.doclinks a:hover {
  background: var(--muted);
}

/* FAQ ----------------------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--border-strong);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-family: var(--sans);
  color: var(--muted-foreground);
}
.faq details[open] summary::after {
  content: '–';
}
.faq details p {
  margin: -4px 0 20px;
  max-width: 44em;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--foreground-2);
}

/* Closing and footer -------------------------------------------------------- */

.closing {
  margin-top: 88px;
  padding-bottom: 8px;
  text-align: center;
}
.closing .rule-double {
  margin: 0 0 56px;
}
.closing h2 {
  margin: 0 auto 18px;
  max-width: 16em;
}
.closing p {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--foreground-2);
  max-width: 32em;
  margin: 0 auto;
}
.closing .actions {
  justify-content: center;
}

footer {
  margin-top: 72px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted-foreground);
}
footer .cols {
  display: grid;
  gap: 24px;
}
@media (min-width: 860px) {
  footer .cols {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}
footer .brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
footer .brand img {
  width: 28px;
  height: 28px;
}
footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
footer a {
  color: var(--foreground-2);
}
footer .small {
  margin-top: 18px;
  max-width: 52em;
}

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

/* Blog ---------------------------------------------------------------------- */

.masthead nav a[aria-current='page'] {
  color: var(--foreground);
  font-weight: 700;
}
.blog-head h1,
.post h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
}
.blog-head .meta a {
  color: var(--foreground-2);
}

.posts {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.posts li {
  border-bottom: 1px solid var(--border);
}
.posts a {
  display: block;
  padding: 26px 0 28px;
  text-decoration: none;
}
.posts h2 {
  margin: 6px 0 8px;
  font-size: clamp(26px, 3.2vw, 36px);
}
.posts a:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.posts p {
  margin: 0;
  max-width: 40em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--foreground-2);
}

.post {
  padding-top: 56px;
}
.post .kicker a {
  text-decoration: none;
}
.post .rule-double {
  margin-top: 36px;
}
.post-body {
  margin-top: 36px;
  max-width: 40em;
}
.post-body h2 {
  font-size: 28px;
  margin: 1.6em 0 0.5em;
}
.post-body h3 {
  margin: 1.4em 0 0.4em;
}
.post-body ul,
.post-body ol {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  margin: 0 0 1em;
  padding-left: 1.3em;
  max-width: 36em;
}
.post-body li {
  margin-bottom: 0.4em;
}
.post-body blockquote {
  margin: 0 0 1em;
  padding-left: 18px;
  border-left: 2px solid var(--signal);
}
.post-body blockquote p {
  font-style: italic;
}
.post-body pre {
  margin: 0 0 1em;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--card);
  font-size: 14px;
  line-height: 1.6;
}
.post-body pre code {
  background: none;
  padding: 0;
}
.post-back {
  margin: 44px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 15px;
}

/* Imprint and privacy policy ---------------------------------------------- */

footer .legal {
  display: flex;
  gap: 18px;
  margin-top: 8px;
}
.legal-page .post-body h2 {
  font-size: 24px;
}
.legal-page .post-body h3 {
  font-size: 19px;
}
