/* HighFelt header — matches community Next.js Header.css
   Ghost html root is 62.5% (10px), so sizes are in px to match community's rem@16px. */

:root {
  --hf-header-height: 64px;
  --hf-mini-gap: max(14px, 1vw);
  --hf-header-stack: calc(var(--hf-header-height) + 12px);
}

@font-face {
  font-family: "tiktoksans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/tiktoksans-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "tiktoksans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/tiktoksans-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0300-0301, U+0303, U+0305-0307, U+0309-036F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.hf-header {
  --hf-header-pad-x: max(20px, 5.5vw);

  --hf-font: "tiktoksans", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hf-ink: #111111;
  --hf-ink-soft: #5c5660;
  --hf-line: rgba(17, 17, 17, 0.1);
  --hf-surface: rgba(255, 255, 255, 0.86);
  --hf-surface-solid: #ffffff;
  --hf-track: #f3f2f4;
  --hf-wa: #25d366;
  --hf-wa-ink: #0f6b45;
  --hf-ease: cubic-bezier(0.22, 1, 0.36, 1);

  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  color: var(--hf-ink);
  font-family: var(--hf-font);
  isolation: isolate;
  box-sizing: border-box;
}

.hf-header.is-nav-open {
  z-index: 2000;
}

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

.hf-header[data-color-scheme="dark"] {
  --hf-ink: #f5f5f5;
  --hf-ink-soft: #a8a8b0;
  --hf-line: rgba(255, 255, 255, 0.12);
  --hf-surface: rgba(18, 18, 22, 0.88);
  --hf-surface-solid: #141418;
  --hf-track: #22222a;
  --hf-wa-ink: #9aefc0;
}

.hf-header .header-bar {
  position: relative;
  z-index: 2;
  background: var(--hf-surface);
  border-bottom: none;
  box-shadow: none;
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  transition:
    background-color 0.22s var(--hf-ease),
    backdrop-filter 0.22s var(--hf-ease),
    -webkit-backdrop-filter 0.22s var(--hf-ease);
}

.hf-header.is-scrolled .header-bar {
  background: color-mix(in srgb, var(--hf-surface-solid) 94%, transparent);
  backdrop-filter: saturate(1.15) blur(16px);
  -webkit-backdrop-filter: saturate(1.15) blur(16px);
}

@supports not (background: color-mix(in srgb, white 94%, transparent)) {
  .hf-header.is-scrolled .header-bar {
    background: var(--hf-surface-solid);
  }
}

.hf-header .header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: var(--hf-header-height);
  margin: 0 auto;
  padding: calc(var(--hf-mini-gap) * 1.5) var(--hf-header-pad-x) var(--hf-mini-gap);
}

.hf-header .header-brand {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.hf-header .header-logo-home {
  display: flex;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
  color: var(--hf-ink);
}

.hf-header .header-logo-home img {
  display: block;
  width: auto;
  height: 28px;
  max-width: none;
}

.hf-header .header-logo-text {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.hf-header[data-color-scheme="dark"] .header-logo-home img {
  filter: brightness(0) invert(1);
}

/* Primary nav — flat text links; capsule fill on hover / active */
.hf-header .header-primary-nav {
  display: none;
}

.hf-header .header-primary-nav ul,
.hf-header .header-primary-nav .nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: none;
  background: transparent;
}

.hf-header .header-primary-nav li {
  margin: 0;
  padding: 0;
}

/* Kill any legacy pipe/divider separators between nav items */
.hf-header .header-primary-nav li + li::before,
.hf-header .header-primary-nav li::after {
  content: none;
  display: none;
}

.hf-header .header-primary-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9999px;
  background: transparent;
  color: color-mix(in srgb, var(--hf-ink) 72%, var(--hf-ink-soft) 28%);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.18s ease,
    background-color 0.18s ease;
}

.hf-header .header-primary-nav a:hover {
  color: var(--hf-ink);
  background: var(--hf-track);
  text-decoration: none;
}

/* Active Ghost primary nav item */
.hf-header .header-primary-nav li.nav-current a {
  color: var(--hf-ink);
  background: var(--hf-track);
  font-weight: 650;
}

.hf-header .header-primary-nav a.is-current,
.hf-header .header-primary-nav a.is-active,
.hf-header .header-primary-nav a.active,
.hf-header .header-primary-nav a[aria-current="page"],
.hf-header .header-primary-nav a[aria-current="true"] {
  color: var(--hf-ink);
  background: var(--hf-track);
  font-weight: 650;
}

.hf-header .header-primary-nav a.is-current:hover,
.hf-header .header-primary-nav a.is-active:hover,
.hf-header .header-primary-nav a.active:hover,
.hf-header .header-primary-nav a[aria-current="page"]:hover,
.hf-header .header-primary-nav a[aria-current="true"]:hover,
.hf-header .header-primary-nav li.nav-current a:hover {
  color: var(--hf-ink);
  background: var(--hf-track);
}

.hf-header .header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
}

/* Segmented site switcher */
.hf-header .header-site-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hf-line);
  border-radius: 9999px;
  background: var(--hf-track);
}

.hf-header .header-site-switcher__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 9999px;
  color: var(--hf-ink-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.hf-header .header-site-switcher__link:hover {
  color: var(--hf-ink);
  text-decoration: none;
}

.hf-header .header-site-switcher__link.is-current {
  color: var(--hf-ink);
  background: var(--hf-surface-solid);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.06);
  font-weight: 600;
  pointer-events: none;
}

.hf-header[data-color-scheme="dark"] .header-site-switcher__link.is-current {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* WhatsApp CTA — hollow outline */
.hf-header .header-wa-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--hf-line);
  border-radius: 9999px;
  background: var(--hf-surface-solid);
  color: var(--hf-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.hf-header .header-wa-cta:hover {
  border-color: rgba(17, 17, 17, 0.28);
  color: #000;
  background: var(--hf-surface-solid);
  text-decoration: none;
}

.hf-header[data-color-scheme="dark"] .header-wa-cta:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  background: var(--hf-surface-solid);
}

.hf-header .header-wa-icon {
  display: block;
  flex-shrink: 0;
  color: var(--hf-wa);
}

.hf-header .header-wa-label--full {
  display: none;
}

.hf-header .header-wa-label--short {
  display: inline;
}

/* Menu toggle */
.hf-header .header-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hf-line);
  border-radius: 9999px;
  background: var(--hf-surface-solid);
  color: var(--hf-ink);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.hf-header .header-menu-toggle:hover {
  background: var(--hf-track);
}

.hf-header .header-menu-toggle__box {
  position: relative;
  display: block;
  width: 16px;
  height: 12px;
}

.hf-header .header-menu-toggle__box span {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition:
    transform 0.28s var(--hf-ease),
    top 0.28s var(--hf-ease),
    opacity 0.2s ease;
}

.hf-header .header-menu-toggle__box span:nth-child(1) {
  top: 0;
}

.hf-header .header-menu-toggle__box span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hf-header .header-menu-toggle__box span:nth-child(3) {
  top: 100%;
  transform: translateY(-100%);
}

.hf-header.is-nav-open .header-menu-toggle__box span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hf-header.is-nav-open .header-menu-toggle__box span:nth-child(2) {
  opacity: 0;
}

.hf-header.is-nav-open .header-menu-toggle__box span:nth-child(3) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* Mobile full-screen menu — above sticky bar (z-index 2) */
.hf-header .header-backdrop {
  display: none;
}

.hf-header .header-drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  padding:
    max(20px, env(safe-area-inset-top, 0px))
    max(24px, env(safe-area-inset-right, 0px))
    max(28px, env(safe-area-inset-bottom, 0px))
    max(24px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--hf-surface-solid);
  border: none;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.985);
  transition:
    opacity 0.32s var(--hf-ease),
    transform 0.36s var(--hf-ease),
    visibility 0.36s;
}

.hf-header.is-nav-open .header-drawer {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.hf-header .header-drawer__head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
}

.hf-header .header-drawer__logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.hf-header .header-drawer__logo img {
  display: block;
  width: auto;
  height: 28px;
}

.hf-header[data-color-scheme="dark"] .header-drawer__logo img {
  filter: brightness(0) invert(1);
}

.hf-header .header-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hf-line);
  border-radius: 9999px;
  background: var(--hf-surface-solid);
  color: var(--hf-ink);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.hf-header .header-drawer__close:hover {
  background: var(--hf-track);
}

.hf-header .header-drawer__nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 28px 0 20px;
}

.hf-header .header-drawer__nav ul,
.hf-header .header-drawer__nav .nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hf-header .header-drawer__nav li {
  margin: 0;
  padding: 0;
}

.hf-header .header-drawer__nav a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 2px;
  border-bottom: 1px solid var(--hf-line);
  color: var(--hf-ink);
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-decoration: none;
  transition:
    color 0.18s ease,
    padding-left 0.18s ease;
}

.hf-header .header-drawer__nav li:first-child a {
  border-top: 1px solid var(--hf-line);
}

.hf-header .header-drawer__nav a:hover {
  color: var(--hf-ink-soft);
  text-decoration: none;
}

.hf-header .header-wa-cta--drawer {
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  font-size: 16px;
}

@media (max-width: 959px) {
  /* Compact switcher stays visible in the header bar on mobile */
  .hf-header .header-bar .header-site-switcher {
    padding: 2px;
  }

  .hf-header .header-bar .header-site-switcher__link {
    min-height: 28px;
    padding: 0 9px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  :root {
    --hf-header-height: 58px;
  }

  .hf-header .header-logo-home img,
  .hf-header .header-drawer__logo img {
    height: 24px;
  }

  .hf-header .header-actions {
    gap: 6px;
  }

  .hf-header .header-wrap {
    gap: 10px;
  }

  .hf-header .header-bar .header-site-switcher__link {
    min-height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  /* Icon-only CTA in the bar — do NOT crush the drawer CTA */
  .hf-header .header-bar .header-wa-cta {
    width: 40px;
    min-height: 40px;
    padding: 0;
  }

  .hf-header .header-bar .header-wa-label--short {
    display: none;
  }

  .hf-header .header-wa-cta--drawer {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
  }
}

@media (min-width: 481px) and (max-width: 959px) {
  .hf-header .header-bar .header-wa-cta {
    min-height: 36px;
    padding: 0 12px;
  }

  .hf-header .header-wa-cta--drawer {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
  }
}

@media (min-width: 960px) {
  .hf-header .header-primary-nav {
    display: block;
  }

  .hf-header .header-menu-toggle,
  .hf-header .header-backdrop,
  .hf-header .header-drawer {
    display: none;
  }

  .hf-header .header-wa-label--full {
    display: inline;
  }

  .hf-header .header-wa-label--short {
    display: none;
  }

  .hf-header .header-actions {
    gap: 12px;
  }

  .hf-header .header-wa-cta {
    min-height: 38px;
    padding: 0 16px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hf-header .header-backdrop,
  .hf-header .header-drawer,
  .hf-header .header-menu-toggle__box span,
  .hf-header .header-wa-cta,
  .hf-header .header-site-switcher__link,
  .hf-header .header-primary-nav a {
    transition: none;
  }
}
