/* --- Header & Nav --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 247, 250, .70);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(6, 8, 10, .06);
}

.nav-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.brand small {
  display: block;
  font-weight: 600;
  color: rgba(6, 8, 10, .62);
  letter-spacing: 0;
  font-size: 12px;
  margin-top: 2px;
}

/* Logo Image */
.logoMark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* --- Bubble Pill Nav --- */
.pill-nav-wrap {
  position: relative;
  border: 1px solid rgba(6, 8, 10, .08);
  width: fit-content;
  margin: 0;
  border-radius: 500px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  padding: 5px;
  display: flex;
}

.pill-nav {
  display: flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  anchor-name: --pill-nav;
}

.pill-nav a {
  position: relative;
  z-index: 10;
  display: inline-block;
  padding: 8px 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s var(--ease);
  border-radius: 500px;
}

.pill-nav a:before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  border-radius: 500px;
}

.pill-nav a.active {
  anchor-name: --active;
  color: #fff;
}

.pill-nav a:hover {
  color: var(--text);
}

.pill-nav a:hover:before {
  anchor-name: --pill-nav;
}

.nav-bubble {
  position: absolute;
  border-radius: 500px;
  transition: all 0.25s var(--ease);
  pointer-events: none;
  top: anchor(top);
  right: anchor(right);
  bottom: anchor(bottom);
  left: anchor(left);
}

.nav-bubble.active {
  position-anchor: --active;
  z-index: 2;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(70, 129, 246, .25);
}

.nav-bubble.hover {
  position-anchor: --pill-nav;
  z-index: 1;
  background: rgba(6, 8, 10, .06);
}

/* --- Mobile Drawer & Footer --- */
.navCtas {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Responsive button text */
.btn-text-mobile {
  display: none;
}

.btn-text-desktop {
  display: inline;
}

.hamburger {
  display: none;
  border: 1px solid rgba(6, 8, 10, .12);
  background: rgba(255, 255, 255, .85);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  box-shadow: 0 2px 6px rgba(6, 8, 10, .04);
}

.hamburger:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.hamburger:active {
  transform: scale(0.95);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2.5px;
  background: rgba(6, 8, 10, .78);
  margin: 3.5px 0;
  border-radius: 99px;
  transition: all 0.3s var(--ease);
}

.drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 8, 10, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}

.drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.drawerPanel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(340px, 88vw);
  background: rgba(248, 250, 252, .96);
  backdrop-filter: blur(16px);
  border-left: 1px solid rgba(6, 8, 10, .10);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(0.4, 0.0, 0.2, 1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: -4px 0 20px rgba(6, 8, 10, .08);
}

.drawer.open .drawerPanel {
  transform: translateX(0);
}

.drawerPanel a {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(6, 8, 10, .08);
  background: rgba(255, 255, 255, .75);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s var(--ease);
}

.drawerPanel a:hover {
  background: rgba(255, 255, 255, .95);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-2px);
}

.drawerPanel .brand {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(6, 8, 10, .08);
}

.drawer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(6, 8, 10, .10);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(6, 8, 10, .18);
  transform: scale(1.05);
}

.drawer-close:active {
  transform: scale(0.95);
}

.drawer-close .lucide {
  width: 20px;
  height: 20px;
  color: rgba(6, 8, 10, .70);
}

/* Drawer divider */
.drawer-divider {
  height: 1px;
  background: rgba(6, 8, 10, .08);
  margin: 8px 0;
}

/* Drawer CTA links - styled like menu items but with color accents */
.drawer-cta {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(6, 8, 10, .08);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  transition: all 0.2s var(--ease);
}

.drawer-cta-secondary {
  background: rgba(255, 255, 255, .75);
  color: var(--text);
  border-color: rgba(6, 8, 10, .12);
}

.drawer-cta-secondary:hover {
  background: rgba(255, 255, 255, .95);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-2px);
}

.drawer-cta-primary {
  background: linear-gradient(135deg, var(--primary), #5a8ff8) !important;
  color: white !important;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(70, 129, 246, .20);
}

.drawer-cta-primary:hover {
  background: linear-gradient(135deg, #5a8ff8, var(--primary));
  box-shadow: 0 6px 16px rgba(70, 129, 246, .30);
  transform: translateX(-2px);
  color: white !important;
}

footer {
  padding: 34px 0 42px;
  border-top: 1px solid rgba(6, 8, 10, .06);
  background: rgba(245, 247, 250, .60);
  margin-top: 40px;
}

.footerGrid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.footTitle {
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}

.footText {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13.5px;
}

.footLinks {
  display: grid;
  gap: 10px;
  color: rgba(6, 8, 10, .78);
  font-size: 13.5px;
}

.subRow {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.subRow input {
  flex: 1;
  min-width: 0;
}

.copy {
  margin-top: 18px;
  color: rgba(6, 8, 10, .58);
  font-size: 12px;
}

/* --- Layout Responsive Logic --- */

/* Tablet Breakpoint - Optimize for smaller screens */
@media (max-width: 1024px) {

  /* Navigation: Reduce spacing to prevent overlap */
  .pill-nav a {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Hide secondary CTA text, keep icon/shorter version */
  .navCtas .btn-secondary {
    padding: 10px 16px;
    font-size: 13px;
  }

  .navCtas .btn-primary {
    padding: 10px 18px;
    font-size: 13px;
  }
}

/* Footer collapse at 980px */
@media (max-width: 980px) {
  .footerGrid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile Breakpoint - Full mobile experience */
@media (max-width: 768px) {

  /* Hide desktop navigation */
  .pill-nav-wrap,
  .navCtas .btn-secondary {
    display: none;
  }

  /* Show mobile menu */
  .hamburger {
    display: inline-block;
  }

  .drawer {
    display: block;
  }

  /* Swap button text for mobile */
  .btn-text-desktop {
    display: none;
  }

  .btn-text-mobile {
    display: inline;
  }

  /* Mobile header optimizations */
  .header {
    padding: 0;
  }

  .nav-layout {
    padding: 10px 0;
  }

  .brand {
    gap: 10px;
  }

  .logoMark {
    width: 32px;
    height: 32px;
  }

  .brand div {
    font-size: 15px;
  }

  .brand small {
    font-size: 11px;
  }

  .navCtas .btn-primary {
    padding: 9px 14px;
    font-size: 13px;
  }

  /* Footer: Single column */
  .footerGrid {
    grid-template-columns: 1fr;
  }
}