@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&display=swap');

.apple-header {
  position: fixed;
  top: 22px;
  left: 50%;
  width: min(1120px, calc(100% - 28px));
  z-index: 99999;
  pointer-events: none;
  transform: translateX(-50%) translateY(0) scale(1);
  transform-origin: top center;
  will-change: transform, width;
  transition:
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-nav-wrap {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: none;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
  transform: scale(1);
  transform-origin: center;
  will-change: transform, background, box-shadow, backdrop-filter;
  transition:
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    -webkit-backdrop-filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-nav-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.04));
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-logo-text,
.apple-nav,
.apple-cta,
.apple-menu-toggle {
  position: relative;
  z-index: 2;
}

.apple-logo-text {
  font-family: "Amatic SC", cursive;
  font-size: 29px;
  font-weight: 700;
  color: #0f4f2f;
  text-decoration: none !important;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  transform: scale(1);
  transform-origin: left center;
  transition:
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.apple-logo-text:hover {
  color: #0b3f25;
  text-decoration: none !important;
}

.apple-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex: 1;
}

.apple-nav a {
  font-family: "Amatic SC", cursive;
  text-decoration: none !important;
  color: #0f4f2f;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  transform: scale(1);
  transform-origin: center;
  transition:
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.apple-nav a:hover {
  color: #0b3f25;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.apple-nav a:focus,
.apple-nav a:active,
.apple-nav a:visited {
  color: #0f4f2f;
  text-decoration: none !important;
}

.apple-nav ul,
.apple-nav li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.apple-cta {
  font-family: "Amatic SC", cursive;
  text-decoration: none !important;
  color: #ffffff;
  background: #0f4f2f;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  transform: scale(1);
  transform-origin: right center;
  transition:
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.apple-cta:hover {
  transform: translateY(-1px);
  background: #0b3f25;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  text-decoration: none !important;
}

.apple-cta:focus,
.apple-cta:active,
.apple-cta:visited {
  text-decoration: none !important;
  color: #ffffff;
}

.apple-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.36);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.apple-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #0f4f2f;
  border-radius: 999px;
  transition: all .25s ease;
}

.apple-header.is-scrolled {
  width: min(900px, calc(100% - 72px));
  transform: translateX(-50%) translateY(-10px) scale(.985);
}

.apple-header.is-scrolled .apple-nav-wrap {
  transform: scale(.985);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  box-shadow:
    0 24px 60px rgba(0,0,0,.18),
    0 6px 18px rgba(15,79,47,.08);
}

.apple-header.is-scrolled .apple-nav-wrap::before {
  opacity: 1;
}

.apple-header.is-scrolled .apple-logo-text,
.apple-header.is-scrolled .apple-nav a,
.apple-header.is-scrolled .apple-cta {
  transform: scale(.96);
}

.apple-header.is-scrolled .apple-nav a:hover {
  transform: scale(.96) translateY(-1px);
}

.apple-header.is-scrolled .apple-cta:hover {
  transform: scale(.96) translateY(-1px);
}

@media (max-width: 900px) {
  .apple-header {
    top: 12px;
    width: calc(100% - 18px);
    pointer-events: auto !important;
  }

  .apple-nav-wrap {
    padding: 12px 14px;
    border-radius: 20px;
    gap: 12px;
    overflow: visible !important;
    pointer-events: auto !important;
  }

  .apple-logo-text {
    font-size: 29px;
  }

  .apple-menu-toggle {
    display: inline-flex !important;
    position: relative;
    z-index: 999999;
    pointer-events: auto !important;
  }

  .apple-cta {
    display: none;
  }

  .apple-nav {
    display: none !important;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255,255,255,.76);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: none;
    box-shadow: 0 18px 45px rgba(0,0,0,.16);
    z-index: 999998;
  }

  .apple-nav.is-open {
    display: flex !important;
  }

  .apple-nav a {
    padding: 15px 16px;
    border-radius: 14px;
    font-size: 25px;
    text-decoration: none !important;
  }

  .apple-nav a:hover {
    background: rgba(255,255,255,.42);
    transform: none;
    text-decoration: none !important;
  }

  .apple-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
  }

  .apple-menu-toggle.is-active span:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .apple-header.is-scrolled {
    width: calc(100% - 28px);
    transform: translateX(-50%) translateY(-4px) scale(.99);
  }

  .apple-header.is-scrolled .apple-nav-wrap {
    transform: scale(.99);
    border-radius: 22px;
  }

  .apple-header.is-scrolled .apple-logo-text,
  .apple-header.is-scrolled .apple-nav a,
  .apple-header.is-scrolled .apple-cta {
    transform: scale(1);
  }
}

@media (max-width: 420px) {
  .apple-logo-text {
    font-size: 26px;
  }

  .apple-nav-wrap {
    padding: 10px 12px;
  }

  .apple-menu-toggle {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apple-header,
  .apple-nav-wrap,
  .apple-logo-text,
  .apple-nav a,
  .apple-cta,
  .apple-nav-wrap::before {
    transition: none !important;
  }
}
