/* Custom styles for MetaFuZe marketing site */

.mfz-lockup {
	width: min(4rem, 20vw);
	height: auto;
}

.mfz-hero-list {
	display: grid;
	gap: 1.5rem;
}

.mfz-hero {
	background: radial-gradient(circle at top left, rgba(168, 85, 247, 0.12), transparent 55%),
	            radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.12), transparent 45%),
	            rgba(17, 24, 39, 0.92);
	border: 1px solid rgba(168, 85, 247, 0.25);
	box-shadow: 0 25px 55px -25px rgba(59, 130, 246, 0.35);
}

.mfz-persona-card {
	display: block;
	padding: 1.25rem;
	border-radius: 1rem;
	border: 1px solid rgba(148, 163, 184, 0.2);
	background: rgba(12, 17, 27, 0.8);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.mfz-persona-card:hover {
	transform: translateY(-4px);
	border-color: rgba(168, 85, 247, 0.45);
}

.mfz-persona-label {
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(196, 181, 253, 1);
	margin-bottom: 0.75rem;
}

.mfz-persona-copy {
	font-size: 0.85rem;
	color: rgba(226, 232, 240, 0.85);
}

.mfz-offerings {
	background: rgba(13, 17, 29, 0.95);
	border: 1px solid rgba(79, 70, 229, 0.2);
	box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.05);
}

.mfz-pill {
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 9999px;
	padding: 0.4rem 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	background: rgba(31, 41, 55, 0.55);
	display: inline-flex;
	gap: 0.4rem;
	align-items: center;
	font-size: 0.65rem;
}

.mfz-pill::before {
	content: "";
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 9999px;
	background: linear-gradient(135deg, #22d3ee, #8b5cf6);
	box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

/* --- MetaFuze Theme System (System default + user override) --- */
:root {
  --mf-accent: 0, 194, 255;
  --mf-bg: #070b12;
  --mf-surface: #0b1220;
  --mf-surface-2: #0f1a2d;
  --mf-text: rgba(255, 255, 255, 0.92);
  --mf-text-muted: rgba(255, 255, 255, 0.68);
  --mf-border: rgba(255, 255, 255, 0.1);
  --mf-border-2: rgba(255, 255, 255, 0.16);
  --mf-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] {
  /* Use a deeper accent in light mode for contrast (links/buttons look washed out with the dark-mode cyan). */
  --mf-accent: 37, 99, 235;
  --mf-bg: #f6f7fb;
  --mf-surface: #ffffff;
  --mf-surface-2: #eef2ff;
  --mf-text: rgba(8, 12, 20, 0.92);
  --mf-text-muted: rgba(8, 12, 20, 0.62);
  --mf-border: rgba(8, 12, 20, 0.1);
  --mf-border-2: rgba(8, 12, 20, 0.16);
  --mf-shadow: 0 20px 70px rgba(10, 20, 40, 0.14);
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html,
body {
  background: var(--mf-bg);
  color: var(--mf-text);
}

/* Persistent compact footer bar (so the footer is visible even if the user doesn't scroll). */
#mfz-footer-fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(7, 11, 18, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: saturate(160%) blur(10px);
}
html[data-theme="light"] #mfz-footer-fixed {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(8, 12, 20, 0.12);
}
#mfz-footer-fixed .mfz-footer-fixed-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
}
html[data-theme="light"] #mfz-footer-fixed .mfz-footer-fixed-inner {
  color: rgba(8, 12, 20, 0.62);
}
#mfz-footer-fixed .mfz-footer-fixed-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
#mfz-footer-fixed a {
  color: inherit;
  text-decoration: none;
}
#mfz-footer-fixed a:hover {
  color: rgba(var(--mf-accent), 1);
}

#mfz-footer-fixed summary:hover {
  color: rgba(var(--mf-accent), 1);
}
body {
  padding-bottom: 64px;
}

@media (max-width: 640px) {
  #mfz-footer-fixed {
    position: static;
  }
  body {
    padding-bottom: 0;
  }
}

/* Override common Tailwind bg-black usage to keep a "whitepaper-like" surface contrast in dark mode too. */
html[data-theme="dark"] .bg-black {
  background-color: rgba(8, 12, 20, 0.78) !important;
}

a {
  color: rgba(var(--mf-accent), 0.9);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: rgba(var(--mf-accent), 1);
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid rgba(var(--mf-accent), 0.35);
  outline-offset: 2px;
  border-radius: 6px;
}

button:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(var(--mf-accent), 0.45);
  outline-offset: 2px;
  border-radius: 12px;
}

html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] summary:focus-visible,
html[data-theme="dark"] select:focus-visible {
  outline-color: rgba(var(--mf-accent), 0.6);
}

html[data-theme="light"] .bg-black {
  background-color: var(--mf-surface) !important;
}
html[data-theme="light"] .text-gray-400 {
  color: var(--mf-text-muted) !important;
}
html[data-theme="light"] .text-gray-200 {
  color: var(--mf-text) !important;
}
html[data-theme="light"] .text-gray-300 {
  color: rgba(8, 12, 20, 0.78) !important;
}
html[data-theme="light"] .text-gray-500 {
  color: rgba(8, 12, 20, 0.56) !important;
}
html[data-theme="light"] .text-gray-600 {
  color: rgba(8, 12, 20, 0.6) !important;
}
html[data-theme="light"] .border-purple-700\/20 {
  border-color: var(--mf-border) !important;
}
html[data-theme="light"] .border-gray-800,
html[data-theme="light"] .border-gray-700 {
  border-color: var(--mf-border) !important;
}
html[data-theme="light"] .text-purple-200 {
  color: rgba(var(--mf-accent), 0.88) !important;
}

html[data-theme="light"] .text-purple-300 {
  color: rgba(var(--mf-accent), 0.98) !important;
}

/* Light mode: improve header/nav contrast (Tailwind defaults skew low-contrast). */
html[data-theme="light"] header {
  background: rgba(246, 247, 251, 0.92) !important;
}

html[data-theme="light"] header nav {
  color: rgba(8, 12, 20, 0.72) !important;
}

html[data-theme="light"] header nav a,
html[data-theme="light"] header nav summary {
  color: rgba(8, 12, 20, 0.72) !important;
}

html[data-theme="light"] header nav a:hover,
html[data-theme="light"] header nav summary:hover {
  color: rgba(var(--mf-accent), 1) !important;
}

/* FuZeFACTORY step pills: in light mode, avoid dark bg + dark text (Tailwind overrides flip text colors). */
html[data-theme="light"] .bg-gray-800 {
  background-color: rgba(8, 12, 20, 0.06) !important;
}
html[data-theme="light"] .bg-purple-600\/30 {
  background-color: rgba(var(--mf-accent), 0.16) !important;
}
html[data-theme="light"] .text-purple-100 {
  color: rgba(8, 12, 20, 0.92) !important;
}

header {
  backdrop-filter: saturate(160%) blur(10px);
  position: relative;
}

/* --- Modern header (match fixed footer visual language) --- */
header.mfz-site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid var(--mf-border);
  background: rgba(5, 7, 12, 0.82);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] header.mfz-site-header {
  background: rgba(246, 247, 251, 0.88) !important;
}

header.mfz-site-header .mfz-header-inner {
  gap: 14px;
}

header.mfz-site-header nav a,
header.mfz-site-header nav summary {
  padding: 7px 10px;
  border-radius: 9999px;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

header.mfz-site-header nav a:hover,
header.mfz-site-header nav summary:hover {
  background: rgba(var(--mf-accent), 0.08);
}

header.mfz-site-header nav a.text-purple-300,
header.mfz-site-header nav a.mfz-active,
header.mfz-site-header nav summary.text-purple-300 {
  background: rgba(var(--mf-accent), 0.1);
}

.mfz-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mfz-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 9999px;
  border: 1px solid var(--mf-border);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.mfz-cta-btn:hover {
  transform: translateY(-1px);
}

.mfz-cta-primary {
  background: rgba(var(--mf-accent), 1);
  border-color: rgba(var(--mf-accent), 0.9);
  color: rgba(0, 0, 0, 0.92);
}

.mfz-cta-primary:hover {
  background: rgba(var(--mf-accent), 0.92);
}

.mfz-cta-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--mf-text);
}

html[data-theme="light"] .mfz-cta-secondary {
  background: rgba(8, 12, 20, 0.04);
}

/* --- Mobile header (hamburger nav) --- */
.mfz-header-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mfz-header-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mfz-mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--mf-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--mf-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html[data-theme="light"] .mfz-mobile-menu-toggle {
  background: var(--mf-surface-2);
}

.mfz-mobile-menu-toggle::after {
  content: "☰";
  font-size: 14px;
  line-height: 1;
  opacity: 0.9;
}

.mfz-mobile-menu {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(100% + 10px);
  z-index: 90;
  border-radius: 18px;
  border: 1px solid var(--mf-border);
  background: rgba(11, 18, 32, 0.96);
  box-shadow: var(--mf-shadow);
  padding: 10px;
  max-height: min(70vh, 520px);
  overflow: auto;
}

/* CTA stack in mobile nav dropdown */
.mfz-mobile-cta {
  display: grid;
  gap: 8px;
  padding: 6px 4px 10px 4px;
}

.mfz-mobile-cta .mfz-cta-btn {
  width: 100%;
}

html[data-theme="light"] .mfz-mobile-menu {
  background: rgba(255, 255, 255, 0.98);
}

.mfz-mobile-nav {
  display: grid;
  gap: 6px;
}

.mfz-mobile-link,
.mfz-mobile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--mf-text);
  text-decoration: none;
  font-size: 13px;
}

.mfz-mobile-link:hover,
.mfz-mobile-summary:hover {
  background: rgba(var(--mf-accent), 0.08);
  border-color: rgba(var(--mf-accent), 0.16);
}

.mfz-mobile-link.mfz-active {
  background: rgba(var(--mf-accent), 0.1);
  border-color: rgba(var(--mf-accent), 0.22);
  color: rgba(var(--mf-accent), 0.95);
  font-weight: 700;
}

.mfz-mobile-details {
  border-radius: 14px;
  border: 1px solid var(--mf-border);
  overflow: hidden;
}

.mfz-mobile-details summary {
  list-style: none;
  cursor: pointer;
}

.mfz-mobile-details summary::-webkit-details-marker {
  display: none;
}

.mfz-mobile-details summary.mfz-mobile-summary::after {
  content: "▾";
  font-size: 11px;
  opacity: 0.8;
  transition: transform 0.15s ease;
}

.mfz-mobile-details[open] summary.mfz-mobile-summary::after {
  transform: rotate(180deg);
}

.mfz-mobile-submenu {
  display: grid;
  gap: 6px;
  padding: 6px;
  border-top: 1px solid var(--mf-border);
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme="light"] .mfz-mobile-submenu {
  background: rgba(8, 12, 20, 0.03);
}

@media (max-width: 1023px) {
  /* Stop the "word-map" header wrap on mobile. */
  header nav:not(.mfz-mobile-nav) {
    display: none !important;
  }

  header .mf-theme {
    margin-left: 0 !important;
  }

  .mfz-tagline {
    display: none !important;
  }

  .mfz-mobile-menu-toggle {
    display: inline-flex;
  }

  /* Keep CTAs out of the cramped header row on mobile; they live in the dropdown. */
  .mfz-header-cta {
    display: none !important;
  }

  /* Theme toggle is icon-only across breakpoints. */
  #mf-theme-toggle-label {
    display: none;
  }

  /* Keep the mobile dropdown anchored to the left edge of the navbar. */
  .mfz-mobile-menu {
    left: 24px;
    right: auto;
    width: min(92vw, 360px);
  }
}

@media (min-width: 1024px) {
  .mfz-mobile-menu {
    display: none !important;
  }
}

/* Resources dropdown (header + fixed footer) */
.mfz-resources-dropdown {
  position: relative;
  display: inline-block;
}

.mfz-resources-dropdown summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mfz-resources-dropdown summary::-webkit-details-marker {
  display: none;
}

.mfz-resources-dropdown summary::after {
  content: "▾";
  display: inline-block;
  font-size: 10px;
  opacity: 0.8;
  transform-origin: 50% 50%;
  transition: transform 0.15s ease;
}

.mfz-resources-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.mfz-resources-menu {
  position: absolute;
  right: 0;
  min-width: 200px;
  border-radius: 16px;
  border: 1px solid var(--mf-border);
  background: var(--mf-surface);
  box-shadow: var(--mf-shadow);
  padding: 8px;
  z-index: 80;
}

html[data-theme="dark"] .mfz-resources-menu {
  background: rgba(11, 18, 32, 0.96);
}

header .mfz-resources-menu {
  top: calc(100% + 10px);
}

#mfz-footer-fixed .mfz-resources-menu {
  bottom: calc(100% + 10px);
}

.mfz-resources-menu a {
  display: block;
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--mf-text);
  font-size: 12px;
  text-decoration: none;
  border: 1px solid transparent;
}

.mfz-resources-menu a:hover {
  background: rgba(var(--mf-accent), 0.08);
  border-color: rgba(var(--mf-accent), 0.16);
  color: var(--mf-text);
}

.mfz-resources-menu a.mfz-active {
  background: rgba(var(--mf-accent), 0.1);
  border-color: rgba(var(--mf-accent), 0.22);
  color: rgba(var(--mf-accent), 0.95);
  font-weight: 600;
}

.mf-theme {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#mf-theme-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mf-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--mf-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--mf-text);
  font-size: 12px;
}

.mf-theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--mf-text);
}

html[data-theme="light"] .mf-theme-btn {
  background: var(--mf-surface-2);
}

.mf-theme-toggle-btn {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  z-index: 10;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

html[data-theme="light"] .mf-theme-toggle-btn {
  border-color: rgba(8, 12, 20, 0.16);
  background: rgba(8, 12, 20, 0.04);
}

.mf-theme-toggle-btn i {
  font-size: 1rem;
  line-height: 1;
}

/* Legacy inline SVG icons (removed by theme.js when possible). Keep hidden if present. */
.mf-theme-toggle-btn .mf-theme-icon {
  display: none !important;
}

.mf-theme-toggle-btn:hover {
  border-color: rgba(var(--mf-accent), 0.45);
  transform: translateY(-1px);
}

html[data-theme="light"] .mf-theme-toggle-btn:hover {
  border-color: rgba(var(--mf-accent), 0.45);
}

.mf-theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(var(--mf-accent), 0.85);
  box-shadow: 0 0 0 4px rgba(var(--mf-accent), 0.1);
}

.mf-theme-menu {
  position: absolute;
  right: 0;
  top: 44px;
  min-width: 180px;
  border-radius: 16px;
  border: 1px solid var(--mf-border);
  background: var(--mf-surface);
  box-shadow: var(--mf-shadow);
  padding: 8px;
  z-index: 50;
}

html[data-theme="dark"] .mf-theme-menu {
  background: rgba(11, 18, 32, 0.96);
}

.mf-theme-item {
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--mf-text);
  font-size: 12px;
  border: 1px solid transparent;
  background: transparent;
}

.mf-theme-item:hover {
  background: rgba(var(--mf-accent), 0.08);
  border-color: rgba(var(--mf-accent), 0.16);
}

html[data-theme="light"] .text-white {
  color: var(--mf-text) !important;
}
html[data-theme="light"] .text-gray-50,
html[data-theme="light"] .text-gray-100 {
  color: var(--mf-text) !important;
}

html[data-theme="light"] .bg-white\/5,
html[data-theme="light"] .bg-white\/10 {
  background-color: var(--mf-surface-2) !important;
}

html[data-theme="light"] .bg-black\/10,
html[data-theme="light"] .bg-black\/20,
html[data-theme="light"] .bg-black\/30,
html[data-theme="light"] .bg-black\/40 {
  background-color: var(--mf-surface-2) !important;
}

html[data-theme="light"] .bg-black\/50,
html[data-theme="light"] .bg-black\/60,
html[data-theme="light"] .bg-black\/70,
html[data-theme="light"] .bg-black\/80,
html[data-theme="light"] .bg-black\/90 {
  background-color: var(--mf-surface-2) !important;
}

html[data-theme="light"] .border-white\/10 {
  border-color: var(--mf-border) !important;
}
html[data-theme="light"] .border-white\/20 {
  border-color: var(--mf-border-2) !important;
}

html[data-theme="light"] .hover\:bg-white\/10:hover {
  background-color: rgba(8, 12, 20, 0.04) !important;
}
html[data-theme="light"] .hover\:bg-white\/5:hover {
  background-color: rgba(8, 12, 20, 0.03) !important;
}
html[data-theme="light"] .hover\:bg-purple-900\/40:hover {
  background-color: rgba(var(--mf-accent), 0.1) !important;
}

html[data-theme="light"] .mfz-hero {
  background: radial-gradient(circle at top left, rgba(var(--mf-accent), 0.1), transparent 55%),
    radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.1), transparent 45%),
    var(--mf-surface);
  border: 1px solid var(--mf-border);
}

html[data-theme="light"] .mfz-offerings {
  background: var(--mf-surface);
  border-color: var(--mf-border);
  box-shadow: var(--mf-shadow);
}

html[data-theme="light"] .mfz-persona-copy {
  color: rgba(8, 12, 20, 0.72) !important;
}

html[data-theme="light"] iframe {
  background: var(--mf-surface) !important;
}

/* Light-mode readability: Tailwind dark gradients make text unreadable once text colors flip to dark. */
html[data-theme="light"] .trial-tab,
html[data-theme="light"] .bg-gradient-to-br {
  background-image: none !important;
  background-color: var(--mf-surface) !important;
  box-shadow: var(--mf-shadow);
}

html[data-theme="light"] .trial-tab:hover,
html[data-theme="light"] .bg-gradient-to-br:hover {
  border-color: rgba(var(--mf-accent), 0.28) !important;
}

/* Theme-aware page background (matches whitepaper light/dark feel) */
.mfz-page-bg {
  opacity: 1;
  background:
    radial-gradient(circle at 12% 18%, rgba(168, 85, 247, 0.16), transparent 55%),
    radial-gradient(circle at 88% 82%, rgba(var(--mf-accent), 0.14), transparent 50%),
    linear-gradient(135deg, #05070d, #05070d 45%, #1a0b2e);
}

html[data-theme="light"] .mfz-page-bg {
  background:
    radial-gradient(circle at 12% 18%, rgba(168, 85, 247, 0.16), transparent 55%),
    radial-gradient(circle at 88% 82%, rgba(var(--mf-accent), 0.12), transparent 50%),
    linear-gradient(135deg, #ffffff, #f6f7fb 55%, #eef2ff);
}
