/* Techdesko Header Styles */

.td-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid rgba(15, 35, 65, 0.08);
  backdrop-filter: blur(10px);
}

.td-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.td-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

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

.td-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 0.9rem;
  background: radial-gradient(circle at 30% 20%, #5bb5ff 0, #1d7ed6 40%, #134a9b 100%);
}

.td-header__site-name {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: #11233d;
  white-space: nowrap;
}

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

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

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

.td-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  transition: width 0.2s ease-out;
}

.td-header__nav-link:focus-visible,
.td-header__nav-link:hover {
  color: #1d4ed8;
}

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

.td-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.td-header__utility-link {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  color: #475569;
  text-decoration: none;
}

.td-header__utility-link:hover,
.td-header__utility-link:focus-visible {
  color: #1d4ed8;
}

.td-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, background 0.1s ease-out;
}

.td-header__cta:hover,
.td-header__cta:focus-visible {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(30, 64, 175, 0.35);
  color: #ffffff;
}

.td-header__cta:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.3);
}

/* Menu toggle button */

.td-header__menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background-color: #ffffff;
  padding: 0;
  cursor: pointer;
}

.td-header__menu-toggle-bar {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  border-radius: 999px;
  background-color: #0f172a;
  transition: transform 0.18s ease, opacity 0.18s ease, top 0.18s ease, bottom 0.18s ease;
}

.td-header__menu-toggle-bar:nth-child(1) {
  top: 13px;
}

.td-header__menu-toggle-bar:nth-child(2) {
  top: 18px;
}

.td-header__menu-toggle-bar:nth-child(3) {
  bottom: 13px;
}

.td-header__menu-toggle[aria-expanded="true"] .td-header__menu-toggle-bar:nth-child(1) {
  top: 17px;
  transform: rotate(45deg);
}

.td-header__menu-toggle[aria-expanded="true"] .td-header__menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.td-header__menu-toggle[aria-expanded="true"] .td-header__menu-toggle-bar:nth-child(3) {
  bottom: 19px;
  transform: rotate(-45deg);
}

.td-header__menu-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Responsive layout */

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

  .td-header__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .td-header__nav {
    position: fixed;
    inset-inline: 0;
    top: 56px;
    max-height: calc(100vh - 56px);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.5rem;
    transition: opacity 0.18s ease-out, transform 0.18s ease-out, visibility 0.18s ease-out;
  }

  .td-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
  }

  .td-header__nav-link {
    padding: 0.6rem 0.85rem;
    border-radius: 0.65rem;
    color: #e5f0ff;
    font-size: 1rem;
  }

  .td-header__nav-link::after {
    display: none;
  }

  .td-header__nav-link:focus-visible,
  .td-header__nav-link:hover {
    background: rgba(37, 99, 235, 0.32);
    color: #ffffff;
  }

  .td-header__actions {
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    justify-content: space-between;
  }

  .td-header__utility-link {
    color: #cbd5f5;
  }

  .td-header__cta {
    box-shadow: none;
  }

  .td-header__nav--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }

  body.td-nav-lock {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-header__nav,
  .td-header__menu-toggle-bar,
  .td-header__cta {
    transition: none;
  }
}