/* Two-row sticky header — logo + wordmark, violet nav bar, scroll shrink */

:root {
  --header-logo-base: 5.2rem;
  --header-logo-base-md: 6.5rem;
  --header-wordmark-violet: #3f2d68;
  --header-bar-violet: #4a2c7a;
  --header-ivory: #f5f2eb;
  --header-bg: #f5f2eb;
  --header-scale: 1;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 500;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 44, 122, 0.1);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.site-header.header-compact {
  --header-scale: 0.88;
  box-shadow: 0 2px 12px rgba(41, 28, 58, 0.08);
}

.site-header__inner {
  max-width: 80rem;
  margin: 0 auto;
}

/* —— Logo row —— */

.site-header__brand-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: calc(0.55rem * var(--header-scale)) 1.25rem;
  transition: padding 0.35s ease;
  position: relative;
  z-index: 1;
}

.site-header__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(0.65rem * var(--header-scale));
  min-width: 0;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 768px) {
  .site-header__brand-row {
    justify-content: stretch;
  }

  .site-header__brand {
    gap: 2rem;
  }
}

.site-header__logo,
header [data-header-logo="true"] {
  display: block;
  flex-shrink: 0;
  width: auto;
  height: calc(var(--header-logo-base) * var(--header-scale)) !important;
  transition: height 0.35s ease;
}

@media (min-width: 768px) {
  .site-header__logo,
  header [data-header-logo="true"] {
    height: calc(var(--header-logo-base-md) * var(--header-scale)) !important;
  }

  .site-header__brand-row {
    padding: calc(0.65rem * var(--header-scale)) 2.5rem;
  }
}

.site-header__wordmark-img {
  display: none !important;
}

.site-header__wordmark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.02;
  color: var(--header-wordmark-violet);
  font-family: Optima, 'Segoe UI', Candara, 'Helvetica Neue', Arial, sans-serif;
  font-feature-settings: 'liga' 1, 'kern' 1;
  max-height: calc(var(--header-logo-base) * var(--header-scale));
  margin-left: auto;
  flex-shrink: 1;
  min-width: 0;
  transition: max-height 0.35s ease, transform 0.35s ease;
}

@media (min-width: 768px) {
  .site-header__wordmark {
    max-height: calc(var(--header-logo-base-md) * var(--header-scale));
  }
}

.site-header__title {
  font-size: clamp(1.02rem, 2.85vw, 1.72rem);
  font-weight: 500;
  letter-spacing: 0.07em;
  white-space: nowrap;
  line-height: 1;
}

.site-header__title-und {
  font-style: normal;
  font-weight: 400;
  font-size: 0.58em;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.site-header__tagline {
  align-self: flex-end;
  margin-top: 0.14em;
  padding-right: 0.14em;
  font-family: 'Libre Baskerville', 'Times New Roman', serif;
  font-size: clamp(0.46rem, 1.15vw, 0.6rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-align: right;
  line-height: 1.1;
  white-space: nowrap;
}

.site-header__name {
  align-self: flex-end;
  margin-top: 0.1em;
  padding-right: 0.08em;
  font-size: clamp(0.76rem, 2.05vw, 1.02rem);
  font-weight: 500;
  letter-spacing: 0.045em;
  text-align: right;
  line-height: 1.05;
  white-space: nowrap;
}

/* —— Nav row (violet bar) —— */

.site-header__nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.25rem;
  background: var(--header-bar-violet);
  border-top: 1px solid rgba(244, 242, 233, 0.12);
  transition: min-height 0.35s ease;
  position: relative;
  z-index: 3;
}

.site-header.header-compact .site-header__nav-row {
  min-height: calc(2.25rem * var(--header-scale));
}

.site-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 1.5rem;
  width: 100%;
  padding: 0.42rem 1.5rem;
  transition: padding 0.35s ease, gap 0.35s ease;
}

@media (min-width: 768px) {
  .site-header__nav {
    gap: 2.35rem;
  }

  .site-header.header-compact .site-header__nav {
    gap: 2.1rem;
    padding: 0.38rem 1.5rem;
  }

  /* Desktop scroll: litere doar ~12% mai mici față de static */
  .site-header.header-compact .site-header__nav a {
    font-size: 1.08rem;
  }
}

@media (max-width: 767px) {
  .site-header__nav {
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.4rem 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-header__nav::-webkit-scrollbar {
    display: none;
  }

  .site-header__nav > a {
    flex: 1 1 0;
    text-align: center;
    min-width: 0;
  }

  .site-header__nav .relative {
    margin-left: 0;
    flex: 0 0 auto;
    flex-shrink: 0;
  }
}

.site-header.header-compact .site-header__nav {
  padding: calc(0.42rem * var(--header-scale)) 1.5rem;
}

.site-header__nav a {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  color: var(--header-ivory);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.225rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity 0.2s ease, font-size 0.35s ease;
}

@media (max-width: 767px) {
  /* Mobile: start at former “scrolled” size, shrink further on scroll */
  .site-header {
    --header-scale: 0.7;
  }

  .site-header.header-compact {
    --header-scale: 0.55;
  }

  .site-header__wordmark {
    transform: scale(calc(var(--header-scale) / 0.7));
    transform-origin: center right;
  }

  .site-header__nav a {
    font-size: 1.01rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  .site-header.header-compact .site-header__nav a {
    font-size: 0.95rem;
  }

  .site-header__lang-btn {
    padding: 0.22rem 0.4rem;
    font-size: 0.62rem;
  }
}

.site-header__nav a:hover {
  opacity: 0.82;
}

.site-header__nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 1px;
  background: var(--header-ivory);
  transition: width 0.3s ease;
}

.site-header__nav a:hover::after {
  width: 100%;
}

.site-header__lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(244, 242, 233, 0.35);
  border-radius: 2px;
  background: transparent;
  color: var(--header-ivory);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.site-header__lang-btn:hover {
  border-color: var(--header-ivory);
  opacity: 0.9;
}

/* Legacy mobile hamburger — removed, nav always visible */
.site-header__mobile-bar,
.site-header__mobile-menu,
.site-header__menu-btn {
  display: none !important;
}

/* —— Body offset —— */

body {
  padding-top: var(--site-header-height, 9.5rem);
}

main > section:first-of-type {
  padding-top: 0 !important;
}

[id] {
  scroll-margin-top: var(--site-header-height, 9.5rem);
}

/* Hide legacy single-row header layout helpers */
.site-header .mx-auto.flex.max-w-7xl.items-center.justify-between {
  display: none !important;
}

/* Small phones: tighten brand row, keep original centered group */
@media (max-width: 380px) {
  .site-header__brand {
    gap: 0.55rem;
  }

  .site-header__title {
    font-size: 0.92rem;
    letter-spacing: 0.06em;
  }

  .site-header__tagline {
    font-size: 0.44rem;
  }

  .site-header__name {
    font-size: 0.64rem;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .site-header__title {
    font-size: 1.42rem;
  }

  .site-header__tagline {
    font-size: 0.56rem;
  }

  .site-header__name {
    font-size: 0.94rem;
  }
}


/* —— Banner logo mode (full logo bar, centered; revert via site-header.css.bak-20260820pre-banner) —— */
.site-header__brand-row {
  justify-content: center !important;
  align-items: center !important;
  width: 100%;
  background: #f5f2eb !important;
  padding: 0.2cm 0.75rem !important;
  transition: padding 0.35s ease;
}

.site-header.header-compact .site-header__brand-row {
  padding: 0.15cm 0.75rem !important;
}

.site-header__brand {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 56rem;
  margin: 0 auto;
  gap: 0 !important;
}

.site-header__logo.site-header__logo--banner,
header [data-header-logo="true"].site-header__logo--banner {
  display: block !important;
  width: 100% !important;
  max-width: 52rem;
  height: auto !important;
  max-height: none !important;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

.site-header.header-compact .site-header__logo.site-header__logo--banner,
.site-header.header-compact header [data-header-logo="true"].site-header__logo--banner {
  max-width: 40rem;
}

.site-header__wordmark {
  display: none !important;
}

@media (max-width: 767px) {
  .site-header__brand-row {
    padding: 0.2cm 0.5rem !important;
  }

  .site-header.header-compact .site-header__brand-row {
    padding: 0.12cm 0.5rem !important;
  }

  .site-header__brand {
    max-width: 100%;
  }

  .site-header__logo.site-header__logo--banner,
  header [data-header-logo="true"].site-header__logo--banner {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
  }

  .site-header.header-compact .site-header__logo.site-header__logo--banner {
    max-width: 92%;
  }
}

@media (min-width: 768px) {
  .site-header__brand-row {
    padding: 0.2cm 1.5rem !important;
  }

  .site-header.header-compact .site-header__brand-row {
    padding: 0.15cm 1.5rem !important;
  }
}

/* kb-logo-full-20260916 */
.site-header__brand-row,
.site-header__brand {
  overflow: visible !important;
}

.site-header__logo.site-header__logo--banner,
header [data-header-logo="true"].site-header__logo--banner {
  width: 100% !important;
  max-width: min(52rem, 100%) !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  clip-path: none !important;
}

@media (max-width: 767px) {
  .site-header__logo.site-header__logo--banner,
  header [data-header-logo="true"].site-header__logo--banner,
  .site-header.header-compact .site-header__logo.site-header__logo--banner {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}