/* ============================================================
   OBSIDIAN LUXE — Layout
   Header, Footer, Navigation, Responsive
   ============================================================ */

/* ── Header ──────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  padding: var(--space-lg) 0;
  background: transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: padding var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  will-change: padding, background, border-color, box-shadow;
}

.header.is-scrolled {
  background: var(--glass-bg-solid);
  padding: var(--space-sm) 0;
  border-bottom-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.header__logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-violet);
  border-radius: var(--radius-md);
  box-shadow: 0 0 16px var(--accent-violet-glow);
  position: relative;
}

.header__logo-icon svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2;
}

.header__logo-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: var(--fw-bold);
  color: var(--text-white);
  letter-spacing: var(--ls-tight);
}

.header__logo-text span {
  color: var(--accent-violet-light);
}

.header__logo-group,
.footer__logo-group {
  display: flex;
  flex-direction: column;
  line-height: 1.0;
}

.header__logo-subtext,
.footer__logo-subtext {
  font-size: 9px;
  color: var(--accent-cyan-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: var(--fw-semibold);
  margin-top: 2px;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav__link {
  padding: 8px 16px;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  position: relative;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text-white);
}

.nav__link.is-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gradient-violet);
  box-shadow: 0 0 8px var(--accent-violet-glow);
  border-radius: var(--radius-full);
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__dropdown-trigger svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  transition: transform var(--duration-fast);
}

.nav__dropdown:hover .nav__dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  background: var(--secondary-dark);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  pointer-events: none;
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.nav__dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--fs-small);
  transition: var(--transition-fast);
}

.nav__dropdown-item:hover {
  background: rgba(124, 58, 237, 0.14);
  color: #ffffff;
}

.nav__dropdown-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-dim);
  stroke-width: 1.5;
  flex-shrink: 0;
  transition: stroke var(--duration-fast);
}

.nav__dropdown-item:hover svg {
  stroke: var(--accent-violet-light);
}

/* Header CTA */
.header__cta {
  flex-shrink: 0;
}

/* Mobile Toggle */
.header__toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--accent-violet-light);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  flex-shrink: 0;
  padding: 8px;
  transition: var(--transition-base);
  touch-action: manipulation;
  z-index: 10;
}

.header__toggle:hover,
.header__toggle:active {
  background: rgba(124, 58, 237, 0.25);
  border-color: var(--accent-violet);
}

.header__toggle svg,
.header__toggle svg * {
  width: 22px;
  height: 22px;
  stroke: var(--accent-violet-light);
  stroke-width: 2.2;
  pointer-events: none;
}

.header__toggle svg line {
  stroke: var(--accent-violet-light);
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(9, 13, 26, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-lg) var(--space-2xl);
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-out);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.mobile-menu__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--accent-violet-light);
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.mobile-menu__close:hover,
.mobile-menu__close:active {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--accent-violet);
}

.mobile-menu__close svg,
.mobile-menu__close svg * {
  width: 22px;
  height: 22px;
  stroke: var(--accent-violet-light);
  stroke-width: 2.5;
  pointer-events: none;
}

.mobile-menu .container {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-xl);
}

.mobile-menu__link {
  padding: 14px 4px;
  font-size: 1.15rem;
  font-weight: var(--fw-medium);
  color: var(--text-light);
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu__link:hover,
.mobile-menu__link:active {
  color: var(--accent-violet-light);
  padding-left: 8px;
}

.mobile-menu__cta {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--secondary-dark);
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.footer__top {
  padding: var(--space-5xl) 0 var(--space-3xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-3xl);
}

.footer__brand {
  max-width: 300px;
}

.footer__brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.footer__brand-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-violet);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 14px var(--accent-violet-glow);
}

.footer__brand-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  stroke-width: 2;
}

.footer__brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  color: var(--text-white);
}

.footer__brand-name span {
  color: var(--accent-violet-light);
}

.footer__brand-desc {
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-xl);
}

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

.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: var(--transition-base);
}

.footer__social-link:hover {
  border-color: var(--accent-violet);
  color: #ffffff;
  background: rgba(124, 58, 237, 0.18);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.25);
  transform: translateY(-2px);
}

.footer__social-link svg {
  width: 18px;
  height: 18px;
}

/* Footer Column */
.footer__col-title {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--text-white);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent-violet);
  display: inline-block;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__link {
  color: var(--text-muted);
  font-size: var(--fs-small);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer__link:hover {
  color: var(--accent-violet-light);
  padding-left: 4px;
}

/* Footer Newsletter */
.footer__newsletter {
  margin-top: var(--space-lg);
}

.footer__newsletter-form {
  display: flex;
  gap: var(--space-xs);
}

.footer__newsletter-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--tertiary-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-white);
  font-size: var(--fs-small);
}

.footer__newsletter-input:focus {
  outline: none;
  border-color: var(--accent-violet);
  box-shadow: 0 0 10px var(--accent-violet-glow);
}

.footer__newsletter-btn {
  padding: 10px 18px;
  background: var(--gradient-violet);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  cursor: pointer;
  transition: var(--transition-base);
}

.footer__newsletter-btn:hover {
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

/* Footer Bottom */
.footer__bottom {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copy {
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.footer__legal {
  display: flex;
  gap: var(--space-lg);
}

.footer__legal a {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  transition: color var(--duration-fast);
}

.footer__legal a:hover {
  color: var(--accent-violet-light);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-solid);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--accent-violet-light);
  cursor: pointer;
  z-index: var(--z-sticky);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-base);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gradient-violet);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 18px var(--accent-violet-glow);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ── Hero Shared ─────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 100px;
  padding-bottom: var(--space-3xl);
  box-sizing: border-box;
}

.hero--sm,
.hero--inner {
  min-height: auto;
  padding-top: 140px;
  padding-bottom: var(--space-3xl);
  display: block;
  overflow: hidden;
}

.hero--luxe {
  min-height: auto;
  padding-top: 150px;
  padding-bottom: var(--space-4xl);
  display: block;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-behind);
}

.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

.hero__bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--primary-dark), transparent);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav,
  .header__cta {
    display: none !important;
  }

  .header__toggle {
    display: flex !important;
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero,
  .hero--home,
  .hero--luxe,
  .hero--inner,
  .hero--sm {
    min-height: auto !important;
    height: auto !important;
    display: block !important;
    padding-top: 110px !important;
    padding-bottom: var(--space-3xl) !important;
    overflow: visible !important;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 12px 0;
  }

  .header.is-scrolled {
    padding: 10px 0;
  }

  .header__inner {
    gap: var(--space-sm);
  }

  .header__logo {
    min-width: 0;
    flex-shrink: 1;
    gap: 8px;
  }

  .header__logo-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .header__logo-icon svg {
    width: 18px;
    height: 18px;
  }

  .header__logo-text {
    font-size: clamp(1rem, 4vw, 1.25rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header__logo-subtext {
    font-size: 7.5px;
    letter-spacing: 0.5px;
  }

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

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

  .hero,
  .hero--home,
  .hero--luxe,
  .hero--inner,
  .hero--sm {
    min-height: auto !important;
    height: auto !important;
    display: block !important;
    padding-top: 95px !important;
    padding-bottom: var(--space-2xl) !important;
    overflow: visible !important;
  }
}

@media (max-width: 480px) {
  .header__logo-text {
    font-size: 0.95rem;
  }

  .header__toggle {
    width: 38px;
    height: 38px;
    padding: 6px;
  }

  .header__toggle svg {
    width: 20px;
    height: 20px;
  }

  .hero,
  .hero--home,
  .hero--luxe,
  .hero--inner,
  .hero--sm {
    padding-top: 85px !important;
    padding-bottom: var(--space-xl) !important;
  }

  .footer__newsletter-form {
    flex-direction: column;
  }

  .footer__brand {
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .header__logo-subtext {
    display: none;
  }

  .header__logo-text {
    font-size: 0.85rem;
  }
}
