/* Header styles for Drapelys */

.dr-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(247, 245, 242, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
}

.dr-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

/* Brand */
.dr-header__brand {
  flex: 0 0 auto;
}

.dr-header__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--gray-900);
}

.dr-header__logo:hover {
  text-decoration: none;
  color: var(--gray-900);
}

.dr-header__logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(182, 138, 91, 0.55);
  position: relative;
  background: radial-gradient(circle at 30% 20%, #fff 0, #f3efe9 45%, #e2d7c8 100%);
}

.dr-header__logo-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  border: 1px solid rgba(182, 138, 91, 0.7);
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(35deg);
}

.dr-header__logo-text {
  font-weight: 500;
}

/* Navigation */
.dr-header__nav {
  flex: 1 1 auto;
}

.dr-header__nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  list-style: none;
}

.dr-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  padding: 0.25rem 0;
}

.dr-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary-soft), var(--color-primary));
  transform-origin: center;
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.dr-header__nav-link:hover {
  color: var(--gray-900);
  text-decoration: none;
}

.dr-header__nav-link:focus-visible {
  outline-offset: 3px;
}

.dr-header__nav-link:hover::after,
.dr-header__nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* Actions */
.dr-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.dr-header__action-link {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.dr-header__action-link--contact {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.dr-header__action-link--contact:hover {
  border-color: var(--color-border-subtle);
  background-color: rgba(243, 239, 234, 0.8);
  text-decoration: none;
  color: var(--gray-900);
}

.dr-header__action-primary {
  white-space: nowrap;
}

/* Mobile toggle */
.dr-header__toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(255, 255, 255, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.dr-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--gray-800);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.dr-header__toggle:focus-visible {
  outline-offset: 3px;
}

/* Toggle animation when open */
.dr-header--menu-open .dr-header__toggle-bar:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}

.dr-header--menu-open .dr-header__toggle-bar:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

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

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

  .dr-header__nav {
    position: fixed;
    inset-inline: 0;
    top: 56px;
    background-color: rgba(247, 245, 242, 0.98);
    border-bottom: 1px solid var(--color-border-subtle);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
  }

  .dr-header--menu-open .dr-header__nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .dr-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-12) var(--space-16) var(--space-12);
  }

  .dr-header__nav-link {
    width: 100%;
    padding: 0.5rem 0;
    font-size: var(--font-size-md);
  }

  .dr-header__actions {
    flex: 0 0 auto;
  }

  .dr-header__action-link--contact {
    display: none;
  }
}

@media (max-width: 480px) {
  .dr-header__action-primary {
    padding-inline: 1.1rem;
  }

  .dr-header__logo-text {
    font-size: 0.9rem;
  }
}
