/* ============================================================
   PODMOD SHARED COMPONENTS
   Navbar, footer, buttons, cards, FAQ accordion, video modal,
   and other reusable UI pieces. Depends on design-system.css.
   ============================================================ */

/* ===========================================
   NAVBAR — Frosted glass, scroll-reactive
   =========================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-height);
  background: rgba(6, 6, 11, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition:
    background var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out);
}

/* Scroll state — JS toggles data-scrolled="true" */
.navbar[data-scrolled="true"] {
  background: rgba(6, 6, 11, 0.92);
  border-bottom-color: var(--border-subtle);
}

.navbar__container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.navbar__logo img {
  height: 32px;
  width: auto;
}

/* Desktop navigation links — centered */
.navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width var(--duration-normal) var(--ease-out);
}

.navbar__link:hover,
.navbar__link--active {
  color: var(--text-primary);
}

.navbar__link:hover::after,
.navbar__link--active::after {
  width: 100%;
}

/* Right-side actions */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Hamburger toggle — mobile only */
.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
}

.navbar__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition:
    transform var(--duration-normal) var(--ease-out),
    opacity var(--duration-fast);
}

/* X state when drawer is open */
.navbar__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.navbar__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay */
.navbar__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.navbar__overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile drawer */
.navbar__drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  z-index: 999;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-subtle);
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.navbar__drawer.is-open {
  transform: translateX(0);
}

.navbar__drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar__drawer-logo img {
  height: 28px;
  width: auto;
}

.navbar__drawer-close {
  color: var(--text-secondary);
  padding: var(--space-xs);
  transition: color var(--duration-fast);
}

.navbar__drawer-close:hover {
  color: var(--text-primary);
}

.navbar__drawer-close svg {
  width: 24px;
  height: 24px;
}

.navbar__drawer-nav {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  gap: var(--space-xs);
  flex: 1;
}

.navbar__drawer-link {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--duration-fast);
}

.navbar__drawer-link:hover,
.navbar__drawer-link--active {
  color: var(--text-primary);
}

.navbar__drawer-cta {
  padding: var(--space-lg);
  margin-top: auto;
}

/* ----- Mobile breakpoint ----- */
@media (max-width: 768px) {
  .navbar__nav,
  .navbar__actions {
    display: none;
  }

  .navbar__toggle {
    display: flex;
  }
}


/* ===========================================
   BUTTONS
   =========================================== */

/* Primary CTA — solid brand purple */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 14px 28px;
  border-radius: var(--border-radius-full);
  transition:
    background var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn--primary {
  background: var(--brand);
  color: var(--text-on-brand);
  box-shadow: 0 0 0 rgba(91, 58, 255, 0);
}

.btn--primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 0 30px var(--brand-glow);
  transform: translateY(-1px);
}

/* Shine sweep on hover */
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: translateX(-100%) skewX(-15deg);
}

.btn--primary:hover::after {
  animation: shineSweep 0.6s var(--ease-out);
}

/* Secondary / ghost CTA */
.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn--secondary:hover {
  border-color: var(--brand);
  background: var(--brand-subtle);
  box-shadow: 0 0 20px rgba(91, 58, 255, 0.1);
  transform: translateY(-1px);
}

/* Small variant */
.btn--sm {
  font-size: var(--text-xs);
  padding: 10px 20px;
}

/* Large variant */
.btn--lg {
  font-size: var(--text-base);
  padding: 18px 36px;
}

/* Full width (mobile) */
.btn--full {
  width: 100%;
}

/* Navbar CTA (compact) */
.navbar__cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  padding: 10px 22px;
  border-radius: var(--border-radius-full);
  background: var(--brand);
  color: var(--text-on-brand);
  transition:
    background var(--duration-fast),
    box-shadow var(--duration-normal);
  white-space: nowrap;
}

.navbar__cta:hover {
  background: var(--brand-hover);
  box-shadow: 0 0 20px var(--brand-glow);
}

.navbar__cta--full {
  width: 100%;
  justify-content: center;
  padding: 14px 28px;
  font-size: var(--text-sm);
}

/* Button icon arrow */
.btn__icon {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn:hover .btn__icon {
  transform: translateX(3px);
}


/* ===========================================
   CARDS
   =========================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-md);
  padding: var(--space-xl);
  transition:
    background var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-brand);
  box-shadow: var(--glow-brand);
  transform: translateY(-4px);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  background: var(--brand-subtle);
  color: var(--brand-light);
  margin-bottom: var(--space-lg);
  font-size: 1.25rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Card with image */
.card--media {
  padding: 0;
  overflow: hidden;
}

.card--media .card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
}

.card--media .card__body {
  padding: var(--space-lg);
}


/* ===========================================
   FAQ ACCORDION
   =========================================== */

.faq-list {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition:
    border-color var(--duration-normal) var(--ease-out),
    background var(--duration-normal) var(--ease-out);
}

.faq-item.is-active {
  border-color: var(--border-brand);
  border-left: 3px solid var(--brand);
  background: var(--bg-card-hover);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: color var(--duration-fast);
}

.faq-question:hover {
  color: var(--brand-light);
}

.faq-question__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--duration-normal) var(--ease-out);
}

.faq-item.is-active .faq-question__icon {
  transform: rotate(180deg);
  color: var(--brand);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.faq-answer__inner {
  padding: 0 var(--space-xl) var(--space-lg);
}

.faq-answer__inner p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ===========================================
   VIDEO MODAL
   =========================================== */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

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

.video-modal__container {
  position: relative;
  width: 90vw;
  max-width: 960px;
}

.video-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  color: var(--text-secondary);
  padding: var(--space-sm);
  transition: color var(--duration-fast);
}

.video-modal__close:hover {
  color: var(--text-primary);
}

.video-modal__close svg {
  width: 28px;
  height: 28px;
}

.video-modal__wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: var(--glow-brand-strong);
}

.video-modal__wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Prevent body scrolling when modal is open */
body.modal-open {
  overflow: hidden;
}


/* ===========================================
   FOOTER
   =========================================== */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer__logo img {
  height: 36px;
  width: auto;
}

.footer__socials {
  display: flex;
  gap: var(--space-sm);
}

.footer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  transition:
    color var(--duration-fast),
    background var(--duration-fast);
}

.footer__social-link:hover {
  color: var(--brand-light);
  background: var(--brand-subtle);
}

.footer__email {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--duration-fast);
}

.footer__email:hover {
  color: var(--brand-light);
}

.footer__col-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.footer__link {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--brand-light);
}

.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__socials {
    justify-content: center;
  }
}
