/* Public pages — fixed header + hamburger menu */

.public-header-root {
  position: relative;
  z-index: 50;
}

body.landing-page .public-header-root:has(.landing-header--hybrid) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.2, 0, 0, 1),
    visibility 0s linear 0s;
  will-change: transform;
}

body.landing-page .public-header-root:has(.landing-header--hybrid):not(.header-hidden) .public-header,
body.landing-page .public-header-root:has(.landing-header--hybrid):not(.header-hidden) .public-header__overlay {
  pointer-events: auto;
}

body.landing-page .public-header-root:has(.landing-header--hybrid).header-hidden {
  transform: translate3d(0, calc(-100% - 0.75rem), 0);
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 0.35s cubic-bezier(0.2, 0, 0, 1),
    visibility 0s linear 0.35s;
}

body.landing-page .public-header-root:has(.landing-header--hybrid).header-hidden .public-header__overlay {
  pointer-events: none;
}

.public-header-root.is-menu-open {
  z-index: 200;
}

body:has(.public-header-root.is-menu-open) {
  overflow: hidden;
}

.public-header {
  visibility: visible;
  transition:
    transform 0.35s cubic-bezier(0.2, 0, 0, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    visibility 0s linear 0s;
  will-change: transform;
}

.public-header__overlay [x-cloak] {
  display: none !important;
}

/* Landing hybrid — transparent in hero, floating pill when scrolled, hides on scroll down */
body.landing-page .public-header.landing-header--hybrid {
  position: relative;
  top: auto;
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

body.landing-page .public-header.landing-header--hybrid .landing-header__shell {
  padding-inline: clamp(0.65rem, 2.5vw, 1.25rem);
  padding-top: max(0.55rem, env(safe-area-inset-top));
  transition: padding 0.35s cubic-bezier(0.2, 0, 0, 1);
}

body.landing-page .public-header.landing-header--hybrid .landing-header__inner {
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    transform 0.35s cubic-bezier(0.2, 0, 0, 1),
    border-radius 0.35s cubic-bezier(0.2, 0, 0, 1),
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    padding 0.35s ease;
}

body.landing-page .public-header.landing-header--hybrid.header-scrolled .landing-header__shell {
  padding-top: max(0.75rem, env(safe-area-inset-top));
}

body.landing-page .public-header.landing-header--hybrid.header-scrolled .landing-header__inner {
  max-width: 72rem;
  margin-inline: auto;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(232, 131, 107, 0.18);
  box-shadow:
    0 12px 36px rgba(46, 42, 51, 0.1),
    0 2px 8px rgba(232, 131, 107, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

html.dark body.landing-page .public-header.landing-header--hybrid.header-scrolled .landing-header__inner {
  background: rgba(37, 32, 25, 0.88);
  border-color: rgba(232, 131, 107, 0.22);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.landing-page .public-header.landing-header--hybrid.header-scrolled .public-header__logo .brand-logo__img {
  height: 2.15rem;
}

@media (min-width: 768px) {
  body.landing-page .public-header.landing-header--hybrid.header-scrolled .public-header__logo .brand-logo__img {
    height: 2.25rem;
  }
}

body.landing-page .public-header.landing-header--hybrid.header-scrolled .public-header__nav a {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

body.landing-page .public-header.landing-header--hybrid.header-scrolled .public-header__nav a:not(.public-header__nav-link--shagerd):hover {
  background: rgba(232, 131, 107, 0.1);
}

@media (max-width: 767px) {
  body.landing-page .public-header.landing-header--hybrid.header-scrolled .landing-header__inner,
  html.dark body.landing-page .public-header.landing-header--hybrid.header-scrolled .landing-header__inner {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
  }

  body.landing-page .public-header.landing-header--hybrid .public-header__menu-btn,
  body.landing-page .public-header.landing-header--hybrid .public-header__theme {
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(46, 42, 51, 0.08);
    box-shadow: 0 4px 14px rgba(46, 42, 51, 0.06);
  }

  html.dark body.landing-page .public-header.landing-header--hybrid .public-header__menu-btn,
  html.dark body.landing-page .public-header.landing-header--hybrid .public-header__theme {
    background: rgba(37, 32, 25, 0.42);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  }
}

/* Legacy landing-header (non-hybrid) + shared scrolled shell */
body.landing-page .public-header.landing-header {
  left: 0;
  right: 0;
}
body.landing-page .public-header.landing-header.header-scrolled:not(.landing-header--hybrid) {
  background: rgba(247, 243, 239, 0.96);
  border-bottom-color: rgba(232, 131, 107, 0.14);
  box-shadow: 0 8px 24px rgba(46, 42, 51, 0.06);
}
html.dark body.landing-page .public-header.landing-header.header-scrolled:not(.landing-header--hybrid) {
  background: rgba(37, 32, 25, 0.96);
  border-bottom-color: rgba(232, 131, 107, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
body.landing-page .public-header.landing-header.header-scrolled:not(.landing-header--hybrid) .landing-header__inner {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.public-header.header-hidden {
  transform: translate3d(0, calc(-100% - 0.75rem), 0);
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 0.35s cubic-bezier(0.2, 0, 0, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    visibility 0s linear 0.35s;
}

body.landing-page .public-header.landing-header--hybrid.header-hidden .landing-header__inner {
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .public-header {
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  }
  body.landing-page .public-header-root:has(.landing-header--hybrid) {
    transition: transform 0.15s ease, visibility 0s linear 0.15s;
  }
  body.landing-page .public-header-root:has(.landing-header--hybrid).header-hidden {
    transition: transform 0.15s ease, visibility 0s linear 0.15s;
  }
}

.header-scrolled {
  background: rgba(247, 243, 239, 0.96);
  border-bottom-color: rgba(232, 131, 107, 0.14);
  box-shadow: 0 8px 24px rgba(46, 42, 51, 0.06);
}

html.dark .header-scrolled {
  background: rgba(37, 32, 25, 0.96);
  border-bottom-color: rgba(232, 131, 107, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.public-header__logo {
  min-width: 0;
}

.public-header__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
}

@media (min-width: 1536px) {
  .public-header__bar {
    grid-template-columns: minmax(9rem, auto) minmax(0, 1fr) auto;
    gap: 1rem 1.5rem;
  }
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: var(--color-ink);
  position: relative;
  z-index: 2;
}

.public-header__logo {
  justify-self: start;
}

.public-header__nav-link {
  white-space: nowrap;
}

.public-header__actions {
  justify-self: end;
  min-width: 0;
}

.public-header__nav {
  justify-self: center;
  max-width: 100%;
  overflow: hidden;
}

.public-header__menu-link {
  display: flex;
  align-items: center;
  min-height: 2.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: color-mix(in oklab, var(--color-ink) 78%, transparent);
  transition: background 0.15s ease, color 0.15s ease;
}

.public-header__menu-link:hover {
  background: rgba(232, 131, 107, 0.1);
  color: var(--color-primary);
}

html.dark .public-header__menu-link {
  color: rgba(245, 238, 232, 0.82);
}

html.dark .public-header__menu-link:hover {
  background: rgba(232, 131, 107, 0.14);
  color: #f0a090;
}

.public-header__nav-link--shagerd {
  background: linear-gradient(135deg, #e8836b 0%, #f5a623 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.public-header__nav-link--shagerd:hover {
  background: linear-gradient(135deg, #d96a50 0%, #e89b2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.public-header__nav-link--nirva {
  color: #6510f0 !important;
}
.public-header__nav-link--nirva:hover {
  color: #5208d4 !important;
}
.public-header__nav-link--chavosh {
  background: linear-gradient(135deg, #129e86 0%, #2bb39b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.public-header__nav-link--chavosh:hover {
  background: linear-gradient(135deg, #0e8570 0%, #24a088 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
body.landing-page .public-header.landing-header--hybrid.header-scrolled .public-header__nav a.public-header__nav-link--shagerd:hover {
  background: linear-gradient(135deg, #d96a50 0%, #e89b2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
body.landing-page .public-header.landing-header--hybrid.header-scrolled .public-header__nav a.public-header__nav-link--nirva:hover {
  background: rgba(101, 16, 240, 0.14);
}
body.landing-page .public-header.landing-header--hybrid.header-scrolled .public-header__nav a.public-header__nav-link--chavosh:hover {
  background: linear-gradient(135deg, #0e8570 0%, #24a088 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.public-header__menu-link--shagerd {
  background: linear-gradient(135deg, #e8836b 0%, #f5a623 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.public-header__menu-link--shagerd:hover {
  background: linear-gradient(135deg, #d96a50 0%, #e89b2a 100%) !important;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.public-header__menu-link--nirva {
  color: #6510f0 !important;
}
.public-header__menu-link--nirva:hover {
  background: rgba(101, 16, 240, 0.14) !important;
  color: #5208d4 !important;
}
.public-header__menu-link--chavosh {
  background: linear-gradient(135deg, #129e86 0%, #2bb39b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.public-header__menu-link--chavosh:hover {
  background: linear-gradient(135deg, #0e8570 0%, #24a088 100%) !important;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
html.dark .public-header__nav-link--shagerd {
  background: linear-gradient(135deg, #f0a090 0%, #f5c842 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
html.dark .public-header__nav-link--nirva { color: #c978ff !important; }
html.dark .public-header__nav-link--chavosh {
  background: linear-gradient(135deg, #5ecdb8 0%, #2bb39b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
html.dark .public-header__menu-link--shagerd {
  background: linear-gradient(135deg, #f0a090 0%, #f5c842 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
html.dark .public-header__menu-link--nirva { color: #c978ff !important; }
html.dark .public-header__menu-link--chavosh {
  background: linear-gradient(135deg, #5ecdb8 0%, #2bb39b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.lang-switcher__form {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 0.75rem;
  border: 1px solid rgba(46, 42, 51, 0.1);
  background: rgba(255, 255, 255, 0.75);
}
html.dark .lang-switcher__form {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(37, 32, 25, 0.86);
}
.lang-switcher__btn {
  min-width: 2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(46, 42, 51, 0.55);
  transition: background 0.15s, color 0.15s;
}
html.dark .lang-switcher__btn {
  color: rgba(255, 255, 255, 0.55);
}
.lang-switcher__btn.is-active {
  background: rgba(232, 106, 90, 0.14);
  color: #e86a5a;
}
html.dark .lang-switcher__btn.is-active {
  background: rgba(232, 106, 90, 0.22);
  color: #f0a090;
}
.panel-mobile-header .lang-switcher__form {
  scale: 0.9;
}

/* Mini footer (contact, legal, and other base.html public pages) */
.site-mini-footer {
  width: 100%;
  margin-top: 2.5rem;
  border-top: 1px solid rgba(46, 42, 51, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, var(--color-paper) 100%);
  padding: 2rem 0 calc(1.5rem + env(safe-area-inset-bottom));
}

.site-mini-footer__inner {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

.site-mini-footer__brand {
  margin-bottom: 1.25rem;
}

.site-mini-footer__logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-ink);
  text-decoration: none;
}

.site-mini-footer__tagline {
  margin: 0.4rem 0 0;
  max-width: 22rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(46, 42, 51, 0.58);
}

.site-mini-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.site-mini-footer__col {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(46, 42, 51, 0.07);
}

.site-mini-footer__heading {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(46, 42, 51, 0.48);
}

.site-mini-footer__list {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.site-mini-footer__list li + li {
  margin-top: 0.45rem;
}

.site-mini-footer__list a {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(46, 42, 51, 0.72);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-mini-footer__list a:hover {
  color: var(--color-primary);
}

.site-mini-footer__bottom {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(46, 42, 51, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(46, 42, 51, 0.55);
}

.site-mini-footer__support {
  margin: 0;
  font-size: 0.78rem;
}

.site-mini-footer__support a {
  color: var(--color-primary);
  font-weight: 700;
}

@media (min-width: 768px) {
  .site-mini-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem 2.5rem;
    align-items: start;
  }

  .site-mini-footer__brand {
    grid-column: 1;
    margin-bottom: 0;
  }

  .site-mini-footer__grid {
    grid-column: 2 / -1;
    gap: 1.25rem;
  }

  .site-mini-footer__bottom {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
  }
}

@media (min-width: 960px) {
  .site-mini-footer__col {
    padding: 0;
    background: transparent;
    border: none;
  }
}

html.dark .site-mini-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, var(--color-paper) 100%);
}

html.dark .site-mini-footer__logo,
html.dark .site-mini-footer__list a {
  color: rgba(245, 238, 232, 0.78);
}

html.dark .site-mini-footer__tagline,
html.dark .site-mini-footer__bottom {
  color: rgba(245, 238, 232, 0.52);
}

html.dark .site-mini-footer__heading {
  color: rgba(245, 238, 232, 0.42);
}

html.dark .site-mini-footer__col {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 960px) {
  html.dark .site-mini-footer__col {
    background: transparent;
    border-color: transparent;
  }
}
