/* Shared stylesheet for the static document pages listed in scripts/document-routes.mjs.
   It carries the marketing page's V2 tokens (src/styles.css, from design/09- WWW) so the
   documents read as part of the same site, and follows the same rule: sizes in rem, and
   lengths that grow with the window written against --fluid rather than set per breakpoint.
   Everything is self-hosted: the display font and the brand mark come from this origin, and
   the pages run no scripts. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/BricolageGrotesque-var.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --page: #FAF9F6;
  --surface: #FFFFFF;
  --ink: #111111;
  --ink-soft: #55534E;
  --deep-rose: #8F3F36;
  --rose: #B65B50;
  --soft-rose: #EFE3E1;
  --hairline: rgba(60, 60, 67, .12);
  --display: 'Bricolage Grotesque', -apple-system, sans-serif;
  /* 0 at a 390px window, 1px at 1440px, as on the marketing page. */
  --fluid: clamp(0px, (100vw - 390px) / 1050, 1px);
  --gutter: calc(1.25rem + 100 * var(--fluid));
  --target: 2.75rem;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 20rem;
  margin: 0;
  color: var(--ink);
  background: var(--page);
}

a:focus-visible {
  outline: 3px solid var(--deep-rose);
  outline-offset: 3px;
  border-radius: .375rem;
}

.legalHeader {
  display: flex;
  align-items: center;
  gap: .875rem;
  width: min(75rem, calc(100% - 2 * var(--gutter)));
  min-height: calc(4.75rem + 20 * var(--fluid));
  margin: 0 auto;
}

.brandMark {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  min-height: var(--target);
  color: var(--deep-rose);
  font-family: var(--display);
  font-size: calc(1.5rem + 4 * var(--fluid));
  font-weight: 700;
  letter-spacing: -.036em;
  line-height: 1;
  text-decoration: none;
}

.brandMark::before {
  content: '';
  width: 1.22em;
  height: 1.22em;
  border-radius: 22%;
  background: url('/assets/app-icon-mark.webp') center / cover no-repeat;
}

.brandMark:hover {
  color: var(--rose);
}

.legalHeader span {
  padding-left: .875rem;
  border-left: 1px solid rgba(143, 63, 54, .4);
  color: var(--deep-rose);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .123em;
  line-height: 1.4;
  text-transform: uppercase;
}

.legalMain {
  width: min(51.25rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: .75rem 0 4rem;
}

.legalCard {
  padding: calc(1.5rem + 24 * var(--fluid));
  border-radius: 1.75rem;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 0 0 .5px var(--hairline);
}

.legalCard h1 {
  margin: 0 0 .625rem;
  font-family: var(--display);
  font-size: calc(2.125rem + 10 * var(--fluid));
  font-weight: 500;
  letter-spacing: -.032em;
  line-height: 1.045;
}

.legalMeta {
  margin: 0 0 1.875rem;
  color: var(--ink-soft);
  font-size: .875rem;
  line-height: 1.5;
}

.legalCard h2 {
  margin: 2.25rem 0 .625rem;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -.021em;
  line-height: 1.17;
}

.legalCard h3 {
  margin: 1.375rem 0 .375rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.legalCard p,
.legalCard li {
  margin: 0 0 .75rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.625;
}

.legalCard strong {
  color: var(--ink);
}

.legalCard ul {
  margin: 0 0 .875rem;
  padding-left: 1.375rem;
}

.legalCard li {
  margin-bottom: .375rem;
}

.legalCard a {
  color: var(--deep-rose);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .2em;
}

.legalCard a:hover {
  color: var(--rose);
}

.legalNotice {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  color: var(--ink);
  background: var(--soft-rose);
  font-size: .9375rem;
  line-height: 1.47;
}

.legalCard .legalNotice {
  color: var(--ink);
  font-size: .9375rem;
  line-height: 1.47;
}

.siteFooter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  width: min(75rem, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 1.125rem 0 2.25rem;
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: .8125rem;
  line-height: 1.46;
}

.siteFooter nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.5rem;
}

.siteFooter a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  color: var(--ink);
  font-size: .875rem;
  text-decoration: none;
}

.siteFooter a:hover {
  text-decoration: underline;
  text-underline-offset: .3em;
}

.siteFooter a[aria-current="page"] {
  color: var(--deep-rose);
  font-weight: 600;
}

.siteFooter p {
  margin: 0;
  text-align: center;
}

@media print {
  body,
  .legalHeader,
  .legalMain,
  .legalCard {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .legalCard {
    border: 0;
    padding: 0;
  }

  .siteFooter {
    display: none !important;
  }
}
