/**
 * Best Pick Lab — complements Tailwind CDN (no build step).
 * Tokens from Figma: Rubik, #0A88B6, #005081, #004067, #EDEDED.
 */

:root {
  --bpl-blue: #0a88b6;
  --bpl-navy: #005081;
  --bpl-ink: #004067;
  --bpl-site-header-z: 100;
  --bpl-border: rgba(0, 80, 129, 0.5);
  --bpl-border-soft: rgba(0, 80, 129, 0.5);
  --bpl-hero-line: rgba(255, 255, 255, 0.5);
  --bpl-muted: #737373;
  --bpl-grey: #ededed;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bpl-partner-strip [data-bpl-partner-strip-inner] {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    transform: none !important;
    will-change: auto;
  }
}

body {
  font-family: "Rubik", system-ui, sans-serif;
  color: #171717;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html.no-scroll,
body.no-scroll {
  overflow: hidden;
  touch-action: none;
}

.bpl-site-header {
  z-index: var(--bpl-site-header-z);
}

/* Top-level landmarks fill the viewport; inner max-width columns stay in HTML/Tailwind. */
body > header,
body > main,
body > footer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/** Site header: aligns with Figma max-width + horizontal padding (matches section rhythm). */
.nav-container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .nav-container {
    padding-inline: 2.5rem;
  }
}

.section-container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .section-container {
    padding-inline: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .section-container {
    padding-inline: 120px;
  }
}

@media (min-width: 1536px) {
  .section-container-outer {
    max-width: 1920px;
    margin-inline: auto;
  }
}

/* Rasters: antialiased stacking + smooth downscaling where supported (CDN Tailwind does not compile input.css). */
img {
  -webkit-font-smoothing: antialiased;
}

@supports (image-rendering: high-quality) {
  img {
    image-rendering: high-quality;
  }
}

/**
 * Global paragraph variants — pair with Tailwind size/leading as needed.
 * .p-light = dark text on light backgrounds; .p-dark = light text on dark (blue/navy/footer).
 * (Tailwind CDN: plain CSS only — no @apply in this file.)
 */
.p-main {
  margin-bottom: 1rem;
  font-weight: 300;
  transition: color 300ms ease;
  font-size: 1rem; /* mobile */
  line-height: 1.5;
}

@media (min-width: 768px) {
  .p-main {
    font-size: 1.125rem;
    line-height: 1.55;
  }
}

@media (min-width: 1024px) {
  .p-main {
    font-size: 1.25rem;
    line-height: 1.625;
  }
}

.p-main.p-light {
  color: rgb(23, 23, 23);
}

.p-main.p-dark {
  color: #fff;
}

#footer-copyright-line {
  margin-bottom: 0;
}

.label-main {
  margin-bottom: 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.label-main.label-light {
  color: rgb(23, 23, 23);
}

.label-main.label-dark {
  color: #fff;
}

.p-s {
  margin-bottom: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 300;
}

.p-s.p-light {
  color: rgb(23, 23, 23);
}

.p-s.p-dark {
  color: #fff;
}

/**
 * Team grid name lines — matches founder blocks that use p-main + text-xl + leading-[26px], on a light surface (pair with .p-light).
 * Stacks first + last name with no gap between lines (overrides .p-main margin-bottom).
 */
.p-main.p-main--team-name {
  margin-bottom: 0;
  font-size: 1.125rem;
  line-height: 1.45;
}

@media (min-width: 768px) {
  .p-main.p-main--team-name {
    font-size: 1.25rem;
    line-height: 26px;
  }
}

/**
 * Global H1 variants — pair with utilities (e.g. uppercase, text-center) as needed.
 * .h1-light = #171717 on light backgrounds; .h1-dark = white on blue/hero.
 * Rubik Light 40px; line-height normal (natural/auto box height).
 */
.h1-main {
  margin-bottom: 1.5rem;
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 300;
  font-size: 2rem;
  line-height: 1.2;
  height: auto;
  transition: color 300ms ease;
}

@media (min-width: 768px) {
  .h1-main {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .h1-main {
    font-size: 2.5rem;
    line-height: normal;
  }
}

.h1-main.h1-light {
  color: rgb(23, 23, 23);
}

.h1-main.h1-dark {
  color: #fff;
}

/**
 * Global H2 variants — .h2-light = dark text on light BG; .h2-dark = white on navy/blue blocks.
 * Rubik regular 24px; line-height normal (natural/auto box height).
 */
.h2-main {
  margin-bottom: 1rem;
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.3;
  height: auto;
  transition: color 300ms ease;
}

@media (min-width: 768px) {
  .h2-main {
    font-size: 1.5rem;
    line-height: normal;
  }
}

.h2-main.h2-light {
  color: rgb(23, 23, 23);
}

.h2-main.h2-dark {
  color: #fff;
}

/**
 * Global H3 variants — Rubik regular 22px; .h3-light / .h3-dark for surface contrast.
 * (Plain CSS — Tailwind CDN does not process @apply in this file.)
 */
.h3-main {
  margin-bottom: 0.75rem;
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.3;
  height: auto;
  transition: color 300ms ease;
}

@media (min-width: 768px) {
  .h3-main {
    font-size: 1.375rem;
    line-height: normal;
  }
}

.h3-main.h3-light {
  color: rgb(23, 23, 23);
}

.h3-main.h3-dark {
  color: #fff;
}

/**
 * Global H4 variants — Rubik regular 22px; .h4-light / .h4-dark for surface contrast.
 * (Plain CSS — no @apply.) Add utilities (e.g. uppercase, tracking-widest) per block when needed.
 */
.h4-main {
  margin-bottom: 0.5rem;
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.35;
  height: auto;
  transition: color 300ms ease;
}

@media (min-width: 768px) {
  .h4-main {
    font-size: 1.25rem;
    line-height: normal;
  }
}

.h4-main.h4-light {
  color: rgb(23, 23, 23);
}

.h4-main.h4-dark {
  color: #fff;
}

/**
 * Global caption / eyebrow — Rubik 400, 12px / 16px line-height, 2px letter-spacing, uppercase.
 * Pair .caption-main with .caption-light (ink on light surfaces) or .caption-dark (white on blue/hero).
 */
.caption-main {
  margin: 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 300ms ease;
}

.caption-main.caption-light {
  color: rgb(23, 23, 23);
}

.caption-main.caption-dark {
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--bpl-navy);
  outline-offset: 2px;
}

/* Skip link — WCAG (hidden off-screen until :focus; avoids white box in top-left) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 100;
  white-space: nowrap;
  border-radius: 0.25rem;
  background: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bpl-ink);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.15);
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  outline: 2px solid var(--bpl-navy);
  outline-offset: 2px;
}

/* Decorative 5×5 grid */
.bpl-mosaic {
  display: grid;
  grid-template-columns: repeat(5, 1.25rem);
  grid-template-rows: repeat(5, 1.25rem);
}

/* Hero stats row: mosaic sits on blue — no opaque fill, top rule matches sibling cells */
.bpl-mosaic--hero-strip {
  background: unset;
}

.bpl-mosaic span {
  border-color: var(--bpl-hero-line, rgba(255, 255, 255, 0.5));
  border-style: solid;
  border-width: 0 1px 1px 0;
  box-sizing: border-box;
}

.bpl-mosaic span:nth-child(n+21) {
  border-bottom-width: 0;
}

.bpl-mosaic--no-right-border span:nth-child(5n) {
  border-right-width: 0;
}

.stat-block strong {
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.5rem;
  color: #fff;
}

.stat-block .stat-label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
}

/* index.html hero only: injected section-decoration-A partial targets white sections; theme for blue header */
#index-hero-decoration-a > div {
  background-color: transparent !important;
}
#index-hero-decoration-a svg {
  color: #fff !important;
}
#index-hero-decoration-a [data-bpl-mosaic] {
  --bpl-hero-line: rgba(255, 255, 255, 0.5) !important;
}
#index-hero-decoration-a [class*="005081"] {
  border-color: rgb(255 255 255 / 0.5) !important;
}

/* Partner strip: scroll-linked drift (transform applied in script.js) */
.bpl-partner-strip [data-bpl-partner-strip-inner] {
  width: max-content;
  max-width: none;
  will-change: transform;
}

.partner-logo {
  height: 2.5rem;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
}

@media (min-width: 768px) {
  .partner-logo {
    height: 3rem;
  }
}

.service-nav button[aria-current="true"] {
  background-color: rgba(237, 237, 237, 0.75);
}

.faq-tab-icon {
  filter: none;
  opacity: 1;
  transition: transform 0.2s ease;
}

.faq-tab[aria-selected="true"] .faq-tab-icon,
.faq-tab:hover .faq-tab-icon {
  transform: rotate(-45deg);
}

.faq-tab[aria-selected="true"] {
  background-color: rgba(237, 237, 237, 0.3);
}

/* --------------------------------------------------------------------------
 * Global button components (plain CSS).
 * Mirrors the Tailwind @apply stacks documented in src/assets/css/input.css.
 * Play CDN does not compile @layer / @apply in linked stylesheets.
 * -------------------------------------------------------------------------- */

.btn-primary,
.btn-secondary,
.btn-tertiary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem; /* py-4 px-8 */
  border-radius: 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 1.25rem; /* 20px */
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  text-transform: none; /* case as typed */
  cursor: pointer;
  transition: all 300ms ease;
}

button.btn-primary,
button.btn-secondary,
button.btn-tertiary {
  appearance: none;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-tertiary:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Filled navy — no border */
.btn-primary {
  border: none;
  background-color: #005081;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background-color: rgb(0 80 129 / 0.9);
}

.btn-primary:active:not(:disabled) {
  background-color: rgb(0 80 129 / 0.85);
}

header.bg-bpl-blue .btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* White fill, ink border, black label */
.btn-secondary {
  border: 1px solid rgba(0, 80, 129, 0.5); /* #005081 / 50% */
  background-color: #fff;
  color: #000000;
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--bpl-grey);
}

.btn-secondary:active:not(:disabled) {
  background-color: #e8e8e8;
}

/* Tertiary — lang rows & light panels: Rubik 16px / 400, case as typed, no border */
.btn-tertiary {
  border: none;
  padding: 0.5rem 1.25rem; /* 8px 20px */
  background-color: transparent;
  color: #005081;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
}

.btn-tertiary:hover:not(:disabled) {
  background-color: var(--bpl-grey);
  color: #005081;
}

.btn-tertiary:active:not(:disabled) {
  background-color: #e8e8e8;
  color: #005081;
}

.btn-tertiary img[alt=""] {
  filter: brightness(0) saturate(100%) invert(18%) sepia(54%) saturate(2234%) hue-rotate(169deg) brightness(0.45)
    contrast(101%);
}

.btn-tertiary:hover:not(:disabled) img[alt=""],
.btn-tertiary:active:not(:disabled) img[alt=""] {
  filter: brightness(0) saturate(100%) invert(18%) sepia(54%) saturate(2234%) hue-rotate(169deg) brightness(0.45)
    contrast(101%);
}

.btn-tertiary [data-lang-check] svg {
  color: #005081;
}

.btn-tertiary:hover:not(:disabled) [data-lang-check] svg,
.btn-tertiary:active:not(:disabled) [data-lang-check] svg {
  color: #005081;
}

/*
 * Site header + language switcher — keep in sync with kontakt.html:
 * Header row: flex flex-wrap items-center justify-between gap-4 py-6 pl-10 pr-0
 * #site-nav: items-end gap-0 … lg:ml-auto lg:items-stretch
 * Link cluster: lg:border-y lg:border-l … lg:gap-[20px] lg:px-[30px] lg:py-3
 * Lang cell: group relative flex items-center border-y border-l … px-[20px] py-3 (matches kontakt)
 * Active page link: aria-current — see .site-nav-popover a[aria-current="page"] (mobile) / header nav (desktop)
 * JS: script.js initLangPopover — data-lang-toggle, data-lang-panel, data-lang-indicator, data-lang-check
 */

/* Mobile nav popover — current page (white panel, ink underline) */
.site-nav-popover a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: rgba(0, 80, 129, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35rem;
}
/* Language popover — white panel on hero nav */
.lang-menu-panel {
  border-radius: 0.125rem;
}

.lang-menu-panel [data-lang-check] {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lang-menu-panel [data-lang-check].hidden {
  display: none;
}

/* icon-arrow-external.svg defaults to white; tint to match ink link text on white panel */
.lang-menu-external-icon {
  filter: brightness(0) saturate(100%) invert(18%) sepia(54%) saturate(2234%) hue-rotate(169deg) brightness(0.95)
    contrast(101%);
}

/* White secondary / tertiary: external icons match ink label */
.btn-secondary img[alt=""],
.btn-secondary .lang-menu-external-icon,
.btn-tertiary .lang-menu-external-icon {
  filter: brightness(0) saturate(100%) invert(18%) sepia(54%) saturate(2234%) hue-rotate(169deg) brightness(0.95)
    contrast(101%);
}

