/* Header styles for StayFlowCenter */

.sf-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: radial-gradient(circle at top left, rgba(253, 248, 241, 0.96), rgba(241, 231, 219, 0.94));
  border-bottom: 1px solid rgba(197, 183, 158, 0.5);
}

.sf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

/* Brand / logo */
.sf-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.sf-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.sf-header__logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, var(--color-accent-soft), var(--color-accent));
  box-shadow: var(--shadow-sm);
  position: relative;
}

.sf-header__logo-mark::before,
.sf-header__logo-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  border: 1px solid rgba(253, 250, 245, 0.7);
}

.sf-header__logo-mark::after {
  inset: 14px 8px 8px 14px;
  border-radius: 999px 999px 999px 0;
}

.sf-header__logo-text {
  display: flex;
  flex-direction: column;
}

.sf-header__logo-primary {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.sf-header__logo-tagline {
  font-size: var(--font-size-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Navigation */
.sf-header__nav {
  display: flex;
  align-items: center;
}

.sf-header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
}

.sf-header__nav-link {
  position: relative;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  padding: 0.4rem 0;
}

.sf-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  transition: width var(--transition-base);
}

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

.sf-header__nav-link:hover,
.sf-header__nav-link:focus-visible {
  color: var(--color-primary);
}

.sf-header__nav-item--accent .sf-header__nav-link {
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(178, 139, 74, 0.7);
  background: linear-gradient(135deg, #fdf9f3, #f4eee3);
  box-shadow: var(--shadow-sm);
}

.sf-header__nav-item--accent .sf-header__nav-link::after {
  display: none;
}

.sf-header__nav-link--primary {
  color: var(--color-primary);
}

.sf-header__nav-item--accent .sf-header__nav-link:hover,
.sf-header__nav-item--accent .sf-header__nav-link:focus-visible {
  background: linear-gradient(135deg, #f4eee3, #e9ddc8);
  color: var(--color-primary);
}

/* Mobile toggle */
.sf-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(197, 183, 158, 0.7);
  background-color: rgba(253, 250, 245, 0.9);
  box-shadow: var(--shadow-sm);
}

.sf-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--color-primary);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* State: open menu */
.sf-header__toggle--open .sf-header__toggle-bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

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

.sf-header__toggle--open .sf-header__toggle-bar:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Responsive behaviour */
@media (max-width: 768px) {
  .sf-header__inner {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

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

  .sf-header__nav {
    position: fixed;
    inset: 56px 0 auto 0;
    z-index: 30;
    pointer-events: none;
  }

  .sf-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    margin-top: var(--space-2);
    margin-left: var(--space-4);
    margin-right: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(197, 183, 158, 0.7);
    background: linear-gradient(155deg, rgba(253, 249, 243, 0.98), rgba(244, 238, 227, 0.98));
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height var(--transition-slow), opacity var(--transition-base), transform var(--transition-base);
  }

  .sf-header__nav--open {
    pointer-events: auto;
  }

  .sf-header__nav--open .sf-header__nav-list {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
  }

  .sf-header__nav-item--accent {
    width: 100%;
  }

  .sf-header__nav-item--accent .sf-header__nav-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .sf-header__logo-primary {
    font-size: 1rem;
  }

  .sf-header__logo-tagline {
    display: none;
  }
}
