/* Studio M - V3 Billion Dollar Design System */
:root {
  /* Colors */
  --bg-color: #050505;
  --bg-secondary: #0a0a0a;
  --text-main: #ffffff;
  --text-muted: #888888;

  /* Neon Accents - Refined */
  --neon-purple: #b026ff;
  --neon-blue: #4d4dff;
  --neon-cyan: #00f3ff;
  --gradient-main: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));

  /* Glassmorphism - Premium */
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-glow: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(30px);

  /* Typography */
  --font-main: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Spacing */
  --container-width: 1400px;
  --header-height: 100px;

  /* Easing */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
  /* Fix header overlap globally */
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(3rem, 8vw, 8rem);
  background: linear-gradient(to bottom right, #fff 30%, #666);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 2rem;
}

p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

/* Layout */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

section {
  padding: 120px 0;
  position: relative;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: rgba(5, 5, 5, 0.8);
  /* Always semi-transparent */
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.nav-links a:hover {
  opacity: 1;
}

/* Magnetic Button (Simplified) */
.btn-magnetic {
  display: inline-block;
  padding: 16px 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  background: transparent;
  color: white;
}

.btn-magnetic:hover {
  background: white;
  color: black;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero-v2 {
  min-height: 90vh;
  /* Adjusted for header */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: -100px;
  /* Pull back up behind header if needed, but body padding handles it mostly. Let's keep it clean. */
  padding-top: 100px;
}

.hero-bg-glow {
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--neon-purple) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(100px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulseGlow 10s infinite alternate;
  z-index: -1;
}

@keyframes pulseGlow {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.2;
  }
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: repeat(2, minmax(300px, auto));
  gap: 20px;
  margin-top: 4rem;
}

.bento-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.bento-item:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Bento Spans */
.bento-span-2 {
  grid-column: span 2;
}

.bento-span-row-2 {
  grid-row: span 2;
}

.bento-item h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  z-index: 2;
}

.bento-item p {
  font-size: 1rem;
  z-index: 2;
  max-width: 80%;
}

.bento-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.3;
  transition: opacity 0.5s;
}

.bento-item:hover .bento-bg {
  opacity: 0.5;
}

/* Marquee */
.marquee-container {
  width: 100%;
  overflow: hidden;
  padding: 60px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
  position: relative;
}

.marquee-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
}

.marquee-item {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
  margin: 0 40px;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Footer */
.footer-v2 {
  padding: 100px 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-big-text {
  font-family: var(--font-display);
  font-size: 15vw;
  line-height: 0.8;
  opacity: 0.1;
  user-select: none;
  pointer-events: none;
}

/* Utilities */
.reveal-text {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s var(--ease-out-expo);
}

.reveal-text.active {
  opacity: 1;
  transform: translateY(0);
}

/* Legal Content Fix */
.legal-content {
  padding-top: 60px;
  /* Additional padding on top of body padding */
  max-width: 800px;
}

/* Mobile */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .bento-span-2,
  .bento-span-row-2 {
    grid-column: span 1;
    grid-row: span 1;
  }
}

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

  .nav-links {
    display: none;
  }
}

/* Workflow Visual Styles */
.flow-node {
  position: absolute;
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: translate(0, 0);
  /* Reset default flow */
}

.node-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: #000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
  transition: transform 0.3s ease;
}

.flow-node:hover .node-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 38, 168, 0.4);
}

.node-label {
  font-size: 0.7rem;
  color: #aaa;
  font-family: monospace;
}

@media (max-width: 768px) {
  .bento-item .workflow-visual {
    margin-top: 2rem;
    width: 100%;
  }

  .bento-item[class*="bento-span-2"]>div {
    flex-direction: column;
    gap: 1rem;
  }

  .bento-item[class*="bento-span-2"] p {
    max-width: 100%;
  }
}