:root {
  color-scheme: light dark;
  --brand: #14152d;
  --bg: #f7f7fa;
  --fg: var(--brand);
  --muted: #5d5f78;
  --line: #e2e2ec;
  --bar: 6px;
  --bar-gap: 1.25rem;
  --offset: 2.5rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--brand);
    --fg: #f2f2f7;
    --muted: #a6a8c4;
    --line: #2d2f55;
  }

  /* Logos ship in a single dark colour; flip them instead of maintaining light variants. */
  .logo-mono {
    filter: invert(1);
  }

  .logo-brand {
    filter: brightness(0) invert(0.95);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.6 var(--font);
  overflow-wrap: break-word;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

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

.wrap {
  width: min(100% - 2 * var(--gutter), 60rem);
  margin-inline: auto;
}

/* Top bar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  font-size: 0.9375rem;
}

.topbar--end {
  justify-content: flex-end;
}

.home {
  display: block;
}

.home img {
  display: block;
  width: auto;
  height: 2rem;
}

.lang {
  color: var(--muted);
}

/* Hero */

.hero {
  padding-block: clamp(2.5rem, 9vw, 6rem) clamp(2rem, 6vw, 3.5rem);
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(4.5rem, 12vw, 7rem);
}

.tagline {
  max-width: 44ch;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  line-height: 1.55;
}

/* Ventures: two free-standing logos split by the slanted bar from the FG|BD mark */

.ventures {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  column-gap: calc(var(--bar) + 2 * var(--bar-gap));
  margin: 0;
  padding: 2rem 0;
  list-style: none;
}

/* Right edge sits lower than the left, like the bar in the logo (skew measured from the PDF). */
.ventures::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--bar);
  margin-left: calc(var(--bar) / -2);
  background: var(--fg);
  transform: skewY(25.6deg);
}

.ventures > li {
  display: flex;
}

/* Left logo high and right logo low, mirroring FG above the baseline of BD. */
.ventures > li:first-child {
  justify-content: flex-end;
  margin-bottom: var(--offset);
  text-align: right;
}

.ventures > li:last-child {
  justify-content: flex-start;
  margin-top: var(--offset);
}

.venture {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: min(100%, var(--w));
  text-decoration: none;
}

.ventures > li:first-child .venture {
  align-items: flex-end;
}

.venture--codeq {
  --w: 10rem;
}

/* vienna.rentals guideline: stacked lockup ≥ 120 px wide, horizontal lockup ≥ 44 px high. */
.venture--vr {
  --w: 9rem;
}

.venture-logo,
.venture-logo picture {
  display: block;
  width: 100%;
}

.venture-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.venture-meta {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.venture:hover .venture-meta {
  color: var(--fg);
  text-decoration-color: currentColor;
}

.arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.venture:hover .arrow {
  transform: translateX(3px);
}

/* Sections */

.section {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}

.page-head {
  padding-block: clamp(2rem, 8vw, 5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.lead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.page-head .lead {
  margin: 0.75rem 0 0;
}

/* Definition list for legal facts */

.facts {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
}

.facts dt {
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  padding: 0.25rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

/* Prose for longer legal texts */

.prose {
  max-width: 68ch;
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

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

.prose p,
.prose ul {
  margin: 0 0 1rem;
}

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

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

@media (min-width: 40rem) {
  :root {
    --bar: 12px;
    --bar-gap: clamp(2rem, 4.5vw, 3.5rem);
    --offset: clamp(3rem, 6vw, 4.5rem);
  }

  .ventures {
    padding-block: 2.5rem;
  }

  .venture {
    gap: 1.5rem;
  }

  .venture-meta {
    font-size: 0.9375rem;
  }

  .venture--codeq {
    --w: 14rem;
  }

  .venture--vr {
    --w: 22rem;
  }

  .facts {
    grid-template-columns: 15rem 1fr;
    column-gap: 2rem;
  }

  .facts dt,
  .facts dd {
    padding-block: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
