/*
 * slvnt.cloud — the public site.
 *
 * The `--ledger-*` block below is copied verbatim from ledger-auth's
 * `auth.css`, which is the canonical source (D19/D20). ledger-ui mirrors the
 * same values as Angular Material tokens. That makes three copies, and the
 * rule that comes with them is "change one, change all three".
 *
 * So: do not add a colour here. Every value this page needs already exists in
 * that set, and a fourth colour invented for a marketing page would either
 * break the pairing or grow a shared surface across two repositories for no
 * domain reason. The one thing auth.css genuinely lacks is a layout scale —
 * it only ever renders a 26rem centred card — and that goes in the separate
 * `--site-*` block, deliberately outside the shared surface, exactly as
 * ledger-ui keeps its `--app-*` scale out of it.
 */

:root {
  --ledger-bg: #f4f5f7;
  --ledger-surface: #ffffff;
  --ledger-ink: #16191d;
  --ledger-ink-muted: #5b6470;
  --ledger-line: #d9dde3;
  --ledger-input-border: #8a93a0;
  --ledger-accent: #1f5f4b;
  --ledger-accent-ink: #ffffff;
  --ledger-danger: #9b2c2c;
  --ledger-danger-bg: #fdf0f0;
  --ledger-ok: #1f5f4b;
  --ledger-ok-bg: #eef5f2;

  --ledger-radius: 10px;
  --ledger-gap: 1rem;
  --ledger-font:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ledger-bg: #14171a;
    --ledger-surface: #1c2024;
    --ledger-ink: #e9ecef;
    --ledger-ink-muted: #9aa4b0;
    --ledger-line: #2f353c;
    --ledger-input-border: #626c77;
    --ledger-accent: #4bbf95;
    --ledger-accent-ink: #10241d;
    --ledger-danger: #f4a8a8;
    --ledger-danger-bg: #2d1d1d;
    --ledger-ok: #4bbf95;
    --ledger-ok-bg: #16261f;
  }
}

/* Site-local. Not part of the shared surface above — nothing else reads these. */
:root {
  --site-space-1: 0.25rem;
  --site-space-2: 0.5rem;
  --site-space-3: 0.75rem;
  --site-space-4: 1rem;
  --site-space-5: 1.5rem;
  --site-space-6: 2rem;
  --site-space-7: 3rem;
  --site-space-8: 4.5rem;

  --site-page-max: 64rem;
  /* Measure for running text. The legal pages are the reason this exists. */
  --site-prose-max: 42rem;
  --site-card-min: 17rem;

  --site-brand-font: "Fraunces", Georgia, "Times New Roman", serif;
}

/*
 * Fraunces, self-hosted, two weights, latin only — the same files ledger-ui
 * pulls from @fontsource. There is no CDN link on this page and there must not
 * be one: a request to fonts.gstatic.com would make the cookie policy this
 * site hosts untrue on the page that links to it.
 *
 * Body text stays on --ledger-font's system stack, which costs nothing to
 * load. Fraunces is used for the wordmark and headings only.
 */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/fraunces-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

html {
  /* Anchors on this page scroll under the sticky header without it. */
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--ledger-bg);
  color: var(--ledger-ink);
  font-family: var(--ledger-font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--ledger-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ledger-accent);
  outline-offset: 2px;
}

/* Screen-reader-only, for the skip link. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--site-space-4);
  top: -4rem;
  z-index: 10;
  padding: var(--site-space-2) var(--site-space-4);
  background: var(--ledger-surface);
  border: 1px solid var(--ledger-input-border);
  border-radius: calc(var(--ledger-radius) - 4px);
  text-decoration: none;
  transition: top 120ms ease;
}

.skip-link:focus {
  top: var(--site-space-4);
}

/* ---------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--site-page-max);
  margin-inline: auto;
  padding-inline: var(--site-space-5);
}

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--ledger-surface);
  /* Same 2px accent rule the application's own header carries. */
  border-bottom: 2px solid var(--ledger-accent);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--site-space-4);
  min-height: 4rem;
}

/*
 * The lockup, matching ledger-ui's shell header: 26px mark, "slvnt" in
 * Fraunces 400 at the muted ink, "Ledger" in Fraunces 600 at the accent.
 */
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
  font-family: var(--site-brand-font);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--ledger-accent);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark .brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  margin-right: 0.2rem;
}

.wordmark-prefix {
  font-weight: 400;
  color: var(--ledger-ink-muted);
}

/* ---------------------------------------------------------------- buttons -- */

/*
 * Same two shapes auth.css defines: a filled accent primary, and an outlined
 * secondary for the second way forward. Rendered as links here rather than
 * <button>, so the box is restated rather than inherited.
 */
.btn {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: calc(var(--ledger-radius) - 4px);
  background: var(--ledger-accent);
  color: var(--ledger-accent-ink);
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  border-color: var(--ledger-input-border);
  color: var(--ledger-ink);
  font-weight: 500;
}

.btn-outline:hover {
  border-color: var(--ledger-accent);
  filter: none;
}

.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
}

/* ------------------------------------------------------------------- hero -- */

.hero {
  padding-block: var(--site-space-8) var(--site-space-7);
}

.hero h1 {
  margin: 0 0 var(--site-space-5);
  max-width: 20ch;
  font-family: var(--site-brand-font);
  font-weight: 600;
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero-lede {
  margin: 0 0 var(--site-space-6);
  max-width: 54ch;
  font-size: 1.2rem;
  color: var(--ledger-ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--site-space-3);
  align-items: center;
}

.hero-note {
  margin: var(--site-space-5) 0 0;
  font-size: 0.95rem;
  color: var(--ledger-ink-muted);
}

/* --------------------------------------------------------------- sections -- */

.section {
  padding-block: var(--site-space-7);
  border-top: 1px solid var(--ledger-line);
}

.section h2 {
  margin: 0 0 var(--site-space-3);
  font-family: var(--site-brand-font);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.2;
}

.section-lede {
  margin: 0 0 var(--site-space-6);
  max-width: 60ch;
  color: var(--ledger-ink-muted);
}

/*
 * auto-fit rather than breakpoints, following ledger-ui's deliberate choice:
 * the application ships zero media queries and the grid does the work.
 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--site-card-min), 100%), 1fr));
  gap: var(--site-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--ledger-surface);
  border: 1px solid var(--ledger-line);
  border-radius: var(--ledger-radius);
  padding: calc(var(--ledger-gap) * 1.25);
}

.card h3 {
  margin: 0 0 var(--site-space-2);
  font-size: 1.05rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--ledger-ink-muted);
}

/* Numbered steps. The counter is the only ornament on the page. */
.steps {
  counter-reset: step;
}

.steps .card {
  position: relative;
  /* Room for the counter above the heading. The absolutely-positioned ::before
     is out of flow, so nothing else reserves it and the number would otherwise
     sit on top of the h3. */
  padding-top: calc(var(--ledger-gap) * 2.6);
}

.steps .card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: calc(var(--ledger-gap) * 1.25);
  line-height: 1;
  font-family: var(--site-brand-font);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--ledger-accent);
}

/* A plain fact list — used for what it reads, and for what it does not do. */
.fact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--site-space-3);
  max-width: var(--site-prose-max);
}

.fact-list li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--ledger-ink-muted);
}

.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--ledger-accent);
}

.fact-list strong {
  color: var(--ledger-ink);
  font-weight: 600;
}

/* ------------------------------------------------------------------ plans -- */

.plan-list {
  display: grid;
  gap: var(--site-space-5);
  margin: 0;
  max-width: var(--site-prose-max);
}

.plan-list dt {
  margin-bottom: var(--site-space-1);
  font-weight: 600;
}

.plan-list dd {
  margin: 0;
  color: var(--ledger-ink-muted);
}

/* --------------------------------------------------------------- waitlist -- */

.waitlist {
  background: var(--ledger-surface);
  border: 1px solid var(--ledger-line);
  border-radius: var(--ledger-radius);
  padding: calc(var(--ledger-gap) * 1.75);
  max-width: var(--site-prose-max);
}

.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--site-space-3);
  align-items: flex-end;
  margin-top: var(--site-space-5);
}

.field {
  flex: 1 1 16rem;
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.field input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--ledger-input-border);
  border-radius: calc(var(--ledger-radius) - 4px);
  background: var(--ledger-bg);
  color: var(--ledger-ink);
  font: inherit;
}

/*
 * Honeypot. Hidden from people and from assistive technology, left in the DOM
 * for anything filling every field it finds. `display: none` is skipped by
 * some naive bots, so it is moved off-canvas instead — the reason this is not
 * simply `hidden`.
 */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  margin: var(--site-space-4) 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: calc(var(--ledger-radius) - 4px);
  font-size: 0.95rem;
}

.notice-ok {
  background: var(--ledger-ok-bg);
  color: var(--ledger-ok);
}

.notice-error {
  background: var(--ledger-danger-bg);
  color: var(--ledger-danger);
}

.hint {
  margin: var(--site-space-4) 0 0;
  font-size: 0.9rem;
  color: var(--ledger-ink-muted);
}

/* ---------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--ledger-line);
  padding-block: var(--site-space-6);
  font-size: 0.95rem;
  color: var(--ledger-ink-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--site-space-5);
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--site-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer .wordmark {
  flex: 0 0 auto;
  font-size: 1.05rem;
}

.site-footer .wordmark .brand-mark {
  width: 22px;
  height: 22px;
}

/* ------------------------------------------------------------ legal pages -- */

.prose {
  max-width: var(--site-prose-max);
  padding-block: var(--site-space-7);
}

.prose h1 {
  margin: 0 0 var(--site-space-2);
  font-family: var(--site-brand-font);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.5rem);
  line-height: 1.15;
}

.prose h2 {
  margin: var(--site-space-7) 0 var(--site-space-3);
  font-family: var(--site-brand-font);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.25;
}

.prose h3 {
  margin: var(--site-space-5) 0 var(--site-space-2);
  font-size: 1.05rem;
  font-weight: 600;
}

.prose p,
.prose li {
  margin: 0 0 var(--ledger-gap);
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: var(--site-space-2);
}

.prose .updated {
  margin: 0 0 var(--site-space-6);
  font-size: 0.95rem;
  color: var(--ledger-ink-muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--ledger-gap);
  font-size: 0.95rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: var(--site-space-2) var(--site-space-3);
  border-bottom: 1px solid var(--ledger-line);
}

.prose th {
  font-weight: 600;
  color: var(--ledger-ink-muted);
}

/*
 * The three legal pages carry a table, which is the one thing on this site
 * that can be wider than a narrow viewport. It scrolls inside its own box so
 * the page body never scrolls sideways.
 */
.table-scroll {
  overflow-x: auto;
}

/*
 * Unfilled placeholders in the legal text. Marked loudly on purpose: these
 * pages are drafted from the code and cannot know the entity's own details,
 * and the failure mode to avoid is one shipping unnoticed. `grep -rn
 * PLACEHOLDER site/` is the check; this is the same check by eye.
 */
.placeholder {
  padding: 0 0.25rem;
  border-bottom: 2px dotted var(--ledger-danger);
  background: var(--ledger-danger-bg);
  color: var(--ledger-danger);
  font-weight: 600;
  font-size: 0.95em;
}

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