/* Header styles specific to HomeSortia. Assumes base.css provides resets & layout utilities. */

.hs-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid #e3e3de;
  backdrop-filter: blur(10px);
}

.hs-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hs-header__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.hs-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.hs-header__logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #c9c9c0;
  background: radial-gradient(circle at 30% 20%, #f6f6f2 0, #e8e8e0 40%, #d5d5cb 100%);
}

.hs-header__logo-text {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #222222;
}

/* Primary nav */

.hs-header__nav {
  flex: 1 1 auto;
}

.hs-header__nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 0;
  margin: 0;
}

.hs-header__nav-link {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #44443c;
  position: relative;
  padding-bottom: 0.15rem;
}

.hs-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: #111111;
  transition: width 0.18s ease-out;
}

.hs-header__nav-link:focus-visible,
.hs-header__nav-link:hover {
  color: #111111;
}

.hs-header__nav-link:hover::after,
.hs-header__nav-link:focus-visible::after {
  width: 100%;
}

/* Actions */

.hs-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hs-header__link-secondary {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #6a6a61;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.hs-header__link-secondary:hover,
.hs-header__link-secondary:focus-visible {
  color: #222222;
  border-color: #cfcfc5;
  outline: none;
}

.hs-header__icon-btn {
  border: none;
  background: transparent;
  padding: 0.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #44443c;
  cursor: pointer;
}

.hs-header__icon-btn i {
  font-size: 1rem;
}

.hs-header__icon-btn:hover,
.hs-header__icon-btn:focus-visible {
  color: #111111;
  background-color: #f0f0ea;
  outline: none;
}

/* Mobile toggle */

.hs-header__toggle {
  display: none;
  border: 1px solid #d7d7cf;
  background-color: #ffffff;
  border-radius: 999px;

  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.22rem;
}

.hs-header__toggle-bar {
  width: 18px;
  height: 1.6px;
  border-radius: 999px;
  background-color: #222222;
  transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}

.hs-header__toggle:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

/* Toggle animation when active */

.hs-header--menu-open .hs-header__toggle-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.hs-header--menu-open .hs-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.hs-header--menu-open .hs-header__toggle-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Responsive layout */

@media (max-width: 768px) {
  .hs-header__inner {
    padding-inline: 1rem;
  }

  .hs-header__toggle {
    display: inline-flex;
  }

  .hs-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e3e3de;
    transform-origin: top;
  }

  /* Default: menu visible if JS disabled. JS adds the --js class to enable collapsing. */
  .hs-header__nav--js {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out, opacity 0.2s ease-out;
  }

  .hs-header--menu-open .hs-header__nav--js {
    max-height: 320px;
    opacity: 1;
  }

  .hs-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.75rem;
  }

  .hs-header__nav-link {
    font-size: 0.95rem;
  }

  .hs-header__actions {
    gap: 0.25rem;
  }

  .hs-header__link-secondary {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-header__nav--js,
  .hs-header__toggle-bar {
    transition: none !important;
  }
}
