/* Site header, after Dilara's mockups (design/reference/modules-page.png): a flat bar over the page, the letter-spaced word mark,
   small uppercase menu in the middle, an outline demo pill and TR / EN on the right. It turns solid once the page scrolls. */

.teo-website-header {
  inset: 0 0 auto 0;
  padding: 0;
}

/* the solid state is a layer of its own, so the bar's content never fades with it */
.teo-website-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(2, 7, 22, 0.92), rgba(3, 9, 28, 0.82));
  border-bottom: 1px solid rgba(140, 190, 255, 0.14);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.teo-website-header.teo-website-header-solid::before, .teo-website-header.teo-website-menu-open::before {
  opacity: 1;
}

.teo-website-header .teo-website-header-bar {
  position: relative;
  max-width: var(--teo-website-shell);
  height: 76px;
  margin: 0 auto;
  padding: 0 var(--teo-website-gutter);
  gap: clamp(20px, 3vw, 44px);
  border: none;
  border-radius: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.teo-website-header-solid .teo-website-header-bar {
  background: none;
}

/* the word mark: letter-spaced capitals, no logo, as in the mockup (about 130 px wide at 1440) */
.teo-website-header .teo-website-brand {
  flex: none;
  gap: 0;
  font-family: var(--teo-website-font-body);
  font-weight: 600;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.56em;
  /* the last letter carries spacing too; pull it back so the mark ends where its K ends */
  margin-right: -0.56em;
  color: #fff;
  text-shadow: 0 0 18px rgba(144, 200, 255, 0.25);
}

.teo-website-header .teo-website-navigation {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 44px);
  font-size: 13px;
}

.teo-website-navigation-links {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 2.3vw, 34px);
}

.teo-website-navigation-links a {
  position: relative;
  padding: 8px 0;
  color: #d2dae8;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.teo-website-navigation-links a:hover, .teo-website-navigation-links a.teo-website-active {
  color: #fff;
}

/* the shown page: a short glowing line under its name */
.teo-website-navigation-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0.08em;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(144, 215, 255, 0), #90d7ff 50%, rgba(144, 215, 255, 0));
  box-shadow: 0 0 8px rgba(77, 164, 255, 0.8);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.teo-website-navigation-links a.teo-website-active::after {
  opacity: 1;
  transform: none;
}

.teo-website-header-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.6vw, 24px);
}

/* outline pill, no icon */
.teo-website-header-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid rgba(210, 225, 255, 0.6);
  background: rgba(4, 12, 34, 0.28);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.teo-website-header-demo:hover {
  border-color: #b8e2ff;
  background: rgba(77, 164, 255, 0.16);
  box-shadow: 0 0 22px rgba(42, 107, 255, 0.45);
}

/* TR / EN as plain text, the chosen language white */
.teo-website-header .teo-website-language {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  color: #8fb1ea;
  font-size: 13px;
  font-weight: 600;
}

.teo-website-header .teo-website-language button {
  padding: 6px 3px;
  border-radius: 4px;
  background: none;
  color: #7f9fd3;
  font: 600 13px var(--teo-website-font-body);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.teo-website-header .teo-website-language button:hover {
  color: #fff;
}

.teo-website-header .teo-website-language button.teo-website-active {
  background: none;
  color: #e8f1ff;
}

.teo-website-language-separator {
  color: rgba(143, 177, 234, 0.7);
}

.teo-website-header .teo-website-menu-button {
  width: 44px;
  height: 44px;
  border-color: rgba(170, 200, 255, 0.32);
  background: rgba(4, 12, 34, 0.35);
  font-size: 22px;
}

/* the keyboard ring keeps the pill and the round button round (the site's ring squares corners to 6 px) */
.teo-website-header .teo-website-header-demo:focus-visible, .teo-website-header .teo-website-menu-button:focus-visible {
  border-radius: 999px;
}

/* the menu gets tight before the narrow layout takes over */
@media (max-width: 1180px) {
  .teo-website-navigation-links {
    gap: clamp(14px, 1.7vw, 22px);
  }

  .teo-website-navigation-links a, .teo-website-header-demo {
    letter-spacing: 0.04em;
  }

  .teo-website-header-demo {
    padding: 0 18px;
  }
}

/* narrow screens: the word mark and the menu button; the menu opens as a panel under the bar */
@media (max-width: 1024px) {
  .teo-website-header .teo-website-header-bar {
    height: 64px;
    flex-wrap: nowrap;
    border-radius: 0;
  }

  .teo-website-header .teo-website-brand {
    font-size: 16px;
  }

  .teo-website-header .teo-website-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .teo-website-header .teo-website-navigation {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    width: auto;
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--teo-website-gutter) 22px;
    background: linear-gradient(180deg, #03091c, #050e28);
    border-bottom: 1px solid rgba(140, 190, 255, 0.16);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  }

  .teo-website-header.teo-website-menu-open .teo-website-navigation {
    display: flex;
  }

  /* the panel ends in the lit line of the site's glass panels */
  .teo-website-header .teo-website-navigation::after {
    content: '';
    position: absolute;
    left: 4%;
    right: 4%;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, rgba(77, 164, 255, 0), rgba(144, 215, 255, 0.8) 50%, rgba(77, 164, 255, 0));
    box-shadow: 0 0 10px 1px rgba(42, 107, 255, 0.45);
    pointer-events: none;
  }

  .teo-website-navigation-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .teo-website-navigation-links a {
    padding: 15px 4px 15px 14px;
    border-bottom: 1px solid rgba(140, 190, 255, 0.12);
    font-size: 14px;
  }

  /* the shown page: a glowing bar on the left instead of the line under it */
  .teo-website-navigation-links a::after {
    left: 0;
    right: auto;
    top: 14px;
    bottom: 14px;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, #90d7ff, #2a6bff);
    transform: scaleY(0.4);
  }

  .teo-website-header-actions {
    justify-content: space-between;
    padding-top: 20px;
  }

  .teo-website-header .teo-website-language {
    align-self: center;
    margin: 0;
  }

  .teo-website-header .teo-website-language button {
    padding: 10px 6px;
    font-size: 14px;
  }
}

/* after a navigation the router moves the keyboard focus to the opened page (its title, or the main area of the home
   page): a starting point, not a control, so it draws no ring */
.teo-website .teo-website-focus-target:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .teo-website-header::before, .teo-website-navigation-links a::after, .teo-website-header-demo {
    transition: none;
  }
}
