/*
 * Replimo's public pages (replimo.zilscore.com): the app's own palette and typeface, indigo and
 * violet on a lavender white, Plus Jakarta Sans. One loud thing: the chat on the home page, drawn
 * like the app's bubbles. Everything else is a quiet reading page.
 */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: #f8f7fd;
  --surface: #ffffff;
  --sunken: #f1effa;
  --ink: #1b1a3d;
  --ink-2: #555975;
  --line: #e4e2f3;
  --accent: #4f46e5;
  --accent-ink: #4338ca;
  --accent-soft: #eeebff;
  --focus: #6366f1;
  --bubble: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --incoming: #ffffff;
  --shadow: 0 1px 2px rgba(30, 27, 75, 0.06), 0 8px 24px rgba(30, 27, 75, 0.08);
  --r: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f0e24;
    --surface: #1a1936;
    --sunken: #201f40;
    --ink: #f4f3ff;
    --ink-2: #b1b0cf;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #6366f1;
    --accent-ink: #b4bdfd;
    --accent-soft: rgba(129, 140, 248, 0.16);
    --focus: #a5b4fc;
    --incoming: #24234a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

/* Header and footer ------------------------------------------------------------------------- */

.top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 700;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--accent-ink);
}

.bottom {
  margin-top: 72px;
  border-top: 1px solid var(--line);
}

.bottom-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: grid;
  gap: 14px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.6;
}

.bottom p {
  margin: 0;
}

.bottom .nav {
  font-size: 14.5px;
}

/* Reading pages ----------------------------------------------------------------------------- */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.page.with-toc {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: 56px;
}

.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  padding-top: 8px;
  font-size: 14.5px;
  line-height: 1.45;
}

.toc p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-weight: 700;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent-ink);
}

article {
  max-width: 720px;
  min-width: 0;
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2 {
  margin: 44px 0 10px;
  font-size: 23px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h3 {
  margin: 26px 0 6px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 750;
}

p,
ul,
ol {
  margin: 0 0 14px;
}

li {
  margin-bottom: 6px;
}

article ul,
article ol {
  padding-left: 22px;
}

.updated {
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 15px;
}

.lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
}

.short {
  margin: 28px 0 8px;
  padding: 22px 24px 10px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.short h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.short ul {
  padding-left: 20px;
}

.table {
  width: 100%;
  margin: 14px 0 20px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 15.5px;
  line-height: 1.5;
}

.table th,
.table td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table thead th {
  border-top: 0;
  background: var(--sunken);
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
}

.steps {
  margin: 14px 0 20px;
  padding: 18px 22px 8px 44px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.path {
  font-weight: 700;
}

.contact-card {
  margin: 20px 0;
  padding: 20px 22px;
  border-radius: var(--r);
  background: var(--accent-soft);
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.contact-card a {
  font-weight: 800;
}

details {
  border-bottom: 1px solid var(--line);
}

details summary {
  padding: 14px 0;
  font-weight: 750;
  cursor: pointer;
}

details > div {
  padding: 0 0 12px;
}

/* Home -------------------------------------------------------------------------------------- */

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 64px);
  letter-spacing: -0.035em;
}

.hero .lead {
  max-width: 34ch;
  font-size: 20px;
}

.soon {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
}

.chat {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 28px 24px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.bubble {
  max-width: 82%;
  padding: 11px 16px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.45;
}

.bubble.in {
  justify-self: start;
  border-bottom-left-radius: 6px;
  background: var(--sunken);
}

.bubble.out {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: var(--bubble);
  color: #fff;
}

.chat-label {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 700;
}

.choices {
  display: grid;
  gap: 8px;
}

.choice {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  font-size: 15px;
  line-height: 1.4;
}

.choice b {
  display: block;
  margin-bottom: 2px;
  color: var(--accent-ink);
  font-size: 12.5px;
}

.features {
  max-width: 1120px;
  margin: 56px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 40px;
}

.features h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.features p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
}

.promise {
  max-width: 1120px;
  margin: 56px auto 0;
  padding: 0 24px;
}

.promise > div {
  padding: 26px 28px 14px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.promise h2 {
  margin-top: 0;
}

/* Narrow screens ------------------------------------------------------------------------------ */

@media (max-width: 980px) {
  .page.with-toc {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* Short sections and one column: the contents list would only push the text down. */
  .toc {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16.5px;
  }

  .top {
    padding: 14px 18px;
  }

  .page,
  .hero,
  .features,
  .promise {
    padding-left: 18px;
    padding-right: 18px;
  }

  .bottom-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nav {
    gap: 4px 14px;
  }

  .short,
  .steps {
    padding-left: 18px;
    padding-right: 18px;
  }

  .steps {
    padding-left: 38px;
  }

  .table th,
  .table td {
    padding: 10px 10px;
  }

  .chat {
    padding: 20px 16px;
  }
}

@media print {
  .top .nav,
  .toc,
  .bottom .nav {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
