/* The legal and support pages (public/*.html in German, public/en/*.html in English): static HTML in the shop page's design
   (ShopPage.tsx). Header = LiteSite.module.css .header/.menu, footer = RingAfterword.module.css .footer,
   colours = FL.Palette in experience.css. The header and footer markup comes from scripts/legal-shell.mjs. */

/* The site's two fonts, the latin files that next/font serves the story with (SIL Open Font License 1.1). */
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-latin.woff2") format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-700-latin.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --fl-ground-light: #EEEAE4; --fl-ground-dark: #1E1814;
  --fl-ink-light: #1F0B08; --fl-ink-dark: #EFE6DA;
  --fl-secondary-light: #6E635A; --fl-secondary-dark: #B8A898;
  --fl-brick-light: #BA3E2B; --fl-brick-dark: #EC7A64;
  --text: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Bricolage Grotesque", var(--text);
  --body: color-mix(in srgb, var(--fl-ink-light) 84%, var(--fl-ground-light));
  --rule: color-mix(in srgb, var(--fl-secondary-light) 24%, transparent);
  --edge: 24px; --radius: 28px;
}

* { box-sizing: border-box; }
html { background: var(--fl-ground-dark); scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fl-ground-dark); color: var(--fl-ink-light); font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; text-underline-offset: .2em; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--fl-brick-light); outline-offset: 4px; }
::selection { background: var(--fl-brick-light); color: var(--fl-ink-dark); }

/* header: brand, Shop, App, language, menu */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(env(safe-area-inset-top) + 10px) var(--edge) 10px; background: var(--fl-ground-light); border-bottom: 1px solid color-mix(in srgb, var(--fl-ink-light) 8%, transparent); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--fl-ink-light); font: 600 17px/1 var(--text); letter-spacing: -.02em; }
.brand svg { width: 26px; height: 26px; color: var(--fl-brick-light); }
.site-header nav { display: flex; align-items: center; gap: 4px; }
.site-header nav > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; color: var(--fl-ink-light); font: 500 14px/1 var(--text); }
.site-header nav > a[aria-current=page] { text-decoration: underline; text-underline-offset: 6px; }
.site-header nav > a[data-set-locale]:not([aria-current]) { color: var(--fl-secondary-light); }
.menu summary { display: grid; place-items: center; width: 44px; height: 44px; margin-left: 2px; list-style: none; cursor: pointer; color: var(--fl-ink-light); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; height: 22px; }
.menu .close, .menu[open] .open { display: none; }
.menu[open] .close { display: block; }
.menu-panel { position: absolute; right: calc(var(--edge) - 12px); top: calc(100% - 4px); min-width: 232px; padding: 8px; display: flex; flex-direction: column; border-radius: 20px; background: var(--fl-ground-light); box-shadow: 0 16px 48px color-mix(in srgb, var(--fl-ink-light) 22%, transparent); }
.menu-panel a { display: block; padding: 12px 14px; border-radius: 12px; font: 500 16px/1.2 var(--text); letter-spacing: -.01em; }
.menu-panel a:hover, .menu-panel a:focus-visible { background: color-mix(in srgb, var(--fl-ink-light) 7%, transparent); }
.menu hr { width: calc(100% - 28px); margin: 6px 14px; border: 0; border-top: 1px solid color-mix(in srgb, var(--fl-ink-light) 12%, transparent); }

/* the page on the light ground, rounded into the dark footer like the shop */
.legal-page { padding: 40px var(--edge) 112px; background: var(--fl-ground-light); border-radius: 0 0 var(--radius) var(--radius); }
.legal-page > * { max-width: 720px; }
.legal-page > h1 { max-width: 1120px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: -8px 0 24px; color: var(--fl-secondary-light); font: 500 15px/1 var(--text); }
.back:hover { color: var(--fl-ink-light); }
.label { margin: 0 0 12px; color: var(--fl-brick-light); font: 600 13px/1.2 var(--text); letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font: 700 clamp(40px, 11vw, 72px)/1.02 var(--display); letter-spacing: -.05em; text-wrap: balance; overflow-wrap: anywhere; hyphens: manual; }
h2 { margin: 48px 0 12px; font: 700 clamp(22px, 5.6vw, 28px)/1.15 var(--display); letter-spacing: -.035em; text-wrap: balance; }
h3 { margin: 28px 0 8px; font: 600 17px/1.4 var(--text); }
p, li, dd { margin: 0 0 14px; color: var(--body); }
ul, ol { margin: 0 0 14px; padding-left: 1.3em; }
li { margin-bottom: 8px; }
li::marker { color: var(--fl-secondary-light); }
strong { color: var(--fl-ink-light); font-weight: 600; }
.legal-page a:not(.back) { color: var(--fl-brick-light); text-decoration: underline; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.legal-page a:not(.back):hover { color: var(--fl-ink-light); }
.date { margin: 16px 0 40px; color: var(--fl-secondary-light); font-size: 14px; }
.note { color: var(--fl-secondary-light); }
code { padding: 0 .25em; border-radius: 4px; background: color-mix(in srgb, var(--fl-ink-light) 6%, transparent); font-size: .88em; overflow-wrap: anywhere; }

/* what still has to happen before the first sale (data-release-block, scripts/validate_website_release.rb) */
.release-block { margin: 28px 0; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--fl-brick-light) 35%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--fl-brick-light) 5%, var(--fl-ground-light)); color: var(--body); }
.release-block p:last-child { margin-bottom: 0; }
/* the model withdrawal form, and the closing contact sections */
.form { margin: 20px 0; padding: 20px 20px 8px; border: 1px solid var(--rule); border-radius: 16px; }
.legal, .contact { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--rule); }
.legal h2, .contact h2 { margin-top: 32px; }

/* the online withdrawal's button on the withdrawal page; the form itself has withdrawal-form.css */
.legal-page a.action { display: inline-flex; align-items: center; min-height: 48px; margin: 4px 0 14px; padding: 0 24px; border-radius: 999px; background: var(--fl-brick-light); color: var(--fl-ground-light); font: 600 16px/1 var(--text); text-decoration: none; }
.legal-page a.action:hover { background: var(--fl-ink-light); color: var(--fl-ground-light); }

/* footer on the dark ground: path, link columns, the big brand line, small print */
.site-footer { width: min(calc(100% - 2 * var(--edge)), 1280px); margin-inline: auto; padding-block: 64px 32px; color: var(--fl-secondary-dark); font-size: 14px; line-height: 1.5; container-type: inline-size; }
.site-footer a { color: inherit; overflow-wrap: anywhere; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer a[aria-current=page] { color: var(--fl-ink-dark); }
.site-footer :focus-visible { outline-color: var(--fl-brick-dark); }
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 40px; padding-bottom: 20px; border-bottom: 1px solid color-mix(in srgb, var(--fl-secondary-dark) 22%, transparent); font-size: 13px; }
.trail span { display: inline-flex; align-items: center; gap: 10px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
.footer-links nav { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.footer-links nav:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
.footer-links nav:nth-child(4) { grid-column: 1; grid-row: 3; }
.footer-links h3 { margin: 0 0 8px; color: var(--fl-ink-dark); font-size: 16px; font-weight: 550; line-height: 1.5; }
.footer-brand { display: flex; align-items: center; gap: 2.5%; margin-block: 64px 40px; color: var(--fl-ink-dark); }
.footer-brand svg { display: block; width: 13%; height: auto; flex: none; color: var(--fl-brick-dark); }
.footer-brand span { font: 700 15.7cqw/1.1 var(--display); letter-spacing: -.065em; white-space: nowrap; }
.small-print { display: grid; gap: 16px; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--fl-secondary-dark) 25%, transparent); }
.small-print p { margin: 0; max-width: 80ch; color: inherit; }

/* phones: the header keeps the other language as the switch; on the narrowest ones the App link steps back
   into the menu (the shop's full row needs about 420 px) */
@media (max-width: 430px) {
  .site-header nav > a { padding: 0 7px; }
  .site-header nav > a[data-set-locale][aria-current] { display: none; }
}
@media (max-width: 374px) {
  :root { --edge: 16px; }
  .site-header nav > a.app { display: none; }
}
@media (min-width: 800px) {
  :root { --edge: 4vw; --radius: 40px; }
  body { font-size: 18px; }
  .site-header { padding-top: 16px; padding-bottom: 16px; }
  .legal-page { padding: 48px max(var(--edge), calc((100vw - 1120px) / 2)) 128px; }
  .site-footer { padding-block: 96px 40px; font-size: 16px; }
  .footer-links { grid-template-columns: .8fr 1.15fr 1.3fr .5fr; gap: 32px; }
  .footer-links nav:nth-child(3), .footer-links nav:nth-child(4) { grid-column: auto; grid-row: auto; }
  .footer-links h3 { font-size: 18px; }
  .footer-brand { margin-block: 80px 48px; }
  .small-print { grid-template-columns: 1fr 1.6fr; gap: 48px; }
}
/* printed, a legal page is just its text */
@media print {
  html, body, .legal-page { background: #fff; }
  .site-header, .site-footer, .back { display: none; }
  .legal-page { padding: 0; border-radius: 0; }
  .legal-page a:not(.back) { color: inherit; }
}
