/*
 * liffer.com styles. Colors, type scale, spacing and radii follow
 * design/tokens.json (version 2) and docs/design-system.md.
 * When a token changes there, change it here too.
 */

@font-face {
  font-family: "Archivo";
  src: url("/landing/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --surface: #FFFFFF;
  --surface-raised: #F7F7F5;
  --surface-sunken: #EDEDE9;
  --line: #E0E0DB;
  --line-strong: #BFBFB8;
  --ink: #121212;
  --ink-mid: #4A4A46;
  --ink-soft: #6E6E68;
  --accent: #DD0000;
  --on-accent: #FFFFFF;
  --accent-soft: #FDE8E8;
  --gold: #FFCE00;
  --gold-soft: #FFF6D6;
  --on-gold: #121212;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  --gutter: 16px;
  --font: "Archivo", Arial, Helvetica, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #121212;
    --surface-raised: #1B1B1A;
    --surface-sunken: #0C0C0B;
    --line: #2C2C2A;
    --line-strong: #44443F;
    --ink: #F4F4F0;
    --ink-mid: #BDBDB6;
    --ink-soft: #92928B;
    --accent: #FF4D4D;
    --on-accent: #121212;
    --accent-soft: #3A1212;
    --gold-soft: #3A3000;
  }
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[id] { scroll-margin-top: 16px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -64px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
}

.skip:focus { top: 8px; }

/* Type styles (tokens.json -> type.styles) */

.label {
  margin: 0;
  font-weight: 600;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.title {
  margin: 0;
  font-weight: 700;
  font-size: 28px;
  line-height: 32px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}

.heading {
  margin: 0;
  font-weight: 600;
  font-size: 20px;
  line-height: 26px;
  letter-spacing: -0.2px;
}

.display {
  margin: 0;
  font-weight: 700;
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .title { font-size: 36px; line-height: 40px; letter-spacing: -0.5px; }
}

/* Header rule: 3 px ink under a screen title, like a collar */

.rule {
  height: 3px;
  margin: 16px 0 0;
  border: 0;
  background: var(--ink);
}

/* Site header */

.site-header { border-bottom: 1px solid var(--line); }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  padding: 8px 0;
}

.brand img { width: auto; height: 28px; }

.nav {
  display: flex;
  margin-right: -8px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

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

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

@media (max-width: 399px) {
  .nav .nav-wide { display: none; }
}

@media (min-width: 768px) {
  .bar { min-height: 72px; }
  .brand img { height: 32px; }
  .nav { gap: 8px; }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 84%, var(--ink)); }

.btn-secondary { border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); }

/* Marks */

.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 700;
  font-size: 13px;
  line-height: 13px;
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.badge-pro { background: var(--gold); color: var(--on-gold); }
.badge-free { border: 1px solid var(--line-strong); color: var(--ink); }

.status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.note {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--gold-soft);
  color: var(--ink);
}

.note .label { color: var(--ink); margin-bottom: 4px; }
.note p { margin: 0; font-size: 15px; line-height: 22px; }

/* Home: hero */

.hero { padding-block: 32px 48px; }

/* Sized so that KNOWLEDGE fits a phone and each sentence holds one line on
   desktop: at wdth 125 the caps run about 8.4 and 16.6 em wide. */
.hero .display {
  margin-top: 16px;
  font-size: min(40px, calc((100vw - 32px) / 8.6));
  line-height: 1;
}

.hero .display span { display: block; }

.chevron {
  width: 100%;
  height: 22px;
  margin-top: 24px;
  color: var(--accent);
  overflow: visible;
}

.hero-grid {
  display: grid;
  gap: 32px;
  margin-top: 32px;
}

.lede {
  max-width: 34em;
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-mid);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.cta-row .btn { flex: 1 1 220px; }

.fine {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-soft);
}

.spec {
  margin: 0;
  padding: 16px 16px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.spec dl { margin: 12px 0 0; }

.spec dt {
  font-weight: 600;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.spec dd {
  margin: 0;
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  .hero { padding-block: 56px; }
  .hero .display { font-size: min(62px, calc((100vw - 64px) / 16.8)); }
  .chevron { height: 32px; margin-top: 32px; }
  .lede { font-size: 20px; line-height: 30px; }
  .cta-row .btn { flex: 0 0 auto; }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 64px;
    margin-top: 40px;
  }
}

/* Home: sections */

.section { padding-block: 40px; }
.section-head { margin-bottom: 8px; }
.section-head .label { margin-bottom: 8px; }

.section-lede {
  max-width: 40em;
  margin: 16px 0 0;
  color: var(--ink-mid);
}

@media (min-width: 768px) {
  .section { padding-block: 56px; }
  .section:last-child { padding-bottom: 96px; }
}

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

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

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

.feature {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.feature svg { width: 24px; height: 24px; color: var(--ink); }
.feature .heading { margin-top: 16px; }

.feature p {
  margin: 8px 0 0;
  color: var(--ink-mid);
}

.step {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.step .heading { margin-top: 16px; }

.step p {
  margin: 8px 0 0;
  color: var(--ink-mid);
}

.roster-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}

.roster-no {
  width: 24px;
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.roster-name {
  flex-grow: 1;
  font-size: 18px;
  line-height: 24px;
}

.inside .note { margin-top: 32px; }

@media (min-width: 768px) {
  .inside .note { max-width: 720px; }
}

/* Home: pricing */

.plans {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.plan-pro { background: var(--surface-raised); }

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 16px 0 0;
  font-weight: 700;
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.price span {
  font-weight: 500;
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.checks {
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.checks svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--ink); }

.plan .fine { text-align: center; }

/* Sub pages: privacy, support */

.page-head { padding-block: 32px 0; }
.page-head .label { margin-bottom: 12px; }

.page-head .display {
  font-size: clamp(34px, 6.4vw, 64px);
  line-height: 1;
}

.page-meta {
  margin: 16px 0 0;
  color: var(--ink-mid);
}

.page-body {
  display: grid;
  gap: 32px;
  padding-block: 32px 64px;
}

@media (min-width: 768px) {
  .page-head { padding-block: 56px 0; }
  .page-body { padding-block: 48px 96px; }
}

@media (min-width: 960px) {
  .page-body { grid-template-columns: 220px minmax(0, 680px); gap: 64px; }
  .page-body-aside { grid-template-columns: minmax(0, 680px) 320px; }
  .page-body-aside > aside { grid-column: 2; grid-row: 1; align-self: start; }
  .page-body-aside > .faq { grid-column: 1; grid-row: 1; }
}

.toc { display: none; }

@media (min-width: 960px) {
  .toc { display: block; }
  .toc-inner { position: sticky; top: 24px; }
}

.toc ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.toc a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-mid);
  text-decoration: none;
}

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

.prose { font-size: 17px; line-height: 28px; }
.prose > :first-child { margin-top: 0; }

.prose h2 {
  margin: 48px 0 12px;
  font-weight: 700;
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.2px;
}

.prose h3 {
  margin: 32px 0 8px;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
}

.prose p { margin: 0 0 16px; }
.prose strong { font-weight: 600; }

.prose ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.prose li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 20px;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--ink);
}

.summary {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.prose .summary { margin: 24px 0 8px; }

.prose .summary h2,
.prose .note h2 {
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.prose .note h2 { margin-bottom: 4px; }
.summary ul { margin: 0; }
.summary li:last-child { margin-bottom: 0; }

.prose .note { margin-top: 48px; }
.prose .note p { margin: 0; font-size: 15px; line-height: 22px; }

/* Support */

.contact {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

@media (min-width: 960px) {
  .contact { position: sticky; top: 24px; }
}

.contact .heading { margin-top: 8px; }

.contact p {
  margin: 8px 0 20px;
  color: var(--ink-mid);
}

.contact .btn { width: 100%; }

.contact .fine { text-align: center; overflow-wrap: anywhere; }

.faq-list { border-top: 1px solid var(--line); margin-top: 16px; }

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

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }

.faq summary svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--ink);
}

.faq details[open] .plus-v { display: none; }

.faq .answer { padding-bottom: 20px; font-size: 16px; line-height: 26px; }
.faq .answer > :last-child { margin-bottom: 0; }
.faq .answer li { margin-bottom: 6px; }

.after {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.after p { margin: 8px 0 0; color: var(--ink-mid); }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 32px 40px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 32px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-soft);
}

.foot-brand img { width: auto; height: 32px; }
.foot-brand p { margin: 0; }
.foot-brand a { color: var(--ink-mid); }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

.foot-links a:hover { color: var(--accent); }

.foot-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Analytics consent (analytics.js) */

.consent {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 16px;
  z-index: 20;
  max-width: 440px;
  padding: 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-mid);
}

.consent p { margin: 0 0 16px; }

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.consent .btn {
  flex: 1 1 140px;
  cursor: pointer;
}

.consent .btn-secondary { background: transparent; }
