/**
 * Header, mobile navigation, floating call button and footer.
 */

/* ---------- header ---------- */

.tim-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(13, 11, 15, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--tim-ease);
}

.tim-header.is-hidden {
  transform: translateY(-100%);
}

.tim-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--tim-container);
  margin: 0 auto;
  padding: 18px var(--tim-section-x);
}

.tim-logo {
  font-family: var(--tim-font-display);
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  letter-spacing: -0.5px;
}

.tim-logo:hover {
  color: #fff;
}

.tim-logo__dot {
  color: var(--tim-magenta);
}

.tim-logo--lg {
  font-size: 30px;
}

.tim-nav__list,
.tim-footer__menu,
.tim-mobile-nav__list,
.tim-lang {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tim-nav__link {
  color: var(--tim-on-dark-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s;
}

.tim-nav__link:hover,
.tim-nav__item.is-current > .tim-nav__link {
  color: var(--tim-magenta-light);
}

.tim-nav__item {
  position: relative;
}

/* Submenus stay CSS-only: hover on pointer devices, focus-within for keyboards. */
.tim-nav__sub {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 210px;
  margin: 0;
  padding: 12px;
  list-style: none;
  border-radius: var(--tim-radius-card-sm);
  background: var(--tim-dark-panel-2);
  border: 1px solid var(--tim-line-dark);
  box-shadow: var(--tim-shadow-dark);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

.tim-nav__item.has-children:hover > .tim-nav__sub,
.tim-nav__item.has-children:focus-within > .tim-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tim-nav__sub .tim-nav__item {
  display: block;
}

.tim-nav__sub .tim-nav__link {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
}

.tim-nav__sub .tim-nav__link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tim-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tim-btn--sm {
  padding: 10px 22px;
  font-size: 14px;
}

.tim-lang {
  gap: 10px;
}

.tim-lang__item a {
  color: var(--tim-on-dark-dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}

.tim-lang__item.is-active a,
.tim-lang__item a:hover {
  color: #fff;
}

/* ---------- burger + mobile nav ---------- */

.tim-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tim-burger__bar {
  display: block;
  width: 24px;
  height: 2px;
  margin-inline: auto;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
}

.tim-burger[aria-expanded="true"] .tim-burger__bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.tim-burger[aria-expanded="true"] .tim-burger__bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.tim-mobile-nav {
  position: fixed;
  inset: 78px 0 auto 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px var(--tim-section-x) 40px;
  background: var(--tim-dark);
  border-bottom: 1px solid var(--tim-line-dark);
}

.tim-mobile-nav[hidden] {
  display: none;
}

.tim-mobile-nav__list {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.tim-mobile-nav .tim-nav__link {
  font-size: 20px;
  color: #fff;
}

.tim-mobile-nav .tim-nav__sub {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  padding: 8px 0 0 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* ---------- floating call ---------- */

.tim-call {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--tim-radius-pill);
  background: var(--tim-magenta);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--tim-shadow-cta);
  animation: tim-cta-pulse 2.6s ease-out infinite;
}

.tim-call:hover {
  background: var(--tim-magenta-hover);
  color: #fff;
}

/* The hero carries its own CTAs; the floating button would sit on top of the
   scene tabs, so it fades in only once the hero is scrolled past. */
.tim-call {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.4s, visibility 0.4s;
}

.tim-call.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- footer ---------- */

.tim-footer {
  background: var(--tim-dark);
  color: var(--tim-on-dark);
}

.tim-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 56px;
  border-top: 1px solid var(--tim-line-dark);
}

.tim-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tim-footer__tagline {
  max-width: 280px;
  color: var(--tim-on-dark-dim);
  font-size: 15px;
}

.tim-footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tim-footer__col a,
.tim-footer__menu a {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

.tim-footer__col a:hover,
.tim-footer__menu a:hover {
  color: var(--tim-magenta-light);
}

.tim-footer__menu {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.tim-footer__label {
  color: var(--tim-ink-500);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.tim-footer__muted {
  color: var(--tim-on-dark-dim);
  font-size: 15px;
}

.tim-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--tim-ink-500);
  font-size: 13px;
}

.tim-footer__bottom a {
  color: var(--tim-on-dark-dim);
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .tim-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .tim-nav,
  .tim-header__actions .tim-btn {
    display: none;
  }

  .tim-burger {
    display: flex;
  }
}

@media (max-width: 620px) {
  .tim-footer__grid {
    grid-template-columns: 1fr;
  }

  .tim-call {
    right: 16px;
    bottom: 16px;
    padding: 12px 18px;
    font-size: 14px;
  }
}

/*
 * Touch targets.
 *
 * The language links rendered 17px tall — well under the ~44px a finger needs,
 * and they sit next to each other, so mis-taps switched the site's language.
 * Padding (not height) keeps the header's vertical rhythm intact.
 *
 * Last in the file so it wins over the base .tim-lang__item rule above at
 * equal specificity.
 */
@media (max-width: 900px) {
  .tim-lang__item a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
  }

  .tim-lang {
    gap: 2px;
  }
}
