/* Granola AI Clone Custom Interactive Styles */

/* 1. Scrolled Pill Navbar */
.navbar-pill {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-pill[data-scrolled="true"] {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  border-radius: 9999px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* 2. Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s ease-out;
  pointer-events: none;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.custom-modal {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96) translateY(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  background: #f4f4f5;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #e4e4e7;
  color: #18181b;
}

.modal-body {
  padding: 1.5rem;
}

.download-option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.download-option-btn:hover {
  background: #fafafa;
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.download-option-btn.active {
  border-color: #000000;
  background: #f9f9f9;
}

.download-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 9999px;
  background: #18181b;
  color: #ffffff;
}

.custom-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  font-size: 0.875rem;
  color: #18181b;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-input:focus {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

/* 3. Mobile Navigation Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 102;
  background: #ffffff;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.active {
  transform: translateX(0);
}

/* 4. Audio Visualizer Equalizer Animations */
@keyframes eqBounce {
  0%, 100% {
    transform: scaleY(0.25);
  }
  50% {
    transform: scaleY(1);
  }
}

.audio-eq-bar {
  transform-origin: bottom;
  animation: eqBounce 1.2s ease-in-out infinite;
}

.audio-eq-bar:nth-child(2n) {
  animation-duration: 0.85s;
  animation-delay: 0.15s;
}

.audio-eq-bar:nth-child(3n) {
  animation-duration: 1.4s;
  animation-delay: 0.3s;
}

.audio-eq-bar:nth-child(4n) {
  animation-duration: 0.95s;
  animation-delay: 0.05s;
}

.audio-eq-bar:nth-child(5n) {
  animation-duration: 1.1s;
  animation-delay: 0.25s;
}

/* 5. Infinite Marquee for MCP Connectors */
@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.connectors-marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 35s linear infinite;
}

.connectors-marquee-track:hover {
  animation-play-state: paused;
}

/* 6. Granola Chat Typewriter Cursor */
@keyframes cursorBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.chat-cursor {
  display: inline-block;
  width: 2.5px;
  height: 1.1em;
  background-color: currentColor;
  margin-left: 2px;
  vertical-align: -0.15em;
  animation: cursorBlink 0.8s infinite;
}

/* 7. Hide scrollbar utility */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 8. Tab Transitions for "How it works" */
.hiw-step-fill {
  transition: width 0.4s ease, background-color 0.4s ease;
}

.hiw-content-step {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hiw-content-step.hidden {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.hiw-content-step.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* 9. Hero Demo Interactive Note & Video Call */
.video-thumbs {
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.4);
}

.video-thumbs video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

#hero-enhanced-notes {
  will-change: clip-path, opacity;
}

#hero-enhancing-pill {
  will-change: transform, opacity;
}

@keyframes bgSlide {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0% 0;
  }
}

.gradient-text-animate {
  background-size: 200% 100%;
  animation: bgSlide 0.8s ease-in-out forwards;
}

#hero-toggle-highlight {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes caretBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.animate-caret-blink {
  animation: caretBlink 0.9s steps(1) infinite;
}

/* 7. Section 7: How It Works Fidelity */
.demo-enhanced .hiw-grad,
.hiw-step-source-2 .demo-enhanced .hiw-grad,
.hiw-step-source-0 .demo-enhanced .hiw-grad {
  background: transparent !important;
  color: #1e1e1e !important;
  -webkit-text-fill-color: #1e1e1e !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}

.demo-enhanced .hiw-grad.gradient-text-grey,
.hiw-step-source-2 .demo-enhanced .hiw-grad.gradient-text-grey {
  color: #646460 !important;
  -webkit-text-fill-color: #646460 !important;
}

.demo-enhanced .hiw-grad.font-semibold,
.hiw-step-source-2 .demo-enhanced .hiw-grad.font-semibold {
  color: #1a1a18 !important;
  -webkit-text-fill-color: #1a1a18 !important;
  font-weight: 600 !important;
}

.hiw-step-underline {
  transition: all 0.3s ease;
}

.hiw-step-fill {
  transition: width 0.35s ease, background-color 0.35s ease;
}

/* 8. Features Dropdown Menu */
#features-dropdown-container {
  position: relative;
}

#features-dropdown-container:hover #features-dropdown-menu,
#features-dropdown-container.is-open #features-dropdown-menu,
#features-dropdown-menu:hover,
#features-dropdown-menu.is-active {
  pointer-events: auto !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  visibility: visible !important;
}

#features-dropdown-menu {
  width: 620px !important;
  max-width: 90vw !important;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

#features-dropdown-menu .bg-white {
  background-color: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.12), 0 6px 16px -2px rgba(0, 0, 0, 0.06) !important;
  padding: 8px !important;
}

#features-dropdown-menu img[src*="watchog"] {
  height: 140px !important;
  width: 100% !important;
  object-fit: cover !important;
  border-radius: 10px !important;
}
