/* Liforiah website. Black-and-white foundation, Inter (self-hosted, SIL OFL 1.1), no frameworks. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f4;
  --ink: #0a0a0a;
  --ink-soft: #3f3f3f;
  --ink-muted: #6b6b6b;
  --line: #e4e4e2;
  --invert-bg: #0a0a0a;
  --invert-ink: #ffffff;
  --invert-soft: #b9b9b9;
  --invert-line: #2a2a2a;
  --focus: #0a0a0a;
  --radius: 20px;
  --max: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

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

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

.on-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: #ffffff;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

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

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 650;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

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

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 4px;
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 999px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-soft);
}

/* ---------- type ---------- */
h1,
h2,
h3 {
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0;
  font-weight: 650;
}

h1 {
  font-size: clamp(2.8rem, 8.4vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(2rem, 4.8vw, 3.25rem);
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

p {
  margin: 0;
}

.lede {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34em;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.on-dark .eyebrow {
  color: var(--invert-soft);
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(64px, 11vw, 140px) clamp(56px, 9vw, 110px);
  position: relative;
  overflow: hidden;
}

.hero .grid {
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}

.hero .copy {
  display: grid;
  gap: 28px;
}

.hero-mark {
  justify-self: center;
  width: min(72vw, 380px);
  aspect-ratio: 1;
  border-radius: 22%;
  background: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.45);
}

.hero-mark img {
  width: 78%;
  height: 78%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-soft);
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

/* ---------- sections ---------- */
section {
  padding-block: clamp(64px, 9vw, 120px);
}

.on-soft {
  background: var(--bg-soft);
}

.on-dark {
  background: var(--invert-bg);
  color: var(--invert-ink);
}

.on-dark .lede,
.on-dark p {
  color: var(--invert-soft);
}

.section-head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(36px, 5vw, 64px);
  max-width: 44rem;
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--bg);
  display: grid;
  gap: 12px;
  align-content: start;
}

.on-soft .card {
  border-color: transparent;
}

.card p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.on-dark .card {
  background: #121212;
  border-color: var(--invert-line);
}

.on-dark .card p {
  color: var(--invert-soft);
}

.tag {
  display: inline-block;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--ink-muted);
}

.tag.now {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.on-dark .tag {
  color: var(--invert-soft);
}

.on-dark .tag.now {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}

.split {
  display: grid;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

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

.principles li {
  display: grid;
  gap: 6px;
  padding-block: 22px;
  border-top: 1px solid var(--invert-line);
}

.principles li:last-child {
  border-bottom: 1px solid var(--invert-line);
}

.principles strong {
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  color: var(--invert-ink);
  font-weight: 600;
}

.note {
  margin-top: 28px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.98rem;
  background: var(--bg);
}

.on-dark .note {
  background: transparent;
  border-color: var(--invert-line);
  color: var(--invert-soft);
}

.faq {
  display: grid;
  gap: 0;
  max-width: 48rem;
}

.faq details {
  border-top: 1px solid var(--line);
  padding-block: 4px;
}

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

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  padding-block: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  flex: none;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding-bottom: 20px;
  color: var(--ink-soft);
}

/* ---------- legal pages ---------- */
.legal {
  padding-block: clamp(48px, 7vw, 96px) clamp(64px, 9vw, 120px);
}

.legal .wrap {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
}

.legal-head {
  display: grid;
  gap: 16px;
  max-width: 46rem;
}

.legal-head h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.04em;
}

.meta {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.legal-facts {
  line-height: 1.9;
  max-width: 46rem;
  color: var(--ink-soft);
}

.legal-intro {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 46rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 22px;
}

.draft-banner {
  border: 1px solid var(--ink);
  border-radius: 16px;
  padding: 18px 22px;
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 46rem;
}

.toc {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  max-width: 46rem;
  background: var(--bg-soft);
}

.toc strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.toc ol {
  margin: 0;
  padding-left: 1.25em;
  columns: 1;
  column-gap: 32px;
}

.toc li {
  padding-block: 3px;
  break-inside: avoid;
}

.prose {
  max-width: 46rem;
  display: grid;
  gap: 18px;
}

.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  letter-spacing: -0.03em;
  margin-top: clamp(28px, 4vw, 44px);
  scroll-margin-top: 90px;
}

.prose h3 {
  margin-top: 10px;
  font-size: 1.1rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
}

.prose a {
  color: var(--ink);
  font-weight: 500;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.97rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

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

.prose th {
  color: var(--ink);
  font-weight: 600;
  background: var(--bg-soft);
  white-space: nowrap;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.todo {
  background: #fff4c2;
  color: #5a4300;
  border-radius: 6px;
  padding: 1px 7px;
  font-weight: 600;
  font-size: 0.92em;
}

.callout {
  border-left: 3px solid var(--ink);
  padding: 4px 0 4px 18px;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--invert-bg);
  color: var(--invert-soft);
  padding-block: 56px 40px;
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: grid;
  gap: 36px;
}

.footer-top {
  display: grid;
  gap: 28px;
}

.footer-brand {
  display: grid;
  gap: 14px;
  max-width: 24rem;
}

.footer-brand .brand {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--invert-line);
  padding-top: 24px;
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
}

/* ---------- 404 ---------- */
.lost {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 80px;
}

.lost .copy {
  display: grid;
  gap: 20px;
  justify-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
  background: #262626;
}

/* ---------- motion (enhancement only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .js .reveal.in {
    opacity: 1;
    transform: none;
  }

  .hero-mark {
    animation: float 9s ease-in-out infinite;
  }

  @keyframes float {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }
}

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

/* ---------- larger screens ---------- */
@media (min-width: 760px) {
  .hero .grid {
    grid-template-columns: 1.25fr 0.75fr;
  }

  .split {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .footer-top {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }

  .toc ol {
    columns: 2;
  }
}

@media (max-width: 520px) {
  .brand span {
    font-size: 1.1rem;
  }

  .nav a {
    padding: 8px 9px;
    font-size: 0.9rem;
  }

  .card {
    padding: 22px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }

  body {
    font-size: 11pt;
  }
}
