/* bleeptools site pages: holding page and legal pages. Swiss Style, same tokens as pritoki/css/style.css:
   ivory ground, navy type, hairline rules, square corners, orange as the
   only signal color. Mobile-first; see SPEC.md */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-navy: #212431;
  --c-accent: #FC5C02;
  --c-ivory: #F2EDE0;

  --rule: 1px solid var(--c-navy);

  --gutter: 16px;
  --max: 1200px;
}

/* ---------- Base ---------- */

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--c-ivory);
  color: var(--c-navy);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

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

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

/* ---------- Logo and note, centered in the viewport ---------- */

.hold {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 64px var(--gutter);
}

/* 500px source: keep at or below 250px so it stays sharp at 2x */
.hold__logo img { width: clamp(180px, 56vw, 250px); }

.hold__note {
  padding-top: 8px;
  border-top: var(--rule);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------- Top bar (legal pages) ---------- */

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  /* Hairline inset to the content width, as on the footer */
  background: linear-gradient(var(--c-navy), var(--c-navy)) center bottom / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}

.topbar__logo {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.topbar__logo img { width: auto; height: 28px; }

.topbar__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.topbar__link:hover { color: var(--c-accent); }

/* ---------- Legal pages: imprint, privacy policy ---------- */

.legal {
  flex: 1;
  padding-block: 32px 96px;
}

.legal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.legal__head {
  padding-bottom: 24px;
  border-bottom: 2px solid var(--c-navy);
}

.legal h1 {
  margin: 24px 0 0 -.03em;
  font-size: clamp(2.25rem, 10vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Mobile: one column. lg: each h2 sits left of its text (see below). */
.legal__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--gutter);
  margin-top: 32px;
}

.legal__body > * { max-width: 62ch; }

.legal h2 {
  margin-top: 48px;
  padding-top: 12px;
  border-top: var(--rule);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
}
.legal h2:first-child { margin-top: 0; border-top: 0; }

.legal h3 {
  margin-top: 24px;
  font-size: 1rem;
  font-weight: 700;
}

.legal p,
.legal ul { margin-top: 12px; }

.legal__body ul { padding-left: 1.25em; list-style: square; }
.legal__body li + li { margin-top: 4px; }

.legal__body a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.legal__body a:hover { color: var(--c-accent); }

/* Draft values still to be confirmed */
.todo { background: rgba(252, 92, 2, .18); }

/* ---------- Footer ---------- */

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 8px 24px;
  /* Hairline inset to the content width (the wrap itself carries the gutters) */
  background: linear-gradient(var(--c-navy), var(--c-navy)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  font-size: .8125rem;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}
.footer a:hover,
.footer a[aria-current="page"] { color: var(--c-accent); }

/* ---------- md: 768px ---------- */

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

/* ---------- lg: 1024px ---------- */

@media (min-width: 1024px) {
  :root { --gutter: 40px; }

  .legal { padding-block: 48px 128px; }
  .legal h1 { margin-top: 32px; }

  /* 12 columns: h2 in 1–4, text in 5–11. The h2 and the element next to it
     both carry the rule, so it runs across the row with a column gap. */
  .legal__body { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .legal__body > * { grid-column: 5 / span 7; max-width: none; }
  .legal__body > h2 { grid-column: 1 / span 4; }
  .legal__body > h2 + * {
    margin-top: 48px;
    padding-top: 12px;
    border-top: var(--rule);
  }
  .legal__body > h2:first-child + * { margin-top: 0; border-top: 0; }
  .legal__body > h2 + h3 { padding-top: 14px; }
}
