:root {
  --header-height: 4rem;
  --header-padding-y: 0.5rem;
  --header-shell-padding-x: 1.25rem;
  --header-logo-size: 2rem;
  --header-nav-font-size: 0.9375rem;
  --header-button-height: 2.75rem;
  --header-button-font-size: 0.9375rem;
  --header-inline-gap: 0.875rem;
  --header-nav-gap: 1.75rem;
  --header-shell-max-width: 1000px;
  --header-shell-radius: 999px;
  --header-mobile-radius: 2rem;
}

@media (min-width: 640px) {
  :root {
    --header-height: 4.5rem;
    --header-padding-y: 0.625rem;
    --header-shell-padding-x: 1.75rem;
    --header-logo-size: 2.25rem;
    --header-button-height: 3rem;
  }
}

[data-corely-header] {
  position: sticky;
  top: 0;
  z-index: 100;
  display: block;
  padding-top: 1rem;
  padding-inline: 0.75rem;
}

@media (min-width: 640px) {
  [data-corely-header] {
    padding-inline: 1rem;
  }
}

@media (min-width: 768px) {
  [data-corely-header] {
    padding-inline: 1.25rem;
  }
}

[data-corely-header] [hidden] {
  display: none !important;
}

.corely-header__sticky {
  display: block;
}

.corely-header__shell {
  position: relative;
  isolation: isolate;
  max-width: var(--header-shell-max-width);
  min-height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--header-inline-gap);
  padding-inline: var(--header-shell-padding-x);
  padding-block: var(--header-padding-y);
  border-radius: var(--header-shell-radius);
  background: var(--glass-panel-fill, rgb(255 255 255 / 0.6));
  border: 1px solid var(--glass-panel-border, rgb(255 255 255 / 0.8));
  box-shadow: var(--glass-panel-shadow, 0 20px 50px -12px var(--surface-shadow, rgb(0 0 0 / 0.03)));
  backdrop-filter: blur(24px) saturate(1.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.08);
  overflow: hidden;
}

.corely-header__shell::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: inherit;
  background:
    var(--glass-reflection, linear-gradient(135deg, rgb(255 255 255 / 0.34), transparent 36%)),
    radial-gradient(circle at 86% 0%, rgb(var(--accent-rgb) / 0.08), transparent 36%);
  pointer-events: none;
}

.corely-header__shell > * {
  position: relative;
  z-index: 1;
}

.corely-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  flex-shrink: 0;
  text-decoration: none;
}

.corely-header__logo {
  width: auto;
  height: var(--header-logo-size);
  object-fit: contain;
}

.corely-header__nav {
  display: none;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: var(--header-nav-gap);
  min-width: 0;
  padding-inline: 1rem;
  white-space: nowrap;
}

@media (min-width: 1280px) {
  .corely-header__nav {
    display: flex;
  }
}

.corely-header__link,
.corely-header__login,
.corely-header__mobile-link {
  color: rgb(var(--text-rgb) / 0.72);
  font-size: var(--header-nav-font-size);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease, background-color 180ms ease;
}

.corely-header__link:hover,
.corely-header__login:hover,
.corely-header__mobile-link:hover {
  color: rgb(var(--accent-rgb));
}

.corely-header__link.is-active,
.corely-header__login.is-active,
.corely-header__mobile-link.is-active {
  color: rgb(var(--accent-rgb));
  font-weight: 800;
}

.corely-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .corely-header__actions {
    gap: 1rem;
  }
}

@media (min-width: 1280px) {
  .corely-header__actions {
    margin-left: 2.25rem;
    gap: 1.25rem;
  }
}

.corely-header__login {
  display: none;
  flex-shrink: 0;
  white-space: nowrap;
  padding-inline: 0.75rem;
}

@media (min-width: 640px) {
  .corely-header__login {
    display: inline-flex;
    align-items: center;
    min-height: var(--header-button-height);
  }
}

.corely-header__cta {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: var(--header-button-height);
  padding-inline: 1.5rem;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
  text-decoration: none;
  font-size: var(--header-button-font-size);
  font-weight: 700;
  color: white;
  background: rgb(var(--accent-rgb));
  box-shadow: 0 4px 15px rgb(var(--accent-rgb) / 0.24);
  transition: background-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.corely-header__cta:hover {
  background: rgb(var(--accent-strong-rgb, var(--accent-rgb)));
  box-shadow: 0 8px 25px rgb(var(--accent-rgb) / 0.30);
  transform: translateY(-1px);
}

@media (min-width: 640px) {
  .corely-header__cta {
    display: inline-flex;
  }
}

.corely-header__cta-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.corely-header__menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--header-button-height);
  height: var(--header-button-height);
  padding: 0;
  border: 1px solid var(--glass-control-border, rgb(var(--border-rgb) / 0.55));
  border-radius: 999px;
  background: var(--glass-control-fill, rgb(var(--surface-rgb) / 0.6));
  color: rgb(var(--text-rgb));
  box-shadow: var(--glass-control-shadow, inset 0 1px 0 rgb(255 255 255 / 0.4));
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.corely-header__menu-toggle:hover {
  border-color: rgb(var(--accent-rgb) / 0.22);
  color: rgb(var(--accent-rgb));
}

@media (min-width: 1280px) {
  .corely-header__menu-toggle {
    display: none;
  }
}

.corely-header__menu-icon {
  font-size: 1.375rem;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.corely-header__mobile {
  position: relative;
  isolation: isolate;
  max-width: var(--header-shell-max-width);
  margin: 0.75rem auto 0;
  border-radius: var(--header-mobile-radius);
  background: var(--glass-panel-fill, rgb(255 255 255 / 0.6));
  border: 1px solid var(--glass-panel-border, rgb(255 255 255 / 0.8));
  box-shadow: var(--glass-panel-shadow, 0 20px 50px -12px var(--surface-shadow, rgb(0 0 0 / 0.03)));
  backdrop-filter: blur(24px) saturate(1.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.08);
  overflow: hidden;
}

.corely-header__mobile::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: inherit;
  background: var(--glass-reflection, linear-gradient(135deg, rgb(255 255 255 / 0.34), transparent 36%));
  pointer-events: none;
}

.corely-header__mobile > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 1280px) {
  .corely-header__mobile {
    display: none !important;
  }
}

.corely-header__mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.corely-header__mobile-link {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  padding-inline: 1.25rem;
  border-radius: 1rem;
  font-weight: 700;
}

.corely-header__mobile-divider {
  height: 1px;
  margin: 0.75rem 0;
  background: rgb(var(--border-rgb) / 0.55);
}

.corely-header__mobile-cta {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3.25rem;
  padding-inline: 1.75rem;
  border-radius: 999px;
  background: rgb(var(--accent-rgb));
  color: white;
  font-size: var(--header-button-font-size);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgb(var(--accent-rgb) / 0.24);
}

.corely-header__mobile-cta:hover {
  background: rgb(var(--accent-strong-rgb, var(--accent-rgb)));
}
