/* Brand colours, matching calltracking.au */
:root {
  --md-primary-fg-color: #635bff;
  --md-primary-fg-color--dark: #5247e6;
  --md-accent-fg-color: #5247e6;
  --md-typeset-a-color: #635bff;
}

/* Header, copied from the calltracking.au marketing site.
   Values are Tailwind's: slate-700 #334155, slate-900 #0f172a, slate-600 #475569,
   slate-200 #e2e8f0, primary #635bff, accent teal #14b8a6, violet #a855f7,
   pink #ff5cd6, indigo #6366f1, electric #0073e6; shadow-lift from tailwind.config.ts. */
.ct-header {
  /* Independent of Material's stylesheet: every property .md-header sets is
     overridden here, and the typography is explicit rather than inherited from
     Material's 10px body. Material's search and icon buttons read these variables. */
  --md-primary-fg-color: #ffffff;
  --md-primary-bg-color: #334155;
  --md-primary-bg-color--light: #64748b;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: block;
  background-color: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: none;
  transition: none;
  /* Base typography as on calltracking.au: Inter 16px/24px, weight 400. */
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: normal;
  color: #334155;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ct-header a {
  color: inherit;
  text-decoration: none;
}

/* .container-custom: max-w-7xl mx-auto px-6 md:px-8 lg:px-12; row: h-16 lg:h-20 */
.ct-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  /* Align with Material's content grid (.md-grid is 61rem) rather than the
     site's 1280px container, so the logo lines up with the sidebar. */
  max-width: 61rem;
  margin: 0 auto;
  padding: 0 0.2rem;
}

.ct-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-left: 0.6rem;
}

.ct-header__logo img {
  display: block;
  height: 36px;
  width: auto;
}

/* hidden lg:flex items-center space-x-8 */
.ct-header__links {
  display: none;
  align-items: center;
  gap: 32px;
}

.ct-header__links > a,
.ct-dd__button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: #334155;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.ct-header__links > a:hover,
.ct-dd:hover .ct-dd__button,
.ct-dd:focus-within .ct-dd__button {
  color: #635bff;
}

.ct-chevron {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.ct-dd:hover .ct-chevron,
.ct-dd:focus-within .ct-chevron {
  transform: rotate(180deg);
}

.ct-dd {
  position: relative;
}

/* absolute top-full left-0 mt-3 w-80 rounded-2xl border border-slate-200/60 bg-white p-2 shadow-lift */
.ct-dd__menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 320px;
  margin-top: 12px;
  padding: 8px;
  font-size: 16px;
  line-height: 24px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  background: #ffffff;
  box-shadow: 0 20px 40px -12px rgba(99, 91, 255, 0.25);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.ct-dd__menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.ct-dd:hover .ct-dd__menu,
.ct-dd:focus-within .ct-dd__menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* flex items-start gap-3 rounded-xl px-4 py-3 (space-y-1 between items) */
.ct-dd__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.ct-dd__item + .ct-dd__item {
  margin-top: 4px;
}

.ct-dd__item--pink:hover {
  background-image: linear-gradient(to bottom right, rgba(255, 92, 214, 0.05), rgba(168, 85, 247, 0.05));
}

.ct-dd__item--violet:hover {
  background-image: linear-gradient(to bottom right, rgba(168, 85, 247, 0.05), rgba(99, 102, 241, 0.05));
}

.ct-dd__item--teal:hover {
  background-image: linear-gradient(to bottom right, rgba(20, 184, 166, 0.05), rgba(0, 115, 230, 0.05));
}

/* mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br text-primary */
.ct-dd__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-top: 2px;
  border-radius: 8px;
  color: #635bff;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.ct-dd__icon svg {
  width: 20px;
  height: 20px;
}

.ct-dd__item:hover .ct-dd__icon {
  transform: scale(1.1);
}

.ct-dd__item--pink .ct-dd__icon {
  background-image: linear-gradient(to bottom right, rgba(255, 92, 214, 0.15), rgba(168, 85, 247, 0.1));
}

.ct-dd__item--violet .ct-dd__icon {
  background-image: linear-gradient(to bottom right, rgba(168, 85, 247, 0.15), rgba(99, 102, 241, 0.1));
}

.ct-dd__item--teal .ct-dd__icon {
  background-image: linear-gradient(to bottom right, rgba(20, 184, 166, 0.15), rgba(0, 115, 230, 0.1));
}

.ct-dd__title {
  display: block;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
}

.ct-dd__desc {
  display: block;
  font-size: 14px;
  line-height: 1.375;
  font-weight: 400;
  color: #475569;
}

.ct-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 0.6rem;
}

/* inline-flex items-center gap-2 px-5 py-2.5 rounded-xl font-semibold text-sm bg-white/60
   backdrop-blur-sm border border-slate-200/80 shadow-sm hover:bg-white/90 hover:shadow-md hover:scale-105 */
.ct-header__login {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background-color: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* text-transparent bg-clip-text bg-gradient-to-r from-accent-teal via-accent-violet to-accent-pink
   bg-[length:200%_100%] animate-gradient-x */
.ct-header__login span {
  background-image: linear-gradient(to right, #14b8a6, #a855f7, #ff5cd6);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ct-gradient-x 3s ease infinite;
}

@keyframes ct-gradient-x {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.ct-header__login svg {
  color: #a855f7;
  opacity: 0.6;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.ct-header__login:hover {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.ct-header__login:hover svg {
  transform: translateX(2px);
}

.ct-header .md-header__button.md-icon {
  color: #334155;
  margin: 0;
  padding: 8px;
}

.ct-header .md-header__button.md-icon:hover {
  color: #635bff;
  opacity: 1;
}

/* Search: an icon that expands into a field when focused */
.ct-header .md-search__form {
  background-color: transparent;
  color: #334155;
  box-shadow: none;
}

.ct-header .md-search__input {
  color: #334155;
}

.ct-header .md-search__input::placeholder,
.ct-header .md-search__icon {
  color: #334155;
}

.ct-header .md-search__form:hover {
  background-color: #f1f5f9;
}

@media screen and (min-width: 60em) {
  /* The search keeps a fixed icon-sized slot in the row; the field itself is
     anchored to that slot's right edge and expands leftwards over the links
     instead of pushing them aside. */
  .ct-header .md-search {
    position: relative;
    width: 38.4px;
    height: 40px;
    padding: 0;
  }

  .ct-header .md-search__inner {
    position: absolute;
    top: 0;
    right: 0;
    float: none;
    width: 38.4px;
    transition: width 0.2s;
  }

  .ct-header .md-search__input::placeholder {
    color: transparent;
  }

  [data-md-toggle="search"]:checked ~ .md-header .md-search__inner {
    width: 480px;
  }

  /* Material sizes the results panel to its own field width; match ours or the
     results are clipped. */
  .ct-header .md-search__scrollwrap {
    width: 480px;
  }

  [data-md-toggle="search"]:checked ~ .md-header .md-search__input::placeholder {
    color: #64748b;
  }

  [data-md-toggle="search"]:checked ~ .md-header .md-search__form {
    background-color: #ffffff;
    box-shadow: 0 0 9.6px rgba(0, 0, 0, 0.07);
  }
}

/* lg: 1024px */
@media screen and (min-width: 64em) {
  .ct-header__inner {
    height: 80px;
  }

  .ct-header__logo img {
    height: 48px;
  }

  .ct-header__links {
    display: flex;
  }

  .ct-header__login {
    display: inline-flex;
  }
}

/* Material hides its own drawer toggle from 76.25em */
@media screen and (min-width: 76.25em) {
  .ct-header__menu {
    display: none;
  }
}

/* Sidebar: the header already names the site, so hide the repeated site name on desktop */
@media screen and (min-width: 76.25em) {
  .md-nav--primary > .md-nav__title {
    display: none;
  }
}
