/* D2hub site styles on top of Bootstrap 5. */

:root {
  --d2-blue: #041CCC;
  --d2-ink: #111;
  --d2-muted: #6b6b6b;
  --d2-sand: #f1f0ec;          /* light background used for alternating sections */
  --d2-line: rgba(0, 0, 0, .12);

  --bs-primary: var(--d2-blue);
  --bs-primary-rgb: 4, 28, 204;
  --bs-link-color: var(--d2-blue);
  --bs-link-color-rgb: 4, 28, 204;
  --bs-link-hover-color: #031594;
  --bs-body-font-family: 'Inter', system-ui, sans-serif;
  --bs-body-color: var(--d2-ink);
  --bs-body-font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  --bs-body-line-height: 1.6;
  --bs-body-font-weight: 400;
  --bs-border-radius: 0;

  /* type scale */
  --d2-h1: clamp(2.25rem, 1.6rem + 2.8vw, 4rem);
  --d2-h2: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
  --d2-h3: clamp(1.25rem, 1.1rem + .6vw, 1.625rem);
  --d2-lead: clamp(1.125rem, 1rem + .5vw, 1.375rem);

  /* content width (header, sections and footer share it) */
  --d2-container: 1440px;

  /* vertical rhythm */
  --d2-section-y: clamp(3rem, 2rem + 4vw, 6rem);
}

@media (min-width: 1200px) {
  .container { max-width: min(var(--d2-container), 100% - 4rem); }
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
}
h1, .h1 { font-size: var(--d2-h1); }
h2, .h2 { font-size: var(--d2-h2); margin-bottom: 1.25rem; }
h3, .h3 { font-size: var(--d2-h3); margin-bottom: .75rem; }
.lead { font-size: var(--d2-lead); font-weight: 500; }
main ul { padding-left: 1.2rem; }
main li + li { margin-top: .35rem; }

/* ---------------------------------------------------------------- header */
.site-header { box-shadow: 0 1px 0 var(--d2-line); }
.site-header .navbar { --bs-navbar-padding-y: .75rem; }
.site-header .navbar-brand img { height: 40px; width: auto; }
.site-header .nav-link { color: var(--d2-ink); font-weight: 500; }
.site-header .nav-link.active,
.site-header .nav-link:hover { color: var(--d2-blue); }
.site-header .dropdown-menu { border-color: var(--d2-line); }
.site-header .dropdown-item.active,
.site-header .dropdown-item:active { background: var(--d2-blue); }

/* ---------------------------------------------------------------- hero (page header) */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(220px, 28vw, 380px);
  color: #fff;
  background-color: #333;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;   /* image is set inline by ui.hero (url relative to the page) */
}
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); }
.hero__inner { position: relative; text-align: center; padding-block: 3rem; }
.hero__title { margin: 0; color: #fff; }
.hero__subtitle { margin: 1rem auto 0; max-width: 50rem; font-size: var(--d2-lead); font-weight: 500; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: var(--d2-section-y); }
.section--sand { background: var(--d2-sand); }
.section-title { margin-bottom: 1.5rem; }
.section:not(.section--sand) + .section:not(.section--sand) { padding-top: 0; }   /* no double spacing between two white sections */

/* cards in grids (use cases, applications, segments) */
.d2-card { height: 100%; background: #fff; border: 1px solid var(--d2-line); }
.d2-card__body { padding: 1.5rem; }
.d2-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.d2-card--contain img { object-fit: contain; background: #fff; padding: 1rem; }
a.d2-card { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
a.d2-card:hover { border-color: var(--d2-blue); }

/* ---------------------------------------------------------------- accordion */
.d2-accordion {
  --bs-accordion-border-color: var(--d2-ink);
  --bs-accordion-btn-focus-box-shadow: none;
  --bs-accordion-active-bg: transparent;
  --bs-accordion-active-color: var(--d2-ink);
  border-top: 1px solid var(--d2-ink);
  border-bottom: 1px solid var(--d2-ink);
}
.d2-accordion .accordion-header { margin: 0; font-size: var(--d2-h3); }
.d2-accordion .accordion-button { font-size: inherit; font-weight: 600; padding: 1.5rem 1.25rem; background: transparent; }
.d2-accordion .accordion-body { padding: 0 1.25rem 1.75rem; }

/* ---------------------------------------------------------------- footer */
.site-footer { padding-block: 3.5rem 2rem; border-top: 1px solid var(--d2-line); font-size: 1rem; line-height: 1.6; }
.site-footer__logo { display: inline-block; margin-bottom: 2rem; }
.site-footer__logo img { display: block; height: auto; }
.site-footer p { margin: 0; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .site-footer__label {
  margin: 0 0 .5rem;
  font-family: 'Inter', sans-serif;
  font-size: .8125rem; font-weight: 600; line-height: 1.6; letter-spacing: .08em; text-transform: uppercase;
  color: var(--d2-muted);
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--d2-line); font-weight: 500; }

/* long legal texts (Datenschutz): spacing between the numbered parts */
.legal-text h2:not(:first-child) { margin-top: 3rem; }
.legal-text h3 { margin-top: 2rem; }
.legal-text h4 { margin-top: 1.5rem; font-size: 1.125rem; }
