/**
 * Index page layout: top menu (dashboard-style) + footer (dashboard-style).
 * Uses same theme vars as index-landing.css; no dependency on dashboard CSS.
 */

/* Remove focus outline/border on all index links and buttons */
.index-wrap a:focus,
.index-wrap a:active,
.index-wrap a:focus-visible,
.index-wrap button:focus,
.index-wrap button:active,
.index-wrap button:focus-visible {
  outline: none !important;
  outline-width: 0 !important;
  box-shadow: none !important;
}

/* ----- Index header (top menu) ----- */
.index-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(12, 12, 15, 0.85);
  border-bottom: 1px solid var(--stroke);
}

.index-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Logo + page badge grouped so badge sits directly next to logo */
.index-header-brand {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.index-header-brand .index-logo {
  margin-right: 0;
}

.index-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.index-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Page badge next to logo (when not home) */
.index-page-badge {
  margin-left: 12px;
  flex-shrink: 0;
}

/* Fallback badge pill style when style-main not loaded (e.g. pricing/docs only) */
.index-header-inner .index-page-badge .breadcrumb-item.current {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 12px;
  color: rgba(0, 212, 255, 0.95);
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.28);
}

/* Logo text gradient (match dashboard) */
.index-logo span {
  font-size: 1.28rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary) 0%, rgba(0, 212, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.index-top-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.index-top-nav > a {
  position: relative;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  border-radius: 10px;
  transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, letter-spacing 0.22s ease;
}

.index-top-nav > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #a78bfa, #22d3ee);
  transform: translateX(-50%);
  transition: width 0.25s ease;
  opacity: 0.9;
}

.index-top-nav > a:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  letter-spacing: 0.07em;
}

.index-top-nav > a:hover::after {
  width: calc(100% - 28px);
}

.index-top-nav > a.active {
  color: #fff;
  background: linear-gradient(
    145deg,
    rgba(139, 92, 246, 0.18) 0%,
    rgba(59, 130, 246, 0.08) 100%
  );
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.22) inset,
    0 0 24px -8px rgba(139, 92, 246, 0.35);
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.25);
}

.index-top-nav > a.active::after {
  width: calc(100% - 28px);
}

.index-top-nav-dropdown.active > .index-nav-trigger {
  color: #fff;
  background: linear-gradient(
    145deg,
    rgba(139, 92, 246, 0.18) 0%,
    rgba(59, 130, 246, 0.08) 100%
  );
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.22) inset,
    0 0 24px -8px rgba(139, 92, 246, 0.35);
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.25);
}

.index-top-nav-dropdown.active > .index-nav-trigger:hover,
.index-top-nav-dropdown.active.open > .index-nav-trigger {
  color: #fff;
  background: linear-gradient(
    145deg,
    rgba(139, 92, 246, 0.22) 0%,
    rgba(59, 130, 246, 0.12) 100%
  );
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.3) inset,
    0 0 28px -6px rgba(139, 92, 246, 0.42);
  letter-spacing: 0.07em;
}

.index-top-nav-dropdown {
  position: relative;
}

.index-top-nav-dropdown .index-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  background: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, letter-spacing 0.22s ease;
}

.index-top-nav-dropdown .index-nav-trigger:hover,
.index-top-nav-dropdown.open .index-nav-trigger {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  letter-spacing: 0.07em;
}

.index-top-nav-dropdown .index-nav-trigger i {
  font-size: 9px;
  opacity: 0.65;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.index-top-nav-dropdown.open .index-nav-trigger i {
  transform: rotate(180deg);
  opacity: 0.95;
}

.index-top-nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 216px;
  margin-top: 6px;
  padding: 6px;
  background: rgba(16, 16, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  list-style: none;
  margin: 0;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.08) inset,
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(91, 33, 182, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 100;
}

.index-top-nav-dropdown.open .index-top-nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.index-top-nav-submenu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-radius: 10px;
  background: transparent;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.index-top-nav-submenu li a i {
  width: 1.1em;
  text-align: center;
  font-size: 14px;
  color: rgba(167, 139, 250, 0.85);
  transition: color 0.18s ease, transform 0.18s ease;
}

.index-top-nav-submenu li a:hover {
  color: #fff;
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0.16) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  transform: translateX(2px);
}

.index-top-nav-submenu li a:hover i {
  color: #c4b5fd;
  transform: scale(1.06);
}

.index-top-nav-submenu li a.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0.24) 0%,
    rgba(255, 255, 255, 0.06) 100%
  );
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.2) inset;
}

.index-top-nav-submenu li a.active i {
  color: #ddd6fe;
}

.index-top-nav-submenu li a.active:hover {
  color: #fff;
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0.3) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
  transform: translateX(2px);
}

.index-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.index-user-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.index-user-actions .btn:hover {
  transform: translateY(-1px);
}

.index-user-actions .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}

.index-user-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}

.index-user-actions .btn-primary {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25), 0 0 40px rgba(59, 130, 246, 0.2);
}

.index-user-actions .btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #6d28d9);
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.3), 0 0 48px rgba(59, 130, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
}

/* Register + Dashboard (header & mobile) — soft purple, beats index-landing .index-wrap .btn-primary */
.index-wrap .index-user-actions .index-header-primary-cta.btn-primary,
.index-wrap .index-mobile-drawer .index-header-primary-cta.btn-primary {
  border: 1px solid rgba(124, 58, 237, 0.28);
  background: linear-gradient(180deg, #6d28d9 0%, #5b21b6 48%, #4c1d95 100%);
  color: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.index-wrap .index-user-actions .index-header-primary-cta.btn-primary:hover,
.index-wrap .index-mobile-drawer .index-header-primary-cta.btn-primary:hover {
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 52%, #5b21b6 100%);
  border-color: rgba(167, 139, 250, 0.38);
  color: #fff;
  box-shadow:
    0 3px 14px rgba(0, 0, 0, 0.32),
    0 0 24px rgba(91, 33, 182, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.index-wrap .index-user-actions a.btn-primary.index-studio-cta,
.index-wrap .index-mobile-drawer a.btn-primary.index-studio-cta {
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid rgba(109, 40, 217, 0.45);
  color: rgba(245, 243, 255, 0.96);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  background: linear-gradient(180deg, #1c1a22 0%, #131118 42%, #0c0b0f 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 10px 28px -6px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 20px -4px rgba(91, 33, 182, 0.25);
  transition: transform 0.2s ease, box-shadow 0.24s ease, border-color 0.2s ease, background 0.24s ease;
  flex-shrink: 0;
}

.index-wrap .index-user-actions a.btn-primary.index-studio-cta::before,
.index-wrap .index-mobile-drawer a.btn-primary.index-studio-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    125deg,
    transparent 0%,
    transparent 42%,
    rgba(167, 139, 250, 0.07) 50%,
    transparent 58%
  );
  pointer-events: none;
  z-index: 1;
}

.index-wrap .index-user-actions a.btn-primary.index-studio-cta > *,
.index-wrap .index-mobile-drawer a.btn-primary.index-studio-cta > * {
  position: relative;
  z-index: 2;
}

.index-wrap .index-user-actions a.btn-primary.index-studio-cta:hover,
.index-wrap .index-mobile-drawer a.btn-primary.index-studio-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 92, 246, 0.65);
  background: linear-gradient(180deg, #24222c 0%, #18161d 45%, #100f14 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.09) inset,
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 12px 32px -6px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 28px -2px rgba(109, 40, 217, 0.35);
}

.index-wrap .index-mobile-drawer-inner > a.index-studio-cta:not(.btn) {
  color: rgba(235, 232, 255, 0.92);
  font-weight: 600;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(28, 26, 34, 0.95) 0%, rgba(15, 14, 18, 0.98) 100%);
  border: 1px solid rgba(109, 40, 217, 0.4);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 6px 20px -4px rgba(0, 0, 0, 0.45);
}

.index-wrap .index-mobile-drawer-inner > a.index-studio-cta:not(.btn):hover {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.55);
  background: linear-gradient(180deg, rgba(36, 34, 44, 0.98) 0%, rgba(18, 16, 22, 1) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 8px 24px -4px rgba(0, 0, 0, 0.5),
    0 0 20px -4px rgba(91, 33, 182, 0.2);
}

/* Mobile menu toggle */
.index-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
}

.index-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Mobile nav drawer */
.index-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg1);
  border-right: 1px solid var(--stroke);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.index-mobile-drawer.open {
  transform: translateX(0);
}

.index-mobile-drawer-inner {
  padding: 24px 16px;
}

.index-mobile-drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
}

.index-mobile-drawer .index-mobile-cta {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

.index-mobile-drawer a:hover,
.index-mobile-drawer a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.index-mobile-drawer .index-mobile-group {
  margin-top: 8px;
}

.index-mobile-drawer .index-mobile-group-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.index-mobile-drawer .index-mobile-group-trigger:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.index-mobile-drawer .index-mobile-sublinks {
  display: none;
  padding-left: 16px;
  margin-bottom: 8px;
}

.index-mobile-drawer .index-mobile-sublinks.open {
  display: block;
}

.index-mobile-drawer .index-mobile-sublinks a {
  padding: 10px 14px;
  font-size: 14px;
}

.index-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.index-mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1024px) {
  .index-top-nav {
    display: none;
  }
  .index-user-actions {
    display: none;
  }
  .index-mobile-toggle {
    display: flex;
  }
}

@media (min-width: 1025px) {
  .index-mobile-drawer,
  .index-mobile-overlay {
    display: none !important;
  }
}

/* ----- Index main content (included pages) ----- */
.index-main {
  flex: 1;
  overflow-x: clip;
}

.index-main-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

/* ----- Index footer (dashboard-style content) ----- */
.index-footer {
  border-top: 1px solid var(--stroke);
  background: var(--bg1);
  padding: 48px 24px 32px;
}

.index-footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.index-footer-content {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.index-footer-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-strong);
  margin: 0 0 16px;
}

.index-footer-section p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.index-footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.index-footer-section ul li {
  margin-bottom: 8px;
}

.index-footer-section ul li a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.index-footer-section ul li a:hover {
  color: var(--text);
}

.index-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.index-footer-logo span {
  background: linear-gradient(135deg, var(--text-primary) 0%, rgba(0, 212, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.index-footer-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.index-footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.index-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.index-footer-social a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.index-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
  text-align: center;
}

.index-footer-bottom p {
  font-size: 13px;
  color: var(--muted-strong);
  margin: 0 0 8px;
}

.index-footer-bottom .index-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-top: 12px;
}

.index-footer-bottom .index-footer-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.index-footer-bottom .index-footer-links a:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .index-footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .index-footer-logo {
    justify-content: center;
  }
  .index-footer-social {
    justify-content: center;
  }
}
