/* Bindbell landing site. No build step, no third-party requests.
   Fonts are self-hosted (SIL Open Font License, see assets/fonts/OFL-*.txt)
   and shared with the broker web app, so nothing is fetched from a font CDN. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-opsz-wght.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-wght.woff") format("woff");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-wght-italic.woff") format("woff");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --paper: #f3f5f2;
  --paper-raised: #ffffff;
  --ink: #1b2e27;
  --ink-muted: #4a5c54;
  --ledger: #24483c;
  --ledger-ink: #eef4f0;
  --ledger-muted: #b9cdc4;
  --ledger-line: #3a6153;
  --brass: #a8741a;
  --brass-on-ledger: #e2b55a;
  --mist: #d5ded9;
  --link: #1f5a47;
  --focus: #a8741a;
  --draft-bg: #fff4d6;
  --draft-ink: #4d3a07;

  --serif: "Source Serif 4", Charter, "Bitstream Charter", Cambria, Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --measure: 40rem;
  --page: 72rem;
  --gutter: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1916;
    --paper-raised: #142420;
    --ink: #e4ece7;
    --ink-muted: #a7b7af;
    --ledger: #17312a;
    --ledger-ink: #e9f1ec;
    --ledger-muted: #a9c0b6;
    --ledger-line: #2d5045;
    --brass: #d6a548;
    --brass-on-ledger: #e8bd64;
    --mist: #284039;
    --link: #8fd0b7;
    --focus: #e8bd64;
    --draft-bg: #3a2f12;
    --draft-ink: #f6e2ae;
  }
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

p + p {
  margin-top: 1em;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ledger);
  color: var(--ledger-ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Header */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  min-height: 44px;
}

.brand svg {
  width: 2rem;
  height: 2rem;
}

.bell-body {
  fill: var(--brass);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.975rem;
}

.site-nav a:hover {
  text-decoration: underline;
}

/* Hero */

.hero {
  padding-block: 2.5rem 4rem;
}

.hero .wrap {
  display: grid;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 60rem) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 4rem;
  }

  .hero {
    padding-block: 4rem 6rem;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 13ch;
}

.lede {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: 1.1875rem;
  color: var(--ink);
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  background: var(--ledger);
  color: var(--ledger-ink);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--ink);
  color: var(--paper);
}

@media (prefers-color-scheme: dark) {
  .button {
    background: var(--brass-on-ledger);
    color: #1a1406;
  }

  .button:hover {
    background: var(--ink);
    color: var(--paper);
  }
}

.status {
  color: var(--ink-muted);
  font-size: 0.975rem;
}

/* The example thread: the one bold element on the page */

.thread {
  margin: 0;
  background: var(--ledger);
  color: var(--ledger-ink);
  border-radius: 1.25rem;
  padding: 1.5rem 1.25rem 1.25rem;
}

@media (min-width: 30rem) {
  .thread {
    padding: 1.75rem 1.75rem 1.5rem;
  }
}

.thread-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ledger-line);
}

.thread-ref {
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 700;
}

.thread-line {
  color: var(--ledger-muted);
  font-size: 0.9375rem;
}

.thread ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.msg {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--ledger-line);
}

.msg-meta {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ledger-muted);
  padding-top: 0.15rem;
}

.msg-channel {
  display: block;
  color: var(--ledger-ink);
  font-weight: 600;
  font-size: 0.875rem;
}

.msg-who {
  display: block;
  font-size: 0.8125rem;
  color: var(--ledger-muted);
}

.msg .msg-text {
  margin: 0;
  font-size: 0.975rem;
  line-height: 1.5;
}

.msg-client .msg-text {
  font-style: italic;
}

.cite {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--brass-on-ledger);
  border-radius: 999px;
  color: var(--brass-on-ledger);
  font-size: 0.8125rem;
  font-style: normal;
}

.handover {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.9rem 0.2rem;
  color: var(--brass-on-ledger);
  font-weight: 600;
  font-size: 0.975rem;
}

.handover svg {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  transform-origin: 50% 12%;
}

.handover .bell-body {
  fill: var(--brass-on-ledger);
}

.handover-mid {
  border-bottom: 1px solid var(--ledger-line);
  padding-block: 0.75rem;
}

.thread figcaption {
  margin-top: 1rem;
  color: var(--ledger-muted);
  font-size: 0.8125rem;
}

@media (max-width: 26rem) {
  .msg {
    grid-template-columns: minmax(0, 1fr);
  }

  .msg-meta {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
  }
}

/* One orchestrated moment: the thread fills in once, top to bottom. */
@media (prefers-reduced-motion: no-preference) {
  .thread li {
    animation: arrive 480ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .thread li:nth-child(1) { animation-delay: 150ms; }
  .thread li:nth-child(2) { animation-delay: 450ms; }
  .thread li:nth-child(3) { animation-delay: 750ms; }
  .thread li:nth-child(4) { animation-delay: 1050ms; }
  .thread li:nth-child(5) { animation-delay: 1350ms; }
  .thread li:nth-child(6) { animation-delay: 1650ms; }
  .thread li:nth-child(7) { animation-delay: 1950ms; }
  .thread li:nth-child(8) { animation-delay: 2250ms; }

  .thread li.handover-final svg {
    animation: ring 900ms ease-in-out 2600ms 1 both;
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(14deg); }
  40% { transform: rotate(-11deg); }
  60% { transform: rotate(7deg); }
  80% { transform: rotate(-4deg); }
}

/* Sections */

.section {
  padding-block: 4rem;
  border-top: 1px solid var(--mist);
}

@media (min-width: 60rem) {
  .section {
    padding-block: 5.5rem;
  }
}

.section h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  letter-spacing: -0.01em;
  max-width: 24ch;
}

.section-intro {
  margin-top: 1rem;
  max-width: var(--measure);
  color: var(--ink-muted);
  font-size: 1.125rem;
}

.section h3 {
  font-size: 1.3125rem;
}

/* Who it's for */

.audiences {
  display: grid;
  gap: 2rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .audiences {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

.audiences li {
  padding-left: 1rem;
  border-left: 3px solid var(--brass);
}

.audiences p {
  margin-top: 0.5rem;
  color: var(--ink-muted);
}

/* How it works: a real sequence, so it is numbered */

.steps {
  counter-reset: step;
  display: grid;
  gap: 0;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 60rem) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 2.25rem 3.75rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.2rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--ledger);
  color: var(--ledger-ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.125rem;
}

/* The thread line joining the steps */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 2.5rem;
  bottom: 0.2rem;
  width: 2px;
  background: var(--mist);
}

@media (min-width: 60rem) {
  .steps li {
    padding: 3.75rem 0 0;
  }

  .steps li::before {
    top: 0;
  }

  .steps li:not(:last-child)::after {
    left: 3.25rem;
    right: -1.75rem;
    top: 1.25rem;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

.steps p {
  margin-top: 0.6rem;
  color: var(--ink-muted);
}

.channel-list {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  list-style: none;
}

.steps .channel-list li {
  counter-increment: none;
  padding: 0.1rem 0.65rem;
  border: 1px solid var(--mist);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--ink);
}

.steps .channel-list li::before,
.steps .channel-list li::after {
  content: none;
}

/* Does and never does */

.scope {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 48rem) {
  .scope {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
  }
}

.scope ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.scope li {
  position: relative;
  padding: 0.6rem 0 0.6rem 2rem;
  border-bottom: 1px solid var(--mist);
}

.scope li::before {
  position: absolute;
  left: 0.2rem;
  top: 0.55rem;
  font-weight: 700;
}

.scope-does li::before {
  content: "\2713";
  color: var(--link);
}

.scope-never li::before {
  content: "\2715";
  color: var(--brass);
}

/* Compliance by design */

.principles {
  display: grid;
  gap: 2rem 3rem;
  margin: 2.5rem 0 0;
}

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

.principles div {
  max-width: 34rem;
}

.principles dt {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3125rem;
  line-height: 1.25;
}

.principles dd {
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
}

/* Pilot and contact */

.pilot {
  background: var(--ledger);
  color: var(--ledger-ink);
  border-top: 0;
}

.pilot .wrap {
  display: grid;
  gap: 2rem;
  align-items: end;
}

@media (min-width: 60rem) {
  .pilot .wrap {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 4rem;
  }
}

.pilot .section-intro {
  color: var(--ledger-muted);
}

.pilot .button {
  background: var(--brass-on-ledger);
  color: #1a1406;
}

.pilot .button:hover {
  background: var(--ledger-ink);
  color: var(--ledger);
}

.pilot a:not(.button) {
  color: var(--ledger-ink);
}

.pilot :focus-visible {
  outline-color: var(--ledger-ink);
}

.pilot-contact p + p {
  margin-top: 0.75rem;
}

.pilot-contact .small {
  color: var(--ledger-muted);
  font-size: 0.9375rem;
}

/* Footer */

.site-footer {
  padding-block: 2.5rem 3rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.site-footer .wrap {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 48rem) {
  .site-footer .wrap {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.125rem;
}

.footer-brand svg {
  width: 1.5rem;
  height: 1.5rem;
}

.company-details {
  margin-top: 0.75rem;
  max-width: 40rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .footer-links {
    justify-content: flex-end;
  }
}

.footer-links a {
  display: inline-block;
  padding-block: 0.4rem;
}

/* Prose pages: privacy notice and 404 */

.prose-page {
  padding-block: 2rem 5rem;
}

.prose {
  max-width: var(--measure);
}

.prose h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  letter-spacing: -0.015em;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
}

.prose h2 + p,
.prose h2 + ul {
  margin-top: 0.75rem;
}

.prose p,
.prose ul {
  max-width: var(--measure);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose ul + p,
.prose p + ul {
  margin-top: 1em;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose .meta {
  margin-top: 0.75rem;
  color: var(--ink-muted);
}

.draft-banner {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--brass);
  background: var(--draft-bg);
  color: var(--draft-ink);
}

.placeholder {
  font-weight: 600;
}

.not-found {
  padding-block: 4rem 6rem;
}

.not-found .bell-large {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.5rem;
}

.not-found h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
}

.not-found p {
  margin-top: 1rem;
  max-width: 32rem;
  font-size: 1.125rem;
}

@media print {
  .skip-link,
  .site-nav,
  .hero-actions .button {
    display: none;
  }

  .thread,
  .pilot {
    background: none;
    color: inherit;
    border: 1px solid #999;
  }
}
