/* Header styles for PlantNesto - builds on base.css */

.pn-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffffcc;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(19, 41, 31, 0.06);
}

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

.pn-header__brand {
  display: flex;
  align-items: center;
}

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

.pn-header__logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #9be1a0, #2f7845);
  color: #f3f7f3;
  box-shadow: 0 6px 18px rgba(23, 68, 46, 0.35);
  font-size: 1.1rem;
}

.pn-header__logo-text {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  color: #123324;
}

/* Navigation */

.pn-header__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.pn-header__nav-list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pn-header__nav-link {
  position: relative;
  text-decoration: none;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #234131;
  padding: 0.25rem 0;
}

.pn-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f7845, #68b38a);
  transition: width 0.18s ease-out;
}

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

.pn-header__nav-link:focus-visible {
  outline: 2px solid #2f7845;
  outline-offset: 3px;
  border-radius: 4px;
}

/* CTAs */

.pn-header__cta-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pn-header__link-secondary,
.pn-header__link-primary {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  text-decoration: none;
  white-space: nowrap;
}

.pn-header__link-secondary {
  color: #234131;
  border: 1px solid rgba(35, 65, 49, 0.22);
  background: #ffffff;
}

.pn-header__link-secondary:hover {
  background: #f3f7f3;
}

.pn-header__link-primary {
  color: #f5fbf7!important;
  background: linear-gradient(135deg, #2f7845, #4f9b68);
  border: 1px solid #2f7845;
  box-shadow: 0 4px 14px rgba(25, 92, 54, 0.4);
}

.pn-header__link-primary:hover {
  filter: brightness(1.03);
}

.pn-header__link-primary:focus-visible,
.pn-header__link-secondary:focus-visible {
  outline: 2px solid #18472e;
  outline-offset: 3px;
}

/* Mobile toggle */

.pn-header__toggle {
  display: none;
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(19, 41, 31, 0.18);
  background: #ffffff;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.23rem;
  cursor: pointer;
}

.pn-header__toggle-bar {
  width: 1.25rem;
  height: 2px;
  border-radius: 999px;
  background: #234131;
  transition: transform 0.18s ease, opacity 0.18s ease, width 0.18s ease;
}

.pn-header__toggle:focus-visible {
  outline: 2px solid #2f7845;
  outline-offset: 3px;
}

/* Hamburger -> close animation */

.pn-header--menu-open .pn-header__toggle-bar:nth-child(1) {
  transform: translateY(4px) rotate(42deg);
}

.pn-header--menu-open .pn-header__toggle-bar:nth-child(2) {
  opacity: 0;
  width: 0.5rem;
}

.pn-header--menu-open .pn-header__toggle-bar:nth-child(3) {
  transform: translateY(-4px) rotate(-42deg);
}

/* Responsive */

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

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

  .pn-header__nav {
    position: fixed;
   width: 100%;
    inset-block-start: 3.75rem;
    background: rgba(248, 250, 248, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.75rem;
    gap: 1.25rem;
    overflow-y: auto;
  }

  .pn-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .pn-header__nav-link {
    font-size: 1rem;
  }

  .pn-header__cta-group {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .pn-header__link-secondary,
  .pn-header__link-primary {
    text-align: center;
  }

  .pn-header--menu-open .pn-header__nav {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pn-header *,
  .pn-header__toggle-bar {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
